@frumu/tandem-panel 0.5.4 → 0.5.6

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.
Files changed (56) hide show
  1. package/bin/setup.js +1 -0
  2. package/dist/assets/AutomationsPage-BGqpmilp.js +946 -0
  3. package/dist/assets/BugMonitorPage-BVzdj9y-.js +4 -0
  4. package/dist/assets/ChannelsPage-B-InJ4Yh.js +1 -0
  5. package/dist/assets/ChatInterfacePanel-BrMo4cXg.js +1 -0
  6. package/dist/assets/ChatPage-Bc-BfOG1.js +1 -0
  7. package/dist/assets/CodingWorkflowsPage-xgfwLRlt.js +8 -0
  8. package/dist/assets/ControlPanelDialogs-yFfCht3Y.js +1 -0
  9. package/dist/assets/DashboardPage-CrA1itFc.js +1 -0
  10. package/dist/assets/ExperimentsPage-Bkg1_6rw.js +84 -0
  11. package/dist/assets/FilesPage-DChyHlO_.js +1 -0
  12. package/dist/assets/IntentPlannerPage-Dti1h8Tm.js +5 -0
  13. package/dist/assets/LazyJson-vfWw7G9F.js +1 -0
  14. package/dist/assets/MarketplacePage-90fAVNGg.js +1 -0
  15. package/dist/assets/McpToolAllowlistEditor-BzQ64HrZ.js +1 -0
  16. package/dist/assets/MemoryImportDialog-DSpS1JF5.js +1 -0
  17. package/dist/assets/MemoryPage-DRRLgoc0.js +1 -0
  18. package/dist/assets/OrchestratorPage-CYU-ESPI.js +3 -0
  19. package/dist/assets/PacksPage-dRmjjdKD.js +3 -0
  20. package/dist/assets/PlannerDiagnosticsPanel-C1uIuRIx.js +1 -0
  21. package/dist/assets/ProviderModelSelector-BdtOpkJR.js +1 -0
  22. package/dist/assets/RunsPage-DEy8vbRT.js +1 -0
  23. package/dist/assets/SettingsPage-CwH_FzOs.js +5 -0
  24. package/dist/assets/TaskBoard-CCY_Qy5S.js +1 -0
  25. package/dist/assets/TeamsPage-Dn81V0EB.js +4472 -0
  26. package/dist/assets/TimezoneField-B5i---lF.js +1 -0
  27. package/dist/assets/WorkflowStudioPage-yFhlA4KV.js +1854 -0
  28. package/dist/assets/WorkflowsPage-vmaKHFox.js +2 -0
  29. package/dist/assets/chatPageHelpers-Dmb4waDk.js +1 -0
  30. package/dist/assets/explorerHandoff-BPKxMR82.js +1 -0
  31. package/dist/assets/format-DyX5imzJ.js +1 -0
  32. package/dist/assets/fullcalendar-Bn75j0xM.js +1 -0
  33. package/dist/assets/index-C8Bjo7hU.css +1 -0
  34. package/dist/assets/index-TvymvGva.js +3 -0
  35. package/dist/assets/messages-uD0aB_MZ.js +3 -0
  36. package/dist/assets/motion-B3ZE8SGR.js +9 -0
  37. package/dist/assets/plannerShared-Dx7-Sxpc.js +1 -0
  38. package/dist/assets/preact-vendor-DaCG_P2o.js +1 -0
  39. package/dist/assets/react-query-BIbNygEJ.js +1 -0
  40. package/dist/assets/sse-B4A2m-Nk.js +2 -0
  41. package/dist/assets/useEngineStream-Diqri33l.js +1 -0
  42. package/dist/assets/vendor-DSaYtO9f.js +156 -0
  43. package/dist/assets/workflowStability-C8USyGOY.js +2 -0
  44. package/dist/index.html +8 -7
  45. package/lib/automations/workflow-list.js +147 -0
  46. package/lib/setup/control-panel-preferences.js +4 -0
  47. package/package.json +3 -3
  48. package/server/routes/capabilities.js +1 -0
  49. package/server/routes/knowledgebase.js +7 -1
  50. package/dist/assets/index-BL-9rGEh.css +0 -1
  51. package/dist/assets/index-DhoScTZK.js +0 -7379
  52. package/dist/assets/motion-CBnf8hfk.js +0 -9
  53. package/dist/assets/preact-vendor-B239Onrg.js +0 -1
  54. package/dist/assets/react-query-_hsOQSt5.js +0 -1
  55. package/dist/assets/vendor-DZYPF2Pz.js +0 -156
  56. /package/dist/assets/{markdown-Dd89TVib.js → markdown-Dwwtq3bu.js} +0 -0
