likec4 1.56.0 → 1.57.0
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/__app__/chunks/AIChat2.mjs +2 -0
- package/__app__/chunks/DiagramActorProvider.mjs +4 -4
- package/__app__/chunks/EmbedPage.mjs +1 -0
- package/__app__/chunks/ExportPage.mjs +2 -0
- package/__app__/chunks/LikeC4Diagram.mjs +5 -5
- package/__app__/chunks/LikeC4Styles.mjs +11 -11
- package/__app__/chunks/Markdown.mjs +1 -0
- package/__app__/chunks/NavigationPanel.mjs +1 -1
- package/__app__/chunks/ViewReact.mjs +1 -1
- package/__app__/chunks/adhoc-editor.mjs +1 -1
- package/__app__/chunks/aichat.mjs +1 -0
- package/__app__/chunks/box.mjs +1 -0
- package/__app__/chunks/create-style-context.mjs +1 -0
- package/__app__/chunks/css.mjs +1 -0
- package/__app__/chunks/factory.mjs +1 -0
- package/__app__/chunks/hooks.mjs +1 -1
- package/__app__/chunks/hstack.mjs +1 -0
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +1 -1
- package/__app__/chunks/libs/@floating-ui/core.mjs +1 -1
- package/__app__/chunks/libs/@floating-ui/dom.mjs +1 -1
- package/__app__/chunks/libs/@floating-ui/react.mjs +1 -1
- package/__app__/chunks/libs/@mantine/core.mjs +24 -24
- package/__app__/chunks/libs/@mantine/hooks.mjs +1 -1
- package/__app__/chunks/libs/@nanostores/react.mjs +1 -1
- package/__app__/chunks/libs/@react-hookz/web.mjs +1 -1
- package/__app__/chunks/libs/@tabler/icons-react.mjs +347 -4
- package/__app__/chunks/libs/@tanstack/ai-client.mjs +2 -0
- package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/ai-react.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/ai.mjs +2 -0
- package/__app__/chunks/libs/@tanstack/history.mjs +1 -1
- package/__app__/chunks/libs/@tanstack/react-router.mjs +3 -3
- package/__app__/chunks/libs/@tanstack/router-core.mjs +1 -1
- package/__app__/chunks/libs/@xstate/react.mjs +1 -1
- package/__app__/chunks/libs/@xstate/store.mjs +1 -1
- package/__app__/chunks/libs/@xyflow/react.mjs +3 -3
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +1 -1
- package/__app__/chunks/libs/@zag-js/collection.mjs +1 -1
- package/__app__/chunks/libs/@zag-js/core.mjs +1 -1
- package/__app__/chunks/libs/@zag-js/react.mjs +1 -1
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +1 -1
- package/__app__/chunks/libs/bezier-js.mjs +1 -1
- package/__app__/chunks/libs/copy-anything.mjs +1 -0
- package/__app__/chunks/libs/d3-path.mjs +1 -1
- package/__app__/chunks/libs/d3-shape.mjs +1 -1
- package/__app__/chunks/libs/fast-equals.mjs +1 -1
- package/__app__/chunks/libs/framer-motion.mjs +3 -3
- package/__app__/chunks/libs/html-to-image.mjs +2 -2
- package/__app__/chunks/libs/motion-dom.mjs +1 -1
- package/__app__/chunks/libs/nanostores.mjs +1 -1
- package/__app__/chunks/libs/react-error-boundary.mjs +1 -1
- package/__app__/chunks/libs/react-resizable-panels.mjs +1 -1
- package/__app__/chunks/libs/remeda.mjs +1 -1
- package/__app__/chunks/libs/superjson.mjs +1 -0
- package/__app__/chunks/libs/zod.mjs +39 -14
- package/__app__/chunks/rolldown-runtime.mjs +1 -1
- package/__app__/chunks/styles.css.mjs +1 -1
- package/__app__/chunks/txt.mjs +1 -0
- package/__app__/chunks/useLikeC4Project.mjs +1 -1
- package/__app__/codegen/webcomponent.mjs +221 -69
- package/__app__/src/aichat/index.mjs +1 -0
- package/__app__/src/main.mjs +45 -1
- package/__app__/src/pages/AdHocViewEditor.mjs +1 -1
- package/__app__/src/pages/EmbedPage.mjs +1 -1
- package/__app__/src/pages/ExportPage.mjs +1 -1
- package/__app__/src/pages/ProjectsOverview.mjs +1 -1
- package/__app__/src/pages/ViewAsD2.mjs +1 -1
- package/__app__/src/pages/ViewAsDot.mjs +1 -1
- package/__app__/src/pages/ViewAsMmd.mjs +1 -1
- package/__app__/src/pages/ViewAsPuml.mjs +1 -1
- package/__app__/src/pages/ViewEditor.mjs +1 -1
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -41
- package/dist/chunks/enableServer.mjs +1 -0
- package/dist/chunks/index2.d.mts +569 -377
- package/dist/chunks/libs/@hono/mcp.mjs +33 -8
- package/dist/chunks/libs/@hono/node-server.mjs +1 -1
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +7 -7
- package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +9 -0
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
- package/dist/chunks/libs/ajv.mjs +1 -1
- package/dist/chunks/libs/ansi-styles.mjs +1 -1
- package/dist/chunks/libs/boxen.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +2 -2
- package/dist/chunks/libs/conf.mjs +1 -1
- package/dist/chunks/libs/langium.d.mts +5 -5
- package/dist/chunks/libs/langium.mjs +10 -10
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +3 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ts-graphviz.mjs +1 -4
- package/dist/chunks/libs/unctx.mjs +1 -0
- package/dist/chunks/libs/vscode-languageserver.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +60 -25
- package/dist/chunks/node.mjs +62 -45
- package/dist/chunks/plugin.mjs +234 -41
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/cli/index.mjs +142 -139
- package/dist/index.d.mts +1 -130
- package/dist/model/index.d.mts +1 -1
- package/dist/vite-plugin/index.d.mts +53 -2
- package/dist/vite-plugin/internal/index.d.mts +331 -3
- package/dist/vite-plugin/internal/index.mjs +1 -1
- package/package.json +65 -51
- package/react/index.d.mts +82 -50
- package/react/index.mjs +34017 -32421
- package/vite-plugin-modules.d.ts +4 -0
- package/__app__/chunks/ColorSchemeToggle.mjs +0 -1
- package/__app__/chunks/Fallback.mjs +0 -1
- package/__app__/chunks/Header.mjs +0 -13
- package/__app__/chunks/IconRenderer.mjs +0 -1
- package/__app__/chunks/LikeC4ModelContext.mjs +0 -1
- package/__app__/chunks/LikeC4ModelContext2.mjs +0 -1
- package/__app__/chunks/StaticLikeC4Diagram.mjs +0 -1
- package/__app__/chunks/__root.mjs +0 -1
- package/__app__/chunks/libs/motion.mjs +0 -1
- package/__app__/chunks/libs/xstate.mjs +0 -1
- package/__app__/chunks/safeCtx.mjs +0 -1
- package/__app__/chunks/searchParams.mjs +0 -1
- package/__app__/chunks/single-index.mjs +0 -1
- package/__app__/chunks/styled-system.mjs +0 -1
- package/__app__/chunks/useUpdateEffect.mjs +0 -1
- package/__app__/src/routeTree.gen.mjs +0 -1
- package/__app__/src/routes/__root.mjs +0 -1
- package/__app__/src/routes/_single/adhoc.mjs +0 -1
- package/__app__/src/routes/_single/embed._viewId.mjs +0 -1
- package/__app__/src/routes/_single/export._viewId.mjs +0 -1
- package/__app__/src/routes/_single/route.mjs +0 -1
- package/__app__/src/routes/_single/single-index.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.d2.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.dot.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.index.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.mmd.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.puml.mjs +0 -1
- package/__app__/src/routes/_single/webcomponent._.mjs +0 -33
- package/__app__/src/routes/index.mjs +0 -1
- package/__app__/src/routes/project._projectId/-components.mjs +0 -1
- package/__app__/src/routes/project._projectId/adhoc.mjs +0 -1
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +0 -1
- package/__app__/src/routes/project._projectId/export._viewId.mjs +0 -1
- package/__app__/src/routes/project._projectId/index.mjs +0 -1
- package/__app__/src/routes/project._projectId/route.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +0 -1
- package/__app__/src/routes/projects.mjs +0 -1
- package/dist/chunks/libs/ts-graphviz.d.mts +0 -12
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.d.mts +0 -269
- package/dist/vite-plugin/internal/chunks/libs/nanostores.d.mts +0 -59
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{a as e,i as t}from"../rolldown-runtime.mjs";import*as n from"react";import{Children as r,Component as i,Fragment as a,createContext as o,createElement as s,forwardRef as c,isValidElement as l,useCallback as u,useContext as d,useEffect as f,useId as p,useInsertionEffect as m,useLayoutEffect as h,useMemo as g,useRef as _,useState as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";const S=o({});function useConstant(e){let t=_(null);return t.current===null&&(t.current=e()),t.current}const C=typeof window<`u`?h:f,w=o(null);function addUniqueItem(e,t){e.indexOf(t)===-1&&e.push(t)}function removeItem(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}const clamp=(e,t,n)=>n>t?t:n<e?e:n,T={},isNumericalString=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function isObject(e){return typeof e==`object`&&!!e}const isZeroValueString=e=>/^0[^.\s]+$/u.test(e);function memo$1(e){let t;return()=>(t===void 0&&(t=e()),t)}t(memo$1,`memo`);const noop=e=>e,combineFunctions=(e,t)=>n=>t(e(n)),pipe=(...e)=>e.reduce(combineFunctions),progress=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};var SubscriptionManager=class{constructor(){this.subscriptions=[]}add(e){return addUniqueItem(this.subscriptions,e),()=>removeItem(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const secondsToMilliseconds=e=>e*1e3,millisecondsToSeconds=e=>e/1e3;function velocityPerSecond(e,t){return t?1e3/t*e:0}const wrap=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},calcBezier=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function binarySubdivide(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=calcBezier(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function cubicBezier(e,t,n,r){if(e===t&&n===r)return noop;let getTForX=t=>binarySubdivide(t,0,1,e,n);return e=>e===0||e===1?e:calcBezier(getTForX(e),t,r)}const mirrorEasing=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,reverseEasing=e=>t=>1-e(1-t),ee=cubicBezier(.33,1.53,.69,.99),te=reverseEasing(ee),E=mirrorEasing(te),anticipate=e=>e>=1?1:(e*=2)<1?.5*te(e):.5*(2-2**(-10*(e-1))),circIn=e=>1-Math.sin(Math.acos(e)),ne=reverseEasing(circIn),D=mirrorEasing(circIn),re=cubicBezier(.42,0,1,1),ie=cubicBezier(0,0,.58,1),ae=cubicBezier(.42,0,.58,1),isEasingArray=e=>Array.isArray(e)&&typeof e[0]!=`number`;function getEasingForSegment(e,t){return isEasingArray(e)?e[wrap(0,e.length,t)]:e}const isBezierDefinition=e=>Array.isArray(e)&&typeof e[0]==`number`,oe={linear:noop,easeIn:re,easeInOut:ae,easeOut:ie,circIn,circInOut:D,circOut:ne,backIn:te,backInOut:E,backOut:ee,anticipate},isValidEasing=e=>typeof e==`string`,easingDefinitionToFunction=e=>{if(isBezierDefinition(e)){e.length;let[t,n,r,i]=e;return cubicBezier(t,n,r,i)}else if(isValidEasing(e))return oe[e],`${e}`,oe[e];return e},se=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],O={value:null,addProjectionMetrics:null};function createRenderStep(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function triggerCallback(t){o.has(t)&&(l.schedule(t),e()),c++,t(s)}let l={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(triggerCallback),t&&O.value&&O.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,l.process(e))}};return l}function createRenderBatcher(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},flagRunNextFrame=()=>n=!0,a=se.reduce((e,n)=>(e[n]=createRenderStep(flagRunNextFrame,t?n:void 0),e),{}),{setup:o,read:s,resolveKeyframes:c,preUpdate:l,update:u,preRender:d,render:f,postRender:p}=a,processBatch=()=>{let a=T.useManualTiming,m=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,40),1)),i.timestamp=m,i.isProcessing=!0,o.process(i),s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(processBatch))},wake=()=>{n=!0,r=!0,i.isProcessing||e(processBatch)},m=se.reduce((e,t)=>{let r=a[t];return e[t]=(e,t=!1,i=!1)=>(n||wake(),r.schedule(e,t,i)),e},{}),cancel=e=>{for(let t=0;t<se.length;t++)a[se[t]].cancel(e)};return{schedule:m,cancel,state:i,steps:a}}const{schedule:k,cancel:A,state:j,steps:ce}=createRenderBatcher(typeof requestAnimationFrame<`u`?requestAnimationFrame:noop,!0);let le;function clearTime(){le=void 0}const M={now:()=>(le===void 0&&M.set(j.isProcessing||T.useManualTiming?j.timestamp:performance.now()),le),set:e=>{le=e,queueMicrotask(clearTime)}},N={layout:0,mainThread:0,waapi:0},checkStringStartsWith=e=>t=>typeof t==`string`&&t.startsWith(e),ue=checkStringStartsWith(`--`),de=checkStringStartsWith(`var(--`),isCSSVariableToken=e=>de(e)?fe.test(e.split(`/*`)[0].trim()):!1,fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function containsCSSVariable(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}const P={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},F={...P,transform:e=>clamp(0,1,e)},pe={...P,default:1},sanitize=e=>Math.round(e*1e5)/1e5,me=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(e){return e==null}const he=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(e,t)=>n=>!!(typeof n==`string`&&he.test(n)&&n.startsWith(e)||t&&!isNullish(n)&&Object.prototype.hasOwnProperty.call(n,t)),splitColor=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(me);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},clampRgbUnit=e=>clamp(0,255,e),ge={...P,transform:e=>Math.round(clampRgbUnit(e))},I={test:isColorString(`rgb`,`red`),parse:splitColor(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ge.transform(e)+`, `+ge.transform(t)+`, `+ge.transform(n)+`, `+sanitize(F.transform(r))+`)`};function parseHex(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const _e={test:isColorString(`#`),parse:parseHex,transform:I.transform},createUnitType=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),L=createUnitType(`deg`),R=createUnitType(`%`),z=createUnitType(`px`),ve=createUnitType(`vh`),ye=createUnitType(`vw`),be={...R,parse:e=>R.parse(e)/100,transform:e=>R.transform(e*100)},B={test:isColorString(`hsl`,`hue`),parse:splitColor(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+R.transform(sanitize(t))+`, `+R.transform(sanitize(n))+`, `+sanitize(F.transform(r))+`)`},V={test:e=>I.test(e)||_e.test(e)||B.test(e),parse:e=>I.test(e)?I.parse(e):B.test(e)?B.parse(e):_e.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?I.transform(e):B.transform(e),getAnimatableNone:e=>{let t=V.parse(e);return t.alpha=0,V.transform(t)}},xe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(e){return isNaN(e)&&typeof e==`string`&&(e.match(me)?.length||0)+(e.match(xe)?.length||0)>0}const Se=`number`,Ce=`color`,we=/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 analyseComplexValue(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(we,e=>(V.test(e)?(r.color.push(a),i.push(Ce),n.push(V.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push(Se),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:r,types:i}}function parseComplexValue(e){return analyseComplexValue(e).values}function buildTransformer({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Se?i+=sanitize(r[a]):e===Ce?i+=V.transform(r[a]):i+=r[a]}return i}}function createTransformer(e){return buildTransformer(analyseComplexValue(e))}const convertNumbersToZero=e=>typeof e==`number`?0:V.test(e)?V.getAnimatableNone(e):e,convertToZero=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:convertNumbersToZero(e);function getAnimatableNone$1(e){let t=analyseComplexValue(e);return buildTransformer(t)(t.values.map((e,n)=>convertToZero(e,t.split[n])))}t(getAnimatableNone$1,`getAnimatableNone`);const H={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1};function hueToRgb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslaToRgba({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=hueToRgb(s,r,e+1/3),a=hueToRgb(s,r,e),o=hueToRgb(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function mixImmediate(e,t){return n=>n>0?t:e}const U=t((e,t,n)=>e+(t-e)*n,`mixNumber`),mixLinearColor=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Te=[_e,I,B],getColorType=e=>Te.find(t=>t.test(e));function asRGBA(e){let t=getColorType(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===B&&(n=hslaToRgba(n)),n}const mixColor=(e,t)=>{let n=asRGBA(e),r=asRGBA(t);if(!n||!r)return mixImmediate(e,t);let i={...n};return e=>(i.red=mixLinearColor(n.red,r.red,e),i.green=mixLinearColor(n.green,r.green,e),i.blue=mixLinearColor(n.blue,r.blue,e),i.alpha=U(n.alpha,r.alpha,e),I.transform(i))},Ee=new Set([`none`,`hidden`]);function mixVisibility(e,t){return Ee.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mixNumber(e,t){return n=>U(e,t,n)}function getMixer(e){return typeof e==`number`?mixNumber:typeof e==`string`?isCSSVariableToken(e)?mixImmediate:V.test(e)?mixColor:mixComplex:Array.isArray(e)?mixArray:typeof e==`object`?V.test(e)?mixColor:mixObject:mixImmediate}function mixArray(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>getMixer(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function mixObject(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=getMixer(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function matchOrder(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}const mixComplex=(e,t)=>{let n=H.createTransformer(t),r=analyseComplexValue(e),i=analyseComplexValue(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ee.has(e)&&!i.values.length||Ee.has(t)&&!r.values.length?mixVisibility(e,t):pipe(mixArray(matchOrder(r,i),i.values),n):(`${e}${t}`,mixImmediate(e,t))};function mix(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?U(e,t,n):getMixer(e)(e,t)}const frameloopDriver=e=>{let passTimestamp=({timestamp:t})=>e(t);return{start:(e=!0)=>k.update(passTimestamp,e),stop:()=>A(passTimestamp),now:()=>j.isProcessing?j.timestamp:M.now()}},generateLinearEasing=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},De=2e4;function calcGeneratorDuration(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function createGeneratorEasing(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(calcGeneratorDuration(r),De);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:millisecondsToSeconds(i)}}const W={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};function calcAngularFreq(e,t){return e*Math.sqrt(1-t*t)}function approximateRoot(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}const Oe=.001;function findSpring({duration:e=W.duration,bounce:t=W.bounce,velocity:n=W.velocity,mass:r=W.mass}){let envelope,derivative;W.maxDuration;let i=1-t;i=clamp(W.minDamping,W.maxDamping,i),e=clamp(W.minDuration,W.maxDuration,millisecondsToSeconds(e)),i<1?(envelope=t=>{let r=t*i,a=r*e,o=r-n,s=calcAngularFreq(t,i),c=Math.exp(-a);return Oe-o/s*c},derivative=t=>{let r=t*i*e,a=r*n+n,o=i**2*t**2*e,s=Math.exp(-r),c=calcAngularFreq(t**2,i);return(-envelope(t)+Oe>0?-1:1)*((a-o)*s)/c}):(envelope=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Oe+r*i},derivative=t=>Math.exp(-t*e)*((n-t)*(e*e)));let a=5/e,o=approximateRoot(envelope,derivative,a);if(e=secondsToMilliseconds(e),isNaN(o))return{stiffness:W.stiffness,damping:W.damping,duration:e};{let t=o**2*r;return{stiffness:t,damping:i*2*Math.sqrt(r*t),duration:e}}}const ke=[`duration`,`bounce`],Ae=[`stiffness`,`damping`,`mass`];function isSpringType(e,t){return t.some(t=>e[t]!==void 0)}function getSpringOptions(e){let t={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...e};if(!isSpringType(e,Ae)&&isSpringType(e,ke))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*clamp(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:W.mass,stiffness:i,damping:a}}else{let n=findSpring({...e,velocity:0});t={...t,...n,mass:W.mass},t.isResolvedFromDuration=!0}return t}function spring(e=W.visualDuration,t=W.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=getSpringOptions({...n,velocity:-millisecondsToSeconds(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=millisecondsToSeconds(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?W.restSpeed.granular:W.restSpeed.default,i||=v?W.restDelta.granular:W.restDelta.default;let resolveSpring,resolveVelocity,y,b,x,S;if(h<1)y=calcAngularFreq(_,h),b=(m+h*_*g)/y,resolveSpring=e=>o-Math.exp(-h*_*e)*(b*Math.sin(y*e)+g*Math.cos(y*e)),x=h*_*b+g*y,S=h*_*g-b*y,resolveVelocity=e=>Math.exp(-h*_*e)*(x*Math.sin(y*e)+S*Math.cos(y*e));else if(h===1){resolveSpring=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;resolveVelocity=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);resolveSpring=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;resolveVelocity=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let C={calculatedDuration:p&&d||null,velocity:e=>secondsToMilliseconds(resolveVelocity(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(y*e),a=Math.cos(y*e),c=o-t*(b*n+g*a),l=secondsToMilliseconds(t*(x*n+S*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=resolveSpring(e);if(p)s.done=e>=d;else{let n=secondsToMilliseconds(resolveVelocity(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(calcGeneratorDuration(C),De),t=generateLinearEasing(t=>C.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return C}spring.applyToOptions=e=>{let t=createGeneratorEasing(e,100,spring);return e.ease=t.ease,e.duration=secondsToMilliseconds(t.duration),e.type=`keyframes`,e};function getGeneratorVelocity(e,t,n){let r=Math.max(t-5,0);return velocityPerSecond(n-e(r),t-r)}function inertia({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},isOutOfBounds=e=>s!==void 0&&e<s||c!==void 0&&e>c,nearestBoundary=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,p=n*t,m=d+p,h=o===void 0?m:o(m);h!==m&&(p=h-d);let calcDelta=e=>-p*Math.exp(-e/r),calcLatest=e=>h+calcDelta(e),applyFriction=e=>{let t=calcDelta(e),n=calcLatest(e);f.done=Math.abs(t)<=l,f.value=f.done?h:n},g,_,checkCatchBoundary=e=>{isOutOfBounds(f.value)&&(g=e,_=spring({keyframes:[f.value,nearestBoundary(f.value)],velocity:getGeneratorVelocity(calcLatest,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return checkCatchBoundary(0),{calculatedDuration:null,next:e=>{let t=!1;return!_&&g===void 0&&(t=!0,applyFriction(e),checkCatchBoundary(e)),g!==void 0&&e>=g?_.next(e-g):(!t&&applyFriction(e),f)}}}function createMixers(e,t,n){let r=[],i=n||T.mix||mix,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=pipe(Array.isArray(t)?t[n]||noop:t,a)),r.push(a)}return r}function interpolate(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=createMixers(t,r,i),c=s.length,interpolator=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=progress(e[r],e[r+1],n);return s[r](i)};return n?t=>interpolator(clamp(e[0],e[a-1],t)):interpolator}function fillOffset(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=progress(0,t,r);e.push(U(n,1,i))}}function defaultOffset(e){let t=[0];return fillOffset(t,e.length-1),t}function convertOffsetToTimes(e,t){return e.map(e=>e*t)}function defaultEasing(e,t){return e.map(()=>t||ae).splice(0,e.length-1)}function keyframes({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=isEasingArray(r)?r.map(easingDefinitionToFunction):easingDefinitionToFunction(r),a={done:!1,value:t[0]},o=interpolate(convertOffsetToTimes(n&&n.length===t.length?n:defaultOffset(t),e),t,{ease:Array.isArray(i)?i:defaultEasing(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}const je=t(e=>e!==null,`isNotNull`);function getFinalKeyframe$1(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(je),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}t(getFinalKeyframe$1,`getFinalKeyframe`);const Me={decay:inertia,inertia,tween:keyframes,keyframes,spring};function replaceTransitionType(e){typeof e.type==`string`&&(e.type=Me[e.type])}var WithPromise=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};const percentToProgress=e=>e/100;var JSAnimation=class extends WithPromise{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==M.now()&&this.tick(M.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},N.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;replaceTransitionType(e);let{type:t=keyframes,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||keyframes;s!==keyframes&&typeof o[0]!=`number`&&(this.mixKeyframes=pipe(percentToProgress,mix(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=calcGeneratorDuration(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=clamp(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==inertia&&(b.value=getFinalKeyframe$1(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+millisecondsToSeconds(e)}get time(){return millisecondsToSeconds(this.currentTime)}set time(e){e=secondsToMilliseconds(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return getGeneratorVelocity(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(M.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=frameloopDriver,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(M.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,N.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function fillWildcards(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const radToDeg=e=>e*180/Math.PI,rotate=e=>rebaseAngle(radToDeg(Math.atan2(e[1],e[0]))),Ne={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate,rotateZ:rotate,skewX:e=>radToDeg(Math.atan(e[1])),skewY:e=>radToDeg(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rebaseAngle=e=>(e%=360,e<0&&(e+=360),e),Pe=rotate,scaleX=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),scaleY=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX,scaleY,scale:e=>(scaleX(e)+scaleY(e))/2,rotateX:e=>rebaseAngle(radToDeg(Math.atan2(e[6],e[5]))),rotateY:e=>rebaseAngle(radToDeg(Math.atan2(-e[2],e[0]))),rotateZ:Pe,rotate:Pe,skewX:e=>radToDeg(Math.atan(e[4])),skewY:e=>radToDeg(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function defaultTransformValue(e){return+!!e.includes(`scale`)}function parseValueFromTransform(e,t){if(!e||e===`none`)return defaultTransformValue(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Fe,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ne,i=t}if(!i)return defaultTransformValue(t);let a=r[t],o=i[1].split(`,`).map(convertTransformToNumber);return typeof a==`function`?a(o):o[a]}const readTransformValue=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return parseValueFromTransform(n,t)};function convertTransformToNumber(e){return parseFloat(e.trim())}const G=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],K=new Set(G),isNumOrPxType=e=>e===P||e===z,Ie=new Set([`x`,`y`,`z`]),Le=G.filter(e=>!Ie.has(e));function removeNonTranslationalTransform(e){let t=[];return Le.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}const q={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>parseValueFromTransform(t,`x`),y:(e,{transform:t})=>parseValueFromTransform(t,`y`)};q.translateX=q.x,q.translateY=q.y;const J=new Set;let Re=!1,ze=!1,Be=!1;function measureAllKeyframes(){if(ze){let e=Array.from(J).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=removeNonTranslationalTransform(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}ze=!1,Re=!1,J.forEach(e=>e.complete(Be)),J.clear()}function readAllKeyframes(){J.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ze=!0)})}function flushKeyframeResolvers(){Be=!0,readAllKeyframes(),measureAllKeyframes(),Be=!1}var KeyframeResolver=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(J.add(this),Re||(Re=!0,k.read(readAllKeyframes),k.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}fillWildcards(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),J.delete(this)}cancel(){this.state===`scheduled`&&(J.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}};const isCSSVar=e=>e.startsWith(`--`);function setStyle(e,t,n){isCSSVar(t)?e.style.setProperty(t,n):e.style[t]=n}const Ve={};function memoSupports(e,t){let n=memo$1(e);return()=>Ve[t]??n()}const He=memoSupports(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Ue=memoSupports(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),cubicBezierAsString=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,We={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(e,t){if(e)return typeof e==`function`?Ue()?generateLinearEasing(e,t):`ease-out`:isBezierDefinition(e)?cubicBezierAsString(e):Array.isArray(e)?e.map(e=>mapEasingToNativeEasing(e,t)||We.easeOut):We[e]}function startWaapiAnimation(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=mapEasingToNativeEasing(s,i);Array.isArray(d)&&(u.easing=d),O.value&&N.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return O.value&&p.finished.finally(()=>{N.waapi--}),p}function isGenerator(e){return typeof e==`function`&&`applyToOptions`in e}function applyGeneratorOptions({type:e,...t}){return isGenerator(e)&&Ue()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var NativeAnimation=class extends WithPromise{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=applyGeneratorOptions(e);this.animation=startWaapiAnimation(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=getFinalKeyframe$1(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),setStyle(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return millisecondsToSeconds(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+millisecondsToSeconds(e)}get time(){return millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=secondsToMilliseconds(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&He()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),noop):r(this)}};const Ge={anticipate,backInOut:E,circInOut:D};function isUnsupportedEase(e){return e in Ge}function replaceStringEasing(e){typeof e.ease==`string`&&isUnsupportedEase(e.ease)&&(e.ease=Ge[e.ease])}var NativeAnimationExtended=class extends NativeAnimation{constructor(e){replaceStringEasing(e),replaceTransitionType(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new JSAnimation({...a,autoplay:!1}),s=Math.max(10,M.now()-this.startTime),c=clamp(0,10,s-10),l=o.sample(s).value,{name:u}=this.options;i&&u&&setStyle(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}};const isAnimatable=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(H.test(e)||e===`0`)&&!e.startsWith(`url(`));function hasKeyframesChanged(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function canAnimate(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=isAnimatable(i,t),s=isAnimatable(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:hasKeyframesChanged(e)||(n===`spring`||isGenerator(n))&&r}function makeAnimationInstant(e){e.duration=0,e.type=`keyframes`}const Ke=new Set([`opacity`,`clipPath`,`filter`,`transform`]),qe=memo$1(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function supportsBrowserAnimation(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return qe()&&n&&Ke.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var AsyncMotionValueAnimation=class extends WithPromise{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=M.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||KeyframeResolver;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=M.now();let u=!0;canAnimate(e,i,a,o)||(u=!1,(T.instantAnimations||!s)&&l?.(getFinalKeyframe$1(e,n,t)),e[0]=e[e.length-1],makeAnimationInstant(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&supportsBrowserAnimation(d),p=d.motionValue?.owner?.current,m=f?new NativeAnimationExtended({...d,element:p}):new JSAnimation(d);m.finished.then(()=>{this.notifyFinished()}).catch(noop),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),flushKeyframeResolvers()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},GroupAnimation=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return getMax(this.animations,`duration`)}get iterationDuration(){return getMax(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function getMax(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var GroupAnimationWithThen=class extends GroupAnimation{then(e,t){return this.finished.finally(e).then(()=>{})}};function calcChildStagger(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}const Je=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(e){let t=Je.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function getVariableValue(e,t,n=1){`${e}`;let[r,i]=parseCSSVariable(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return isNumericalString(e)?parseFloat(e):e}return isCSSVariableToken(i)?getVariableValue(i,t,n+1):i}const Ye={type:`spring`,stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xe={type:`keyframes`,duration:.8},Ze={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(e,{keyframes:t})=>t.length>2?Xe:K.has(e)?e.startsWith(`scale`)?criticallyDampedSpring(t[1]):Ye:Ze,isNotNull=e=>e!==null;function getFinalKeyframe(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(isNotNull),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}function resolveTransition(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function getValueTransition$1(e,t){let n=e?.[t]??e?.default??e;return n===e?n:resolveTransition(n,e)}t(getValueTransition$1,`getValueTransition`);function isTransitionDefined({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const animateMotionValue=(e,t,n,r={},i,a)=>o=>{let s=getValueTransition$1(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=secondsToMilliseconds(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};isTransitionDefined(s)||Object.assign(u,getDefaultTransition(e,u)),u.duration&&=secondsToMilliseconds(u.duration),u.repeatDelay&&=secondsToMilliseconds(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(makeAnimationInstant(u),u.delay===0&&(d=!0)),(T.instantAnimations||T.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,makeAnimationInstant(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=getFinalKeyframe(u.keyframes,s);if(e!==void 0){k.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new JSAnimation(u):new AsyncMotionValueAnimation(u)};function getValueState(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function resolveVariantFromProps(e,t,n,r){if(typeof t==`function`){let[i,a]=getValueState(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=getValueState(r);t=t(n===void 0?e.custom:n,i,a)}return t}function resolveVariant(e,t,n){let r=e.getProps();return resolveVariantFromProps(r,t,n===void 0?r.custom:n,e)}const Qe=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...G]),isFloat=e=>!isNaN(parseFloat(e)),$e={current:void 0};var MotionValue=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=M.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new SubscriptionManager);let n=this.events[e].add(t);return e===`change`?()=>{n(),k.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return $e.current&&$e.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=M.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function motionValue(e,t){return new MotionValue(e,t)}const isKeyframesTarget=e=>Array.isArray(e);function setMotionValue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,motionValue(n))}function resolveFinalValueInKeyframes(e){return isKeyframesTarget(e)?e[e.length-1]||0:e}function setTarget(e,t){let{transitionEnd:n={},transition:r={},...i}=resolveVariant(e,t)||{};i={...i,...n};for(let t in i)setMotionValue(e,t,resolveFinalValueInKeyframes(i[t]))}const isMotionValue=e=>!!(e&&e.getVelocity);function isWillChangeMotionValue(e){return!!(isMotionValue(e)&&e.add)}function addValueToWillChange(e,t){let n=e.getValue(`willChange`);if(isWillChangeMotionValue(n))return n.add(t);if(!n&&T.WillChange){let n=new T.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function camelToDash(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const et=`data-`+camelToDash(`framerAppearId`);function getOptimisedAppearId(e){return e.props[et]}function shouldBlockAnimation({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function animateTarget(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?resolveTransition(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&shouldBlockAnimation(d,t))continue;let o={delay:n,...getValueTransition$1(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){let n=getOptimisedAppearId(e);if(n){let e=window.MotionHandoffAnimation(n,t,k);e!==null&&(o.startTime=e,f=!0)}}addValueToWillChange(e,t);let p=l??e.shouldReduceMotion;r.start(animateMotionValue(t,r,i,p&&Qe.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let applyTransitionEnd=()=>k.update(()=>{o&&setTarget(e,o)});u.length?Promise.all(u).then(applyTransitionEnd):applyTransitionEnd()}return u}function animateVariant(e,t,n={}){let r=resolveVariant(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(animateTarget(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return animateChildren(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function animateChildren(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(animateVariant(c,t,{...o,delay:n+(typeof r==`function`?0:r)+calcChildStagger(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function animateVisualElement(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>animateVariant(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=animateVariant(e,t,n);else{let i=typeof t==`function`?resolveVariant(e,t,n.custom):t;r=Promise.all(animateTarget(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}const tt={test:e=>e===`auto`,parse:e=>e},testValueType=e=>t=>t.test(e),nt=[P,z,R,L,ye,ve,tt],findDimensionValueType=e=>nt.find(testValueType(e));function isNone(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||isZeroValueString(e)}const rt=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function applyDefaultFilter(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(me)||[];if(!r)return e;let i=n.replace(r,``),a=+!!rt.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}const it=/\b([a-z-]*)\(.*?\)/gu,at={...H,getAnimatableNone:e=>{let t=e.match(it);return t?t.map(applyDefaultFilter).join(` `):e}},ot={...H,getAnimatableNone:e=>{let t=H.parse(e);return H.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},st={...P,transform:Math.round},ct={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,inset:z,insetBlock:z,insetBlockStart:z,insetBlockEnd:z,insetInline:z,insetInlineStart:z,insetInlineEnd:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,paddingBlock:z,paddingBlockStart:z,paddingBlockEnd:z,paddingInline:z,paddingInlineStart:z,paddingInlineEnd:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,marginBlock:z,marginBlockStart:z,marginBlockEnd:z,marginInline:z,marginInlineStart:z,marginInlineEnd:z,fontSize:z,backgroundPositionX:z,backgroundPositionY:z,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:pe,scaleX:pe,scaleY:pe,scaleZ:pe,skew:L,skewX:L,skewY:L,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:F,originX:be,originY:be,originZ:z,zIndex:st,fillOpacity:F,strokeOpacity:F,numOctaves:st},lt={...ct,color:V,backgroundColor:V,outlineColor:V,fill:V,stroke:V,borderColor:V,borderTopColor:V,borderRightColor:V,borderBottomColor:V,borderLeftColor:V,filter:at,WebkitFilter:at,mask:ot,WebkitMask:ot},getDefaultValueType=e=>lt[e],ut=new Set([at,ot]);function getAnimatableNone(e,t){let n=getDefaultValueType(e);return ut.has(n)||(n=H),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const dt=new Set([`auto`,`none`,`0`]);function makeNoneKeyframesAnimatable(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!dt.has(t)&&analyseComplexValue(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=getAnimatableNone(n,i)}var DOMKeyframesResolver=class extends KeyframeResolver{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),isCSSVariableToken(r))){let i=getVariableValue(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Qe.has(n)||e.length!==2)return;let[r,i]=e,a=findDimensionValueType(r),o=findDimensionValueType(i);if(containsCSSVariable(r)!==containsCSSVariable(i)&&q[n]){this.needsMeasurement=!0;return}if(a!==o)if(isNumOrPxType(a)&&isNumOrPxType(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else q[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||isNone(e[t]))&&n.push(t);n.length&&makeNoneKeyframesAnimatable(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=q[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=q[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};const ft=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function resolveElements(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}const getValueAsType=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function isHTMLElement(e){return isObject(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}const{schedule:pt,cancel:mt}=createRenderBatcher(queueMicrotask,!1),Y={x:!1,y:!1};function isDragActive(){return Y.x||Y.y}function setDragLock(e){return e===`x`||e===`y`?Y[e]?null:(Y[e]=!0,()=>{Y[e]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}function setupGesture(e,t){let n=resolveElements(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},cancel=()=>r.abort();return[n,i,cancel]}function isValidHover(e){return!(e.pointerType===`touch`||isDragActive())}function hover(e,t,n={}){let[r,i,a]=setupGesture(e,n);return r.forEach(e=>{let n=!1,r=!1,a,removePointerLeave=()=>{e.removeEventListener(`pointerleave`,onPointerLeave)},endHover=e=>{a&&=(a(e),void 0),removePointerLeave()},onPointerUp=e=>{n=!1,window.removeEventListener(`pointerup`,onPointerUp),window.removeEventListener(`pointercancel`,onPointerUp),r&&(r=!1,endHover(e))},onPointerDown=()=>{n=!0,window.addEventListener(`pointerup`,onPointerUp,i),window.addEventListener(`pointercancel`,onPointerUp,i)},onPointerLeave=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}endHover(e)}},onPointerEnter=n=>{if(!isValidHover(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,onPointerLeave,i))};e.addEventListener(`pointerenter`,onPointerEnter,i),e.addEventListener(`pointerdown`,onPointerDown,i)}),a}const isNodeOrChild=(e,t)=>t?e===t?!0:isNodeOrChild(e,t.parentElement):!1,isPrimaryPointer=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ht=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function isElementKeyboardAccessible(e){return ht.has(e.tagName)||e.isContentEditable===!0}const gt=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function isElementTextInput(e){return gt.has(e.tagName)||e.isContentEditable===!0}const _t=new WeakSet;function filterEvents(e){return t=>{t.key===`Enter`&&e(t)}}function firePointerEvent(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const enableKeyboardPress=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=filterEvents(()=>{if(_t.has(n))return;firePointerEvent(n,`down`);let e=filterEvents(()=>{firePointerEvent(n,`up`)}),handleBlur=()=>firePointerEvent(n,`cancel`);n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,handleBlur,t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function isValidPressEvent(e){return isPrimaryPointer(e)&&!isDragActive()}const vt=new WeakSet;function press(e,t,n={}){let[r,i,a]=setupGesture(e,n),startPress=e=>{let r=e.currentTarget;if(!isValidPressEvent(e)||vt.has(e))return;_t.add(r),n.stopPropagation&&vt.add(e);let a=t(r,e),onPointerEnd=(e,t)=>{window.removeEventListener(`pointerup`,onPointerUp),window.removeEventListener(`pointercancel`,onPointerCancel),_t.has(r)&&_t.delete(r),isValidPressEvent(e)&&typeof a==`function`&&a(e,{success:t})},onPointerUp=e=>{onPointerEnd(e,r===window||r===document||n.useGlobalTarget||isNodeOrChild(r,e.target))},onPointerCancel=e=>{onPointerEnd(e,!1)};window.addEventListener(`pointerup`,onPointerUp,i),window.addEventListener(`pointercancel`,onPointerCancel,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,startPress,i),isHTMLElement(e)&&(e.addEventListener(`focus`,e=>enableKeyboardPress(e,i)),!isElementKeyboardAccessible(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function isSVGElement(e){return isObject(e)&&`ownerSVGElement`in e}const yt=new WeakMap;let bt;const getSize=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:isSVGElement(r)&&`getBBox`in r?r.getBBox()[t]:r[n],xt=getSize(`inline`,`width`,`offsetWidth`),St=getSize(`block`,`height`,`offsetHeight`);function notifyTarget({target:e,borderBoxSize:t}){yt.get(e)?.forEach(n=>{n(e,{get width(){return xt(e,t)},get height(){return St(e,t)}})})}function notifyAll(e){e.forEach(notifyTarget)}function createResizeObserver(){typeof ResizeObserver>`u`||(bt=new ResizeObserver(notifyAll))}function resizeElement(e,t){bt||createResizeObserver();let n=resolveElements(e);return n.forEach(e=>{let n=yt.get(e);n||(n=new Set,yt.set(e,n)),n.add(t),bt?.observe(e)}),()=>{n.forEach(e=>{let n=yt.get(e);n?.delete(t),n?.size||bt?.unobserve(e)})}}const Ct=new Set;let windowResizeHandler;function createWindowResizeHandler(){windowResizeHandler=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ct.forEach(t=>t(e))},window.addEventListener(`resize`,windowResizeHandler)}function resizeWindow(e){return Ct.add(e),windowResizeHandler||createWindowResizeHandler(),()=>{Ct.delete(e),!Ct.size&&typeof windowResizeHandler==`function`&&(window.removeEventListener(`resize`,windowResizeHandler),windowResizeHandler=void 0)}}function resize(e,t){return typeof e==`function`?resizeWindow(e):resizeElement(e,t)}function isSVGSVGElement(e){return isSVGElement(e)&&e.tagName===`svg`}const wt=[...nt,V,H],findValueType=e=>wt.find(testValueType(e)),createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()}),X=new WeakMap;function isAnimationControls(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function isVariantLabel(e){return typeof e==`string`||Array.isArray(e)}const Tt=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Et=[`initial`,...Tt];function isControllingVariants(e){return isAnimationControls(e.animate)||Et.some(t=>isVariantLabel(e[t]))}function isVariantNode(e){return!!(isControllingVariants(e)||e.variants)}function updateMotionValuesFromProps(e,t,n){for(let r in t){let i=t[r],a=n[r];if(isMotionValue(i))e.addValue(r,i);else if(isMotionValue(a))e.addValue(r,motionValue(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,motionValue(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const Dt={current:null},Ot={current:!1},kt=typeof window<`u`;function initPrefersReducedMotion(){if(Ot.current=!0,kt)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),setReducedMotionPreferences=()=>Dt.current=e.matches;e.addEventListener(`change`,setReducedMotionPreferences),setReducedMotionPreferences()}else Dt.current=!1}const At=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];let jt={};function setFeatureDefinitions(e){jt=e}function getFeatureDefinitions(){return jt}var VisualElement=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=M.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,k.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=isControllingVariants(t),this.isVariantNode=isVariantNode(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&isMotionValue(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,X.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Ot.current||initPrefersReducedMotion(),this.shouldReduceMotion=Dt.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),A(this.notifyUpdate),A(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&ft.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new NativeAnimation({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:secondsToMilliseconds(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=K.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&k.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in jt){let t=jt[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<At.length;t++){let n=At[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=motionValue(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(isNumericalString(n)||isZeroValueString(n))?n=parseFloat(n):!findValueType(n)&&H.test(t)&&(n=getAnimatableNone(e,t)),this.setBaseTarget(e,isMotionValue(n)?n.get():n)),isMotionValue(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=resolveVariantFromProps(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!isMotionValue(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new SubscriptionManager),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){pt.render(this.render)}},DOMVisualElement=class extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;isMotionValue(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Feature=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function convertBoundingBoxToBox({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function convertBoxToBoundingBox({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function transformBoxPoints(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function isIdentityScale(e){return e===void 0||e===1}function hasScale({scale:e,scaleX:t,scaleY:n}){return!isIdentityScale(e)||!isIdentityScale(t)||!isIdentityScale(n)}function hasTransform(e){return hasScale(e)||has2DTranslate(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function has2DTranslate(e){return is2DTranslate(e.x)||is2DTranslate(e.y)}function is2DTranslate(e){return e&&e!==`0%`}function scalePoint(e,t,n){return n+t*(e-n)}function applyPointDelta(e,t,n,r,i){return i!==void 0&&(e=scalePoint(e,i,r)),scalePoint(e,n,r)+t}function applyAxisDelta(e,t=0,n=1,r,i){e.min=applyPointDelta(e.min,t,n,r,i),e.max=applyPointDelta(e.max,t,n,r,i)}function applyBoxDelta(e,{x:t,y:n}){applyAxisDelta(e.x,t.translate,t.scale,t.originPoint),applyAxisDelta(e.y,n.translate,n.scale,n.originPoint)}const Mt=.999999999999,Nt=1.0000000000001;function applyTreeDeltas(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&transformBox(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,applyBoxDelta(e,o)),r&&hasTransform(a.latestValues)&&transformBox(e,a.latestValues,a.layout?.layoutBox))}t.x<Nt&&t.x>Mt&&(t.x=1),t.y<Nt&&t.y>Mt&&(t.y=1)}function translateAxis(e,t){e.min+=t,e.max+=t}function transformAxis(e,t,n,r,i=.5){applyAxisDelta(e,t,n,U(e.min,e.max,i),r)}function resolveAxisTranslate(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function transformBox(e,t,n){let r=n??e;transformAxis(e.x,resolveAxisTranslate(t.x,r.x),t.scaleX,t.scale,t.originX),transformAxis(e.y,resolveAxisTranslate(t.y,r.y),t.scaleY,t.scale,t.originY)}function measureViewportBox(e,t){return convertBoundingBoxToBox(transformBoxPoints(e.getBoundingClientRect(),t))}function measurePageBox(e,t,n){let r=measureViewportBox(e,n),{scroll:i}=t;return i&&(translateAxis(r.x,i.offset.x),translateAxis(r.y,i.offset.y)),r}const Pt={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ft=G.length;function buildTransform(e,t,n){let r=``,i=!0;for(let a=0;a<Ft;a++){let o=G[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=getValueAsType(s,ct[o]);if(!c){i=!1;let t=Pt[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function buildHTMLStyles(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(K.has(e)){o=!0;continue}else if(ue(e)){i[e]=n;continue}else{let t=getValueAsType(n,ct[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=buildTransform(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function renderHTML(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function pixelsToPercent(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Z={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(z.test(e))e=parseFloat(e);else return e;return`${pixelsToPercent(e,t.target.x)}% ${pixelsToPercent(e,t.target.y)}%`}},It={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=H.parse(e);if(i.length>5)return r;let a=H.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=U(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Lt={borderRadius:{...Z,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomLeftRadius:Z,borderBottomRightRadius:Z,boxShadow:It};function isForcedMotionValue(e,{layout:t,layoutId:n}){return K.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Lt[e]||e===`opacity`)}function scrapeMotionValuesFromProps$1(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(isMotionValue(r[t])||i&&isMotionValue(i[t])||isForcedMotionValue(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}t(scrapeMotionValuesFromProps$1,`scrapeMotionValuesFromProps`);function getComputedStyle$1(e){return window.getComputedStyle(e)}t(getComputedStyle$1,`getComputedStyle`);var HTMLVisualElement=class extends DOMVisualElement{constructor(){super(...arguments),this.type=`html`,this.renderInstance=renderHTML}readValueFromInstance(e,t){if(K.has(t))return this.projection?.isProjecting?defaultTransformValue(t):readTransformValue(e,t);{let n=getComputedStyle$1(e),r=(ue(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return measureViewportBox(e,t)}build(e,t,n){buildHTMLStyles(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return scrapeMotionValuesFromProps$1(e,t,n)}};function isObjectKey(e,t){return e in t}var ObjectVisualElement=class extends VisualElement{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(isObjectKey(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return createBox()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}};const Rt={offset:`stroke-dashoffset`,array:`stroke-dasharray`},zt={offset:`strokeDashoffset`,array:`strokeDasharray`};function buildSVGPath(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Rt:zt;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const Bt=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function buildSVGAttrs(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(buildHTMLStyles(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Bt)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&buildSVGPath(d,i,a,o,!1)}const Vt=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`]),isSVGTag=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function renderSVG(e,t,n,r){renderHTML(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Vt.has(n)?n:camelToDash(n),t.attrs[n])}function scrapeMotionValuesFromProps(e,t,n){let r=scrapeMotionValuesFromProps$1(e,t,n);for(let n in e)if(isMotionValue(e[n])||isMotionValue(t[n])){let t=G.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var SVGVisualElement=class extends DOMVisualElement{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(K.has(t)){let e=getDefaultValueType(t);return e&&e.default||0}return t=Vt.has(t)?t:camelToDash(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return scrapeMotionValuesFromProps(e,t,n)}build(e,t,n){buildSVGAttrs(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){renderSVG(e,t,n,r)}mount(e){this.isSVGTag=isSVGTag(e.tagName),super.mount(e)}};const Ht=Et.length;function getVariantContext(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&getVariantContext(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Ht;n++){let r=Et[n],i=e.props[r];(isVariantLabel(i)||i===!1)&&(t[r]=i)}return t}function shallowCompare(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Ut=[...Tt].reverse(),Wt=Tt.length;function createAnimateFunction(e){return t=>Promise.all(t.map(({animation:t,options:n})=>animateVisualElement(e,t,n)))}function createAnimationState(e){let t=createAnimateFunction(e),n=createState(),r=!0,i=!1,buildResolvedTypeValues=t=>(n,r)=>{let i=resolveVariant(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function setAnimateFunction(n){t=n(e)}function animateChanges(a){let{props:o}=e,s=getVariantContext(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<Wt;t++){let f=Ut[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=isVariantLabel(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&(r||i)&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||isAnimationControls(m)||typeof m==`boolean`)continue;if(f===`exit`&&p.isActive&&g!==!0){p.prevResolvedValues&&(u={...u,...p.prevResolvedValues});continue}let v=checkVariantsDidChange(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(buildResolvedTypeValues(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},markToAnimate=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=isKeyframesTarget(t)&&isKeyframesTarget(n)?!shallowCompare(t,n):t!==n,r?t==null?l.add(e):markToAnimate(e):t!==void 0&&l.has(e)?markToAnimate(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),(r||i)&&e.blockInitialAnimation&&(y=!1);let T=_&&v;y&&(!T||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&(r||i)&&!T&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=resolveVariant(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=calcChildStagger(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=resolveVariant(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,i=!1,f?t(c):Promise.resolve()}function setActive(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=animateChanges(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges,setActive,setAnimateFunction,getState:()=>n,reset:()=>{n=createState(),i=!0}}}function checkVariantsDidChange(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!shallowCompare(t,e):!1}function createTypeState(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}function copyAxisInto(e,t){e.min=t.min,e.max=t.max}function copyBoxInto(e,t){copyAxisInto(e.x,t.x),copyAxisInto(e.y,t.y)}function copyAxisDeltaInto(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Gt=1e-4;1-Gt,1+Gt;const Kt=.01;0-Kt,0+Kt;function calcLength(e){return e.max-e.min}function isNear(e,t,n){return Math.abs(e-t)<=n}function calcAxisDelta(e,t,n,r=.5){e.origin=r,e.originPoint=U(t.min,t.max,e.origin),e.scale=calcLength(n)/calcLength(t),e.translate=U(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function calcBoxDelta(e,t,n,r){calcAxisDelta(e.x,t.x,n.x,r?r.originX:void 0),calcAxisDelta(e.y,t.y,n.y,r?r.originY:void 0)}function calcRelativeAxis(e,t,n){e.min=n.min+t.min,e.max=e.min+calcLength(t)}function calcRelativeBox(e,t,n){calcRelativeAxis(e.x,t.x,n.x),calcRelativeAxis(e.y,t.y,n.y)}function calcRelativeAxisPosition(e,t,n){e.min=t.min-n.min,e.max=e.min+calcLength(t)}function calcRelativePosition(e,t,n){calcRelativeAxisPosition(e.x,t.x,n.x),calcRelativeAxisPosition(e.y,t.y,n.y)}function removePointDelta(e,t,n,r,i){return e-=t,e=scalePoint(e,1/n,r),i!==void 0&&(e=scalePoint(e,1/i,r)),e}function removeAxisDelta(e,t=0,n=1,r=.5,i,a=e,o=e){if(R.test(t)&&(t=parseFloat(t),t=U(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=U(a.min,a.max,r);e===a&&(s-=t),e.min=removePointDelta(e.min,t,n,s,i),e.max=removePointDelta(e.max,t,n,s,i)}function removeAxisTransforms(e,t,[n,r,i],a,o){removeAxisDelta(e,t[n],t[r],t[i],t.scale,a,o)}const qt=[`x`,`scaleX`,`originX`],Jt=[`y`,`scaleY`,`originY`];function removeBoxTransforms(e,t,n,r){removeAxisTransforms(e.x,t,qt,n?n.x:void 0,r?r.x:void 0),removeAxisTransforms(e.y,t,Jt,n?n.y:void 0,r?r.y:void 0)}function isAxisDeltaZero(e){return e.translate===0&&e.scale===1}function isDeltaZero(e){return isAxisDeltaZero(e.x)&&isAxisDeltaZero(e.y)}function axisEquals(e,t){return e.min===t.min&&e.max===t.max}function boxEquals(e,t){return axisEquals(e.x,t.x)&&axisEquals(e.y,t.y)}function axisEqualsRounded(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function boxEqualsRounded(e,t){return axisEqualsRounded(e.x,t.x)&&axisEqualsRounded(e.y,t.y)}function aspectRatio(e){return calcLength(e.x)/calcLength(e.y)}function axisDeltaEquals(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function eachAxis(e){return[e(`x`),e(`y`)]}function buildProjectionTransform(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}const Yt=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Xt=Yt.length,asNumber=e=>typeof e==`string`?parseFloat(e):e,isPx=e=>typeof e==`number`||z.test(e);function mixValues(e,t,n,r,i,a){i?(e.opacity=U(0,n.opacity??1,Zt(r)),e.opacityExit=U(t.opacity??1,0,Qt(r))):a&&(e.opacity=U(t.opacity??1,n.opacity??1,r));for(let i=0;i<Xt;i++){let a=`border${Yt[i]}Radius`,o=getRadius(t,a),s=getRadius(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||isPx(o)===isPx(s)?(e[a]=Math.max(U(asNumber(o),asNumber(s),r),0),(R.test(s)||R.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=U(t.rotate||0,n.rotate||0,r))}function getRadius(e,t){return e[t]===void 0?e.borderRadius:e[t]}const Zt=compress(0,.5,ne),Qt=compress(.5,.95,noop);function compress(e,t,n){return r=>r<e?0:r>t?1:n(progress(e,t,r))}function animateSingleValue(e,t,n){let r=isMotionValue(e)?e:motionValue(e);return r.start(animateMotionValue(``,r,t,n)),r.animation}function addDomEvent(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const compareByDepth=(e,t)=>e.depth-t.depth;var FlatTree=class{constructor(){this.children=[],this.isDirty=!1}add(e){addUniqueItem(this.children,e),this.isDirty=!0}remove(e){removeItem(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(e)}};function delay(e,t){let n=M.now(),checkElapsed=({timestamp:r})=>{let i=r-n;i>=t&&(A(checkElapsed),e(i-t))};return k.setup(checkElapsed,!0),()=>A(checkElapsed)}function resolveMotionValue(e){return isMotionValue(e)?e.get():e}var NodeStack=class{constructor(){this.members=[]}add(e){addUniqueItem(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(removeItem(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(removeItem(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};const $t={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Q={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},en=[``,`X`,`Y`,`Z`];let tn=0;function resetDistortingTransform(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function cancelTreeOptimisedTransformAnimations(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=getOptimisedAppearId(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,k,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(r)}function createProjectionNode$1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class ProjectionNode{constructor(e={},n=t?.()){this.id=tn++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,O.value&&(Q.nodes=Q.calculatedTargetDeltas=Q.calculatedProjections=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),O.addProjectionMetrics&&O.addProjectionMetrics(Q)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new SubscriptionManager),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=isSVGElement(t)&&!isSVGSVGElement(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,resizeUnblockUpdate=()=>this.root.updateBlockedByResize=!1;k.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=delay(resizeUnblockUpdate,250),$t.hasAnimatedSinceResize&&($t.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||nn,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!boxEqualsRounded(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...getValueTransition$1(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),A(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(clearIsLayoutDirty);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate)):this.nodes.forEach(clearIsLayoutDirty),this.clearAllSnapshots();let e=M.now();j.delta=clamp(0,1e3/60,e-j.timestamp),j.timestamp=e,j.isProcessing=!0,ce.update.process(j),ce.preRender.process(j),ce.render.process(j),j.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!calcLength(this.snapshot.measuredBox.x)&&!calcLength(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!isDeltaZero(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||hasTransform(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),roundBox(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return createBox();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(checkNodeWasScrollRoot))){let{scroll:e}=this.root;e&&(translateAxis(t.x,e.offset.x),translateAxis(t.y,e.offset.y))}return t}removeElementScroll(e){let t=createBox();if(copyBoxInto(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&©BoxInto(t,e),translateAxis(t.x,i.offset.x),translateAxis(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=createBox();copyBoxInto(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&transformBox(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),hasTransform(r.latestValues)&&transformBox(n,r.latestValues,r.layout?.layoutBox)}return hasTransform(this.latestValues)&&transformBox(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(e){let t=createBox();copyBoxInto(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!hasTransform(n.latestValues))continue;let r;n.instance&&(hasScale(n.latestValues)&&n.updateSnapshot(),r=createBox(),copyBoxInto(r,n.measurePageBox())),removeBoxTransforms(t,n.latestValues,n.snapshot?.layoutBox,r)}return hasTransform(this.latestValues)&&removeBoxTransforms(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==j.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=j.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),O.value&&Q.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,t,n),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===j.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=createBox());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),O.value&&Q.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=createBox(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;mixAxisDelta(a.x,e.x,n),mixAxisDelta(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&boxEquals(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=createBox(),copyBoxInto(d,this.relativeTarget)),s&&(this.animationValues=i,mixValues(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(A(this.pendingAnimation),void 0),this.pendingAnimation=k.update(()=>{$t.hasAnimatedSinceResize=!0,N.layout++,this.motionValue||=motionValue(0),this.motionValue.jump(0,!1),this.currentAnimation=animateSingleValue(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{N.layout--},onComplete:()=>{N.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||createBox();let t=calcLength(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=calcLength(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}copyBoxInto(t,n),transformBox(t,i),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new NodeStack),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&resetDistortingTransform(`z`,e,r,this.animationValues);for(let t=0;t<en.length;t++)resetDistortingTransform(`rotate${en[t]}`,e,r,this.animationValues),resetDistortingTransform(`skew${en[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=resolveMotionValue(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=resolveMotionValue(t?.pointerEvents)||``),this.hasProjected&&!hasTransform(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Lt){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Lt[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?resolveMotionValue(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}t(createProjectionNode$1,`createProjectionNode`);function updateLayout(e){e.updateLayout()}function notifyLayoutUpdate(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)eachAxis(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=calcLength(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;copyAxisInto(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else shouldAnimatePositionOnly(i,t.layoutBox,n)&&eachAxis(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=calcLength(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=createDelta();calcBoxDelta(o,n,t.layoutBox);let s=createDelta();a?calcBoxDelta(s,e.applyTransform(r,!0),t.measuredBox):calcBoxDelta(s,n,t.layoutBox);let c=!isDeltaZero(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=createBox();calcRelativePosition(o,t.layoutBox,i.layoutBox);let s=createBox();calcRelativePosition(s,n,a.layoutBox),boxEqualsRounded(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function propagateDirtyNodes(e){O.value&&Q.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function cleanDirtyNodes(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function clearSnapshot(e){e.clearSnapshot()}function clearMeasurements(e){e.clearMeasurements()}function clearIsLayoutDirty(e){e.isLayoutDirty=!1}function resetTransformStyle(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function finishAnimation(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function resolveTargetDelta(e){e.resolveTargetDelta()}function calcProjection(e){e.calcProjection()}function resetSkewAndRotation(e){e.resetSkewAndRotation()}function removeLeadSnapshots(e){e.removeLeadSnapshot()}function mixAxisDelta(e,t,n){e.translate=U(t.translate,0,n),e.scale=U(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mixAxis(e,t,n,r){e.min=U(t.min,n.min,r),e.max=U(t.max,n.max,r)}function mixBox(e,t,n,r){mixAxis(e.x,t.x,n.x,r),mixAxis(e.y,t.y,n.y,r)}function hasOpacityCrossfade(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nn={duration:.45,ease:[.4,0,.1,1]},userAgentContains=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rn=userAgentContains(`applewebkit/`)&&!userAgentContains(`chrome/`)?Math.round:noop;function roundAxis(e){e.min=rn(e.min),e.max=rn(e.max)}function roundBox(e){roundAxis(e.x),roundAxis(e.y)}function shouldAnimatePositionOnly(e,t,n){return e===`position`||e===`preserve-aspect`&&!isNear(aspectRatio(t),aspectRatio(n),.2)}function checkNodeWasScrollRoot(e){return e!==e.root&&e.scroll?.wasRoot}const an=createProjectionNode$1({attachResizeListener:(e,t)=>addDomEvent(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),notify=e=>!e.isLayoutDirty&&e.willUpdate(!1);function nodeGroup(){let e=new Set,t=new WeakMap,dirtyAll=()=>e.forEach(notify);return{add:n=>{e.add(n),t.set(n,n.addEventListener(`willUpdate`,dirtyAll))},remove:n=>{e.delete(n);let r=t.get(n);r&&(r(),t.delete(n)),dirtyAll()},dirty:dirtyAll}}const on={current:void 0},sn=createProjectionNode$1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!on.current){let e=new an({});e.mount(window),e.setOptions({layoutScroll:!0}),on.current=e}return on.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),$=o({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function setRef(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function composeRefs(...e){return t=>{let n=!1,r=e.map(e=>{let r=setRef(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():setRef(e[t],null)}}}}function useComposedRefs(...e){return n.useCallback(composeRefs(...e),e)}var PopChildMeasure=class extends n.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(isHTMLElement(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=isHTMLElement(e)&&e.offsetWidth||0,r=isHTMLElement(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function PopChild({children:e,isPresent:t,anchorX:r,anchorY:i,root:a,pop:o}){let s=p(),c=_(null),l=_({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=d($),f=useComposedRefs(c,e.props?.ref??e?.ref);return m(()=>{let{width:e,height:n,top:d,left:f,right:p,bottom:m}=l.current;if(t||o===!1||!c.current||!e||!n)return;let h=r===`left`?`left: ${f}`:`right: ${p}`,g=i===`bottom`?`bottom: ${m}`:`top: ${d}`;c.current.dataset.motionPopId=s;let _=document.createElement(`style`);u&&(_.nonce=u);let v=a??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
1
|
+
import{r as e}from"../rolldown-runtime.mjs";import*as t from"react";import{Children as n,Component as r,Fragment as i,createContext as a,createElement as o,forwardRef as s,isValidElement as c,useCallback as l,useContext as u,useEffect as d,useId as f,useInsertionEffect as p,useLayoutEffect as m,useMemo as h,useRef as g,useState as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";const x=a({});function S(e){let t=g(null);return t.current===null&&(t.current=e()),t.current}const C=typeof window<`u`?m:d,w=a(null);function T(e,t){e.indexOf(t)===-1&&e.push(t)}function E(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}const D=(e,t,n)=>n>t?t:n<e?e:n,O={},k=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ee(e){return typeof e==`object`&&!!e}const te=e=>/^0[^.\s]+$/u.test(e);function ne(e){let t;return()=>(t===void 0&&(t=e()),t)}const A=e=>e,re=(e,t)=>n=>t(e(n)),ie=(...e)=>e.reduce(re),ae=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};var oe=class{constructor(){this.subscriptions=[]}add(e){return T(this.subscriptions,e),()=>E(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const j=e=>e*1e3,M=e=>e/1e3;function se(e,t){return t?1e3/t*e:0}const ce=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},le=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function ue(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=le(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function de(e,t,n,r){if(e===t&&n===r)return A;let i=t=>ue(t,0,1,e,n);return e=>e===0||e===1?e:le(i(e),t,r)}const fe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pe=e=>t=>1-e(1-t),me=de(.33,1.53,.69,.99),he=pe(me),ge=fe(he),_e=e=>e>=1?1:(e*=2)<1?.5*he(e):.5*(2-2**(-10*(e-1))),ve=e=>1-Math.sin(Math.acos(e)),ye=pe(ve),be=fe(ve),xe=de(.42,0,1,1),Se=de(0,0,.58,1),Ce=de(.42,0,.58,1),we=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Te(e,t){return we(e)?e[ce(0,e.length,t)]:e}const Ee=e=>Array.isArray(e)&&typeof e[0]==`number`,De={linear:A,easeIn:xe,easeInOut:Ce,easeOut:Se,circIn:ve,circInOut:be,circOut:ye,backIn:he,backInOut:ge,backOut:me,anticipate:_e},Oe=e=>typeof e==`string`,ke=e=>{if(Ee(e)){e.length;let[t,n,r,i]=e;return de(t,n,r,i)}else if(Oe(e))return De[e],`${e}`,De[e];return e},Ae=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],N={value:null,addProjectionMetrics:null};function je(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&N.value&&N.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}function Me(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ae.reduce((e,n)=>(e[n]=je(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=O.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ae.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ae.length;t++)o[Ae[t]].cancel(e)},state:i,steps:o}}const{schedule:P,cancel:F,state:I,steps:Ne}=Me(typeof requestAnimationFrame<`u`?requestAnimationFrame:A,!0);let Pe;function Fe(){Pe=void 0}const L={now:()=>(Pe===void 0&&L.set(I.isProcessing||O.useManualTiming?I.timestamp:performance.now()),Pe),set:e=>{Pe=e,queueMicrotask(Fe)}},Ie={layout:0,mainThread:0,waapi:0},Le=e=>t=>typeof t==`string`&&t.startsWith(e),Re=Le(`--`),ze=Le(`var(--`),Be=e=>ze(e)?Ve.test(e.split(`/*`)[0].trim()):!1,Ve=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function He(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}const Ue={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},We={...Ue,transform:e=>D(0,1,e)},Ge={...Ue,default:1},Ke=e=>Math.round(e*1e5)/1e5,qe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Je(e){return e==null}const Ye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xe=(e,t)=>n=>!!(typeof n==`string`&&Ye.test(n)&&n.startsWith(e)||t&&!Je(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ze=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(qe);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Qe=e=>D(0,255,e),$e={...Ue,transform:e=>Math.round(Qe(e))},et={test:Xe(`rgb`,`red`),parse:Ze(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+$e.transform(e)+`, `+$e.transform(t)+`, `+$e.transform(n)+`, `+Ke(We.transform(r))+`)`};function tt(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const nt={test:Xe(`#`),parse:tt,transform:et.transform},rt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),R=rt(`deg`),z=rt(`%`),B=rt(`px`),it=rt(`vh`),at=rt(`vw`),ot={...z,parse:e=>z.parse(e)/100,transform:e=>z.transform(e*100)},st={test:Xe(`hsl`,`hue`),parse:Ze(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+z.transform(Ke(t))+`, `+z.transform(Ke(n))+`, `+Ke(We.transform(r))+`)`},V={test:e=>et.test(e)||nt.test(e)||st.test(e),parse:e=>et.test(e)?et.parse(e):st.test(e)?st.parse(e):nt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?et.transform(e):st.transform(e),getAnimatableNone:e=>{let t=V.parse(e);return t.alpha=0,V.transform(t)}},ct=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lt(e){return isNaN(e)&&typeof e==`string`&&(e.match(qe)?.length||0)+(e.match(ct)?.length||0)>0}const ut=`number`,dt=`color`,ft=/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 pt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ft,e=>(V.test(e)?(r.color.push(a),i.push(dt),n.push(V.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push(ut),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:r,types:i}}function mt(e){return pt(e).values}function ht({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===ut?i+=Ke(r[a]):e===dt?i+=V.transform(r[a]):i+=r[a]}return i}}function gt(e){return ht(pt(e))}const _t=e=>typeof e==`number`?0:V.test(e)?V.getAnimatableNone(e):e,vt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:_t(e);function yt(e){let t=pt(e);return ht(t)(t.values.map((e,n)=>vt(e,t.split[n])))}const H={test:lt,parse:mt,createTransformer:gt,getAnimatableNone:yt};function bt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xt({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=bt(s,r,e+1/3),a=bt(s,r,e),o=bt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function St(e,t){return n=>n>0?t:e}const U=(e,t,n)=>e+(t-e)*n,Ct=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},wt=[nt,et,st],Tt=e=>wt.find(t=>t.test(e));function Et(e){let t=Tt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===st&&(n=xt(n)),n}const Dt=(e,t)=>{let n=Et(e),r=Et(t);if(!n||!r)return St(e,t);let i={...n};return e=>(i.red=Ct(n.red,r.red,e),i.green=Ct(n.green,r.green,e),i.blue=Ct(n.blue,r.blue,e),i.alpha=U(n.alpha,r.alpha,e),et.transform(i))},Ot=new Set([`none`,`hidden`]);function kt(e,t){return Ot.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function At(e,t){return n=>U(e,t,n)}function jt(e){return typeof e==`number`?At:typeof e==`string`?Be(e)?St:V.test(e)?Dt:Ft:Array.isArray(e)?Mt:typeof e==`object`?V.test(e)?Dt:Nt:St}function Mt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>jt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Nt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=jt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Pt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}const Ft=(e,t)=>{let n=H.createTransformer(t),r=pt(e),i=pt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ot.has(e)&&!i.values.length||Ot.has(t)&&!r.values.length?kt(e,t):ie(Mt(Pt(r,i),i.values),n):(`${e}${t}`,St(e,t))};function It(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?U(e,t,n):jt(e)(e,t)}const Lt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>P.update(t,e),stop:()=>F(t),now:()=>I.isProcessing?I.timestamp:L.now()}},Rt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},zt=2e4;function Bt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Vt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Bt(r),zt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:M(i)}}const W={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};function Ht(e,t){return e*Math.sqrt(1-t*t)}function Ut(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}const Wt=.001;function Gt({duration:e=W.duration,bounce:t=W.bounce,velocity:n=W.velocity,mass:r=W.mass}){let i,a;W.maxDuration;let o=1-t;o=D(W.minDamping,W.maxDamping,o),e=D(W.minDuration,W.maxDuration,M(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Ht(t,o),c=Math.exp(-i);return Wt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Ht(t**2,o);return(-i(t)+Wt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Ut(i,a,s);if(e=j(e),isNaN(c))return{stiffness:W.stiffness,damping:W.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}const Kt=[`duration`,`bounce`],qt=[`stiffness`,`damping`,`mass`];function Jt(e,t){return t.some(t=>e[t]!==void 0)}function Yt(e){let t={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...e};if(!Jt(e,qt)&&Jt(e,Kt))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*D(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:W.mass,stiffness:i,damping:a}}else{let n=Gt({...e,velocity:0});t={...t,...n,mass:W.mass},t.isResolvedFromDuration=!0}return t}function Xt(e=W.visualDuration,t=W.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Yt({...n,velocity:-M(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=M(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?W.restSpeed.granular:W.restSpeed.default,i||=v?W.restDelta.granular:W.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Ht(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>j(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=j(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=j(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Bt(T),zt),t=Rt(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Xt.applyToOptions=e=>{let t=Vt(e,100,Xt);return e.ease=t.ease,e.duration=j(t.duration),e.type=`keyframes`,e};function Zt(e,t,n){let r=Math.max(t-5,0);return se(n-e(r),t-r)}function Qt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Xt({keyframes:[f.value,m(f.value)],velocity:Zt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function $t(e,t,n){let r=[],i=n||O.mix||It,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ie(Array.isArray(t)?t[n]||A:t,a)),r.push(a)}return r}function en(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=$t(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ae(e[r],e[r+1],n);return s[r](i)};return n?t=>l(D(e[0],e[a-1],t)):l}function tn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ae(0,t,r);e.push(U(n,1,i))}}function nn(e){let t=[0];return tn(t,e.length-1),t}function rn(e,t){return e.map(e=>e*t)}function an(e,t){return e.map(()=>t||Ce).splice(0,e.length-1)}function on({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=we(r)?r.map(ke):ke(r),a={done:!1,value:t[0]},o=en(rn(n&&n.length===t.length?n:nn(t),e),t,{ease:Array.isArray(i)?i:an(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}const sn=e=>e!==null;function cn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(sn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}const ln={decay:Qt,inertia:Qt,tween:on,keyframes:on,spring:Xt};function un(e){typeof e.type==`string`&&(e.type=ln[e.type])}var dn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};const fn=e=>e/100;var pn=class extends dn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==L.now()&&this.tick(L.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Ie.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;un(e);let{type:t=on,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||on;s!==on&&typeof o[0]!=`number`&&(this.mixKeyframes=ie(fn,It(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Bt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=D(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Qt&&(b.value=cn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return M(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+M(e)}get time(){return M(this.currentTime)}set time(e){e=j(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Zt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(L.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=M(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Lt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(L.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Ie.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function mn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const hn=e=>e*180/Math.PI,gn=e=>vn(hn(Math.atan2(e[1],e[0]))),_n={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gn,rotateZ:gn,skewX:e=>hn(Math.atan(e[1])),skewY:e=>hn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vn=e=>(e%=360,e<0&&(e+=360),e),yn=gn,bn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bn,scaleY:xn,scale:e=>(bn(e)+xn(e))/2,rotateX:e=>vn(hn(Math.atan2(e[6],e[5]))),rotateY:e=>vn(hn(Math.atan2(-e[2],e[0]))),rotateZ:yn,rotate:yn,skewX:e=>hn(Math.atan(e[4])),skewY:e=>hn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Cn(e){return+!!e.includes(`scale`)}function wn(e,t){if(!e||e===`none`)return Cn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Sn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_n,i=t}if(!i)return Cn(t);let a=r[t],o=i[1].split(`,`).map(En);return typeof a==`function`?a(o):o[a]}const Tn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return wn(n,t)};function En(e){return parseFloat(e.trim())}const Dn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],On=new Set(Dn),kn=e=>e===Ue||e===B,An=new Set([`x`,`y`,`z`]),jn=Dn.filter(e=>!An.has(e));function Mn(e){let t=[];return jn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}const G={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>wn(t,`x`),y:(e,{transform:t})=>wn(t,`y`)};G.translateX=G.x,G.translateY=G.y;const Nn=new Set;let Pn=!1,Fn=!1,In=!1;function Ln(){if(Fn){let e=Array.from(Nn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Mn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Fn=!1,Pn=!1,Nn.forEach(e=>e.complete(In)),Nn.clear()}function Rn(){Nn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Fn=!0)})}function zn(){In=!0,Rn(),Ln(),In=!1}var Bn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Nn.add(this),Pn||(Pn=!0,P.read(Rn),P.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}mn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Nn.delete(this)}cancel(){this.state===`scheduled`&&(Nn.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}};const Vn=e=>e.startsWith(`--`);function Hn(e,t,n){Vn(t)?e.style.setProperty(t,n):e.style[t]=n}const Un={};function Wn(e,t){let n=ne(e);return()=>Un[t]??n()}const Gn=Wn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Kn=Wn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),qn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Jn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:qn([0,.65,.55,1]),circOut:qn([.55,0,1,.45]),backIn:qn([.31,.01,.66,-.59]),backOut:qn([.33,1.53,.69,.99])};function Yn(e,t){if(e)return typeof e==`function`?Kn()?Rt(e,t):`ease-out`:Ee(e)?qn(e):Array.isArray(e)?e.map(e=>Yn(e,t)||Jn.easeOut):Jn[e]}function Xn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Yn(s,i);Array.isArray(d)&&(u.easing=d),N.value&&Ie.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return N.value&&p.finished.finally(()=>{Ie.waapi--}),p}function Zn(e){return typeof e==`function`&&`applyToOptions`in e}function Qn({type:e,...t}){return Zn(e)&&Kn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var $n=class extends dn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Qn(e);this.animation=Xn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=cn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Hn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return M(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+M(e)}get time(){return M(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=j(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Gn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),A):r(this)}};const er={anticipate:_e,backInOut:ge,circInOut:be};function tr(e){return e in er}function nr(e){typeof e.ease==`string`&&tr(e.ease)&&(e.ease=er[e.ease])}var rr=class extends $n{constructor(e){nr(e),un(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new pn({...a,autoplay:!1}),s=Math.max(10,L.now()-this.startTime),c=D(0,10,s-10),l=o.sample(s).value,{name:u}=this.options;i&&u&&Hn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}};const ir=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(H.test(e)||e===`0`)&&!e.startsWith(`url(`));function ar(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function or(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ir(i,t),s=ir(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ar(e)||(n===`spring`||Zn(n))&&r}function sr(e){e.duration=0,e.type=`keyframes`}const cr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),lr=ne(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function ur(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return lr()&&n&&cr.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var dr=class extends dn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=L.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Bn;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=L.now();let u=!0;or(e,i,a,o)||(u=!1,(O.instantAnimations||!s)&&l?.(cn(e,n,t)),e[0]=e[e.length-1],sr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&ur(d),p=d.motionValue?.owner?.current,m=f?new rr({...d,element:p}):new pn(d);m.finished.then(()=>{this.notifyFinished()}).catch(A),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),zn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},fr=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return pr(this.animations,`duration`)}get iterationDuration(){return pr(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function pr(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var mr=class extends fr{then(e,t){return this.finished.finally(e).then(()=>{})}};function hr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}const gr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _r(e){let t=gr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function vr(e,t,n=1){`${e}`;let[r,i]=_r(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return k(e)?parseFloat(e):e}return Be(i)?vr(i,t,n+1):i}const yr={type:`spring`,stiffness:500,damping:25,restSpeed:10},br=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xr={type:`keyframes`,duration:.8},Sr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Cr=(e,{keyframes:t})=>t.length>2?xr:On.has(e)?e.startsWith(`scale`)?br(t[1]):yr:Sr,wr=e=>e!==null;function Tr(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(wr),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}function Er(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Dr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Er(n,e)}function Or({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const kr=(e,t,n,r={},i,a)=>o=>{let s=Dr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=j(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Or(s)||Object.assign(u,Cr(e,u)),u.duration&&=j(u.duration),u.repeatDelay&&=j(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(sr(u),u.delay===0&&(d=!0)),(O.instantAnimations||O.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,sr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Tr(u.keyframes,s);if(e!==void 0){P.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new pn(u):new dr(u)};function Ar(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function jr(e,t,n,r){if(typeof t==`function`){let[i,a]=Ar(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Ar(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Mr(e,t,n){let r=e.getProps();return jr(r,t,n===void 0?r.custom:n,e)}const Nr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Dn]),Pr=e=>!isNaN(parseFloat(e)),Fr={current:void 0};var Ir=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=L.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=L.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Pr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new oe);let n=this.events[e].add(t);return e===`change`?()=>{n(),P.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Fr.current&&Fr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=L.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return se(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function K(e,t){return new Ir(e,t)}const Lr=e=>Array.isArray(e);function Rr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K(n))}function zr(e){return Lr(e)?e[e.length-1]||0:e}function Br(e,t){let{transitionEnd:n={},transition:r={},...i}=Mr(e,t)||{};i={...i,...n};for(let t in i)Rr(e,t,zr(i[t]))}const q=e=>!!(e&&e.getVelocity);function Vr(e){return!!(q(e)&&e.add)}function Hr(e,t){let n=e.getValue(`willChange`);if(Vr(n))return n.add(t);if(!n&&O.WillChange){let n=new O.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ur(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Wr=`data-`+Ur(`framerAppearId`);function Gr(e){return e.props[Wr]}function Kr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Er(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Kr(d,t))continue;let o={delay:n,...Dr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){let n=Gr(e);if(n){let e=window.MotionHandoffAnimation(n,t,P);e!==null&&(o.startTime=e,f=!0)}}Hr(e,t);let p=l??e.shouldReduceMotion;r.start(kr(t,r,i,p&&Nr.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>P.update(()=>{o&&Br(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Jr(e,t,n={}){let r=Mr(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(qr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Yr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Yr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Jr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+hr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Xr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Jr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Jr(e,t,n);else{let i=typeof t==`function`?Mr(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}const Zr={test:e=>e===`auto`,parse:e=>e},Qr=e=>t=>t.test(e),$r=[Ue,B,z,R,at,it,Zr],ei=e=>$r.find(Qr(e));function ti(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||te(e)}const ni=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ri(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(qe)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ni.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}const ii=/\b([a-z-]*)\(.*?\)/gu,ai={...H,getAnimatableNone:e=>{let t=e.match(ii);return t?t.map(ri).join(` `):e}},oi={...H,getAnimatableNone:e=>{let t=H.parse(e);return H.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},si={...Ue,transform:Math.round},ci={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius: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,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,rotate:R,rotateX:R,rotateY:R,rotateZ:R,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:R,skewX:R,skewY:R,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:We,originX:ot,originY:ot,originZ:B,zIndex:si,fillOpacity:We,strokeOpacity:We,numOctaves:si},li={...ci,color:V,backgroundColor:V,outlineColor:V,fill:V,stroke:V,borderColor:V,borderTopColor:V,borderRightColor:V,borderBottomColor:V,borderLeftColor:V,filter:ai,WebkitFilter:ai,mask:oi,WebkitMask:oi},ui=e=>li[e],di=new Set([ai,oi]);function fi(e,t){let n=ui(e);return di.has(n)||(n=H),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pi=new Set([`auto`,`none`,`0`]);function mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!pi.has(t)&&pt(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=fi(n,i)}var hi=class extends Bn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Be(r))){let i=vr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Nr.has(n)||e.length!==2)return;let[r,i]=e,a=ei(r),o=ei(i);if(He(r)!==He(i)&&G[n]){this.needsMeasurement=!0;return}if(a!==o)if(kn(a)&&kn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else G[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ti(e[t]))&&n.push(t);n.length&&mi(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=G[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=G[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};const gi=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function _i(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}const vi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function yi(e){return ee(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}const{schedule:bi,cancel:xi}=Me(queueMicrotask,!1),J={x:!1,y:!1};function Si(){return J.x||J.y}function Ci(e){return e===`x`||e===`y`?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function wi(e,t){let n=_i(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ti(e){return!(e.pointerType===`touch`||Si())}function Ei(e,t,n={}){let[r,i,a]=wi(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Ti(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}const Di=(e,t)=>t?e===t?!0:Di(e,t.parentElement):!1,Oi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ki=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ai(e){return ki.has(e.tagName)||e.isContentEditable===!0}const ji=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Mi(e){return ji.has(e.tagName)||e.isContentEditable===!0}const Ni=new WeakSet;function Pi(e){return t=>{t.key===`Enter`&&e(t)}}function Fi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const Ii=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Pi(()=>{if(Ni.has(n))return;Fi(n,`down`);let e=Pi(()=>{Fi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Fi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Li(e){return Oi(e)&&!Si()}const Ri=new WeakSet;function zi(e,t,n={}){let[r,i,a]=wi(e,n),o=e=>{let r=e.currentTarget;if(!Li(e)||Ri.has(e))return;Ni.add(r),n.stopPropagation&&Ri.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Ni.has(r)&&Ni.delete(r),Li(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Di(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),yi(e)&&(e.addEventListener(`focus`,e=>Ii(e,i)),!Ai(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Bi(e){return ee(e)&&`ownerSVGElement`in e}const Vi=new WeakMap;let Hi;const Ui=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Bi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Wi=Ui(`inline`,`width`,`offsetWidth`),Gi=Ui(`block`,`height`,`offsetHeight`);function Ki({target:e,borderBoxSize:t}){Vi.get(e)?.forEach(n=>{n(e,{get width(){return Wi(e,t)},get height(){return Gi(e,t)}})})}function qi(e){e.forEach(Ki)}function Ji(){typeof ResizeObserver>`u`||(Hi=new ResizeObserver(qi))}function Yi(e,t){Hi||Ji();let n=_i(e);return n.forEach(e=>{let n=Vi.get(e);n||(n=new Set,Vi.set(e,n)),n.add(t),Hi?.observe(e)}),()=>{n.forEach(e=>{let n=Vi.get(e);n?.delete(t),n?.size||Hi?.unobserve(e)})}}const Xi=new Set;let Zi;function Qi(){Zi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xi.forEach(t=>t(e))},window.addEventListener(`resize`,Zi)}function $i(e){return Xi.add(e),Zi||Qi(),()=>{Xi.delete(e),!Xi.size&&typeof Zi==`function`&&(window.removeEventListener(`resize`,Zi),Zi=void 0)}}function ea(e,t){return typeof e==`function`?$i(e):Yi(e,t)}function ta(e){return Bi(e)&&e.tagName===`svg`}const na=[...$r,V,H],ra=e=>na.find(Qr(e)),ia=()=>({translate:0,scale:1,origin:0,originPoint:0}),aa=()=>({x:ia(),y:ia()}),oa=()=>({min:0,max:0}),Y=()=>({x:oa(),y:oa()}),sa=new WeakMap;function ca(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function la(e){return typeof e==`string`||Array.isArray(e)}const ua=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],da=[`initial`,...ua];function fa(e){return ca(e.animate)||da.some(t=>la(e[t]))}function pa(e){return!!(fa(e)||e.variants)}function ma(e,t,n){for(let r in t){let i=t[r],a=n[r];if(q(i))e.addValue(r,i);else if(q(a))e.addValue(r,K(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,K(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const ha={current:null},ga={current:!1},_a=typeof window<`u`;function va(){if(ga.current=!0,_a)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ha.current=e.matches;e.addEventListener(`change`,t),t()}else ha.current=!1}const ya=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];let ba={};function xa(e){ba=e}function Sa(){return ba}var Ca=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Bn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=L.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,P.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=fa(t),this.isVariantNode=pa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&q(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,sa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ga.current||va(),this.shouldReduceMotion=ha.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),F(this.notifyUpdate),F(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&gi.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new $n({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:j(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=On.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&P.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ba){let t=ba[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ya.length;t++){let n=ya[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=ma(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=K(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(k(n)||te(n))?n=parseFloat(n):!ra(n)&&H.test(t)&&(n=fi(e,t)),this.setBaseTarget(e,q(n)?n.get():n)),q(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=jr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!q(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new oe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){bi.render(this.render)}},wa=class extends Ca{constructor(){super(...arguments),this.KeyframeResolver=hi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;q(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},X=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ta({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ea({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Da(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Oa(e){return e===void 0||e===1}function ka({scale:e,scaleX:t,scaleY:n}){return!Oa(e)||!Oa(t)||!Oa(n)}function Aa(e){return ka(e)||ja(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ja(e){return Ma(e.x)||Ma(e.y)}function Ma(e){return e&&e!==`0%`}function Na(e,t,n){return n+t*(e-n)}function Pa(e,t,n,r,i){return i!==void 0&&(e=Na(e,i,r)),Na(e,n,r)+t}function Fa(e,t=0,n=1,r,i){e.min=Pa(e.min,t,n,r,i),e.max=Pa(e.max,t,n,r,i)}function Ia(e,{x:t,y:n}){Fa(e.x,t.translate,t.scale,t.originPoint),Fa(e.y,n.translate,n.scale,n.originPoint)}const La=.999999999999,Ra=1.0000000000001;function za(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Ua(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ia(e,o)),r&&Aa(a.latestValues)&&Ua(e,a.latestValues,a.layout?.layoutBox))}t.x<Ra&&t.x>La&&(t.x=1),t.y<Ra&&t.y>La&&(t.y=1)}function Ba(e,t){e.min+=t,e.max+=t}function Va(e,t,n,r,i=.5){Fa(e,t,n,U(e.min,e.max,i),r)}function Ha(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ua(e,t,n){let r=n??e;Va(e.x,Ha(t.x,r.x),t.scaleX,t.scale,t.originX),Va(e.y,Ha(t.y,r.y),t.scaleY,t.scale,t.originY)}function Wa(e,t){return Ta(Da(e.getBoundingClientRect(),t))}function Ga(e,t,n){let r=Wa(e,n),{scroll:i}=t;return i&&(Ba(r.x,i.offset.x),Ba(r.y,i.offset.y)),r}const Ka={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},qa=Dn.length;function Ja(e,t,n){let r=``,i=!0;for(let a=0;a<qa;a++){let o=Dn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=vi(s,ci[o]);if(!c){i=!1;let t=Ka[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ya(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(On.has(e)){o=!0;continue}else if(Re(e)){i[e]=n;continue}else{let t=vi(n,ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ja(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Xa(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Za(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Qa={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(B.test(e))e=parseFloat(e);else return e;return`${Za(e,t.target.x)}% ${Za(e,t.target.y)}%`}},$a={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=H.parse(e);if(i.length>5)return r;let a=H.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=U(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},eo={borderRadius:{...Qa,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Qa,borderTopRightRadius:Qa,borderBottomLeftRadius:Qa,borderBottomRightRadius:Qa,boxShadow:$a};function to(e,{layout:t,layoutId:n}){return On.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!eo[e]||e===`opacity`)}function no(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(q(r[t])||i&&q(i[t])||to(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function ro(e){return window.getComputedStyle(e)}var io=class extends wa{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Xa}readValueFromInstance(e,t){if(On.has(t))return this.projection?.isProjecting?Cn(t):Tn(e,t);{let n=ro(e),r=(Re(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Wa(e,t)}build(e,t,n){Ya(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return no(e,t,n)}};function ao(e,t){return e in t}var oo=class extends Ca{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(ao(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Y()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}};const so={offset:`stroke-dashoffset`,array:`stroke-dasharray`},co={offset:`strokeDashoffset`,array:`strokeDasharray`};function lo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?so:co;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const uo=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function fo(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ya(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of uo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&lo(d,i,a,o,!1)}const po=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`]),mo=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ho(e,t,n,r){Xa(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(po.has(n)?n:Ur(n),t.attrs[n])}function go(e,t,n){let r=no(e,t,n);for(let n in e)if(q(e[n])||q(t[n])){let t=Dn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var _o=class extends wa{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(On.has(t)){let e=ui(t);return e&&e.default||0}return t=po.has(t)?t:Ur(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return go(e,t,n)}build(e,t,n){fo(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ho(e,t,n,r)}mount(e){this.isSVGTag=mo(e.tagName),super.mount(e)}};const vo=da.length;function yo(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&yo(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<vo;n++){let r=da[n],i=e.props[r];(la(i)||i===!1)&&(t[r]=i)}return t}function bo(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const xo=[...ua].reverse(),So=ua.length;function Co(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Xr(e,t,n)))}function wo(e){let t=Co(e),n=Do(),r=!0,i=!1,a=t=>(n,r)=>{let i=Mr(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=yo(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<So;t++){let p=xo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=la(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||ca(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=To(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Lr(t)&&Lr(n)?!bo(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Mr(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=hr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Mr(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Do(),i=!0}}}function To(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!bo(t,e):!1}function Eo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Do(){return{animate:Eo(!0),whileInView:Eo(),whileHover:Eo(),whileTap:Eo(),whileDrag:Eo(),whileFocus:Eo(),exit:Eo()}}function Oo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){Oo(e.x,t.x),Oo(e.y,t.y)}function ko(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Q(e){return e.max-e.min}function Ao(e,t,n){return Math.abs(e-t)<=n}function jo(e,t,n,r=.5){e.origin=r,e.originPoint=U(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=U(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Mo(e,t,n,r){jo(e.x,t.x,n.x,r?r.originX:void 0),jo(e.y,t.y,n.y,r?r.originY:void 0)}function No(e,t,n){e.min=n.min+t.min,e.max=e.min+Q(t)}function Po(e,t,n){No(e.x,t.x,n.x),No(e.y,t.y,n.y)}function Fo(e,t,n){e.min=t.min-n.min,e.max=e.min+Q(t)}function Io(e,t,n){Fo(e.x,t.x,n.x),Fo(e.y,t.y,n.y)}function Lo(e,t,n,r,i){return e-=t,e=Na(e,1/n,r),i!==void 0&&(e=Na(e,1/i,r)),e}function Ro(e,t=0,n=1,r=.5,i,a=e,o=e){if(z.test(t)&&(t=parseFloat(t),t=U(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=U(a.min,a.max,r);e===a&&(s-=t),e.min=Lo(e.min,t,n,s,i),e.max=Lo(e.max,t,n,s,i)}function zo(e,t,[n,r,i],a,o){Ro(e,t[n],t[r],t[i],t.scale,a,o)}const Bo=[`x`,`scaleX`,`originX`],Vo=[`y`,`scaleY`,`originY`];function Ho(e,t,n,r){zo(e.x,t,Bo,n?n.x:void 0,r?r.x:void 0),zo(e.y,t,Vo,n?n.y:void 0,r?r.y:void 0)}function Uo(e){return e.translate===0&&e.scale===1}function Wo(e){return Uo(e.x)&&Uo(e.y)}function Go(e,t){return e.min===t.min&&e.max===t.max}function Ko(e,t){return Go(e.x,t.x)&&Go(e.y,t.y)}function qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Jo(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Yo(e){return Q(e.x)/Q(e.y)}function Xo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function Zo(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}const Qo=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],$o=Qo.length,es=e=>typeof e==`string`?parseFloat(e):e,ts=e=>typeof e==`number`||B.test(e);function ns(e,t,n,r,i,a){i?(e.opacity=U(0,n.opacity??1,is(r)),e.opacityExit=U(t.opacity??1,0,as(r))):a&&(e.opacity=U(t.opacity??1,n.opacity??1,r));for(let i=0;i<$o;i++){let a=`border${Qo[i]}Radius`,o=rs(t,a),s=rs(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||ts(o)===ts(s)?(e[a]=Math.max(U(es(o),es(s),r),0),(z.test(s)||z.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=U(t.rotate||0,n.rotate||0,r))}function rs(e,t){return e[t]===void 0?e.borderRadius:e[t]}const is=os(0,.5,ye),as=os(.5,.95,A);function os(e,t,n){return r=>r<e?0:r>t?1:n(ae(e,t,r))}function ss(e,t,n){let r=q(e)?e:K(e);return r.start(kr(``,r,t,n)),r.animation}function cs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ls=(e,t)=>e.depth-t.depth;var us=class{constructor(){this.children=[],this.isDirty=!1}add(e){T(this.children,e),this.isDirty=!0}remove(e){E(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ls),this.isDirty=!1,this.children.forEach(e)}};function ds(e,t){let n=L.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(F(r),e(a-t))};return P.setup(r,!0),()=>F(r)}function fs(e){return q(e)?e.get():e}var ps=class{constructor(){this.members=[]}add(e){T(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(E(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(E(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};const ms={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hs={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},gs=[``,`X`,`Y`,`Z`];let _s=0;function vs(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ys(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Gr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,P,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ys(r)}function bs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=_s++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,N.value&&(hs.nodes=hs.calculatedTargetDeltas=hs.calculatedProjections=0),this.nodes.forEach(Cs),this.nodes.forEach(As),this.nodes.forEach(js),this.nodes.forEach(ws),N.addProjectionMetrics&&N.addProjectionMetrics(hs)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new us)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new oe),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Bi(t)&&!ta(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;P.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ds(i,250),ms.hasAnimatedSinceResize&&(ms.hasAnimatedSinceResize=!1,this.nodes.forEach(ks)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Rs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Jo(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Dr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||ks(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),F(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ms),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ys(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Es);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ds);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Os),this.nodes.forEach(xs),this.nodes.forEach(Ss)):this.nodes.forEach(Ds),this.clearAllSnapshots();let e=L.now();I.delta=D(0,1e3/60,e-I.timestamp),I.timestamp=e,I.isProcessing=!0,Ne.update.process(I),Ne.preRender.process(I),Ne.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ts),this.sharedNodes.forEach(Ns)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,P.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Wo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Aa(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Hs(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Y();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ws))){let{scroll:e}=this.root;e&&(Ba(t.x,e.offset.x),Ba(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(Z(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z(t,e),Ba(t.x,i.offset.x),Ba(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=Y();Z(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Ua(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Aa(r.latestValues)&&Ua(n,r.latestValues,r.layout?.layoutBox)}return Aa(this.latestValues)&&Ua(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(e){let t=Y();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Aa(n.latestValues))continue;let r;n.instance&&(ka(n.latestValues)&&n.updateSnapshot(),r=Y(),Z(r,n.measurePageBox())),Ho(t,n.latestValues,n.snapshot?.layoutBox,r)}return Aa(this.latestValues)&&Ho(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=I.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Po(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z(this.target,this.layout.layoutBox),Ia(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),N.value&&hs.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||ka(this.parent.latestValues)||ja(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Io(this.relativeTargetOrigin,t,n),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===I.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;za(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Y());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ko(this.prevProjectionDelta.x,this.projectionDelta.x),ko(this.prevProjectionDelta.y,this.projectionDelta.y)),Mo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Xo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),N.value&&hs.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=aa(),this.projectionDelta=aa(),this.projectionDeltaWithTransform=aa()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=aa();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Y(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Ls));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Ps(a.x,e.x,n),Ps(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Is(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Ko(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Y(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,ns(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(F(this.pendingAnimation),void 0),this.pendingAnimation=P.update(()=>{ms.hasAnimatedSinceResize=!0,Ie.layout++,this.motionValue||=K(0),this.motionValue.jump(0,!1),this.currentAnimation=ss(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Ie.layout--},onComplete:()=>{Ie.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Us(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),Ua(t,i),Mo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ps),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&vs(`z`,e,r,this.animationValues);for(let t=0;t<gs.length;t++)vs(`rotate${gs[t]}`,e,r,this.animationValues),vs(`skew${gs[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=fs(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=fs(t?.pointerEvents)||``),this.hasProjected&&!Aa(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Zo(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in eo){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=eo[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?fs(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Es),this.root.sharedNodes.clear()}}}function xs(e){e.updateLayout()}function Ss(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Oo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Us(i,t.layoutBox,n)&&$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=aa();Mo(o,n,t.layoutBox);let s=aa();a?Mo(s,e.applyTransform(r,!0),t.measuredBox):Mo(s,n,t.layoutBox);let c=!Wo(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Y();Io(o,t.layoutBox,i.layoutBox);let s=Y();Io(s,n,a.layoutBox),Jo(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Cs(e){N.value&&hs.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function ws(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ts(e){e.clearSnapshot()}function Es(e){e.clearMeasurements()}function Ds(e){e.isLayoutDirty=!1}function Os(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ks(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function As(e){e.resolveTargetDelta()}function js(e){e.calcProjection()}function Ms(e){e.resetSkewAndRotation()}function Ns(e){e.removeLeadSnapshot()}function Ps(e,t,n){e.translate=U(t.translate,0,n),e.scale=U(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fs(e,t,n,r){e.min=U(t.min,n.min,r),e.max=U(t.max,n.max,r)}function Is(e,t,n,r){Fs(e.x,t.x,n.x,r),Fs(e.y,t.y,n.y,r)}function Ls(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Rs={duration:.45,ease:[.4,0,.1,1]},zs=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bs=zs(`applewebkit/`)&&!zs(`chrome/`)?Math.round:A;function Vs(e){e.min=Bs(e.min),e.max=Bs(e.max)}function Hs(e){Vs(e.x),Vs(e.y)}function Us(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ao(Yo(t),Yo(n),.2)}function Ws(e){return e!==e.root&&e.scroll?.wasRoot}const Gs=bs({attachResizeListener:(e,t)=>cs(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ks=e=>!e.isLayoutDirty&&e.willUpdate(!1);function qs(){let e=new Set,t=new WeakMap,n=()=>e.forEach(Ks);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}const Js={current:void 0},Ys=bs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Js.current){let e=new Gs({});e.mount(window),e.setOptions({layoutScroll:!0}),Js.current=e}return Js.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Xs=a({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Zs(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qs(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zs(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zs(e[t],null)}}}}function $s(...e){return t.useCallback(Qs(...e),e)}var ec=class extends t.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(yi(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=yi(e)&&e.offsetWidth||0,r=yi(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function tc({children:e,isPresent:n,anchorX:r,anchorY:i,root:a,pop:o}){let s=f(),c=g(null),l=g({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=u(Xs),m=$s(c,e.props?.ref??e?.ref);return p(()=>{let{width:e,height:t,top:u,left:f,right:p,bottom:m}=l.current;if(n||o===!1||!c.current||!e||!t)return;let h=r===`left`?`left: ${f}`:`right: ${p}`,g=i===`bottom`?`bottom: ${m}`:`top: ${u}`;c.current.dataset.motionPopId=s;let _=document.createElement(`style`);d&&(_.nonce=d);let v=a??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${s}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${e}px !important;
|
|
5
|
-
height: ${
|
|
5
|
+
height: ${t}px !important;
|
|
6
6
|
${h}px !important;
|
|
7
7
|
${g}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{c.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),b(PopChildMeasure,{isPresent:t,childRef:c,sizeRef:l,pop:o,children:o===!1?e:n.cloneElement(e,{ref:f})})}const PresenceChild=({children:e,initial:t,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:l,root:u})=>{let d=useConstant(newChildrenMap),f=p(),m=!0,h=g(()=>(m=!1,{id:f,initial:t,isPresent:r,custom:a,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;i&&i()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[r,d,i]);return o&&m&&(h={...h}),g(()=>{d.forEach((e,t)=>d.set(t,!1))},[r]),n.useEffect(()=>{!r&&!d.size&&i&&i()},[r]),e=b(PopChild,{pop:s===`popLayout`,isPresent:r,anchorX:c,anchorY:l,root:u,children:e}),b(w.Provider,{value:h,children:e})};function newChildrenMap(){return new Map}function usePresence(e=!0){let t=d(w);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=p();f(()=>{if(e)return i(a)},[e]);let o=u(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const getChildKey=e=>e.key||``;function onlyElements(e){let t=[];return r.forEach(e,e=>{l(e)&&t.push(e)}),t}const AnimatePresence=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,f]=usePresence(o),p=g(()=>onlyElements(e),[e]),m=o&&!u?[]:p.map(getChildKey),h=_(!0),x=_(p),w=useConstant(()=>new Map),T=_(new Set),[ee,te]=v(p),[E,ne]=v(p);C(()=>{h.current=!1,x.current=p;for(let e=0;e<E.length;e++){let t=getChildKey(E[e]);m.includes(t)?(w.delete(t),T.current.delete(t)):w.get(t)!==!0&&w.set(t,!1)}},[E,m.length,m.join(`-`)]);let D=[];if(p!==ee){let e=[...p];for(let t=0;t<E.length;t++){let n=E[t],r=getChildKey(n);m.includes(r)||(e.splice(t,0,n),D.push(n))}return a===`wait`&&D.length&&(e=D),ne(onlyElements(e)),te(p),null}let{forceRender:re}=d(S);return b(y,{children:E.map(e=>{let d=getChildKey(e),g=o&&!u?!1:p===E||m.includes(d),onExit=()=>{if(T.current.has(d))return;if(w.has(d))T.current.add(d),w.set(d,!0);else return;let e=!0;w.forEach(t=>{t||(e=!1)}),e&&(re?.(),ne(x.current),o&&f?.(),r&&r())};return b(PresenceChild,{isPresent:g,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:g?void 0:onExit,anchorX:s,anchorY:c,children:e},d)})})},cn=o(null);function useIsMounted(){let e=_(!1);return C(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function useForceUpdate(){let e=useIsMounted(),[t,n]=v(0),r=u(()=>{e.current&&n(t+1)},[t]);return[u(()=>k.postRender(r),[r]),t]}const shouldInheritGroup=e=>e===!0,shouldInheritId=e=>shouldInheritGroup(e===!0)||e===`id`,LayoutGroup=({children:e,id:t,inherit:n=!0})=>{let r=d(S),i=d(cn),[a,o]=useForceUpdate(),s=_(null),c=r.id||i;s.current===null&&(shouldInheritId(n)&&c&&(t=t?c+`-`+t:c),s.current={id:t,group:shouldInheritGroup(n)&&r.group||nodeGroup()});let l=g(()=>({...s.current,forceRender:a}),[o]);return b(S.Provider,{value:l,children:e})},ln=o({strict:!1}),un={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`]};let dn=!1;function initFeatureDefinitions(){if(dn)return;let e={};for(let t in un)e[t]={isEnabled:e=>un[t].some(t=>!!e[t])};setFeatureDefinitions(e),dn=!0}function getInitializedFeatureDefinitions(){return initFeatureDefinitions(),getFeatureDefinitions()}function loadFeatures(e){let t=getInitializedFeatureDefinitions();for(let n in e)t[n]={...t[n],...e[n]};setFeatureDefinitions(t)}function LazyMotion({children:e,features:t,strict:n=!1}){let[,r]=v(!isLazyBundle(t)),i=_(void 0);if(!isLazyBundle(t)){let{renderer:e,...n}=t;i.current=e,loadFeatures(n)}return f(()=>{isLazyBundle(t)&&t().then(({renderer:e,...t})=>{loadFeatures(t),i.current=e,r(!0)})},[]),b(ln.Provider,{value:{renderer:i.current,strict:n},children:e})}function isLazyBundle(e){return typeof e==`function`}const fn=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.propagate.ignoreStrict.viewport`.split(`.`));function isValidMotionProp(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||fn.has(e)}let shouldForward=e=>!isValidMotionProp(e);function loadExternalIsValidProp(e){typeof e==`function`&&(shouldForward=t=>t.startsWith(`on`)?!isValidMotionProp(t):e(t))}try{loadExternalIsValidProp(e(`@emotion/is-prop-valid`).default)}catch{}function filterProps(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||isMotionValue(e[i])||(shouldForward(i)||n===!0&&isValidMotionProp(i)||!t&&!isValidMotionProp(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function MotionConfig({children:e,isValidProp:t,...n}){t&&loadExternalIsValidProp(t);let r=d($);n={...r,...n},n.transition=resolveTransition(n.transition,r.transition),n.isStatic=useConstant(()=>n.isStatic);let i=g(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return b($.Provider,{value:i,children:e})}const pn=o({});function getCurrentTreeVariants(e,t){if(isControllingVariants(e)){let{initial:t,animate:n}=e;return{initial:t===!1||isVariantLabel(t)?t:void 0,animate:isVariantLabel(n)?n:void 0}}return e.inherit===!1?{}:t}function useCreateMotionContext(e){let{initial:t,animate:n}=getCurrentTreeVariants(e,d(pn));return g(()=>({initial:t,animate:n}),[variantLabelsAsDependency(t),variantLabelsAsDependency(n)])}function variantLabelsAsDependency(e){return Array.isArray(e)?e.join(` `):e}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(e,t,n){for(let r in t)!isMotionValue(t[r])&&!isForcedMotionValue(r,n)&&(e[r]=t[r])}function useInitialMotionValues({transformTemplate:e},t){return g(()=>{let n=createHtmlRenderState();return buildHTMLStyles(n,t,e),Object.assign({},n.vars,n.style)},[t])}function useStyle(e,t){let n=e.style||{},r={};return copyRawValuesOnly(r,n,e),Object.assign(r,useInitialMotionValues(e,t)),r}function useHTMLProps(e,t){let n={},r=useStyle(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.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=r,n}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}});function useSVGProps(e,t,n,r){let i=g(()=>{let n=createSvgRenderState();return buildSVGAttrs(n,t,isSVGTag(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};copyRawValuesOnly(t,e.style,e),i.style={...t,...i.style}}return i}const mn=[`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 isSVGComponent(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(mn.indexOf(e)>-1||/[A-Z]/u.test(e))}function useRender(e,t,n,{latestValues:r},i,o=!1,c){let l=(c??isSVGComponent(e)?useSVGProps:useHTMLProps)(t,r,i,e),u=filterProps(t,typeof e==`string`,o),d=e===a?{}:{...u,...l,ref:n},{children:f}=t,p=g(()=>isMotionValue(f)?f.get():f,[f]);return s(e,{...d,children:p})}function makeState({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:makeLatestValues(n,r,i,e),renderState:t()}}function makeLatestValues(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=resolveMotionValue(a[e]);let{initial:o,animate:s}=e,c=isControllingVariants(e),l=isVariantNode(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!isAnimationControls(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=resolveVariantFromProps(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}const makeUseVisualState=e=>(t,n)=>{let r=d(pn),i=d(w),make=()=>makeState(e,t,r,i);return n?make():useConstant(make)},hn=makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState}),gn=makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState}),_n=Symbol.for(`motionComponentSymbol`);function useMotionRef(e,t,n){let r=_(n);m(()=>{r.current=n});let i=_(null);return u(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const vn=o({});function isRefObject(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function useVisualElement(e,t,n,r,i,a){let{visualElement:o}=d(pn),s=d(ln),c=d(w),l=d($),u=l.reducedMotion,p=l.skipAnimations,h=_(null),g=_(!1);r||=s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:p,isSVG:a}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let v=h.current,y=d(vn);v&&!v.projection&&i&&(v.type===`html`||v.type===`svg`)&&createProjectionNode(h.current,n,i,y);let b=_(!1);m(()=>{v&&b.current&&v.update(n,c)});let x=n[et],S=_(!!x&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return C(()=>{g.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),f(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),!1),v.enteringChildren=void 0)}),v}function createProjectionNode(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:getClosestProjectingNode(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&isRefObject(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function getClosestProjectingNode(e){if(e)return e.options.allowProjection===!1?getClosestProjectingNode(e.parent):e.projection}function createMotionComponent(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&loadFeatures(r);let a=n?n===`svg`:isSVGComponent(e),o=a?gn:hn;function MotionDOMComponent(n,s){let c,l={...d($),...n,layoutId:useLayoutId(n)},{isStatic:u}=l,f=useCreateMotionContext(n),p=o(n,u);if(!u&&typeof window<`u`){useStrictMode(l,r);let t=getProjectionFunctionality(l);c=t.MeasureLayout,f.visualElement=useVisualElement(e,p,l,i,t.ProjectionNode,a)}return x(pn.Provider,{value:f,children:[c&&f.visualElement?b(c,{visualElement:f.visualElement,...l}):null,useRender(e,n,useMotionRef(p,f.visualElement,s),p,u,t,a)]})}MotionDOMComponent.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let s=c(MotionDOMComponent);return s[_n]=e,s}function useLayoutId({layoutId:e}){let t=d(S).id;return t&&e!==void 0?t+`-`+e:e}function useStrictMode(e,t){d(ln).strict}function getProjectionFunctionality(e){let{drag:t,layout:n}=getInitializedFeatureDefinitions();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function createMotionProxy(e,t){if(typeof Proxy>`u`)return createMotionComponent;let n=new Map,factory=(n,r)=>createMotionComponent(n,r,e,t),deprecatedFactoryFunction=(e,t)=>factory(e,t);return new Proxy(deprecatedFactoryFunction,{get:(r,i)=>i===`create`?factory:(n.has(i)||n.set(i,createMotionComponent(i,void 0,e,t)),n.get(i))})}const yn=createMotionProxy(),createDomVisualElement=(e,t)=>t.isSVG??isSVGComponent(e)?new SVGVisualElement(t):new HTMLVisualElement(t,{allowProjection:e!==a});var AnimationFeature=class extends Feature{constructor(e){super(e),e.animationState||=createAnimationState(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();isAnimationControls(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};let bn=0;var ExitAnimationFeature=class extends Feature{constructor(){super(...arguments),this.id=bn++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=resolveVariant(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}};const xn={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function extractEventInfo(e){return{point:{x:e.pageX,y:e.pageY}}}const addPointerInfo=e=>t=>isPrimaryPointer(t)&&e(t,extractEventInfo(t));function addPointerEvent(e,t,n,r){return addDomEvent(e,t,addPointerInfo(n),r)}const getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null,distance=(e,t)=>Math.abs(e-t);function distance2D(e,t){let n=distance(e.x,t.x),r=distance(e.y,t.y);return Math.sqrt(n**2+r**2)}const Sn=new Set([`auto`,`scroll`]);var PanSession=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=transformPoint(this.lastRawMoveEventInfo,this.transformPagePoint));let e=getPanInfo(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=distance2D(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=j;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=transformPoint(t,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=getPanInfo(e.type===`pointercancel`?this.lastMoveEventInfo:transformPoint(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!isPrimaryPointer(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=transformPoint(extractEventInfo(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=j;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,getPanInfo(s,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,`pointermove`,this.handlePointerMove),addPointerEvent(this.contextWindow,`pointerup`,this.handlePointerUp),addPointerEvent(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Sn.has(e.overflowX)||Sn.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),k.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),A(this.updatePoint)}};function transformPoint(e,t){return t?{point:t(e.point)}:e}function subtractPoint(e,t){return{x:e.x-t.x,y:e.y-t.y}}function getPanInfo({point:e},t){return{point:e,delta:subtractPoint(e,lastDevicePoint(t)),offset:subtractPoint(e,startDevicePoint(t)),velocity:getVelocity(t,.1)}}function startDevicePoint(e){return e[0]}function lastDevicePoint(e){return e[e.length-1]}function getVelocity(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=lastDevicePoint(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>secondsToMilliseconds(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>secondsToMilliseconds(t)*2&&(r=e[1]);let a=millisecondsToSeconds(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function applyConstraints(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?U(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?U(n,e,r.max):Math.min(e,n)),e}function calcRelativeAxisConstraints(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function calcRelativeConstraints(e,{top:t,left:n,bottom:r,right:i}){return{x:calcRelativeAxisConstraints(e.x,n,i),y:calcRelativeAxisConstraints(e.y,t,r)}}function calcViewportAxisConstraints(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function calcViewportConstraints(e,t){return{x:calcViewportAxisConstraints(e.x,t.x),y:calcViewportAxisConstraints(e.y,t.y)}}function calcOrigin(e,t){let n=.5,r=calcLength(e),i=calcLength(t);return i>r?n=progress(t.min,t.max-r,e.min):r>i&&(n=progress(e.min,e.max-i,t.min)),clamp(0,1,n)}function rebaseAxisConstraints(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Cn=.35;function resolveDragElastic(e=Cn){return e===!1?e=0:e===!0&&(e=Cn),{x:resolveAxisElastic(e,`left`,`right`),y:resolveAxisElastic(e,`top`,`bottom`)}}function resolveAxisElastic(e,t,n){return{min:resolvePointElastic(e,t),max:resolvePointElastic(e,n)}}function resolvePointElastic(e,t){return typeof e==`number`?e:e[t]||0}const wn=new WeakMap;var VisualElementDragControls=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let onSessionStart=e=>{t&&this.snapToCursor(extractEventInfo(e).point),this.stopAnimation()},onStart=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(e=>{let t=this.getAxisMotionValue(e).get()||0;if(R.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=calcLength(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&k.update(()=>i(e,t),!1,!0),addValueToWillChange(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},onMove=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=getCurrentDirection(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&k.update(()=>a(e,t),!1,!0)},onSessionEnd=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:i}=this.getProps();this.panSession=new PanSession(e,{onSessionStart,onStart,onMove,onSessionEnd,resumeAnimation},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:getContextWindow(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&k.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!shouldDrag(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=applyConstraints(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&isRefObject(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=calcRelativeConstraints(n.layoutBox,e):this.constraints=!1,this.elastic=resolveDragElastic(t),r!==this.constraints&&!isRefObject(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=rebaseAxisConstraints(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!isRefObject(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=measurePageBox(n,r.root,this.visualElement.getTransformPagePoint()),a=calcViewportConstraints(r.layout.layoutBox,i);if(t){let e=t(convertBoxToBoundingBox(a));this.hasMutatedConstraints=!!e,e&&(a=convertBoundingBoxToBox(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=eachAxis(o=>{if(!shouldDrag(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return addValueToWillChange(this.visualElement,e),n.start(animateMotionValue(e,n,0,t,this.visualElement,!1))}stopAnimation(){eachAxis(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){eachAxis(t=>{let{drag:n}=this.getProps();if(!shouldDrag(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-U(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!isRefObject(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};eachAxis(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=calcOrigin({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),eachAxis(t=>{if(!shouldDrag(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(U(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;wn.set(this.visualElement,this);let e=this.visualElement.current,t=addPointerEvent(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&isElementTextInput(i);n&&r&&!a&&this.start(t)}),n,measureDragConstraints=()=>{let{dragConstraints:t}=this.getProps();isRefObject(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=startResizeObservers(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,measureDragConstraints);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),k.read(measureDragConstraints);let a=addDomEvent(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eachAxis(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Cn,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function skipFirstCall(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function startResizeObservers(e,t,n){let r=resize(e,skipFirstCall(n)),i=resize(t,skipFirstCall(n));return()=>{r(),i()}}function shouldDrag(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function getCurrentDirection(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var DragGesture=class extends Feature{constructor(e){super(e),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};const asyncHandler=e=>(t,n)=>{e&&k.update(()=>e(t,n),!1,!0)};var PanGesture=class extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(e){this.session=new PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:asyncHandler(e),onStart:asyncHandler(t),onMove:asyncHandler(n),onEnd:(e,t)=>{delete this.session,r&&k.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};let Tn=!1;var MeasureLayoutWithContext=class extends i{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Tn&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),$t.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Tn=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||k.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pt.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Tn=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function MeasureLayout(e){let[t,n]=usePresence(),r=d(S);return b(MeasureLayoutWithContext,{...e,layoutGroup:r,switchLayoutGroup:d(vn),isPresent:t,safeToRemove:n})}const En={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:sn,MeasureLayout}};function handleHoverEvent(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&k.postRender(()=>i(t,extractEventInfo(t)))}var HoverGesture=class extends Feature{mount(){let{current:e}=this.node;e&&(this.unmount=hover(e,(e,t)=>(handleHoverEvent(this.node,t,`Start`),e=>handleHoverEvent(this.node,e,`End`))))}unmount(){}},FocusGesture=class extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=pipe(addDomEvent(this.node.current,`focus`,()=>this.onFocus()),addDomEvent(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function handlePressEvent(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&k.postRender(()=>i(t,extractEventInfo(t)))}var PressGesture=class extends Feature{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=press(e,(e,t)=>(handlePressEvent(this.node,t,`Start`),(e,{success:t})=>handlePressEvent(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}};const Dn=new WeakMap,On=new WeakMap,fireObserverCallback=e=>{let t=Dn.get(e.target);t&&t(e)},fireAllObserverCallbacks=e=>{e.forEach(fireObserverCallback)};function initIntersectionObserver({root:e,...t}){let n=e||document;On.has(n)||On.set(n,{});let r=On.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(fireAllObserverCallbacks,{root:e,...t})),r[i]}function observeIntersection(e,t,n){let r=initIntersectionObserver(t);return Dn.set(e,n),r.observe(e),()=>{Dn.delete(e),r.unobserve(e)}}const kn={some:0,all:1};var InViewFeature=class extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:kn[r]},onIntersectionUpdate=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};return observeIntersection(this.node.current,a,onIntersectionUpdate)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(hasViewportOptionChanged(e,t))&&this.startObserver()}unmount(){}};function hasViewportOptionChanged({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const An={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},jn={layout:{ProjectionNode:sn,MeasureLayout}},Mn={renderer:createDomVisualElement,...xn,...An,...En,...jn};function useMotionValue(e){let t=useConstant(()=>motionValue(e)),{isStatic:n}=d($);if(n){let[,n]=v(e);f(()=>t.on(`change`,n),[])}return t}function useReducedMotion(){!Ot.current&&initPrefersReducedMotion();let[e]=v(Dt.current);return e}function useReducedMotionConfig(){let e=useReducedMotion(),{reducedMotion:t}=d($);return t===`never`?!1:t===`always`?!0:e}function isDOMKeyframes(e){return typeof e==`object`&&!Array.isArray(e)}function resolveSubjects(e,t,n,r){return e==null?[]:typeof e==`string`&&isDOMKeyframes(t)?resolveElements(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function calculateRepeatDuration(e,t,n){return e*(t+1)}function calcNextTime(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function eraseKeyframes(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(removeItem(e,i),r--)}}function addKeyframes(e,t,n,r,i,a){eraseKeyframes(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:U(i,a,r[o]),easing:getEasingForSegment(n,o)})}function normalizeTimes(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function compareByTime(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}function createAnimationsFromSequence(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,calcNextTime(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=calcNextTime(d,h.at,u,l));let g=0,resolveValueSequence=(e,n,r,o=0,s=0)=>{let c=keyframesAsList(e),{delay:l=0,times:u=defaultOffset(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=isGenerator(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&isNumberKeyframesArray(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=secondsToMilliseconds(b));let r=createGeneratorEasing(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&fillOffset(u,T),c.length===1&&c.unshift(null),m){b=calculateRepeatDuration(b,m);let e=[...c],t=[...u];y=Array.isArray(y)?[...y]:[y];let n=[...y];for(let r=0;r<m;r++){c.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(r+1)),y.push(i===0?`linear`:getEasingForSegment(n,i-1))}normalizeTimes(u,m)}let ee=w+b;addKeyframes(r,c,y,u,w,ee),g=Math.max(x+b,g),f=Math.max(ee,f)};if(isMotionValue(p)){let e=getSubjectSequence(p,s);resolveValueSequence(m,h,getValueSequence(`default`,e))}else{let e=resolveSubjects(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=getSubjectSequence(r,s);for(let e in m)resolveValueSequence(m[e],getValueTransition(h,e),getValueSequence(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(compareByTime);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(progress(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(`easeInOut`)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function getSubjectSequence(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function getValueSequence(e,t){return t[e]||(t[e]=[]),t[e]}function keyframesAsList(e){return Array.isArray(e)?e:[e]}function getValueTransition(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const isNumber=e=>typeof e==`number`,isNumberKeyframesArray=e=>e.every(isNumber);function createDOMVisualElement(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=isSVGElement(e)&&!isSVGSVGElement(e)?new SVGVisualElement(t):new HTMLVisualElement(t);n.mount(e),X.set(e,n)}function createObjectVisualElement(e){let t=new ObjectVisualElement({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),X.set(e,t)}function isSingleValue(e,t){return isMotionValue(e)||typeof e==`number`||typeof e==`string`&&!isDOMKeyframes(t)}function animateSubject(e,t,n,r){let i=[];if(isSingleValue(e,t))i.push(animateSingleValue(e,isDOMKeyframes(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=resolveSubjects(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?createDOMVisualElement:createObjectVisualElement;X.has(r)||s(r);let c=X.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...animateTarget(c,{...t,transition:l},{}))}}return i}function animateSequence(e,t,n){let r=[];return createAnimationsFromSequence(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=motionValue(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring}).forEach(({keyframes:e,transition:t},n)=>{r.push(...animateSubject(n,e,t))}),r}function isSequence(e){return Array.isArray(e)&&e.some(Array.isArray)}function createScopedAnimate(e={}){let{scope:t,reduceMotion:n}=e;function scopedAnimate(e,r,i){let a=[],o;if(isSequence(e)){let{onComplete:i,...s}=r||{};typeof i==`function`&&(o=i),a=animateSequence(e,n===void 0?s:{reduceMotion:n,...s},t)}else{let{onComplete:s,...c}=i||{};typeof s==`function`&&(o=s),a=animateSubject(e,r,n===void 0?c:{reduceMotion:n,...c},t)}let s=new GroupAnimationWithThen(a);return o&&s.finished.then(o),t&&(t.animations.push(s),s.finished.then(()=>{removeItem(t.animations,s)})),s}return scopedAnimate}const Nn=createScopedAnimate();var DragControls=class{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}};const createDragControls=()=>new DragControls;function useDragControls(){return useConstant(createDragControls)}function createMinimalMotionComponent(e,t){return createMotionComponent(e,t)}const Pn=createMinimalMotionComponent(`a`),Fn=createMinimalMotionComponent(`abbr`),In=createMinimalMotionComponent(`address`),Ln=createMinimalMotionComponent(`area`),Rn=createMinimalMotionComponent(`article`),zn=createMinimalMotionComponent(`aside`),Bn=createMinimalMotionComponent(`audio`),Vn=createMinimalMotionComponent(`b`),Hn=createMinimalMotionComponent(`base`),Un=createMinimalMotionComponent(`bdi`),Wn=createMinimalMotionComponent(`bdo`),Gn=createMinimalMotionComponent(`big`),Kn=createMinimalMotionComponent(`blockquote`),qn=createMinimalMotionComponent(`body`),Jn=createMinimalMotionComponent(`button`),Yn=createMinimalMotionComponent(`canvas`),Xn=createMinimalMotionComponent(`caption`),Zn=createMinimalMotionComponent(`cite`),Qn=createMinimalMotionComponent(`code`),$n=createMinimalMotionComponent(`col`),er=createMinimalMotionComponent(`colgroup`),tr=createMinimalMotionComponent(`data`),nr=createMinimalMotionComponent(`datalist`),rr=createMinimalMotionComponent(`dd`),ir=createMinimalMotionComponent(`del`),ar=createMinimalMotionComponent(`details`),or=createMinimalMotionComponent(`dfn`),sr=createMinimalMotionComponent(`dialog`),cr=createMinimalMotionComponent(`div`),lr=createMinimalMotionComponent(`dl`),ur=createMinimalMotionComponent(`dt`),dr=createMinimalMotionComponent(`em`),fr=createMinimalMotionComponent(`embed`),pr=createMinimalMotionComponent(`fieldset`),mr=createMinimalMotionComponent(`figcaption`),hr=createMinimalMotionComponent(`figure`),gr=createMinimalMotionComponent(`footer`),_r=createMinimalMotionComponent(`form`),vr=createMinimalMotionComponent(`h1`),yr=createMinimalMotionComponent(`h2`),br=createMinimalMotionComponent(`h3`),xr=createMinimalMotionComponent(`h4`),Sr=createMinimalMotionComponent(`h5`),Cr=createMinimalMotionComponent(`h6`),wr=createMinimalMotionComponent(`head`),Tr=createMinimalMotionComponent(`header`),Er=createMinimalMotionComponent(`hgroup`),Dr=createMinimalMotionComponent(`hr`),Or=createMinimalMotionComponent(`html`),kr=createMinimalMotionComponent(`i`),Ar=createMinimalMotionComponent(`iframe`),jr=createMinimalMotionComponent(`img`),Mr=createMinimalMotionComponent(`input`),Nr=createMinimalMotionComponent(`ins`),Pr=createMinimalMotionComponent(`kbd`),Fr=createMinimalMotionComponent(`keygen`),Ir=createMinimalMotionComponent(`label`),Lr=createMinimalMotionComponent(`legend`),Rr=createMinimalMotionComponent(`li`),zr=createMinimalMotionComponent(`link`),Br=createMinimalMotionComponent(`main`),Vr=createMinimalMotionComponent(`map`),Hr=createMinimalMotionComponent(`mark`),Ur=createMinimalMotionComponent(`menu`),Wr=createMinimalMotionComponent(`menuitem`),Gr=createMinimalMotionComponent(`meter`),Kr=createMinimalMotionComponent(`nav`),qr=createMinimalMotionComponent(`object`),Jr=createMinimalMotionComponent(`ol`),Yr=createMinimalMotionComponent(`optgroup`),Xr=createMinimalMotionComponent(`option`),Zr=createMinimalMotionComponent(`output`),Qr=createMinimalMotionComponent(`p`),$r=createMinimalMotionComponent(`param`),ei=createMinimalMotionComponent(`picture`),ti=createMinimalMotionComponent(`pre`),ni=createMinimalMotionComponent(`progress`),ri=createMinimalMotionComponent(`q`),ii=createMinimalMotionComponent(`rp`),ai=createMinimalMotionComponent(`rt`),oi=createMinimalMotionComponent(`ruby`),si=createMinimalMotionComponent(`s`),ci=createMinimalMotionComponent(`samp`),li=createMinimalMotionComponent(`script`),ui=createMinimalMotionComponent(`section`),di=createMinimalMotionComponent(`select`),fi=createMinimalMotionComponent(`small`),pi=createMinimalMotionComponent(`source`),mi=createMinimalMotionComponent(`span`),hi=createMinimalMotionComponent(`strong`),gi=createMinimalMotionComponent(`style`),_i=createMinimalMotionComponent(`sub`),vi=createMinimalMotionComponent(`summary`),yi=createMinimalMotionComponent(`sup`),bi=createMinimalMotionComponent(`table`),xi=createMinimalMotionComponent(`tbody`),Si=createMinimalMotionComponent(`td`),Ci=createMinimalMotionComponent(`textarea`),wi=createMinimalMotionComponent(`tfoot`),Ti=createMinimalMotionComponent(`th`),Ei=createMinimalMotionComponent(`thead`),Di=createMinimalMotionComponent(`time`),Oi=createMinimalMotionComponent(`title`),ki=createMinimalMotionComponent(`tr`),Ai=createMinimalMotionComponent(`track`),ji=createMinimalMotionComponent(`u`),Mi=createMinimalMotionComponent(`ul`),Ni=createMinimalMotionComponent(`video`),Pi=createMinimalMotionComponent(`wbr`),Fi=createMinimalMotionComponent(`webview`),Ii=createMinimalMotionComponent(`animate`),Li=createMinimalMotionComponent(`circle`),Ri=createMinimalMotionComponent(`defs`),zi=createMinimalMotionComponent(`desc`),Bi=createMinimalMotionComponent(`ellipse`),Vi=createMinimalMotionComponent(`g`),Hi=createMinimalMotionComponent(`image`),Ui=createMinimalMotionComponent(`line`),Wi=createMinimalMotionComponent(`filter`),Gi=createMinimalMotionComponent(`marker`),Ki=createMinimalMotionComponent(`mask`),qi=createMinimalMotionComponent(`metadata`),Ji=createMinimalMotionComponent(`path`),Yi=createMinimalMotionComponent(`pattern`),Xi=createMinimalMotionComponent(`polygon`),Zi=createMinimalMotionComponent(`polyline`),Qi=createMinimalMotionComponent(`rect`),$i=createMinimalMotionComponent(`stop`),ea=createMinimalMotionComponent(`svg`),ta=createMinimalMotionComponent(`symbol`),na=createMinimalMotionComponent(`text`),ra=createMinimalMotionComponent(`tspan`),ia=createMinimalMotionComponent(`use`),aa=createMinimalMotionComponent(`view`),oa=createMinimalMotionComponent(`clipPath`),sa=createMinimalMotionComponent(`feBlend`),ca=createMinimalMotionComponent(`feColorMatrix`),la=createMinimalMotionComponent(`feComponentTransfer`),ua=createMinimalMotionComponent(`feComposite`),da=createMinimalMotionComponent(`feConvolveMatrix`),fa=createMinimalMotionComponent(`feDiffuseLighting`),pa=createMinimalMotionComponent(`feDisplacementMap`),ma=createMinimalMotionComponent(`feDistantLight`),ha=createMinimalMotionComponent(`feDropShadow`),ga=createMinimalMotionComponent(`feFlood`),_a=createMinimalMotionComponent(`feFuncA`),va=createMinimalMotionComponent(`feFuncB`),ya=createMinimalMotionComponent(`feFuncG`),ba=createMinimalMotionComponent(`feFuncR`),xa=createMinimalMotionComponent(`feGaussianBlur`),Sa=createMinimalMotionComponent(`feImage`),Ca=createMinimalMotionComponent(`feMerge`),wa=createMinimalMotionComponent(`feMergeNode`),Ta=createMinimalMotionComponent(`feMorphology`),Ea=createMinimalMotionComponent(`feOffset`),Da=createMinimalMotionComponent(`fePointLight`),Oa=createMinimalMotionComponent(`feSpecularLighting`),ka=createMinimalMotionComponent(`feSpotLight`),Aa=createMinimalMotionComponent(`feTile`),ja=createMinimalMotionComponent(`feTurbulence`),Ma=createMinimalMotionComponent(`foreignObject`),Na=createMinimalMotionComponent(`linearGradient`),Pa=createMinimalMotionComponent(`radialGradient`),Fa=createMinimalMotionComponent(`textPath`);export{ba as $,Ni as $n,Kr as $t,zi as A,gi as An,kr as At,sa as B,Fa as Bn,Rr as Bt,$n as C,ui as Cn,isCSSVar as Cr,Sr as Ct,rr as D,mi as Dn,A as Dr,Er as Dt,nr as E,pi as En,interpolate as Er,Tr as Et,lr as F,ta as Fn,Nr as Ft,fa as G,Di as Gn,Vr as Gt,la as H,wi as Hn,Na as Ht,ur as I,bi as In,Pr as It,ha as J,Ai as Jn,Ki as Jt,pa as K,Oi as Kn,Hr as Kt,Bi as L,xi as Ln,Fr as Lt,or as M,vi as Mn,Hi as Mt,sr as N,yi as Nn,jr as Nt,Ri as O,$i as On,k as Or,Dr as Ot,cr as P,ea as Pn,Mr as Pt,ya as Q,ia as Qn,Gr as Qt,dr as R,Si as Rn,Ir as Rt,Qn as S,li as Sn,motionValue as Sr,xr as St,tr as T,fi as Tn,K as Tr,wr as Tt,ua as U,Ti as Un,zr as Ut,ca as V,Ci as Vn,Ui as Vt,da as W,Ei as Wn,Br as Wt,_a as X,ji as Xn,Wr as Xt,ga as Y,ra as Yn,Ur as Yt,va as Z,Mi as Zn,qi as Zt,Yn as _,ii as _n,getValueAsType as _r,_r as _t,Ln as a,Qr as an,Nn as ar,Ea as at,Zn as b,si as bn,MotionValue as br,yr as bt,Bn as c,Yi as cn,Mn as cr,ka as ct,Un as d,Zi as dn,isValidMotionProp as dr,pr as dt,qr as en,aa as er,xa as et,Wn as f,ti as fn,LazyMotion as fr,mr as ft,Jn as g,Qi as gn,isHTMLElement as gr,Ma as gt,qn as h,Pa as hn,usePresence as hr,gr as ht,Ii as i,Zr as in,useDragControls as ir,Ta as it,ar as j,_i as jn,Ar as jt,ir as k,hi as kn,easingDefinitionToFunction as kr,Or as kt,Vn as l,ei as ln,yn as lr,Aa as lt,Kn as m,ri as mn,AnimatePresence as mr,Wi as mt,Fn as n,Yr as nn,Fi as nr,Ca as nt,Rn as o,$r as on,useReducedMotionConfig as or,Da as ot,Gn as p,ni as pn,LayoutGroup as pr,hr as pt,ma as q,ki as qn,Gi as qt,In as r,Xr as rn,createMinimalMotionComponent as rr,wa as rt,zn as s,Ji as sn,useMotionValue as sr,Oa as st,Pn as t,Jr as tn,Pi as tr,Sa as tt,Hn as u,Xi as un,MotionConfig as ur,ja as ut,Xn as v,ai as vn,resolveElements as vr,Vi as vt,er as w,di as wn,G as wr,Cr as wt,oa as x,ci as xn,$e as xr,br as xt,Li as y,oi as yn,ct as yr,vr as yt,fr as z,na as zn,Lr as zt};
|
|
9
|
+
`),()=>{c.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[n]),y(ec,{isPresent:n,childRef:c,sizeRef:l,pop:o,children:o===!1?e:t.cloneElement(e,{ref:m})})}const nc=({children:e,initial:n,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:l,root:u})=>{let d=S(rc),p=f(),m=!0,g=h(()=>(m=!1,{id:p,initial:n,isPresent:r,custom:a,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;i&&i()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[r,d,i]);return o&&m&&(g={...g}),h(()=>{d.forEach((e,t)=>d.set(t,!1))},[r]),t.useEffect(()=>{!r&&!d.size&&i&&i()},[r]),e=y(tc,{pop:s===`popLayout`,isPresent:r,anchorX:c,anchorY:l,root:u,children:e}),y(w.Provider,{value:g,children:e})};function rc(){return new Map}function ic(e=!0){let t=u(w);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=f();d(()=>{if(e)return i(a)},[e]);let o=l(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}function ac(){return oc(u(w))}function oc(e){return e===null?!0:e.isPresent}const sc=e=>e.key||``;function cc(e){let t=[];return n.forEach(e,e=>{c(e)&&t.push(e)}),t}const lc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[d,f]=ic(o),p=h(()=>cc(e),[e]),m=o&&!d?[]:p.map(sc),b=g(!0),w=g(p),T=S(()=>new Map),E=g(new Set),[D,O]=_(p),[k,ee]=_(p);C(()=>{b.current=!1,w.current=p;for(let e=0;e<k.length;e++){let t=sc(k[e]);m.includes(t)?(T.delete(t),E.current.delete(t)):T.get(t)!==!0&&T.set(t,!1)}},[k,m.length,m.join(`-`)]);let te=[];if(p!==D){let e=[...p];for(let t=0;t<k.length;t++){let n=k[t],r=sc(n);m.includes(r)||(e.splice(t,0,n),te.push(n))}return a===`wait`&&te.length&&(e=te),ee(cc(e)),O(p),null}let{forceRender:ne}=u(x);return y(v,{children:k.map(e=>{let u=sc(e),h=o&&!d?!1:p===k||m.includes(u);return y(nc,{isPresent:h,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:h?void 0:()=>{if(E.current.has(u))return;if(T.has(u))E.current.add(u),T.set(u,!0);else return;let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(ne?.(),ee(w.current),o&&f?.(),r&&r())},anchorX:s,anchorY:c,children:e},u)})})},uc=a(null);function dc(){let e=g(!1);return C(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fc(){let e=dc(),[t,n]=_(0),r=l(()=>{e.current&&n(t+1)},[t]);return[l(()=>P.postRender(r),[r]),t]}const pc=e=>e===!0,mc=e=>pc(e===!0)||e===`id`,hc=({children:e,id:t,inherit:n=!0})=>{let r=u(x),i=u(uc),[a,o]=fc(),s=g(null),c=r.id||i;s.current===null&&(mc(n)&&c&&(t=t?c+`-`+t:c),s.current={id:t,group:pc(n)&&r.group||qs()});let l=h(()=>({...s.current,forceRender:a}),[o]);return y(x.Provider,{value:l,children:e})},gc=a({strict:!1}),_c={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`]};let vc=!1;function yc(){if(vc)return;let e={};for(let t in _c)e[t]={isEnabled:e=>_c[t].some(t=>!!e[t])};xa(e),vc=!0}function bc(){return yc(),Sa()}function xc(e){let t=bc();for(let n in e)t[n]={...t[n],...e[n]};xa(t)}function Sc({children:e,features:t,strict:n=!1}){let[,r]=_(!Cc(t)),i=g(void 0);if(!Cc(t)){let{renderer:e,...n}=t;i.current=e,xc(n)}return d(()=>{Cc(t)&&t().then(({renderer:e,...t})=>{xc(t),i.current=e,r(!0)})},[]),y(gc.Provider,{value:{renderer:i.current,strict:n},children:e})}function Cc(e){return typeof e==`function`}const wc=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.propagate.ignoreStrict.viewport`.split(`.`));function Tc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||wc.has(e)}let Ec=e=>!Tc(e);function Dc(e){typeof e==`function`&&(Ec=t=>t.startsWith(`on`)?!Tc(t):e(t))}try{Dc(e(`@emotion/is-prop-valid`).default)}catch{}function Oc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||q(e[i])||(Ec(i)||n===!0&&Tc(i)||!t&&!Tc(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function kc({children:e,isValidProp:t,...n}){t&&Dc(t);let r=u(Xs);n={...r,...n},n.transition=Er(n.transition,r.transition),n.isStatic=S(()=>n.isStatic);let i=h(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return y(Xs.Provider,{value:i,children:e})}const Ac=a({});function jc(e,t){if(fa(e)){let{initial:t,animate:n}=e;return{initial:t===!1||la(t)?t:void 0,animate:la(n)?n:void 0}}return e.inherit===!1?{}:t}function Mc(e){let{initial:t,animate:n}=jc(e,u(Ac));return h(()=>({initial:t,animate:n}),[Nc(t),Nc(n)])}function Nc(e){return Array.isArray(e)?e.join(` `):e}const Pc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fc(e,t,n){for(let r in t)!q(t[r])&&!to(r,n)&&(e[r]=t[r])}function Ic({transformTemplate:e},t){return h(()=>{let n=Pc();return Ya(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Lc(e,t){let n=e.style||{},r={};return Fc(r,n,e),Object.assign(r,Ic(e,t)),r}function Rc(e,t){let n={},r=Lc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.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=r,n}const zc=()=>({...Pc(),attrs:{}});function Bc(e,t,n,r){let i=h(()=>{let n=zc();return fo(n,t,mo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Fc(t,e.style,e),i.style={...t,...i.style}}return i}const Vc=[`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 Hc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Vc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Uc(e,t,n,{latestValues:r},a,s=!1,c){let l=(c??Hc(e)?Bc:Rc)(t,r,a,e),u=Oc(t,typeof e==`string`,s),d=e===i?{}:{...u,...l,ref:n},{children:f}=t,p=h(()=>q(f)?f.get():f,[f]);return o(e,{...d,children:p})}function Wc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Gc(n,r,i,e),renderState:t()}}function Gc(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=fs(a[e]);let{initial:o,animate:s}=e,c=fa(e),l=pa(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!ca(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=jr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}const Kc=e=>(t,n)=>{let r=u(Ac),i=u(w),a=()=>Wc(e,t,r,i);return n?a():S(a)},qc=Kc({scrapeMotionValuesFromProps:no,createRenderState:Pc}),Jc=Kc({scrapeMotionValuesFromProps:go,createRenderState:zc}),Yc=Symbol.for(`motionComponentSymbol`);function Xc(e,t,n){let r=g(n);p(()=>{r.current=n});let i=g(null);return l(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const Zc=a({});function Qc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function $c(e,t,n,r,i,a){let{visualElement:o}=u(Ac),s=u(gc),c=u(w),l=u(Xs),f=l.reducedMotion,m=l.skipAnimations,h=g(null),_=g(!1);r||=s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f,skipAnimations:m,isSVG:a}),_.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let v=h.current,y=u(Zc);v&&!v.projection&&i&&(v.type===`html`||v.type===`svg`)&&el(h.current,n,i,y);let b=g(!1);p(()=>{v&&b.current&&v.update(n,c)});let x=n[Wr],S=g(!!x&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return C(()=>{_.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),d(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),!1),v.enteringChildren=void 0)}),v}function el(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:tl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Qc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function tl(e){if(e)return e.options.allowProjection===!1?tl(e.parent):e.projection}function nl(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&xc(r);let a=n?n===`svg`:Hc(e),o=a?Jc:qc;function c(n,s){let c,l={...u(Xs),...n,layoutId:rl(n)},{isStatic:d}=l,f=Mc(n),p=o(n,d);if(!d&&typeof window<`u`){il(l,r);let t=al(l);c=t.MeasureLayout,f.visualElement=$c(e,p,l,i,t.ProjectionNode,a)}return b(Ac.Provider,{value:f,children:[c&&f.visualElement?y(c,{visualElement:f.visualElement,...l}):null,Uc(e,n,Xc(p,f.visualElement,s),p,d,t,a)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=s(c);return l[Yc]=e,l}function rl({layoutId:e}){let t=u(x).id;return t&&e!==void 0?t+`-`+e:e}function il(e,t){u(gc).strict}function al(e){let{drag:t,layout:n}=bc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ol(e,t){if(typeof Proxy>`u`)return nl;let n=new Map,r=(n,r)=>nl(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,nl(a,void 0,e,t)),n.get(a))})}const sl=ol(),cl=(e,t)=>t.isSVG??Hc(e)?new _o(t):new io(t,{allowProjection:e!==i});var ll=class extends X{constructor(e){super(e),e.animationState||=wo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();ca(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};let ul=0;const dl={animation:{Feature:ll},exit:{Feature:class extends X{constructor(){super(...arguments),this.id=ul++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=Mr(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function fl(e){return{point:{x:e.pageX,y:e.pageY}}}const pl=e=>t=>Oi(t)&&e(t,fl(t));function ml(e,t,n,r){return cs(e,t,pl(n),r)}const hl=({current:e})=>e?e.ownerDocument.defaultView:null,gl=(e,t)=>Math.abs(e-t);function _l(e,t){let n=gl(e.x,t.x),r=gl(e.y,t.y);return Math.sqrt(n**2+r**2)}const vl=new Set([`auto`,`scroll`]);var yl=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=bl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Sl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=_l(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=I;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=bl(t,this.transformPagePoint),P.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Sl(e.type===`pointercancel`?this.lastMoveEventInfo:bl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Oi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=bl(fl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=I;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Sl(s,this.history)),this.removeListeners=ie(ml(this.contextWindow,`pointermove`,this.handlePointerMove),ml(this.contextWindow,`pointerup`,this.handlePointerUp),ml(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(vl.has(e.overflowX)||vl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),P.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),F(this.updatePoint)}};function bl(e,t){return t?{point:t(e.point)}:e}function xl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sl({point:e},t){return{point:e,delta:xl(e,wl(t)),offset:xl(e,Cl(t)),velocity:Tl(t,.1)}}function Cl(e){return e[0]}function wl(e){return e[e.length-1]}function Tl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=wl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>j(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>j(t)*2&&(r=e[1]);let a=M(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function El(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?U(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?U(n,e,r.max):Math.min(e,n)),e}function Dl(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Ol(e,{top:t,left:n,bottom:r,right:i}){return{x:Dl(e.x,n,i),y:Dl(e.y,t,r)}}function kl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Al(e,t){return{x:kl(e.x,t.x),y:kl(e.y,t.y)}}function jl(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=ae(t.min,t.max-r,e.min):r>i&&(n=ae(e.min,e.max-i,t.min)),D(0,1,n)}function Ml(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nl=.35;function Pl(e=Nl){return e===!1?e=0:e===!0&&(e=Nl),{x:Fl(e,`left`,`right`),y:Fl(e,`top`,`bottom`)}}function Fl(e,t,n){return{min:Il(e,t),max:Il(e,n)}}function Il(e,t){return typeof e==`number`?e:e[t]||0}const Ll=new WeakMap;var Rl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(fl(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ci(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(z.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&P.update(()=>i(e,t),!1,!0),Hr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Hl(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&P.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new yl(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:hl(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&P.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Vl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=El(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Qc(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Ol(n.layoutBox,e):this.constraints=!1,this.elastic=Pl(t),r!==this.constraints&&!Qc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ml(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Qc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Ga(n,r.root,this.visualElement.getTransformPagePoint()),a=Al(r.layout.layoutBox,i);if(t){let e=t(Ea(a));this.hasMutatedConstraints=!!e,e&&(a=Ta(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=$(o=>{if(!Vl(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Hr(this.visualElement,e),n.start(kr(e,n,0,t,this.visualElement,!1))}stopAnimation(){$(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){$(t=>{let{drag:n}=this.getProps();if(!Vl(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-U(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=jl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),$(t=>{if(!Vl(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(U(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ll.set(this.visualElement,this);let e=this.visualElement.current,t=ml(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Mi(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Qc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Bl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),P.read(r);let o=cs(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Nl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function zl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Bl(e,t,n){let r=ea(e,zl(n)),i=ea(t,zl(n));return()=>{r(),i()}}function Vl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Hl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Ul=class extends X{constructor(e){super(e),this.removeGroupControls=A,this.removeListeners=A,this.controls=new Rl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||A}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};const Wl=e=>(t,n)=>{e&&P.update(()=>e(t,n),!1,!0)};var Gl=class extends X{constructor(){super(...arguments),this.removePointerDownListener=A}onPointerDown(e){this.session=new yl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hl(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Wl(e),onStart:Wl(t),onMove:Wl(n),onEnd:(e,t)=>{delete this.session,r&&P.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ml(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};let Kl=!1;var ql=class extends r{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Kl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ms.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Kl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||P.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),bi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Kl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Jl(e){let[t,n]=ic(),r=u(x);return y(ql,{...e,layoutGroup:r,switchLayoutGroup:u(Zc),isPresent:t,safeToRemove:n})}const Yl={pan:{Feature:Gl},drag:{Feature:Ul,ProjectionNode:Ys,MeasureLayout:Jl}};function Xl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&P.postRender(()=>i(t,fl(t)))}var Zl=class extends X{mount(){let{current:e}=this.node;e&&(this.unmount=Ei(e,(e,t)=>(Xl(this.node,t,`Start`),e=>Xl(this.node,e,`End`))))}unmount(){}},Ql=class extends X{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=ie(cs(this.node.current,`focus`,()=>this.onFocus()),cs(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function $l(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&P.postRender(()=>i(t,fl(t)))}var eu=class extends X{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=zi(e,(e,t)=>($l(this.node,t,`Start`),(e,{success:t})=>$l(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}};const tu=new WeakMap,nu=new WeakMap,ru=e=>{let t=tu.get(e.target);t&&t(e)},iu=e=>{e.forEach(ru)};function au({root:e,...t}){let n=e||document;nu.has(n)||nu.set(n,{});let r=nu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(iu,{root:e,...t})),r[i]}function ou(e,t,n){let r=au(t);return tu.set(e,n),r.observe(e),()=>{tu.delete(e),r.unobserve(e)}}const su={some:0,all:1};var cu=class extends X{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:su[r]};return ou(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(lu(e,t))&&this.startObserver()}unmount(){}};function lu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const uu={inView:{Feature:cu},tap:{Feature:eu},focus:{Feature:Ql},hover:{Feature:Zl}},du={layout:{ProjectionNode:Ys,MeasureLayout:Jl}},fu={renderer:cl,...dl,...uu,...Yl,...du};function pu(e){let t=S(()=>K(e)),{isStatic:n}=u(Xs);if(n){let[,n]=_(e);d(()=>t.on(`change`,n),[])}return t}function mu(){!ga.current&&va();let[e]=_(ha.current);return e}function hu(){let e=mu(),{reducedMotion:t}=u(Xs);return t===`never`?!1:t===`always`?!0:e}function gu(e){return typeof e==`object`&&!Array.isArray(e)}function _u(e,t,n,r){return e==null?[]:typeof e==`string`&&gu(t)?_i(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function vu(e,t,n){return e*(t+1)}function yu(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function bu(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(E(e,i),r--)}}function xu(e,t,n,r,i,a){bu(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:U(i,a,r[o]),easing:Te(n,o)})}function Su(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function Cu(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}function wu(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,yu(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=yu(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Du(e),{delay:l=0,times:u=nn(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=Zn(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Au(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=j(b));let r=Vt(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&tn(u,T),c.length===1&&c.unshift(null),m){b=vu(b,m);let e=[...c],t=[...u];y=Array.isArray(y)?[...y]:[y];let n=[...y];for(let r=0;r<m;r++){c.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(r+1)),y.push(i===0?`linear`:Te(n,i-1))}Su(u,m)}let E=w+b;xu(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(q(p)){let e=Tu(p,s);_(m,h,Eu(`default`,e))}else{let e=_u(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Tu(r,s);for(let e in m)_(m[e],Ou(h,e),Eu(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Cu);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(ae(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(`easeInOut`)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Tu(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Eu(e,t){return t[e]||(t[e]=[]),t[e]}function Du(e){return Array.isArray(e)?e:[e]}function Ou(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const ku=e=>typeof e==`number`,Au=e=>e.every(ku);function ju(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Bi(e)&&!ta(e)?new _o(t):new io(t);n.mount(e),sa.set(e,n)}function Mu(e){let t=new oo({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),sa.set(e,t)}function Nu(e,t){return q(e)||typeof e==`number`||typeof e==`string`&&!gu(t)}function Pu(e,t,n,r){let i=[];if(Nu(e,t))i.push(ss(e,gu(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=_u(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?ju:Mu;sa.has(r)||s(r);let c=sa.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...qr(c,{...t,transition:l},{}))}}return i}function Fu(e,t,n){let r=[];return wu(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=K(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:Xt}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Pu(n,e,t))}),r}function Iu(e){return Array.isArray(e)&&e.some(Array.isArray)}function Lu(e={}){let{scope:t,reduceMotion:n}=e;function r(e,r,i){let a=[],o;if(Iu(e)){let{onComplete:i,...s}=r||{};typeof i==`function`&&(o=i),a=Fu(e,n===void 0?s:{reduceMotion:n,...s},t)}else{let{onComplete:s,...c}=i||{};typeof s==`function`&&(o=s),a=Pu(e,r,n===void 0?c:{reduceMotion:n,...c},t)}let s=new mr(a);return o&&s.finished.then(o),t&&(t.animations.push(s),s.finished.then(()=>{E(t.animations,s)})),s}return r}const Ru=Lu();var zu=class{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}};const Bu=()=>new zu;function Vu(){return S(Bu)}function Hu(e,t){return nl(e,t)}const Uu=Hu(`button`),Wu=Hu(`div`);export{Dn as C,P as D,F as E,ke as O,Vn as S,en as T,_i as _,hu as a,Fr as b,sl as c,Sc as d,hc as f,vi as g,yi as h,Ru as i,kc as l,ac as m,Wu as n,pu as o,lc as p,Vu as r,fu as s,Uu as t,Tc as u,ci as v,On as w,K as x,Ir as y};
|