@@ -0,0 +1,9 @@
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-Dgq8h090.js";import{C as r,D as i,E as a,O as o,S as s,T as c,_ as l,c as u,f as d,g as f,h as p,o as m,s as h,u as g,v as _,w as v,x as y,y as b}from"./fullcalendar-Bn75j0xM.js";var x=0;Array.isArray;function S(e,t,n,r,a,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--x,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return i.vnode&&i.vnode(u),u}var C=v({});function ee(e){let t=p(null);return t.current===null&&(t.current=e()),t.current}var w=v(null),te=v({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),ne=class extends o{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function re({children:e,isPresent:t}){let n=b(),r=p(null),i=p({width:0,height:0,top:0,left:0}),{nonce:a}=s(te);return h(()=>{let{width:e,height:o,top:s,left:c}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement(`style`);return a&&(l.nonce=a),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
2
+ [data-motion-pop-id="${n}"] {
3
+ position: absolute !important;
4
+ width: ${e}px !important;
5
+ height: ${o}px !important;
6
+ top: ${s}px !important;
7
+ left: ${c}px !important;
8
+ }
9
+ `),()=>{document.head.removeChild(l)}},[t]),S(ne,{isPresent:t,childRef:r,sizeRef:i,children:g(e,{ref:r})})}var ie=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s})=>{let c=ee(ae),l=b(),u=y(e=>{c.set(e,!0);for(let e of c.values())if(!e)return;i&&i()},[c,i]),d=f(()=>({id:l,initial:t,isPresent:n,custom:a,onExitComplete:u,register:e=>(c.set(e,!1),()=>c.delete(e))}),o?[Math.random(),u]:[n,u]);return f(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),r(()=>{!n&&!c.size&&i&&i()},[n]),s===`popLayout`&&(e=S(re,{isPresent:n,children:e})),S(w.Provider,{value:d,children:e})};function ae(){return new Map}function oe(e=!0){let t=s(w);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:i,register:a}=t,o=b();r(()=>{e&&a(o)},[e]);let c=y(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,c]:[!0]}var se=e=>e.key||``;function ce(e){let t=[];return u.forEach(e,e=>{d(e)&&t.push(e)}),t}var le=typeof window<`u`,ue=le?l:r,de=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o=`sync`,propagate:c=!1})=>{let[l,u]=oe(c),d=f(()=>ce(e),[e]),m=c&&!l?[]:d.map(se),h=p(!0),g=p(d),v=ee(()=>new Map),[y,b]=_(d),[x,w]=_(d);ue(()=>{h.current=!1,g.current=d;for(let e=0;e<x.length;e++){let t=se(x[e]);m.includes(t)?v.delete(t):v.get(t)!==!0&&v.set(t,!1)}},[x,m.length,m.join(`-`)]);let te=[];if(d!==y){let e=[...d];for(let t=0;t<x.length;t++){let n=x[t],r=se(n);m.includes(r)||(e.splice(t,0,n),te.push(n))}o===`wait`&&te.length&&(e=te),w(ce(e)),b(d);return}let{forceRender:ne}=s(C);return S(a,{children:x.map(e=>{let a=se(e),s=c&&!l?!1:d===x||m.includes(a);return S(ie,{isPresent:s,initial:!h.current||n?void 0:!1,custom:s?void 0:t,presenceAffectsLayout:i,mode:o,onExitComplete:s?void 0:()=>{if(v.has(a))v.set(a,!0);else return;let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(ne?.(),w(g.current),c&&u?.(),r&&r())},children:e},a)})})},T=e=>e,fe=T,pe=T,me={skipAnimations:!1,useManualTiming:!1};function he(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var ge=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],_e=40;function ve(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ge.reduce((e,t)=>(e[t]=he(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=me.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,_e),1),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:ge.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||m(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<ge.length;t++)o[ge[t]].cancel(e)},state:i,steps:o}}var{schedule:E,cancel:D,state:O,steps:ye}=ve(typeof requestAnimationFrame<`u`?requestAnimationFrame:T,!0),be=v({strict:!1}),xe={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`]},Se={};for(let e in xe)Se[e]={isEnabled:t=>xe[e].some(e=>!!t[e])};function Ce(e){for(let t in e)Se[t]={...Se[t],...e[t]}}var we=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function Te(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||we.has(e)}var Ee=e({default:()=>De}),De,Oe=n((()=>{throw De={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "motion". Is it installed?`)})),ke=e=>!Te(e);function Ae(e){e&&(ke=t=>t.startsWith(`on`)?!Te(t):e(t))}try{Ae((Oe(),t(Ee)).default)}catch{}function je(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(ke(i)||n===!0&&Te(i)||!t&&!Te(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function Me(e){if(typeof Proxy>`u`)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}var Ne=v({});function Pe(e){return typeof e==`string`||Array.isArray(e)}function Fe(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var Ie=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Le=[`initial`,...Ie];function Re(e){return Fe(e.animate)||Le.some(t=>Pe(e[t]))}function ze(e){return!!(Re(e)||e.variants)}function Be(e,t){if(Re(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Pe(t)?t:void 0,animate:Pe(n)?n:void 0}}return e.inherit===!1?{}:t}function Ve(e){let{initial:t,animate:n}=Be(e,s(Ne));return f(()=>({initial:t,animate:n}),[He(t),He(n)])}function He(e){return Array.isArray(e)?e.join(` `):e}var Ue=Symbol.for(`motionComponentSymbol`);function We(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ge(e,t,n){return y(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):We(n)&&(n.current=r))},[t])}var Ke=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),qe=`data-`+Ke(`framerAppearId`),{schedule:Je,cancel:Ye}=ve(queueMicrotask,!1),Xe=v({});function Ze(e,t,n,i,a){let{visualElement:o}=s(Ne),c=s(be),l=s(w),u=s(te).reducedMotion,d=p(null);i||=c.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));let f=d.current,m=s(Xe);f&&!f.projection&&a&&(f.type===`html`||f.type===`svg`)&&Qe(d.current,n,a,m);let g=p(!1);h(()=>{f&&g.current&&f.update(n,l)});let _=n[qe],v=p(!!_&&!window.MotionHandoffIsComplete?.call(window,_)&&window.MotionHasOptimisedAnimation?.call(window,_));return ue(()=>{f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Je.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),r(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{var e;(e=window.MotionHandoffMarkAsComplete)==null||e.call(window,_)}),!1))}),f}function Qe(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:$e(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&We(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function $e(e){if(e)return e.options.allowProjection===!1?$e(e.parent):e.projection}function et({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Ce(e);function a(a,o){let c,l={...s(te),...a,layoutId:tt(a)},{isStatic:u}=l,d=Ve(a),f=r(a,u);if(!u&&le){nt(l,e);let n=rt(l);c=n.MeasureLayout,d.visualElement=Ze(i,f,l,t,n.ProjectionNode)}return S(Ne.Provider,{value:d,children:[c&&d.visualElement?S(c,{visualElement:d.visualElement,...l}):null,n(i,a,Ge(f,d.visualElement,o),f,u,d.visualElement)]})}a.displayName=`motion.${typeof i==`string`?i:`create(${i.displayName??i.name??``})`}`;let o=m(a);return o[Ue]=i,o}function tt({layoutId:e}){let t=s(C).id;return t&&e!==void 0?t+`-`+e:e}function nt(e,t){s(be).strict}function rt(e){let{drag:t,layout:n}=Se;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var it=[`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 at(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(it.indexOf(e)>-1||/[A-Z]/u.test(e))}function ot(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function st(e,t,n,r){if(typeof t==`function`){let[i,a]=ot(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]=ot(r);t=t(n===void 0?e.custom:n,i,a)}return t}var ct=e=>Array.isArray(e),lt=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),ut=e=>ct(e)?e[e.length-1]||0:e,k=e=>!!(e&&e.getVelocity);function dt(e){let t=k(e)?e.get():e;return lt(t)?t.toValue():t}function ft({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:mt(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var pt=e=>(t,n)=>{let r=s(Ne),i=s(w),a=()=>ft(e,t,r,i);return n?a():ee(a)};function mt(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=dt(a[e]);let{initial:o,animate:s}=e,c=Re(e),l=ze(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`&&!Fe(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=st(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}var ht=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],A=new Set(ht),gt=e=>t=>typeof t==`string`&&t.startsWith(e),_t=gt(`--`),vt=gt(`var(--`),yt=e=>vt(e)?bt.test(e.split(`/*`)[0].trim()):!1,bt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xt=(e,t)=>t&&typeof e==`number`?t.transform(e):e,j=(e,t,n)=>n>t?t:n<e?e:n,M={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},St={...M,transform:e=>j(0,1,e)},Ct={...M,default:1},wt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),N=wt(`deg`),P=wt(`%`),F=wt(`px`),Tt=wt(`vh`),Et=wt(`vw`),Dt={...P,parse:e=>P.parse(e)/100,transform:e=>P.transform(e*100)},Ot={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,backgroundPositionX:F,backgroundPositionY:F},kt={rotate:N,rotateX:N,rotateY:N,rotateZ:N,scale:Ct,scaleX:Ct,scaleY:Ct,scaleZ:Ct,skew:N,skewX:N,skewY:N,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:St,originX:Dt,originY:Dt,originZ:F},At={...M,transform:Math.round},jt={...Ot,...kt,zIndex:At,size:F,fillOpacity:St,strokeOpacity:St,numOctaves:At},Mt={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Nt=ht.length;function Pt(e,t,n){let r=``,i=!0;for(let a=0;a<Nt;a++){let o=ht[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===+!!o.startsWith(`scale`):parseFloat(s)===0,!c||n){let e=xt(s,jt[o]);if(!c){i=!1;let t=Mt[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ft(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(A.has(e)){o=!0;continue}else if(_t(e)){i[e]=n;continue}else{let t=xt(n,jt[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Pt(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var It={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Lt={offset:`strokeDashoffset`,array:`strokeDasharray`};function Rt(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?It:Lt;e[a.offset]=F.transform(-r);let o=F.transform(t),s=F.transform(n);e[a.array]=`${o} ${s}`}function zt(e,t,n){return typeof e==`string`?e:F.transform(t+n*e)}function Bt(e,t,n){return`${zt(t,e.x,e.width)} ${zt(n,e.y,e.height)}`}function Vt(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(Ft(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Bt(m,i===void 0?.5:i,a===void 0?.5:a)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Rt(f,o,s,c,!1)}var Ht=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Ut=()=>({...Ht(),attrs:{}}),Wt=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Gt(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var Kt=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function qt(e,t,n,r){Gt(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Kt.has(n)?n:Ke(n),t.attrs[n])}var Jt={};function Yt(e){Object.assign(Jt,e)}function Xt(e,{layout:t,layoutId:n}){return A.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Jt[e]||e===`opacity`)}function Zt(e,t,n){let{style:r}=e,i={};for(let a in r)(k(r[a])||t.style&&k(t.style[a])||Xt(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function Qt(e,t,n){let r=Zt(e,t,n);for(let n in e)if(k(e[n])||k(t[n])){let t=ht.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function $t(e,t){try{t.dimensions=typeof e.getBBox==`function`?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var en=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],tn={useVisualState:pt({scrapeMotionValuesFromProps:Qt,createRenderState:Ut,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(let e in i)if(A.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<en.length;n++){let r=en[n];e[r]!==t[r]&&(o=!0)}o&&E.read(()=>{$t(n,r),E.render(()=>{Vt(r,i,Wt(n.tagName),e.transformTemplate),qt(n,r)})})}})},nn={useVisualState:pt({scrapeMotionValuesFromProps:Zt,createRenderState:Ht})};function rn(e,t,n){for(let r in t)!k(t[r])&&!Xt(r,n)&&(e[r]=t[r])}function an({transformTemplate:e},t){return f(()=>{let n=Ht();return Ft(n,t,e),Object.assign({},n.vars,n.style)},[t])}function on(e,t){let n=e.style||{},r={};return rn(r,n,e),Object.assign(r,an(e,t)),r}function sn(e,t){let n={},r=on(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}function cn(e,t,n,r){let i=f(()=>{let n=Ut();return Vt(n,t,Wt(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};rn(t,e.style,e),i.style={...t,...i.style}}return i}function ln(e=!1){return(t,n,r,{latestValues:i},o)=>{let s=(at(t)?cn:sn)(n,i,o,t),l=je(n,typeof t==`string`,e),u=t===a?{}:{...l,...s,ref:r},{children:d}=n,p=f(()=>k(d)?d.get():d,[d]);return c(t,{...u,children:p})}}function un(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return et({...at(n)?tn:nn,preloadedFeatures:e,useRender:ln(r),createVisualElement:t,Component:n})}}function dn(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}function fn(e,t,n){let r=e.getProps();return st(r,t,n===void 0?r.custom:n,e)}function pn(e,t){return e?e[t]||e.default||e:void 0}var mn=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...ht]),hn;function gn(){hn=void 0}var I={now:()=>(hn===void 0&&I.set(O.isProcessing||me.useManualTiming?O.timestamp:performance.now()),hn),set:e=>{hn=e,queueMicrotask(gn)}};function _n(e,t){e.indexOf(t)===-1&&e.push(t)}function vn(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var yn=class{constructor(){this.subscriptions=[]}add(e){return _n(this.subscriptions,e),()=>vn(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}};function bn(e,t){return t?1e3/t*e:0}var xn=30,Sn=e=>!isNaN(parseFloat(e)),Cn={current:void 0},wn=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=I.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Sn(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 yn);let n=this.events[e].add(t);return e===`change`?()=>{n(),E.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,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}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()}get(){return Cn.current&&Cn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xn)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,xn);return bn(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Tn(e,t){return new wn(e,t)}function En(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tn(n))}function Dn(e,t){let{transitionEnd:n={},transition:r={},...i}=fn(e,t)||{};i={...i,...n};for(let t in i)En(e,t,ut(i[t]))}function On(e){return!!(k(e)&&e.add)}function kn(e,t){let n=e.getValue(`willChange`);if(On(n))return n.add(t)}function An(e){return e.props[qe]}function jn(e){let t;return()=>(t===void 0&&(t=e()),t)}var Mn=jn(()=>window.ScrollTimeline!==void 0),Nn=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>`finished`in e?e.finished:e))}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,t){let n=this.animations.map(n=>{if(Mn()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t==`function`)return t(n)});return()=>{n.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 startTime(){return this.getAll(`startTime`)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll(`flatten`)}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},Pn=class extends Nn{then(e,t){return Promise.all(this.animations).then(e).catch(t)}},L=e=>e*1e3,R=e=>e/1e3,Fn={current:!1};function In(e){return typeof e==`function`}function Ln(e,t){e.timeline=t,e.onfinish=null}var Rn=e=>Array.isArray(e)&&typeof e[0]==`number`,zn={linearEasing:void 0};function Bn(e,t){let n=jn(e);return()=>zn[t]??n()}var Vn=Bn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Hn=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Un=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(Hn(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function Wn(e){return!!(typeof e==`function`&&Vn()||!e||typeof e==`string`&&(e in Kn||Vn())||Rn(e)||Array.isArray(e)&&e.every(Wn))}var Gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Gn([0,.65,.55,1]),circOut:Gn([.55,0,1,.45]),backIn:Gn([.31,.01,.66,-.59]),backOut:Gn([.33,1.53,.69,.99])};function qn(e,t){if(e)return typeof e==`function`&&Vn()?Un(e,t):Rn(e)?Gn(e):Array.isArray(e)?e.map(e=>qn(e,t)||Kn.easeOut):Kn[e]}var Jn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Yn=1e-7,Xn=12;function Zn(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Jn(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Yn&&++s<Xn);return o}function Qn(e,t,n,r){if(e===t&&n===r)return T;let i=t=>Zn(t,0,1,e,n);return e=>e===0||e===1?e:Jn(i(e),t,r)}var $n=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,er=e=>t=>1-e(1-t),tr=Qn(.33,1.53,.69,.99),nr=er(tr),rr=$n(nr),ir=e=>(e*=2)<1?.5*nr(e):.5*(2-2**(-10*(e-1))),ar=e=>1-Math.sin(Math.acos(e)),or=er(ar),sr=$n(ar),cr=e=>/^0[^.\s]+$/u.test(e);function lr(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||cr(e)}var ur=e=>Math.round(e*1e5)/1e5,dr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fr(e){return e==null}var pr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mr=(e,t)=>n=>!!(typeof n==`string`&&pr.test(n)&&n.startsWith(e)||t&&!fr(n)&&Object.prototype.hasOwnProperty.call(n,t)),hr=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(dr);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},gr=e=>j(0,255,e),_r={...M,transform:e=>Math.round(gr(e))},z={test:mr(`rgb`,`red`),parse:hr(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+_r.transform(e)+`, `+_r.transform(t)+`, `+_r.transform(n)+`, `+ur(St.transform(r))+`)`};function vr(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}}var yr={test:mr(`#`),parse:vr,transform:z.transform},br={test:mr(`hsl`,`hue`),parse:hr(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+P.transform(ur(t))+`, `+P.transform(ur(n))+`, `+ur(St.transform(r))+`)`},B={test:e=>z.test(e)||yr.test(e)||br.test(e),parse:e=>z.test(e)?z.parse(e):br.test(e)?br.parse(e):yr.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?z.transform(e):br.transform(e)},xr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sr(e){return isNaN(e)&&typeof e==`string`&&(e.match(dr)?.length||0)+(e.match(xr)?.length||0)>0}var Cr=`number`,wr=`color`,Tr=`var`,Er=`var(`,Dr="${}",Or=/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 kr(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Or,e=>(B.test(e)?(r.color.push(a),i.push(wr),n.push(B.parse(e))):e.startsWith(Er)?(r.var.push(a),i.push(Tr),n.push(e)):(r.number.push(a),i.push(Cr),n.push(parseFloat(e))),++a,Dr)).split(Dr),indexes:r,types:i}}function Ar(e){return kr(e).values}function jr(e){let{split:t,types:n}=kr(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===Cr?i+=ur(e[a]):t===wr?i+=B.transform(e[a]):i+=e[a]}return i}}var Mr=e=>typeof e==`number`?0:e;function Nr(e){let t=Ar(e);return jr(e)(t.map(Mr))}var V={test:Sr,parse:Ar,createTransformer:jr,getAnimatableNone:Nr},Pr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Fr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(dr)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Pr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ir=/\b([a-z-]*)\(.*?\)/gu,Lr={...V,getAnimatableNone:e=>{let t=e.match(Ir);return t?t.map(Fr).join(` `):e}},Rr={...jt,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:Lr,WebkitFilter:Lr},zr=e=>Rr[e];function Br(e,t){let n=zr(e);return n!==Lr&&(n=V),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Vr=new Set([`auto`,`none`,`0`]);function Hr(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Vr.has(t)&&kr(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Br(n,i)}var Ur=e=>e===M||e===F,Wr=(e,t)=>parseFloat(e.split(`, `)[t]),Gr=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Wr(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?Wr(t[1],e):0}},Kr=new Set([`x`,`y`,`z`]),qr=ht.filter(e=>!Kr.has(e));function Jr(e){let t=[];return qr.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var Yr={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Gr(4,13),y:Gr(5,14)};Yr.translateX=Yr.x,Yr.translateY=Yr.y;var H=new Set,Xr=!1,Zr=!1;function Qr(){if(Zr){let e=Array.from(H).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Jr(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])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Zr=!1,Xr=!1,H.forEach(e=>e.complete()),H.clear()}function $r(){H.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zr=!0)})}function ei(){$r(),Qr()}var ti=class{constructor(e,t,n,r,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(H.add(this),Xr||(Xr=!0,E.read($r),E.resolveKeyframes(Qr))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){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])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),H.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,H.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},ni=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ri=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ii(e){let t=ri.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var ai=4;function oi(e,t,n=1){pe(n<=ai,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=ii(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ni(e)?parseFloat(e):e}return yt(i)?oi(i,t,n+1):i}var si=e=>t=>t.test(e),ci=[M,F,P,N,Et,Tt,{test:e=>e===`auto`,parse:e=>e}],li=e=>ci.find(si(e)),ui=class extends ti{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(),yt(r))){let i=oi(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!mn.has(n)||e.length!==2)return;let[r,i]=e,a=li(r),o=li(i);if(a!==o)if(Ur(a)&&Ur(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)lr(e[t])&&n.push(t);n.length&&Hr(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=Yr[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]=Yr[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()}},di=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(V.test(e)||e===`0`)&&!e.startsWith(`url(`));function fi(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 pi(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=di(i,t),s=di(a,t);return fe(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!o||!s?!1:fi(e)||(n===`spring`||In(n))&&r}var mi=e=>e!==null;function hi(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(mi),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var gi=40,_i=class{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=I.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>gi?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ei(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=I.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!pi(e,n,r,i))if(Fn.current||!a){s&&s(hi(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}else this.options.duration=0;let l=this.initPlayback(e,t);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type=`keyframes`,this.options.ease=`linear`}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}},vi=2e4;function yi(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}var U=(e,t,n)=>e+(t-e)*n;function bi(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 xi({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=bi(s,r,e+1/3),a=bi(s,r,e),o=bi(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Si(e,t){return n=>n>0?t:e}var Ci=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},wi=[yr,z,br],Ti=e=>wi.find(t=>t.test(e));function Ei(e){let t=Ti(e);if(fe(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===br&&(n=xi(n)),n}var Di=(e,t)=>{let n=Ei(e),r=Ei(t);if(!n||!r)return Si(e,t);let i={...n};return e=>(i.red=Ci(n.red,r.red,e),i.green=Ci(n.green,r.green,e),i.blue=Ci(n.blue,r.blue,e),i.alpha=U(n.alpha,r.alpha,e),z.transform(i))},Oi=(e,t)=>n=>t(e(n)),ki=(...e)=>e.reduce(Oi),Ai=new Set([`none`,`hidden`]);function ji(e,t){return Ai.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Mi(e,t){return n=>U(e,t,n)}function Ni(e){return typeof e==`number`?Mi:typeof e==`string`?yt(e)?Si:B.test(e)?Di:Li:Array.isArray(e)?Pi:typeof e==`object`?B.test(e)?Di:Fi:Si}function Pi(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Ni(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Fi(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ni(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Ii(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}var Li=(e,t)=>{let n=V.createTransformer(t),r=kr(e),i=kr(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?Ai.has(e)&&!i.values.length||Ai.has(t)&&!r.values.length?ji(e,t):ki(Pi(Ii(r,i),i.values),n):(fe(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Si(e,t))};function Ri(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?U(e,t,n):Ni(e)(e,t)}var zi=5;function Bi(e,t,n){let r=Math.max(t-zi,0);return bn(n-e(r),t-r)}var 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},Vi=.001;function Hi({duration:e=W.duration,bounce:t=W.bounce,velocity:n=W.velocity,mass:r=W.mass}){let i,a;fe(e<=L(W.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=j(W.minDamping,W.maxDamping,o),e=j(W.minDuration,W.maxDuration,R(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Gi(t,o),c=Math.exp(-i);return Vi-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=Gi(t**2,o);return(-i(t)+Vi>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Vi+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Wi(i,a,s);if(e=L(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}}}var Ui=12;function Wi(e,t,n){let r=n;for(let n=1;n<Ui;n++)r-=e(r)/t(r);return r}function Gi(e,t){return e*Math.sqrt(1-t*t)}var Ki=[`duration`,`bounce`],qi=[`stiffness`,`damping`,`mass`];function Ji(e,t){return t.some(t=>e[t]!==void 0)}function Yi(e){let t={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...e};if(!Ji(e,qi)&&Ji(e,Ki))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*j(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:W.mass,stiffness:i,damping:a}}else{let n=Hi(e);t={...t,...n,mass:W.mass},t.isResolvedFromDuration=!0}return t}function Xi(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}=Yi({...n,velocity:-R(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=R(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;if(h<1){let e=Gi(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);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 b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=0;h<1&&(n=e===0?L(m):Bi(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(yi(b),vi),t=Un(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function Zi({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=Xi({keyframes:[f.value,m(f.value)],velocity:Bi(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)}}}var Qi=Qn(.42,0,1,1),$i=Qn(0,0,.58,1),ea=Qn(.42,0,.58,1),ta=e=>Array.isArray(e)&&typeof e[0]!=`number`,na={linear:T,easeIn:Qi,easeInOut:ea,easeOut:$i,circIn:ar,circInOut:sr,circOut:or,backIn:nr,backInOut:rr,backOut:tr,anticipate:ir},ra=e=>{if(Rn(e)){pe(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return Qn(t,n,r,i)}else if(typeof e==`string`)return pe(na[e]!==void 0,`Invalid easing type '${e}'`),na[e];return e};function ia(e,t,n){let r=[],i=n||Ri,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ki(Array.isArray(t)?t[n]||T:t,a)),r.push(a)}return r}function aa(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(pe(a===t.length,`Both input and output ranges must be the same 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=ia(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=Hn(e[r],e[r+1],n);return s[r](i)};return n?t=>l(j(e[0],e[a-1],t)):l}function oa(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Hn(0,t,r);e.push(U(n,1,i))}}function sa(e){let t=[0];return oa(t,e.length-1),t}function ca(e,t){return e.map(e=>e*t)}function la(e,t){return e.map(()=>t||ea).splice(0,e.length-1)}function ua({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ta(r)?r.map(ra):ra(r),a={done:!1,value:t[0]},o=aa(ca(n&&n.length===t.length?n:sa(t),e),t,{ease:Array.isArray(i)?i:la(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var da=e=>{let t=({timestamp:t})=>e(t);return{start:()=>E.update(t,!0),stop:()=>D(t),now:()=>O.isProcessing?O.timestamp:I.now()}},fa={decay:Zi,inertia:Zi,tween:ua,keyframes:ua,spring:Xi},pa=e=>e/100,ma=class extends _i{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=`running`,this.startTime=null,this.state=`idle`,this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,a=r?.KeyframeResolver||ti,o=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new a(i,o,t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let{type:t=`keyframes`,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=this.options,o=In(t)?t:fa[t]||ua,s,c;o!==ua&&typeof e[0]!=`number`&&(s=ki(pa,Ri(e[0],e[1])),e=[0,100]);let l=o({...this.options,keyframes:e});i===`mirror`&&(c=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=yi(l));let{calculatedDuration:u}=l,d=u+r,f=d*(n+1)-r;return{generator:l,mirroredGenerator:c,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:f}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState===`paused`||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:c,totalDuration:l,resolvedDuration:u}=n;if(this.startTime===null)return i.next(0);let{delay:d,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:this.holdTime===null?this.currentTime=Math.round(e-this.startTime)*this.speed:this.currentTime=this.holdTime;let g=this.currentTime-d*(this.speed>=0?1:-1),_=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,y=i;if(f){let e=Math.min(this.currentTime,l)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,f+1),t%2&&(p===`reverse`?(n=1-n,m&&(n-=m/u)):p===`mirror`&&(y=a)),v=j(0,1,n)*u}let b=_?{done:!1,value:s[0]}:y.next(v);o&&(b.value=o(b.value));let{done:x}=b;!_&&c!==null&&(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&r!==void 0&&(b.value=hi(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?R(e.calculatedDuration):0}get time(){return R(this.currentTime)}set time(e){e=L(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=R(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=da,onPlay:t,startTime:n}=this.options;this.driver||=e(e=>this.tick(e)),t&&t();let r=this.driver.now();this.holdTime===null?this.startTime?this.state===`finished`&&(this.startTime=r):this.startTime=n??this.calcStartTime():this.startTime=r-this.holdTime,this.state===`finished`&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=`running`,this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState=`paused`;return}this.state=`paused`,this.holdTime=this.currentTime??0}complete(){this.state!==`running`&&this.play(),this.pendingPlayState=this.state=`finished`,this.holdTime=null}finish(){this.teardown(),this.state=`finished`;let{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=`idle`,this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}},ha=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function ga(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeInOut`,times:c}={}){let l={[t]:n};c&&(l.offset=c);let u=qn(s,i);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:i,easing:Array.isArray(u)?`linear`:u,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`})}var _a=jn(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),va=10,ya=2e4;function ba(e){return In(e.type)||e.type===`spring`||!Wn(e.ease)}function xa(e,t){let n=new ma({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<ya;)r=n.sample(a),i.push(r.value),a+=va;return{times:void 0,keyframes:i,duration:a-va,ease:`linear`}}var Sa={anticipate:ir,backInOut:rr,circInOut:sr};function Ca(e){return e in Sa}var wa=class extends _i{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new ui(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:i,type:a,motionValue:o,name:s,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i==`string`&&Vn()&&Ca(i)&&(i=Sa[i]),ba(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=xa(e,l);e=u.keyframes,e.length===1&&(e[1]=e[0]),n=u.duration,r=u.times,i=u.ease,a=`keyframes`}let l=ga(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(Ln(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(hi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:r,type:a,ease:i,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return R(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return R(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=L(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return`idle`;let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{let{resolved:t}=this;if(!t)return T;let{animation:n}=t;Ln(n,e)}return T}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.playState===`finished`&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:a,times:o}=e;if(t.playState===`idle`||t.playState===`finished`)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:c,...l}=this.options,u=new ma({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=L(this.time);e.setWithVelocity(u.sample(d-va).value,u.sample(d).value,va)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return _a()&&n&&ha.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},Ta={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ea=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Da={type:`keyframes`,duration:.8},Oa={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ka=(e,{keyframes:t})=>t.length>2?Da:A.has(e)?e.startsWith(`scale`)?Ea(t[1]):Ta:Oa;function Aa({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}var ja=(e,t,n,r={},i,a)=>o=>{let s=pn(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=L(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};Aa(s)||(u={...u,...ka(e,u)}),u.duration&&=L(u.duration),u.repeatDelay&&=L(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Fn.current||me.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=hi(u.keyframes,s);if(e!==void 0)return E.update(()=>{u.onUpdate(e),u.onComplete()}),new Pn([])}return!a&&wa.supports(u)?new wa(u):new ma(u)};function Ma({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Na(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=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||l&&Ma(l,t))continue;let o={delay:n,...pn(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=An(e);if(n){let e=window.MotionHandoffAnimation(n,t,E);e!==null&&(o.startTime=e,u=!0)}}kn(e,t),r.start(ja(t,r,i,e.shouldReduceMotion&&mn.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{E.update(()=>{o&&Dn(e,o)})}),c}function Pa(e,t,n={}){let r=fn(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(Na(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Fa(e,t,a+r,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 Fa(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Ia).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(Pa(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function Ia(e,t){return e.sortNodePosition(t)}function La(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Pa(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Pa(e,t,n);else{let i=typeof t==`function`?fn(e,t,n.custom):t;r=Promise.all(Na(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Ra=Le.length;function za(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&za(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Ra;n++){let r=Le[n],i=e.props[r];(Pe(i)||i===!1)&&(t[r]=i)}return t}var Ba=[...Ie].reverse(),Va=Ie.length;function Ha(e){return t=>Promise.all(t.map(({animation:t,options:n})=>La(e,t,n)))}function Ua(e){let t=Ha(e),n=Ga(),r=!0,i=t=>(n,r)=>{let i=fn(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 a(n){t=n(e)}function o(a){let{props:o}=e,s=za(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<Va;t++){let f=Ba[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=Pe(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||Fe(m)||typeof m==`boolean`)continue;let v=Wa(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,ee={...C,...S},w=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 ee){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ct(t)&&ct(n)?!dn(t,n):t!==n,r?t==null?l.add(e):w(e):t!==void 0&&l.has(e)?w(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1),y&&(!(_&&v)||b)&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};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,f?t(c):Promise.resolve()}function s(t,r){var i;if(n[t].isActive===r)return Promise.resolve();(i=e.variantChildren)==null||i.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Ga(),r=!0}}}function Wa(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!dn(t,e):!1}function G(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ga(){return{animate:G(!0),whileInView:G(),whileHover:G(),whileTap:G(),whileDrag:G(),whileFocus:G(),exit:G()}}var K=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Ka=class extends K{constructor(e){super(e),e.animationState||=Ua(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Fe(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},qa=0,Ja={animation:{Feature:Ka},exit:{Feature:class extends K{constructor(){super(...arguments),this.id=qa++}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;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},q={x:!1,y:!1};function Ya(){return q.x||q.y}function Xa(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}var Za=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Qa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $a(e){return{point:{x:e.pageX,y:e.pageY}}}var eo=e=>t=>Za(t)&&e(t,$a(t));function to(e,t,n,r){return Qa(e,t,eo(n),r)}var no=(e,t)=>Math.abs(e-t);function ro(e,t){let n=no(e.x,t.x),r=no(e.y,t.y);return Math.sqrt(n**2+r**2)}var io=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=so(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=ro(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=O;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.lastMoveEventInfo=ao(t,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=so(e.type===`pointercancel`?this.lastMoveEventInfo:ao(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Za(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=ao($a(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=O;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,so(a,this.history)),this.removeListeners=ki(to(this.contextWindow,`pointermove`,this.handlePointerMove),to(this.contextWindow,`pointerup`,this.handlePointerUp),to(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),D(this.updatePoint)}};function ao(e,t){return t?{point:t(e.point)}:e}function oo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function so({point:e},t){return{point:e,delta:oo(e,lo(t)),offset:oo(e,co(t)),velocity:uo(t,.1)}}function co(e){return e[0]}function lo(e){return e[e.length-1]}function uo(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=lo(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>L(t)));)n--;if(!r)return{x:0,y:0};let a=R(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}var fo=1e-4,po=1-fo,mo=1+fo,ho=.01,go=0-ho,_o=0+ho;function J(e){return e.max-e.min}function vo(e,t,n){return Math.abs(e-t)<=n}function yo(e,t,n,r=.5){e.origin=r,e.originPoint=U(t.min,t.max,e.origin),e.scale=J(n)/J(t),e.translate=U(n.min,n.max,e.origin)-e.originPoint,(e.scale>=po&&e.scale<=mo||isNaN(e.scale))&&(e.scale=1),(e.translate>=go&&e.translate<=_o||isNaN(e.translate))&&(e.translate=0)}function bo(e,t,n,r){yo(e.x,t.x,n.x,r?r.originX:void 0),yo(e.y,t.y,n.y,r?r.originY:void 0)}function xo(e,t,n){e.min=n.min+t.min,e.max=e.min+J(t)}function So(e,t,n){xo(e.x,t.x,n.x),xo(e.y,t.y,n.y)}function Co(e,t,n){e.min=t.min-n.min,e.max=e.min+J(t)}function wo(e,t,n){Co(e.x,t.x,n.x),Co(e.y,t.y,n.y)}function To(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 Eo(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 Do(e,{top:t,left:n,bottom:r,right:i}){return{x:Eo(e.x,n,i),y:Eo(e.y,t,r)}}function Oo(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 ko(e,t){return{x:Oo(e.x,t.x),y:Oo(e.y,t.y)}}function Ao(e,t){let n=.5,r=J(e),i=J(t);return i>r?n=Hn(t.min,t.max-r,e.min):r>i&&(n=Hn(e.min,e.max-i,t.min)),j(0,1,n)}function jo(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}var Mo=.35;function No(e=Mo){return e===!1?e=0:e===!0&&(e=Mo),{x:Po(e,`left`,`right`),y:Po(e,`top`,`bottom`)}}function Po(e,t,n){return{min:Fo(e,t),max:Fo(e,n)}}function Fo(e,t){return typeof e==`number`?e:e[t]||0}var Io=()=>({translate:0,scale:1,origin:0,originPoint:0}),Lo=()=>({x:Io(),y:Io()}),Ro=()=>({min:0,max:0}),Y=()=>({x:Ro(),y:Ro()});function X(e){return[e(`x`),e(`y`)]}function zo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Bo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vo(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 Ho(e){return e===void 0||e===1}function Uo({scale:e,scaleX:t,scaleY:n}){return!Ho(e)||!Ho(t)||!Ho(n)}function Z(e){return Uo(e)||Wo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wo(e){return Go(e.x)||Go(e.y)}function Go(e){return e&&e!==`0%`}function Ko(e,t,n){return n+t*(e-n)}function qo(e,t,n,r,i){return i!==void 0&&(e=Ko(e,i,r)),Ko(e,n,r)+t}function Jo(e,t=0,n=1,r,i){e.min=qo(e.min,t,n,r,i),e.max=qo(e.max,t,n,r,i)}function Yo(e,{x:t,y:n}){Jo(e.x,t.translate,t.scale,t.originPoint),Jo(e.y,n.translate,n.scale,n.originPoint)}var Xo=.999999999999,Zo=1.0000000000001;function Qo(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&&ts(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Yo(e,o)),r&&Z(a.latestValues)&&ts(e,a.latestValues))}t.x<Zo&&t.x>Xo&&(t.x=1),t.y<Zo&&t.y>Xo&&(t.y=1)}function $o(e,t){e.min+=t,e.max+=t}function es(e,t,n,r,i=.5){Jo(e,t,n,U(e.min,e.max,i),r)}function ts(e,t){es(e.x,t.x,t.scaleX,t.scale,t.originX),es(e.y,t.y,t.scaleY,t.scale,t.originY)}function ns(e,t){return zo(Vo(e.getBoundingClientRect(),t))}function rs(e,t,n){let r=ns(e,n),{scroll:i}=t;return i&&($o(r.x,i.offset.x),$o(r.y,i.offset.y)),r}var is=({current:e})=>e?e.ownerDocument.defaultView:null,as=new WeakMap,os=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.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor($a(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xa(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),X(e=>{let t=this.getAxisMotionValue(e).get()||0;if(P.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=J(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&E.postRender(()=>i(e,t)),kn(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,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=cs(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&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>X(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new io(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:is(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&E.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!ss(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=To(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&&We(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Do(n.layoutBox,e):this.constraints=!1,this.elastic=No(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&X(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=jo(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!We(e))return!1;let n=e.current;pe(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=rs(n,r.root,this.visualElement.getTransformPagePoint()),a=ko(r.layout.layoutBox,i);if(t){let e=t(Bo(a));this.hasMutatedConstraints=!!e,e&&(a=zo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=X(o=>{if(!ss(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(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 kn(this.visualElement,e),n.start(ja(e,n,0,t,this.visualElement,!1))}stopAnimation(){X(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){X(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}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){X(t=>{let{drag:n}=this.getProps();if(!ss(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];i.set(e[t]-U(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!We(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};X(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Ao({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.resolveConstraints(),X(t=>{if(!ss(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(U(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;as.set(this.visualElement,this);let e=this.visualElement.current,t=to(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();We(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),E.read(n);let a=Qa(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(X(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()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Mo,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function ss(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function cs(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ls=class extends K{constructor(e){super(e),this.removeGroupControls=T,this.removeListeners=T,this.controls=new os(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||T}unmount(){this.removeGroupControls(),this.removeListeners()}},us=e=>(t,n)=>{e&&E.postRender(()=>e(t,n))},ds=class extends K{constructor(){super(...arguments),this.removePointerDownListener=T}onPointerDown(e){this.session=new io(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:is(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:us(e),onStart:us(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&E.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=to(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},fs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ps(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ms={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(F.test(e))e=parseFloat(e);else return e;return`${ps(e,t.target.x)}% ${ps(e,t.target.y)}%`}},hs={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=V.parse(e);if(i.length>5)return r;let a=V.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)}},gs=class extends o{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Yt(vs),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),fs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||E.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Je.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;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 _s(e){let[t,n]=oe(),r=s(C);return S(gs,{...e,layoutGroup:r,switchLayoutGroup:s(Xe),isPresent:t,safeToRemove:n})}var vs={borderRadius:{...ms,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:ms,borderTopRightRadius:ms,borderBottomLeftRadius:ms,borderBottomRightRadius:ms,boxShadow:hs};function ys(e,t,n){let r=k(e)?e:Tn(e);return r.start(ja(``,r,t,n)),r.animation}function bs(e){return e instanceof SVGElement&&e.tagName!==`svg`}var xs=(e,t)=>e.depth-t.depth,Ss=class{constructor(){this.children=[],this.isDirty=!1}add(e){_n(this.children,e),this.isDirty=!0}remove(e){vn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(xs),this.isDirty=!1,this.children.forEach(e)}};function Cs(e,t){let n=I.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(D(r),e(a-t))};return E.read(r,!0),()=>D(r)}var ws=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Ts=ws.length,Es=e=>typeof e==`string`?parseFloat(e):e,Ds=e=>typeof e==`number`||F.test(e);function Os(e,t,n,r,i,a){i?(e.opacity=U(0,n.opacity===void 0?1:n.opacity,As(r)),e.opacityExit=U(t.opacity===void 0?1:t.opacity,0,js(r))):a&&(e.opacity=U(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<Ts;i++){let a=`border${ws[i]}Radius`,o=ks(t,a),s=ks(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Ds(o)===Ds(s)?(e[a]=Math.max(U(Es(o),Es(s),r),0),(P.test(s)||P.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=U(t.rotate||0,n.rotate||0,r))}function ks(e,t){return e[t]===void 0?e.borderRadius:e[t]}var As=Ms(0,.5,or),js=Ms(.5,.95,T);function Ms(e,t,n){return r=>r<e?0:r>t?1:n(Hn(e,t,r))}function Ns(e,t){e.min=t.min,e.max=t.max}function Q(e,t){Ns(e.x,t.x),Ns(e.y,t.y)}function Ps(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Fs(e,t,n,r,i){return e-=t,e=Ko(e,1/n,r),i!==void 0&&(e=Ko(e,1/i,r)),e}function Is(e,t=0,n=1,r=.5,i,a=e,o=e){if(P.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=Fs(e.min,t,n,s,i),e.max=Fs(e.max,t,n,s,i)}function Ls(e,t,[n,r,i],a,o){Is(e,t[n],t[r],t[i],t.scale,a,o)}var Rs=[`x`,`scaleX`,`originX`],zs=[`y`,`scaleY`,`originY`];function Bs(e,t,n,r){Ls(e.x,t,Rs,n?n.x:void 0,r?r.x:void 0),Ls(e.y,t,zs,n?n.y:void 0,r?r.y:void 0)}function Vs(e){return e.translate===0&&e.scale===1}function Hs(e){return Vs(e.x)&&Vs(e.y)}function Us(e,t){return e.min===t.min&&e.max===t.max}function Ws(e,t){return Us(e.x,t.x)&&Us(e.y,t.y)}function Gs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ks(e,t){return Gs(e.x,t.x)&&Gs(e.y,t.y)}function qs(e){return J(e.x)/J(e.y)}function Js(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ys=class{constructor(){this.members=[]}add(e){_n(this.members,e),e.scheduleRender()}remove(e){if(vn(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){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Xs(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`}var $={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Zs=typeof window<`u`&&window.MotionDebug!==void 0,Qs=[``,`X`,`Y`,`Z`],$s={visibility:`hidden`},ec=1e3,tc=0;function nc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function rc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=An(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,E,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&rc(r)}function ic({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=tc++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Zs&&($.totalNodes=$.resolvedTargetDeltas=$.recalculatedProjection=0),this.nodes.forEach(sc),this.nodes.forEach(mc),this.nodes.forEach(hc),this.nodes.forEach(cc),Zs&&window.MotionDebug.record($)},this.resolvedRelativeTargetAt=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 Ss)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new yn),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,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=bs(t),this.instance=t;let{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Cs(r,250),fs.hasAnimatedSinceResize&&(fs.hasAnimatedSinceResize=!1,this.nodes.forEach(pc))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&a&&(r||i)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||Sc,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!Ks(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...pn(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||pc(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,D(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(gc),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&&rc(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,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(uc);return}this.isUpdating||this.nodes.forEach(dc),this.isUpdating=!1,this.nodes.forEach(fc),this.nodes.forEach(ac),this.nodes.forEach(oc),this.clearAllSnapshots();let e=I.now();O.delta=j(0,1e3/60,e-O.timestamp),O.timestamp=e,O.isProcessing=!0,ye.update.process(O),ye.preRender.process(O),ye.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Je.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lc),this.sharedNodes.forEach(_c)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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.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){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&&!Hs(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||Z(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)),Ec(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(Oc))){let{scroll:e}=this.root;e&&($o(t.x,e.offset.x),$o(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(Q(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&&Q(t,e),$o(t.x,i.offset.x),$o(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=Y();Q(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&&ts(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Z(r.latestValues)&&ts(n,r.latestValues)}return Z(this.latestValues)&&ts(n,this.latestValues),n}removeTransform(e){let t=Y();Q(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!Z(n.latestValues))continue;Uo(n.latestValues)&&n.updateSnapshot();let r=Y();Q(r,n.measurePageBox()),Bs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Z(this.latestValues)&&Bs(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!==O.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))){if(this.resolvedRelativeTargetAt=O.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),wo(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Q(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),So(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Q(this.target,this.layout.layoutBox),Yo(this.target,this.targetDelta)):Q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),wo(this.relativeTargetOrigin,this.target,e.target),Q(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Zs&&$.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Uo(this.parent.latestValues)||Wo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}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===O.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;Q(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Qo(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():(Ps(this.prevProjectionDelta.x,this.projectionDelta.x),Ps(this.prevProjectionDelta.y,this.projectionDelta.y)),bo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Js(this.projectionDelta.x,this.prevProjectionDelta.x)||!Js(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Zs&&$.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Lo(),this.projectionDelta=Lo(),this.projectionDeltaWithTransform=Lo()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Lo();(!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(xc));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;vc(a.x,e.x,n),vc(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wo(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bc(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Ws(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Y(),Q(d,this.relativeTarget)),s&&(this.animationValues=i,Os(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&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&=(D(this.pendingAnimation),void 0),this.pendingAnimation=E.update(()=>{fs.hasAnimatedSinceResize=!0,this.currentAnimation=ys(0,ec,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{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(ec),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&&Dc(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=J(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=J(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Q(t,n),ts(t,i),bo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ys),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&&nc(`z`,e,r,this.animationValues);for(let t=0;t<Qs.length;t++)nc(`rotate${Qs[t]}`,e,r,this.animationValues),nc(`skew${Qs[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()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return $s;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=dt(e?.pointerEvents)||``,t.transform=n?n(this.latestValues,``):`none`,t;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=dt(e?.pointerEvents)||``),this.hasProjected&&!Z(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=Xs(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;t.transformOrigin=`${a.origin*100}% ${o.origin*100}% 0`,r.animationValues?t.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let e in Jt){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=Jt[e],o=t.transform===`none`?i[e]:n(i[e],r);if(a){let e=a.length;for(let n=0;n<e;n++)t[a[n]]=o}else t[e]=o}return this.options.layoutId&&(t.pointerEvents=r===this?dt(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(uc),this.root.sharedNodes.clear()}}}function ac(e){e.updateLayout()}function oc(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;i===`size`?X(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=J(r);r.min=n[e].min,r.max=r.min+i}):Dc(i,t.layoutBox,n)&&X(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=J(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=Lo();bo(o,n,t.layoutBox);let s=Lo();a?bo(s,e.applyTransform(r,!0),t.measuredBox):bo(s,n,t.layoutBox);let c=!Hs(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();wo(o,t.layoutBox,i.layoutBox);let s=Y();wo(s,n,a.layoutBox),Ks(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,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function sc(e){Zs&&$.totalNodes++,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 cc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lc(e){e.clearSnapshot()}function uc(e){e.clearMeasurements()}function dc(e){e.isLayoutDirty=!1}function fc(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function pc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mc(e){e.resolveTargetDelta()}function hc(e){e.calcProjection()}function gc(e){e.resetSkewAndRotation()}function _c(e){e.removeLeadSnapshot()}function vc(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 yc(e,t,n,r){e.min=U(t.min,n.min,r),e.max=U(t.max,n.max,r)}function bc(e,t,n,r){yc(e.x,t.x,n.x,r),yc(e.y,t.y,n.y,r)}function xc(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Sc={duration:.45,ease:[.4,0,.1,1]},Cc=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wc=Cc(`applewebkit/`)&&!Cc(`chrome/`)?Math.round:T;function Tc(e){e.min=wc(e.min),e.max=wc(e.max)}function Ec(e){Tc(e.x),Tc(e.y)}function Dc(e,t,n){return e===`position`||e===`preserve-aspect`&&!vo(qs(t),qs(n),.2)}function Oc(e){return e!==e.root&&e.scroll?.wasRoot}var kc=ic({attachResizeListener:(e,t)=>Qa(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ac={current:void 0},jc=ic({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ac.current){let e=new kc({});e.mount(window),e.setOptions({layoutScroll:!0}),Ac.current=e}return Ac.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Mc={pan:{Feature:ds},drag:{Feature:ls,ProjectionNode:jc,MeasureLayout:_s}};function Nc(e,t,n){if(e instanceof Element)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)}function Pc(e,t){let n=Nc(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Fc(e){return t=>{t.pointerType===`touch`||Ya()||e(t)}}function Ic(e,t,n={}){let[r,i,a]=Pc(e,n),o=Fc(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=Fc(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function Lc(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&E.postRender(()=>i(t,$a(t)))}var Rc=class extends K{mount(){let{current:e}=this.node;e&&(this.unmount=Ic(e,e=>(Lc(this.node,e,`Start`),e=>Lc(this.node,e,`End`))))}unmount(){}},zc=class extends K{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=ki(Qa(this.node.current,`focus`,()=>this.onFocus()),Qa(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},Bc=(e,t)=>t?e===t?!0:Bc(e,t.parentElement):!1,Vc=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Hc(e){return Vc.has(e.tagName)||e.tabIndex!==-1}var Uc=new WeakSet;function Wc(e){return t=>{t.key===`Enter`&&e(t)}}function Gc(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Kc=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Wc(()=>{if(Uc.has(n))return;Gc(n,`down`);let e=Wc(()=>{Gc(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Gc(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function qc(e){return Za(e)&&!Ya()}function Jc(e,t,n={}){let[r,i,a]=Pc(e,n),o=e=>{let r=e.currentTarget;if(!qc(e)||Uc.has(r))return;Uc.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!qc(e)||!Uc.has(r))&&(Uc.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||Bc(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!Hc(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>Kc(e,i),i)}),a}function Yc(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&E.postRender(()=>i(t,$a(t)))}var Xc=class extends K{mount(){let{current:e}=this.node;e&&(this.unmount=Jc(e,e=>(Yc(this.node,e,`Start`),(e,{success:t})=>Yc(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},Zc=new WeakMap,Qc=new WeakMap,$c=e=>{let t=Zc.get(e.target);t&&t(e)},el=e=>{e.forEach($c)};function tl({root:e,...t}){let n=e||document;Qc.has(n)||Qc.set(n,{});let r=Qc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(el,{root:e,...t})),r[i]}function nl(e,t,n){let r=tl(t);return Zc.set(e,n),r.observe(e),()=>{Zc.delete(e),r.unobserve(e)}}var rl={some:0,all:1},il=class extends K{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:rl[r]};return nl(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(al(e,t))&&this.startObserver()}unmount(){}};function al({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var ol={inView:{Feature:il},tap:{Feature:Xc},focus:{Feature:zc},hover:{Feature:Rc}},sl={layout:{ProjectionNode:jc,MeasureLayout:_s}},cl={current:null},ll={current:!1};function ul(){if(ll.current=!0,le)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>cl.current=e.matches;e.addListener(t),t()}else cl.current=!1}var dl=[...ci,B,V],fl=e=>dl.find(si(e)),pl=new WeakMap;function ml(e,t,n){for(let r in t){let i=t[r],a=n[r];if(k(i))e.addValue(r,i);else if(k(a))e.addValue(r,Tn(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,Tn(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var hl=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],gl=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ti,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=I.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,E.render(this.render,!1,!0))};let{latestValues:s,renderState:c,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Re(t),this.isVariantNode=ze(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];s[e]!==void 0&&k(t)&&t.set(s[e],!1)}}mount(e){this.current=e,pl.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)),ll.current||ul(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:cl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){pl.delete(this.current),this.projection&&this.projection.unmount(),D(this.notifyUpdate),D(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=A.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&E.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on(`renderRequest`,this.scheduleRender),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),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 Se){let t=Se[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<hl.length;t++){let n=hl[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=ml(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=Tn(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`&&(ni(n)||cr(n))?n=parseFloat(n):!fl(n)&&V.test(t)&&(n=Br(e,t)),this.setBaseTarget(e,k(n)?n.get():n)),k(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=st(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&&!k(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 yn),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},_l=class extends gl{constructor(){super(...arguments),this.KeyframeResolver=ui}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[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;k(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function vl(e){return window.getComputedStyle(e)}var yl=class extends _l{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Gt}readValueFromInstance(e,t){if(A.has(t)){let e=zr(t);return e&&e.default||0}else{let n=vl(e),r=(_t(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ns(e,t)}build(e,t,n){Ft(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Zt(e,t,n)}},bl=class extends _l{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(A.has(t)){let e=zr(t);return e&&e.default||0}return t=Kt.has(t)?t:Ke(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Qt(e,t,n)}build(e,t,n){Vt(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){qt(e,t,n,r)}mount(e){this.isSVGTag=Wt(e.tagName),super.mount(e)}},xl=(e,t)=>at(e)?new bl(t):new yl(t,{allowProjection:e!==a}),Sl=Me(un({...Ja,...ol,...Mc,...sl},xl));function Cl(){!ll.current&&ul();let[e]=_(cl.current);return e}export{S as i,Sl as n,de as r,Cl as t};
@@ -0,0 +1 @@
1
+ function e(...e){let t=new Set,n=[];for(let i of e)for(let e of i){let i=r(e);!i||t.has(i)||(t.add(i),n.push(i))}return n}function t(e){if(Array.isArray(e))return e.map(e=>r(e)).filter(Boolean);if(e&&typeof e==`object`)return Object.keys(e).map(e=>r(e)).filter(Boolean);let t=r(e);return t?[t]:[]}function n(e){let t=r(e).toLowerCase();return t.startsWith(`mcp_header::`)||t.startsWith(`channel::`)}function r(e){return String(e||``).trim()}function i(e){let t=r(e);if(!t)return``;let n=(t.split(/\r?\n/).map(e=>e.trim()).find(Boolean)||t).replace(/\s+/g,` `).trim();return n.length<=180?n:`${n.slice(0,177).trimEnd()}...`}function a(e){let t=Number(e||0);if(!t)return`unknown`;let n=Date.now()-t,r=Math.max(1,Math.round(n/6e4));if(r<60)return`${r}m ago`;let i=Math.round(r/60);return i<24?`${i}h ago`:`${Math.round(i/24)}d ago`}function o(e,t=96){let n=r(e);return n?n.length>t?`${n.slice(0,Math.max(0,t-1)).trimEnd()}…`:n:``}function s(e){return Array.isArray(e?.messages)?e.messages:[]}function c(e){switch(e){case`waiting_for_clarification`:return`Waiting for clarification`;case`ready_to_publish`:return`Ready to publish`;case`published`:return`Published`;case`published_with_new_edits`:return`Published with new edits`;default:return`Draft`}}function l(e){switch(e){case`published`:return`ok`;case`ready_to_publish`:return`info`;case`published_with_new_edits`:case`waiting_for_clarification`:return`warn`;default:return`ghost`}}function u(e){let t=Number(e.publishedAtMs||0),n=Number(e.updatedAtMs||0);return!t||!n?!1:n>t}function d(e){let t=e.session||{},n=e.draft||null,i=[...s(n?.conversation||t?.draft?.conversation||null)].reverse(),a=i.find(e=>r(e?.role).toLowerCase()===`assistant`),c=i.find(e=>r(e?.role).toLowerCase()===`user`);if(e.clarificationState?.status===`waiting`)return o(e.clarificationState.question||`Planner needs clarification.`);let l=r(n?.current_plan?.title||n?.currentPlan?.title||t?.current_plan?.title||t?.plan?.title||t?.title);if(a?.text)return o(a.text);if(c?.text)return o(c.text);if(l)return o(l);let u=r(t?.goal||n?.goal);return u?o(u):`No plan activity yet.`}function f(e){let t=e.session||{},n=e.draft||t?.draft||null,i=n?.current_plan||n?.currentPlan||t?.current_plan||null,o=r(t?.session_id||t?.sessionId),s=Number(t?.updated_at_ms||t?.updatedAtMs||0)||0,f=Number(t?.published_at_ms||t?.publishedAtMs||n?.published_at_ms||0)||null,p=r(t?.current_plan_id||t?.currentPlanId||i?.plan_id||i?.planId),m=Number(n?.plan_revision||n?.planRevision||i?.plan_revision||i?.planRevision||t?.plan_revision||t?.planRevision||+!!p),h=u({publishedAtMs:f,updatedAtMs:s}),g=`draft`;return e.clarificationState?.status===`waiting`?g=`waiting_for_clarification`:f&&h?g=`published_with_new_edits`:f?g=`published`:p&&(g=`ready_to_publish`),{id:o,title:r(t?.title||i?.title||`Untitled plan`),projectSlug:r(t?.project_slug||t?.projectSlug),workspaceRoot:r(t?.workspace_root||t?.workspaceRoot),currentPlanId:p,goal:r(t?.goal||n?.goal),plannerProvider:r(t?.planner_provider||t?.plannerProvider),plannerModel:r(t?.planner_model||t?.plannerModel),updatedAtMs:s,updatedAtLabel:a(s),previewText:d({session:t,draft:n,clarificationState:e.clarificationState||null}),status:g,statusLabel:c(g),statusTone:l(g),revisionCount:Number.isFinite(m)?m:+!!p,publishedAtMs:f,hasUnpublishedChanges:h}}function p(i){let a=Array.isArray(i.providerCatalog?.all)?i.providerCatalog.all:Array.isArray(i.providerCatalog?.providers)?i.providerCatalog.providers:[],o=i.providerConfig?.providers||{},s=new Map;for(let[e,t]of Object.entries(o)){let i=r(e);!i||n(i)||s.set(i.toLowerCase(),{id:i,value:t})}let c=new Set;if(Array.isArray(i.providerCatalog?.connected))for(let e of i.providerCatalog.connected){let t=r(e).toLowerCase();t&&c.add(t)}let l=i.providerAuthStatus;if(l&&typeof l==`object`){let e=l.providers,t=e&&typeof e==`object`?e:l;if(t&&typeof t==`object`)for(let[e,n]of Object.entries(t)){let t=r(e).toLowerCase();if(!t||!n||typeof n!=`object`)continue;let i=r(n.status).toLowerCase();(n.connected===!0||i===`connected`||i===`configured`||n.has_key===!0||n.hasKey===!0)&&c.add(t)}}let u=i.includeUnconfiguredProviders===!0,d=new Map;for(let i of a){let a=r(i?.id);if(!a||n(a))continue;let o=a.toLowerCase(),l=s.get(o),f=!!l,p=l?.value||{},m=e(t(i?.models),t(p?.models),t(p?.default_model||p?.defaultModel));(u||f||c.has(o))&&d.set(o,{id:a,models:m,configured:!!f||c.has(o)})}for(let{id:n,value:r}of s.values()){let i=n.toLowerCase();d.has(i)||d.set(i,{id:n,models:e(t(r?.models),t(r?.default_model||r?.defaultModel)),configured:!0})}for(let e of c)d.has(e)||s.has(e)||n(e)||d.set(e,{id:e,models:[],configured:!0});return[...d.values()].sort((e,t)=>e.id.localeCompare(t.id))}function m(e){let t=i(e);return{knowledge:{enabled:!0,reuse_mode:`preflight`,trust_floor:`promoted`,read_spaces:[{scope:`project`}],promote_spaces:[{scope:`project`}],...t?{subject:t}:{}}}}function h(e){return{rollout:{rollout_mode:`project_first_pilot`,guardrails:[`Start in one project space before widening scope.`,`Keep reuse_mode at preflight and trust_floor at promoted by default.`,`Promote only validated outcomes; do not treat raw run output as shared truth.`,`Use approved_default sparingly, only for reviewed default guidance.`,`Watch reuse_reason, skip_reason, and freshness_reason during the pilot.`,`Expand namespaces only after the pilot demonstrates stable reuse.`],recommended_sequence:[`Run one workflow once to seed working knowledge.`,`Promote validated outcomes into the project knowledge space.`,`Run a second workflow with the same subject to verify reuse.`,`Check that unrelated workflows still miss the same knowledge key.`],subject:r(e)||null}}}function g(e,t=!0){return(Array.isArray(e?.messages)?e.messages:[]).map((e,n)=>({id:String(e?.created_at_ms||e?.createdAtMs||`${n}`),role:r(e?.role||`assistant`).toLowerCase(),displayRole:r(e?.role||`assistant`),text:r(e?.text||``)||` `,markdown:t}))}export{c as a,g as i,h as n,l as o,p as r,f as s,m as t};
@@ -0,0 +1 @@
1
+ import{d as e,p as t}from"./fullcalendar-Bn75j0xM.js";function n(n){return{render:function(e){t(e,n)},unmount:function(){e(n)}}}export{n as t};
@@ -0,0 +1 @@
1
+ import{C as e,S as t,g as n,i as r,v as i,w as a,x as o}from"./fullcalendar-Bn75j0xM.js";import{i as s}from"./motion-B3ZE8SGR.js";var c=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},l={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},u=new class{#e=l;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function d(e){setTimeout(e,0)}var f=typeof window>`u`||`Deno`in globalThis;function p(){}function m(e,t){return typeof e==`function`?e(t):e}function h(e){return typeof e==`number`&&e>=0&&e!==1/0}function g(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _(e,t){return typeof e==`function`?e(t):e}function v(e,t){return typeof e==`function`?e(t):e}function y(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==x(o,t.options))return!1}else if(!C(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function b(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(S(t.options.mutationKey)!==S(a))return!1}else if(!C(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function x(e,t){return(t?.queryKeyHashFn||S)(e)}function S(e){return JSON.stringify(e,(e,t)=>E(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function C(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>C(e[n],t[n])):!1}var ee=Object.prototype.hasOwnProperty;function w(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=te(e)&&te(t);if(!r&&!(E(e)&&E(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=w(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function T(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function te(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function E(e){if(!D(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!D(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function D(e){return Object.prototype.toString.call(e)===`[object Object]`}function ne(e){return new Promise(t=>{u.setTimeout(t,e)})}function O(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:w(e,t)}function re(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ie(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j(e,t){return typeof e==`function`?e(...t):!!e}function ae(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var M=new class extends c{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!f&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function N(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var oe=d;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=se(),F=new class extends c{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!f&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)===`online`?F.isOnline():!0}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=N(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new L(t);p(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>M.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),u=()=>I(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(f?0:3),o=e.retryDelay??ce,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ne(s).then(()=>l()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?h():m().then(h),i)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),h(this.gcTime)&&(this.#e=u.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(f?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(u.clearTimeout(this.#e),void 0)}},le=class extends z{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=H(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=H(this.options);e.data!==void 0&&(this.setState(V(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=O(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(p).catch(p):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>v(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>_(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!g(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=A(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...B(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...V(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function B(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function V(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function H(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var U=class extends c{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=N(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),W(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return G(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return G(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof v(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!T(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&K(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||v(this.options.enabled,this.#t)!==v(t.enabled,this.#t)||_(this.options.staleTime,this.#t)!==_(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||v(this.options.enabled,this.#t)!==v(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return de(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(p)),t}#g(){this.#b();let e=_(this.options.staleTime,this.#t);if(f||this.#r.isStale||!h(e))return;let t=g(this.#r.dataUpdatedAt,e)+1;this.#d=u.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(f||v(this.options.enabled,this.#t)===!1||!h(this.#p)||this.#p===0)&&(this.#f=u.setInterval(()=>{(this.options.refetchIntervalInBackground||M.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(u.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(u.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&W(e,t),o=i&&K(e,n,t,r);(a||o)&&(l={...l,...B(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=O(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=O(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,y=m===`error`,b=_&&g,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:q(e,t),refetch:this.refetch,promise:this.#o,isEnabled:v(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=N())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!T(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){P.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ue(e,t){return v(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function W(e,t){return ue(e,t)||e.state.data!==void 0&&G(e,t,t.refetchOnMount)}function G(e,t,n){if(v(t.enabled,e)!==!1&&_(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&q(e,t)}return!1}function K(e,t,n,r){return(e!==t||v(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&q(e,n)}function q(e,t){return v(t.enabled,e)!==!1&&e.isStaleByTime(_(t.staleTime,e))}function de(e,t){return!T(e.getCurrentResult(),t)}var fe=class extends z{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||J(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=R({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),P.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function J(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var pe=class extends c{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),T(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&S(t.mutationKey)!==S(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??J();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){P.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function me(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function he(e,t,n){let r=e.slice(0);return r[t]=n,r}var ge=class extends c{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,P.batch(()=>{let e=this.#i,t=this.#f(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!T(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(me(e,n).forEach(e=>{e.destroy()}),me(n,e).forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#f(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=w(this.#a,t(e))),this.#a}return e}#f(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new U(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#p(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=he(this.#t,n,t),this.#m())}#m(){if(this.hasListeners()){let e=this.#a,t=this.#u(this.#t,this.#l);e!==this.#d(t,this.#r?.combine)&&P.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},_e=a(void 0),Y=e=>{let n=t(_e);if(e)return e;if(!n)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return n},ve=({client:t,children:n})=>(e(()=>(t.mount(),()=>{t.unmount()}),[t]),s(_e.Provider,{value:t,children:n})),ye=a(!1),be=()=>t(ye);ye.Provider;function xe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Se=a(xe()),Ce=()=>t(Se),X=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?j(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},we=t=>{e(()=>{t.clearReset()},[t])},Te=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||j(n,[e.error,r])),Z=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ee=(e,t)=>e.isLoading&&e.isFetching&&!t,Q=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function De({queries:t,...a},s){let c=Y(s),l=be(),u=Ce(),d=n(()=>t.map(e=>{let t=c.defaultQueryOptions(e);return t._optimisticResults=l?`isRestoring`:`optimistic`,t}),[t,c,l]);d.forEach(e=>{Z(e),X(e,u,c.getQueryCache().get(e.queryHash))}),we(u);let[f]=i(()=>new ge(c,d,a)),[m,h,g]=f.getOptimisticResult(d,a.combine),_=!l&&a.subscribed!==!1;r(o(e=>_?f.subscribe(P.batchCalls(e)):p,[f,_]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),e(()=>{f.setQueries(d,a)},[d,a,f]);let v=m.some((e,t)=>Q(d[t],e))?m.flatMap((e,t)=>{let n=d[t];return n&&Q(n,e)?$(n,new U(c,n),u):[]}):[];if(v.length>0)throw Promise.all(v);let y=m.find((e,t)=>{let n=d[t];return n&&Te({result:e,errorResetBoundary:u,throwOnError:n.throwOnError,query:c.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(y?.error)throw y.error;return h(g())}function Oe(t,n,a){let s=be(),c=Ce(),l=Y(a),u=l.defaultQueryOptions(t);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);let d=l.getQueryCache().get(u.queryHash);u._optimisticResults=s?`isRestoring`:`optimistic`,Z(u),X(u,c,d),we(c);let m=!l.getQueryCache().get(u.queryHash),[h]=i(()=>new n(l,u)),g=h.getOptimisticResult(u),_=!s&&t.subscribed!==!1;if(r(o(e=>{let t=_?h.subscribe(P.batchCalls(e)):p;return h.updateResult(),t},[h,_]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),e(()=>{h.setOptions(u)},[u,h]),Q(u,g))throw $(u,h,c);if(Te({result:g,errorResetBoundary:c,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,g),u.experimental_prefetchInRender&&!f&&Ee(g,s)&&(m?$(u,h,c):d?.promise)?.catch(p).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?g:h.trackResult(g)}function ke(e,t){return Oe(e,U,t)}function Ae(t,n){let a=Y(n),[s]=i(()=>new pe(a,t));e(()=>{s.setOptions(t)},[s,t]);let c=r(o(e=>s.subscribe(P.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l=o((e,t)=>{s.mutate(e,t).catch(p)},[s]);if(c.error&&j(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}export{k as C,_ as S,x as _,Y as a,p as b,F as c,ae as d,re as f,S as g,m as h,ve as i,P as l,A as m,ke as n,fe as o,ie as p,De as r,le as s,Ae as t,M as u,b as v,c as w,C as x,y};
@@ -0,0 +1,2 @@
1
+ var e=new Map,t={channels_open:0,channels_total:0,events_received:0,errors_total:0},n=1e3,r=15e3;function i(e,t){return`${t?`cred`:`anon`}:${e}`}function a(){let n=0;for(let t of e.values())t.closed||(n+=1);t.channels_open=n,t.channels_total=e.size}function o(e){e.reconnectTimer!==null&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null)}function s(e,n){t.events_received+=1;let r={data:n};for(let t of[...e.listeners])try{t(r)}catch{}}function c(e,n){t.errors_total+=1;for(let t of[...e.errorListeners])try{t(n)}catch{}}function l(e,t){let n=String(t||``).trim();!n||n===`: keep-alive`||n.startsWith(`:`)||s(e,n)}async function u(e,t,n){let r=t.getReader(),i=new TextDecoder,a=``,o=``;try{for(;!(n.aborted||e.closed||e.refs===0);){let{done:t,value:n}=await r.read();if(t)break;a+=i.decode(n,{stream:!0});let s=a.split(`
2
+ `);a=s.pop()??``;for(let t of s){let n=t.replace(/\r$/,``);if(n.startsWith(`data:`)){o+=n.slice(5).trimStart();continue}n===``&&(o&&=(l(e,o),``))}}o&&l(e,o)}finally{r.releaseLock()}}async function d(t,i,s,l){if(t.closed||t.refs===0||t.running)return;t.running=!0,o(t);let f=new AbortController;t.controller=f;let p=!1;try{let e=await fetch(i,{credentials:s?`include`:`omit`,headers:{Accept:`text/event-stream`,"Cache-Control":`no-cache`},signal:f.signal});if(t.closed||t.refs===0||f.signal.aborted)return;if(!e.ok){let n=await e.text().catch(()=>``);c(t,Error(`SSE connect failed (${e.status} ${e.statusText}): ${n}`)),p=!0;return}if(!String(e.headers.get(`content-type`)||``).toLowerCase().includes(`text/event-stream`)||!e.body){p=!0;return}t.reconnectDelayMs=n,await u(t,e.body,f.signal)}catch(e){!t.closed&&t.refs>0&&!f.signal.aborted&&(c(t,e),p=!0)}finally{if(t.controller===f&&(t.controller=null),t.running=!1,!t.closed&&t.refs>0){let e=p?t.reconnectDelayMs:n;p?t.reconnectDelayMs=Math.min(Math.max(e,n)*2,r):t.reconnectDelayMs=n,t.reconnectTimer=setTimeout(()=>{t.reconnectTimer=null,d(t,i,s,l)},e)}else e.delete(l),a()}}function f(t,r=!0){let o=i(t,r),s=e.get(o);if(s&&!s.closed)return s;let c={controller:null,errorListeners:new Set,listeners:new Set,reconnectDelayMs:n,reconnectTimer:null,refs:0,closed:!1,running:!1};return e.set(o,c),a(),c}function p(t,n,r={}){let s=r.withCredentials!==!1,c=i(t,s),l=f(t,s);return l.refs+=1,l.listeners.add(n),typeof r.onError==`function`&&l.errorListeners.add(r.onError),d(l,t,s,c),()=>{let t=e.get(c);t&&(t.listeners.delete(n),typeof r.onError==`function`&&t.errorListeners.delete(r.onError),t.refs=Math.max(0,t.refs-1),t.refs===0&&(t.closed=!0,t.controller?.abort(),o(t),e.delete(c),a()))}}export{p as t};
@@ -0,0 +1 @@
1
+ import{C as e,h as t}from"./fullcalendar-Bn75j0xM.js";import{t as n}from"./sse-B4A2m-Nk.js";function r(r,i,a={}){let o=t(i);e(()=>{o.current=i},[i]),e(()=>{if(!(!a.enabled||!r))return n(r,e=>o.current(e),{withCredentials:a.withCredentials})},[a.enabled,a.withCredentials,r])}export{r as t};