@telegraph/combobox 0.2.7 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @telegraph/combobox
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c335807`](https://github.com/knocklabs/telegraph/commit/c33580795d3e75d921449a5684ff7aaff1c2c482)]:
|
|
8
|
+
- @telegraph/tooltip@0.3.0
|
|
9
|
+
- @telegraph/tag@0.2.3
|
|
10
|
+
- @telegraph/truncate@0.1.3
|
|
11
|
+
|
|
12
|
+
## 0.3.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#780](https://github.com/knocklabs/telegraph/pull/780) [`12ed121`](https://github.com/knocklabs/telegraph/commit/12ed1211ce7d8ad9316660b4f6fea4f5528a78a5) Thanks [@ksorathia](https://github.com/ksorathia)! - Swap in surface-1 bg color for Button, Combobox, Input and TextArea's default variants
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`12ed121`](https://github.com/knocklabs/telegraph/commit/12ed1211ce7d8ad9316660b4f6fea4f5528a78a5)]:
|
|
21
|
+
- @telegraph/button@0.7.0
|
|
22
|
+
- @telegraph/input@0.4.0
|
|
23
|
+
- @telegraph/menu@0.3.4
|
|
24
|
+
- @telegraph/tag@0.2.2
|
|
25
|
+
|
|
3
26
|
## 0.2.7
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=e=>a.call(e,`module.exports`)?e[`module.exports`]:c(t({},`__esModule`,{value:!0}),e);let d=require(`@radix-ui/react-dismissable-layer`),f=require(`@radix-ui/react-use-controllable-state`),p=require(`@radix-ui/react-visually-hidden`);p=l(p);let m=require(`@telegraph/button`),h=require(`@telegraph/compose-refs`),g=require(`@telegraph/icon`),_=require(`@telegraph/input`),v=require(`@telegraph/layout`),y=require(`@telegraph/menu`),b=require(`@telegraph/typography`),x=require(`lucide-react`),S=require(`react`);S=l(S,1);let C=require(`@telegraph/helpers`),w=require(`@telegraph/tag`),ee=require(`@telegraph/tooltip`),te=require(`@telegraph/truncate`),T=require(`react/jsx-runtime`);var ne={0:`5`,1:`6`,2:`8`,3:`10`},E=e=>Array.isArray(e),D=e=>typeof e==`object`&&!Array.isArray(e)||typeof e==`string`||!e,re=e=>{let t=(e,n=[])=>(S.default.Children.toArray(e).forEach(e=>{if(S.default.isValidElement(e)){let r=e.props;r.value?n.push(e):r.children&&t(r.children,n)}}),n);return t(e).map(e=>{let t=e;return{value:t.props.value,label:t.props?.label||t.props.children||t.props.value}})},O=(e,t)=>{if(e)return t===!0?e?.value:e},ie=(e,t,n)=>{if(!e||!t||t.length===0)return;let r=t.find(t=>t.value===O(e,n));if(r)return r},ae=({children:e,value:t,searchQuery:n})=>{let r=oe(e);return t?.toLowerCase().includes(n.toLowerCase())||r.some(e=>e.toLowerCase().includes(n.toLowerCase()))},oe=e=>{let t=S.default.Children.toArray(e),n=[];return t.forEach(e=>{if(typeof e==`string`&&n.push(e),S.default.isValidElement(e)){let t=e.props;t.children&&n.push(...oe(t.children))}}),n},se=(0,S.createContext)({});function ce(e){let t=(0,S.useRef)(null);return t.current===null&&(t.current=e()),t.current}var le=typeof window<`u`?S.useLayoutEffect:S.useEffect,ue=(0,S.createContext)(null);function de(e,t){e.indexOf(t)===-1&&e.push(t)}function fe(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var k=(e,t,n)=>n>t?t:n<e?e:n;function pe(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var A=()=>{},j=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(A=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(pe(t,n))},j=(e,t,n)=>{if(!e)throw Error(pe(t,n))});var M={},me=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function he(e){return typeof e==`object`&&!!e}var ge=e=>/^0[^.\s]+$/u.test(e);function _e(e){let t;return()=>(t===void 0&&(t=e()),t)}var ve=e=>e,ye=(e,t)=>n=>t(e(n)),be=(...e)=>e.reduce(ye),xe=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Se=class{constructor(){this.subscriptions=[]}add(e){return de(this.subscriptions,e),()=>fe(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}},N=e=>e*1e3,P=e=>e/1e3;function Ce(e,t){return t?1e3/t*e:0}var we=new Set;function Te(e,t,n){e||we.has(t)||(console.warn(pe(t,n)),we.add(t))}var Ee=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,De=1e-7,Oe=12;function ke(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ee(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>De&&++s<Oe);return o}function Ae(e,t,n,r){if(e===t&&n===r)return ve;let i=t=>ke(t,0,1,e,n);return e=>e===0||e===1?e:Ee(i(e),t,r)}var je=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Me=e=>t=>1-e(1-t),Ne=Ae(.33,1.53,.69,.99),Pe=Me(Ne),Fe=je(Pe),Ie=e=>e>=1?1:(e*=2)<1?.5*Pe(e):.5*(2-2**(-10*(e-1))),Le=e=>1-Math.sin(Math.acos(e)),Re=Me(Le),ze=je(Le),Be=Ae(.42,0,1,1),Ve=Ae(0,0,.58,1),He=Ae(.42,0,.58,1),Ue=e=>Array.isArray(e)&&typeof e[0]!=`number`,We=e=>Array.isArray(e)&&typeof e[0]==`number`,Ge={linear:ve,easeIn:Be,easeInOut:He,easeOut:Ve,circIn:Le,circInOut:ze,circOut:Re,backIn:Pe,backInOut:Fe,backOut:Ne,anticipate:Ie},Ke=e=>typeof e==`string`,qe=e=>{if(We(e)){j(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Ae(t,n,r,i)}else if(Ke(e))return j(Ge[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),Ge[e];return e},Je=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Ye={value:null,addProjectionMetrics:null};function Xe(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Ye.value&&Ye.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ze=40;function Qe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Je.reduce((e,n)=>(e[n]=Xe(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=M.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ze),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Je.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Je.length;t++)o[Je[t]].cancel(e)},state:i,steps:o}}var{schedule:F,cancel:$e,state:et,steps:tt}=Qe(typeof requestAnimationFrame<`u`?requestAnimationFrame:ve,!0),nt;function rt(){nt=void 0}var I={now:()=>(nt===void 0&&I.set(et.isProcessing||M.useManualTiming?et.timestamp:performance.now()),nt),set:e=>{nt=e,queueMicrotask(rt)}},it={layout:0,mainThread:0,waapi:0},at=e=>t=>typeof t==`string`&&t.startsWith(e),ot=at(`--`),st=at(`var(--`),ct=e=>st(e)?lt.test(e.split(`/*`)[0].trim()):!1,lt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ut(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var L={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},dt={...L,transform:e=>k(0,1,e)},ft={...L,default:1},pt=e=>Math.round(e*1e5)/1e5,mt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ht(e){return e==null}var gt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_t=(e,t)=>n=>!!(typeof n==`string`&>.test(n)&&n.startsWith(e)||t&&!ht(n)&&Object.prototype.hasOwnProperty.call(n,t)),vt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(mt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},yt=e=>k(0,255,e),bt={...L,transform:e=>Math.round(yt(e))},R={test:_t(`rgb`,`red`),parse:vt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+bt.transform(e)+`, `+bt.transform(t)+`, `+bt.transform(n)+`, `+pt(dt.transform(r))+`)`};function xt(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 St={test:_t(`#`),parse:xt,transform:R.transform},Ct=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),z=Ct(`deg`),wt=Ct(`%`),B=Ct(`px`),Tt=Ct(`vh`),Et=Ct(`vw`),Dt={...wt,parse:e=>wt.parse(e)/100,transform:e=>wt.transform(e*100)},V={test:_t(`hsl`,`hue`),parse:vt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+wt.transform(pt(t))+`, `+wt.transform(pt(n))+`, `+pt(dt.transform(r))+`)`},H={test:e=>R.test(e)||St.test(e)||V.test(e),parse:e=>R.test(e)?R.parse(e):V.test(e)?V.parse(e):St.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?R.transform(e):V.transform(e),getAnimatableNone:e=>{let t=H.parse(e);return t.alpha=0,H.transform(t)}},Ot=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function kt(e){return isNaN(e)&&typeof e==`string`&&(e.match(mt)?.length||0)+(e.match(Ot)?.length||0)>0}var At=`number`,jt=`color`,Mt=`var`,Nt=`var(`,Pt="${}",Ft=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function U(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ft,e=>(H.test(e)?(r.color.push(a),i.push(jt),n.push(H.parse(e))):e.startsWith(Nt)?(r.var.push(a),i.push(Mt),n.push(e)):(r.number.push(a),i.push(At),n.push(parseFloat(e))),++a,Pt)).split(Pt),indexes:r,types:i}}function It(e){return U(e).values}function Lt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===At?i+=pt(r[a]):e===jt?i+=H.transform(r[a]):i+=r[a]}return i}}function Rt(e){return Lt(U(e))}var zt=e=>typeof e==`number`?0:H.test(e)?H.getAnimatableNone(e):e,Bt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zt(e);function Vt(e){let t=U(e);return Lt(t)(t.values.map((e,n)=>Bt(e,t.split[n])))}var W={test:kt,parse:It,createTransformer:Rt,getAnimatableNone:Vt};function Ht(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 Ut({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=Ht(s,r,e+1/3),a=Ht(s,r,e),o=Ht(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Wt(e,t){return n=>n>0?t:e}var Gt=(e,t,n)=>e+(t-e)*n,Kt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},qt=[St,R,V],Jt=e=>qt.find(t=>t.test(e));function Yt(e){let t=Jt(e);if(A(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===V&&(n=Ut(n)),n}var Xt=(e,t)=>{let n=Yt(e),r=Yt(t);if(!n||!r)return Wt(e,t);let i={...n};return e=>(i.red=Kt(n.red,r.red,e),i.green=Kt(n.green,r.green,e),i.blue=Kt(n.blue,r.blue,e),i.alpha=Gt(n.alpha,r.alpha,e),R.transform(i))},Zt=new Set([`none`,`hidden`]);function Qt(e,t){return Zt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $t(e,t){return n=>Gt(e,t,n)}function en(e){return typeof e==`number`?$t:typeof e==`string`?ct(e)?Wt:H.test(e)?Xt:an:Array.isArray(e)?tn:typeof e==`object`?H.test(e)?Xt:nn:Wt}function tn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>en(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nn(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=en(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function rn(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 an=(e,t)=>{let n=W.createTransformer(t),r=U(e),i=U(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?Zt.has(e)&&!i.values.length||Zt.has(t)&&!r.values.length?Qt(e,t):be(tn(rn(r,i),i.values),n):(A(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Wt(e,t))};function on(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Gt(e,t,n):en(e)(e,t)}var sn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>F.update(t,e),stop:()=>$e(t),now:()=>et.isProcessing?et.timestamp:I.now()}},cn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ln=2e4;function un(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function dn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(un(r),ln);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:P(i)}}var G={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function fn(e,t){return e*Math.sqrt(1-t*t)}var pn=12;function mn(e,t,n){let r=n;for(let n=1;n<pn;n++)r-=e(r)/t(r);return r}var hn=.001;function gn({duration:e=G.duration,bounce:t=G.bounce,velocity:n=G.velocity,mass:r=G.mass}){let i,a;A(e<=N(G.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=k(G.minDamping,G.maxDamping,o),e=k(G.minDuration,G.maxDuration,P(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=fn(t,o),c=Math.exp(-i);return hn-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=fn(t**2,o);return(-i(t)+hn>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-hn+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=mn(i,a,s);if(e=N(e),isNaN(c))return{stiffness:G.stiffness,damping:G.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var _n=[`duration`,`bounce`],vn=[`stiffness`,`damping`,`mass`];function yn(e,t){return t.some(t=>e[t]!==void 0)}function bn(e){let t={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...e};if(!yn(e,vn)&&yn(e,_n))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*k(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:G.mass,stiffness:i,damping:a}}else{let n=gn({...e,velocity:0});t={...t,...n,mass:G.mass},t.isResolvedFromDuration=!0}return t}function xn(e=G.visualDuration,t=G.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}=bn({...n,velocity:-P(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=P(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?G.restSpeed.granular:G.restSpeed.default,i||=v?G.restDelta.granular:G.restDelta.default;let y,b,x,S,C,w;if(h<1)x=fn(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let ee={calculatedDuration:p&&d||null,velocity:e=>N(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=N(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=N(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(un(ee),ln),t=cn(t=>ee.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return ee}xn.applyToOptions=e=>{let t=dn(e,100,xn);return e.ease=t.ease,e.duration=N(t.duration),e.type=`keyframes`,e};var Sn=5;function Cn(e,t,n){let r=Math.max(t-Sn,0);return Ce(n-e(r),t-r)}function wn({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=xn({keyframes:[f.value,m(f.value)],velocity:Cn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Tn(e,t,n){let r=[],i=n||M.mix||on,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=be(Array.isArray(t)?t[n]||ve:t,a)),r.push(a)}return r}function En(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(j(a===t.length,`Both input and output ranges must be the same length`,`range-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=Tn(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=xe(e[r],e[r+1],n);return s[r](i)};return n?t=>l(k(e[0],e[a-1],t)):l}function Dn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=xe(0,t,r);e.push(Gt(n,1,i))}}function On(e){let t=[0];return Dn(t,e.length-1),t}function kn(e,t){return e.map(e=>e*t)}function An(e,t){return e.map(()=>t||He).splice(0,e.length-1)}function jn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ue(r)?r.map(qe):qe(r),a={done:!1,value:t[0]},o=En(kn(n&&n.length===t.length?n:On(t),e),t,{ease:Array.isArray(i)?i:An(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Mn=e=>e!==null;function Nn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Mn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Pn={decay:wn,inertia:wn,tween:jn,keyframes:jn,spring:xn};function Fn(e){typeof e.type==`string`&&(e.type=Pn[e.type])}var In=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Ln=e=>e/100,Rn=class extends In{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==I.now()&&this.tick(I.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},it.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Fn(e);let{type:t=jn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||jn;process.env.NODE_ENV!==`production`&&s!==jn&&j(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==jn&&typeof o[0]!=`number`&&(this.mixKeyframes=be(Ln,on(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=un(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=k(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==wn&&(b.value=Nn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return P(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+P(e)}get time(){return P(this.currentTime)}set time(e){e=N(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Cn(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(I.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=P(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=sn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(I.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,it.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function zn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var K=e=>e*180/Math.PI,Bn=e=>Hn(K(Math.atan2(e[1],e[0]))),Vn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bn,rotateZ:Bn,skewX:e=>K(Math.atan(e[1])),skewY:e=>K(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hn=e=>(e%=360,e<0&&(e+=360),e),Un=Bn,Wn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Gn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Kn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wn,scaleY:Gn,scale:e=>(Wn(e)+Gn(e))/2,rotateX:e=>Hn(K(Math.atan2(e[6],e[5]))),rotateY:e=>Hn(K(Math.atan2(-e[2],e[0]))),rotateZ:Un,rotate:Un,skewX:e=>K(Math.atan(e[4])),skewY:e=>K(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qn(e){return+!!e.includes(`scale`)}function Jn(e,t){if(!e||e===`none`)return qn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Kn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Vn,i=t}if(!i)return qn(t);let a=r[t],o=i[1].split(`,`).map(Xn);return typeof a==`function`?a(o):o[a]}var Yn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Jn(n,t)};function Xn(e){return parseFloat(e.trim())}var Zn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],q=new Set(Zn),Qn=e=>e===L||e===B,$n=new Set([`x`,`y`,`z`]),er=Zn.filter(e=>!$n.has(e));function tr(e){let t=[];return er.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var J={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Jn(t,`x`),y:(e,{transform:t})=>Jn(t,`y`)};J.translateX=J.x,J.translateY=J.y;var Y=new Set,nr=!1,rr=!1,ir=!1;function ar(){if(rr){let e=Array.from(Y).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=tr(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}rr=!1,nr=!1,Y.forEach(e=>e.complete(ir)),Y.clear()}function or(){Y.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rr=!0)})}function sr(){ir=!0,or(),ar(),ir=!1}var cr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Y.add(this),nr||(nr=!0,F.read(or),F.resolveKeyframes(ar))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}zn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Y.delete(this)}cancel(){this.state===`scheduled`&&(Y.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},lr=e=>e.startsWith(`--`);function ur(e,t,n){lr(t)?e.style.setProperty(t,n):e.style[t]=n}var dr={};function fr(e,t){let n=_e(e);return()=>dr[t]??n()}var pr=fr(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),mr=fr(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),hr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:hr([0,.65,.55,1]),circOut:hr([.55,0,1,.45]),backIn:hr([.31,.01,.66,-.59]),backOut:hr([.33,1.53,.69,.99])};function _r(e,t){if(e)return typeof e==`function`?mr()?cn(e,t):`ease-out`:We(e)?hr(e):Array.isArray(e)?e.map(e=>_r(e,t)||gr.easeOut):gr[e]}function vr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=_r(s,i);Array.isArray(d)&&(u.easing=d),Ye.value&&it.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Ye.value&&p.finished.finally(()=>{it.waapi--}),p}function yr(e){return typeof e==`function`&&`applyToOptions`in e}function br({type:e,...t}){return yr(e)&&mr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var xr=class extends In{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,j(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=br(e);this.animation=vr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Nn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ur(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return P(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+P(e)}get time(){return P(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=N(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&pr()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ve):r(this)}},Sr={anticipate:Ie,backInOut:Fe,circInOut:ze};function Cr(e){return e in Sr}function wr(e){typeof e.ease==`string`&&Cr(e.ease)&&(e.ease=Sr[e.ease])}var Tr=10,Er=class extends xr{constructor(e){wr(e),Fn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Rn({...a,autoplay:!1}),s=Math.max(Tr,I.now()-this.startTime),c=k(0,Tr,s-Tr),l=o.sample(s).value,{name:u}=this.options;i&&u&&ur(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Dr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(W.test(e)||e===`0`)&&!e.startsWith(`url(`));function Or(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 kr(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=Dr(i,t),s=Dr(a,t);return A(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Or(e)||(n===`spring`||yr(n))&&r}function Ar(e){e.duration=0,e.type=`keyframes`}var jr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Mr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Nr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Mr.test(e[t]))return!0;return!1}var Pr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Fr=_e(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Ir(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Fr()&&n&&(jr.has(n)||Pr.has(n)&&Nr(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Lr=40,Rr=class extends In{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=I.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||cr)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=I.now();let u=!0;kr(e,i,a,o)||(u=!1,(M.instantAnimations||!s)&&l?.(Nn(e,n,t)),e[0]=e[e.length-1],Ar(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Lr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Ir(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Er({...d,element:p})}catch{m=new Rn(d)}else m=new Rn(d);m.finished.then(()=>{this.notifyFinished()}).catch(ve),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function zr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Br=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vr(e){let t=Br.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var Hr=4;function Ur(e,t,n=1){j(n<=Hr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Vr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return me(e)?parseFloat(e):e}return ct(i)?Ur(i,t,n+1):i}var Wr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Gr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kr={type:`keyframes`,duration:.8},qr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Jr=(e,{keyframes:t})=>t.length>2?Kr:q.has(e)?e.startsWith(`scale`)?Gr(t[1]):Wr:qr;function Yr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Xr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Yr(n,e)}var Zr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Qr(e){for(let t in e)if(!Zr.has(t))return!0;return!1}var $r=(e,t,n,r={},i,a)=>o=>{let s=Xr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=N(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};Qr(s)||Object.assign(u,Jr(e,u)),u.duration&&=N(u.duration),u.repeatDelay&&=N(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ar(u),u.delay===0&&(d=!0)),(M.instantAnimations||M.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Nn(u.keyframes,s);if(e!==void 0){F.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Rn(u):new Rr(u)};function ei(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ti(e,t,n,r){if(typeof t==`function`){let[i,a]=ei(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]=ei(r);t=t(n===void 0?e.custom:n,i,a)}return t}function X(e,t,n){let r=e.getProps();return ti(r,t,n===void 0?r.custom:n,e)}var ni=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Zn]),ri=30,ii=e=>!isNaN(parseFloat(e)),ai={current:void 0},oi=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=I.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ii(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&Te(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Se);let n=this.events[e].add(t);return e===`change`?()=>{n(),F.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ai.current&&ai.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ri)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ri);return Ce(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function si(e,t){return new oi(e,t)}var ci=e=>Array.isArray(e);function li(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,si(n))}function ui(e){return ci(e)?e[e.length-1]||0:e}function di(e,t){let{transitionEnd:n={},transition:r={},...i}=X(e,t)||{};i={...i,...n};for(let t in i)li(e,t,ui(i[t]))}var Z=e=>!!(e&&e.getVelocity);function fi(e){return!!(Z(e)&&e.add)}function pi(e,t){let n=e.getValue(`willChange`);if(fi(n))return n.add(t);if(!n&&M.WillChange){let n=new M.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function mi(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var hi=`data-`+mi(`framerAppearId`);function gi(e){return e.props[hi]}function _i({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Yr(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&_i(d,t))continue;let o={delay:n,...Xr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){F.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=gi(e);if(n){let e=window.MotionHandoffAnimation(n,t,F);e!==null&&(o.startTime=e,f=!0)}}pi(e,t);let p=l??e.shouldReduceMotion;r.start($r(t,r,i,p&&ni.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>F.update(()=>{o&&di(e,o)});u.length?Promise.all(u).then(t):t()}return u}function yi(e,t,n={}){let r=X(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(vi(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return bi(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function bi(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(yi(c,t,{...o,delay:n+(typeof r==`function`?0:r)+zr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function xi(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>yi(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=yi(e,t,n);else{let i=typeof t==`function`?X(e,t,n.custom):t;r=Promise.all(vi(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Si={test:e=>e===`auto`,parse:e=>e},Ci=e=>t=>t.test(e),wi=[L,B,wt,z,Et,Tt,Si],Ti=e=>wi.find(Ci(e));function Ei(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ge(e)}var Di=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Oi(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(mt)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Di.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ki=/\b([a-z-]*)\(.*?\)/gu,Ai={...W,getAnimatableNone:e=>{let t=e.match(ki);return t?t.map(Oi).join(` `):e}},ji={...W,getAnimatableNone:e=>{let t=W.parse(e);return W.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Mi={...L,transform:Math.round},Ni={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:ft,scaleX:ft,scaleY:ft,scaleZ:ft,skew:z,skewX:z,skewY:z,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:dt,originX:Dt,originY:Dt,originZ:B,zIndex:Mi,fillOpacity:dt,strokeOpacity:dt,numOctaves:Mi},Pi={...Ni,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:Ai,WebkitFilter:Ai,mask:ji,WebkitMask:ji},Fi=e=>Pi[e],Ii=new Set([Ai,ji]);function Li(e,t){let n=Fi(e);return Ii.has(n)||(n=W),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ri=new Set([`auto`,`none`,`0`]);function zi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ri.has(t)&&U(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Li(n,i)}var Bi=class extends cr{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(),ct(r))){let i=Ur(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ni.has(n)||e.length!==2)return;let[r,i]=e,a=Ti(r),o=Ti(i);if(ut(r)!==ut(i)&&J[n]){this.needsMeasurement=!0;return}if(a!==o)if(Qn(a)&&Qn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else J[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Ei(e[t]))&&n.push(t);n.length&&zi(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=J[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]=J[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()}};function Vi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Hi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Ui(e){return he(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Wi,cancel:Gi}=Qe(queueMicrotask,!1),Ki={x:!1,y:!1};function qi(){return Ki.x||Ki.y}function Ji(e,t){let n=Vi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Yi(e){return!(e.pointerType===`touch`||qi())}function Xi(e,t,n={}){let[r,i,a]=Ji(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Yi(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Zi=(e,t)=>t?e===t?!0:Zi(e,t.parentElement):!1,Qi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,$i=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ea(e){return $i.has(e.tagName)||e.isContentEditable===!0}var ta=new WeakSet;function na(e){return t=>{t.key===`Enter`&&e(t)}}function ra(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var ia=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=na(()=>{if(ta.has(n))return;ra(n,`down`);let e=na(()=>{ra(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ra(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function aa(e){return Qi(e)&&!qi()}var oa=new WeakSet;function sa(e,t,n={}){let[r,i,a]=Ji(e,n),o=e=>{let r=e.currentTarget;if(!aa(e)||oa.has(e))return;ta.add(r),n.stopPropagation&&oa.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ta.has(r)&&ta.delete(r),aa(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Zi(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Ui(e)&&(e.addEventListener(`focus`,e=>ia(e,i)),!ea(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var ca=[...wi,H,W],la=e=>ca.find(Ci(e)),ua=()=>({min:0,max:0}),da=()=>({x:ua(),y:ua()}),fa=new WeakMap;function pa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ma(e){return typeof e==`string`||Array.isArray(e)}var ha=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ga=[`initial`,...ha];function _a(e){return pa(e.animate)||ga.some(t=>ma(e[t]))}function va(e){return!!(_a(e)||e.variants)}function ya(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Z(i))e.addValue(r,i);else if(Z(a))e.addValue(r,si(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,si(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ba={current:null},xa={current:!1},Sa=typeof window<`u`;function Ca(){if(xa.current=!0,Sa)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ba.current=e.matches;e.addEventListener(`change`,t),t()}else ba.current=!1}var wa=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Ta={};function Ea(e){Ta=e}function Da(){return Ta}var Oa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=I.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,F.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=_a(t),this.isVariantNode=va(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Z(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,fa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(xa.current||Ca(),this.shouldReduceMotion=ba.current),process.env.NODE_ENV!==`production`&&Te(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$e(this.notifyUpdate),$e(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&jr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new xr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:N(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=q.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&F.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Ta){let t=Ta[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):da()}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<wa.length;t++){let n=wa[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=ya(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=si(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`&&(me(n)||ge(n))?n=parseFloat(n):!la(n)&&W.test(t)&&(n=Li(e,t)),this.setBaseTarget(e,Z(n)?n.get():n)),Z(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=ti(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&&!Z(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 Se),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Wi.render(this.render)}},ka=class extends Oa{constructor(){super(...arguments),this.KeyframeResolver=Bi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Z(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Aa=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function ja({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ma(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 Na(e,t){return ja(Ma(e.getBoundingClientRect(),t))}var Pa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Fa=Zn.length;function Ia(e,t,n){let r=``,i=!0;for(let a=0;a<Fa;a++){let o=Zn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Hi(s,Ni[o]);if(!c){i=!1;let t=Pa[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function La(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(q.has(e)){o=!0;continue}else if(ot(e)){i[e]=n;continue}else{let t=Hi(n,Ni[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ia(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ra(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function za(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ba={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(B.test(e))e=parseFloat(e);else return e;return`${za(e,t.target.x)}% ${za(e,t.target.y)}%`}},Va={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=W.parse(e);if(i.length>5)return r;let a=W.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=Gt(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Ha={borderRadius:{...Ba,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:Va};function Ua(e,{layout:t,layoutId:n}){return q.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ha[e]||e===`opacity`)}function Wa(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Z(r[t])||i&&Z(i[t])||Ua(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Ga(e){return window.getComputedStyle(e)}var Ka=class extends ka{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ra}readValueFromInstance(e,t){if(q.has(t))return this.projection?.isProjecting?qn(t):Yn(e,t);{let n=Ga(e),r=(ot(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Na(e,t)}build(e,t,n){La(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Wa(e,t,n)}},qa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ja={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ya(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?qa:Ja;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Xa=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Za(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(La(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Xa)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ya(d,i,a,o,!1)}var Qa=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`]),$a=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function eo(e,t,n,r){Ra(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Qa.has(n)?n:mi(n),t.attrs[n])}function to(e,t,n){let r=Wa(e,t,n);for(let n in e)if(Z(e[n])||Z(t[n])){let t=Zn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var no=class extends ka{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=da}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(q.has(t)){let e=Fi(t);return e&&e.default||0}return t=Qa.has(t)?t:mi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return to(e,t,n)}build(e,t,n){Za(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){eo(e,t,n,r)}mount(e){this.isSVGTag=$a(e.tagName),super.mount(e)}},ro=ga.length;function io(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&io(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ro;n++){let r=ga[n],i=e.props[r];(ma(i)||i===!1)&&(t[r]=i)}return t}function ao(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}var oo=[...ha].reverse(),so=ha.length;function co(e){return t=>Promise.all(t.map(({animation:t,options:n})=>xi(e,t,n)))}function lo(e){let t=co(e),n=fo(),r=!0,i=!1,a=t=>(n,r)=>{let i=X(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=io(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<so;t++){let p=oo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ma(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||pa(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=uo(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,ee={...w,...C},te=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in ee){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=ci(t)&&ci(n)?!ao(t,n):t!==n,r?t==null?u.add(e):te(e):t!==void 0&&u.has(e)?te(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let T=v&&y;b&&(!T||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!T&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=X(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=zr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=X(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fo(),i=!0}}}function uo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ao(t,e):!1}function Q(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fo(){return{animate:Q(!0),whileInView:Q(),whileHover:Q(),whileTap:Q(),whileDrag:Q(),whileFocus:Q(),exit:Q()}}function po(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mo(e){return Z(e)?e.get():e}var ho=(0,S.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),go=(0,S.createContext)({strict:!1}),_o={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`]},vo=!1;function yo(){if(vo)return;let e={};for(let t in _o)e[t]={isEnabled:e=>_o[t].some(t=>!!e[t])};Ea(e),vo=!0}function bo(){return yo(),Da()}function xo(e){let t=bo();for(let n in e)t[n]={...t[n],...e[n]};Ea(t)}function So({children:e,features:t,strict:n=!1}){let[,r]=(0,S.useState)(!Co(t)),i=(0,S.useRef)(void 0);if(!Co(t)){let{renderer:e,...n}=t;i.current=e,xo(n)}return(0,S.useEffect)(()=>{Co(t)&&t().then(({renderer:e,...t})=>{xo(t),i.current=e,r(!0)})},[]),(0,T.jsx)(go.Provider,{value:{renderer:i.current,strict:n},children:e})}function Co(e){return typeof e==`function`}var wo=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function To(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||wo.has(e)}var Eo=s({default:()=>Do}),Do,Oo=o((()=>{throw Do={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),ko=e=>!To(e);function Ao(e){typeof e==`function`&&(ko=t=>t.startsWith(`on`)?!To(t):e(t))}try{Ao((Oo(),u(Eo)).default)}catch{}function jo(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Z(e[i])||(ko(i)||n===!0&&To(i)||!t&&!To(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Mo=(0,S.createContext)({});function No(e,t){if(_a(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ma(t)?t:void 0,animate:ma(n)?n:void 0}}return e.inherit===!1?{}:t}function Po(e){let{initial:t,animate:n}=No(e,(0,S.useContext)(Mo));return(0,S.useMemo)(()=>({initial:t,animate:n}),[Fo(t),Fo(n)])}function Fo(e){return Array.isArray(e)?e.join(` `):e}var Io=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Lo(e,t,n){for(let r in t)!Z(t[r])&&!Ua(r,n)&&(e[r]=t[r])}function Ro({transformTemplate:e},t){return(0,S.useMemo)(()=>{let n=Io();return La(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zo(e,t){let n=e.style||{},r={};return Lo(r,n,e),Object.assign(r,Ro(e,t)),r}function Bo(e,t){let n={},r=zo(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}var Vo=()=>({...Io(),attrs:{}});function Ho(e,t,n,r){let i=(0,S.useMemo)(()=>{let n=Vo();return Za(n,t,$a(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Lo(t,e.style,e),i.style={...t,...i.style}}return i}var Uo=[`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 Wo(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Uo.indexOf(e)>-1||/[A-Z]/u.test(e))}function Go(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Wo(e)?Ho:Bo)(t,r,i,e),c=jo(t,typeof e==`string`,a),l=e===S.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,S.useMemo)(()=>Z(u)?u.get():u,[u]);return(0,S.createElement)(e,{...l,children:d})}function Ko({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:qo(n,r,i,e),renderState:t()}}function qo(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=mo(a[e]);let{initial:o,animate:s}=e,c=_a(e),l=va(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`&&!pa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ti(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 Jo=e=>(t,n)=>{let r=(0,S.useContext)(Mo),i=(0,S.useContext)(ue),a=()=>Ko(e,t,r,i);return n?a():ce(a)},Yo=Jo({scrapeMotionValuesFromProps:Wa,createRenderState:Io}),Xo=Jo({scrapeMotionValuesFromProps:to,createRenderState:Vo}),Zo=Symbol.for(`motionComponentSymbol`);function Qo(e,t,n){let r=(0,S.useRef)(n);(0,S.useInsertionEffect)(()=>{r.current=n});let i=(0,S.useRef)(null);return(0,S.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var $o=(0,S.createContext)({});function es(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function ts(e,t,n,r,i,a){let{visualElement:o}=(0,S.useContext)(Mo),s=(0,S.useContext)(go),c=(0,S.useContext)(ue),l=(0,S.useContext)(ho),u=l.reducedMotion,d=l.skipAnimations,f=(0,S.useRef)(null),p=(0,S.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,S.useContext)($o);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&ns(f.current,n,i,h);let g=(0,S.useRef)(!1);(0,S.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[hi],v=(0,S.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return le(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,S.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function ns(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:rs(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&es(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function rs(e){if(e)return e.options.allowProjection===!1?rs(e.parent):e.projection}function is(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&xo(r);let a=n?n===`svg`:Wo(e),o=a?Xo:Yo;function s(n,s){let c,l={...(0,S.useContext)(ho),...n,layoutId:as(n)},{isStatic:u}=l,d=Po(n),f=o(n,u);if(!u&&typeof window<`u`){os(l,r);let t=ss(l);c=t.MeasureLayout,d.visualElement=ts(e,f,l,i,t.ProjectionNode,a)}return(0,T.jsxs)(Mo.Provider,{value:d,children:[c&&d.visualElement?(0,T.jsx)(c,{visualElement:d.visualElement,...l}):null,Go(e,n,Qo(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,S.forwardRef)(s);return c[Zo]=e,c}function as({layoutId:e}){let t=(0,S.useContext)(se).id;return t&&e!==void 0?t+`-`+e:e}function os(e,t){let n=(0,S.useContext)(go).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?A(!1,t,`lazy-strict-mode`):j(!1,t,`lazy-strict-mode`)}}function ss(e){let{drag:t,layout:n}=bo();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var cs=(e,t)=>t.isSVG??Wo(e)?new no(t):new Ka(t,{allowProjection:e!==S.Fragment}),ls=class extends Aa{constructor(e){super(e),e.animationState||=lo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();pa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},us=0,ds={animation:{Feature:ls},exit:{Feature:class extends Aa{constructor(){super(...arguments),this.id=us++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=X(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function fs(e){return{point:{x:e.pageX,y:e.pageY}}}function ps(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&F.postRender(()=>i(t,fs(t)))}var ms=class extends Aa{mount(){let{current:e}=this.node;e&&(this.unmount=Xi(e,(e,t)=>(ps(this.node,t,`Start`),e=>ps(this.node,e,`End`))))}unmount(){}},hs=class extends Aa{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=be(po(this.node.current,`focus`,()=>this.onFocus()),po(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function gs(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&F.postRender(()=>i(t,fs(t)))}var _s=class extends Aa{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=sa(e,(e,t)=>(gs(this.node,t,`Start`),(e,{success:t})=>gs(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},vs=new WeakMap,ys=new WeakMap,bs=e=>{let t=vs.get(e.target);t&&t(e)},xs=e=>{e.forEach(bs)};function Ss({root:e,...t}){let n=e||document;ys.has(n)||ys.set(n,{});let r=ys.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xs,{root:e,...t})),r[i]}function Cs(e,t,n){let r=Ss(t);return vs.set(e,n),r.observe(e),()=>{vs.delete(e),r.unobserve(e)}}var ws={some:0,all:1},Ts=class extends Aa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:ws[r]};this.stopObserver=Cs(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(Es(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Es({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ds={inView:{Feature:Ts},tap:{Feature:_s},focus:{Feature:hs},hover:{Feature:ms}},Os={renderer:cs,...ds,...Ds};function ks(e,t){return is(e,t)}var As=ks(`div`),js=ks(`span`),Ms=({icon:e=x.ChevronsUpDown,"aria-hidden":t=!0,...n})=>{let r=S.default.useContext($);return(0,T.jsx)(m.Button.Icon,{as:js,animate:{rotate:r.open?180:0},transition:{duration:.15,type:`spring`,bounce:0},icon:e,"aria-hidden":t,...n})},Ns=({tooltipProps:e,...t})=>{let n=S.default.useContext($),r=()=>{if(E(n.value)){let e=n.onValueChange;e?.([])}if(D(n.value)){let e=n.onValueChange;e?.(void 0)}n.triggerRef?.current?.focus()};return S.default.useMemo(()=>{if(D(n.value))return n.clearable&&n.value;if(E(n.value))return n.clearable&&n.value?.length>0},[n.clearable,n.value])?(0,T.jsx)(ee.Tooltip,{label:`Clear field`,...e,children:(0,T.jsx)(m.Button,{type:`button`,icon:{icon:x.X,alt:`Clear field`},size:`0`,variant:`ghost`,onClick:e=>{n.value&&(e.stopPropagation(),r())},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.stopPropagation(),e.preventDefault(),r())},"data-tgph-combobox-clear":!0,style:{marginTop:`calc(-1 * var(--tgph-spacing-1)`,marginBottom:`calc(-1 * var(--tgph-spacing-1)`},...t})}):null},Ps=({children:e,...t})=>{let n=S.default.useContext($),r=S.default.useMemo(()=>{if(!D(n.value))return;let e=ie(n.value,n.options,n.legacyBehavior),t=e?.label||e?.value||n.placeholder;return n.legacyBehavior&&n?.value?.label||t},[n.value,n.options,n.legacyBehavior,n.placeholder]);return(0,T.jsx)(te.TooltipIfTruncated,{children:(0,T.jsx)(m.Button.Text,{color:n.value?`default`:`gray`,textOverflow:`ellipsis`,overflow:`hidden`,...t,children:e||r})})},Fs=({children:e,...t})=>{let n=S.default.useContext($);return(0,T.jsx)(te.TooltipIfTruncated,{children:(0,T.jsx)(m.Button.Text,{color:`gray`,textOverflow:`ellipsis`,overflow:`hidden`,...t,children:e||n.placeholder})})},Is=({children:e})=>{let t=S.default.useContext($);if(!E(t.value))return null;let n=t.layout||`truncate`,r=(t.value.length-2).toString().split(``);return(0,T.jsxs)(v.Stack,{gap:`0_5`,w:`full`,wrap:n===`wrap`?`wrap`:`nowrap`,align:`center`,style:{position:`relative`,flexGrow:1},children:[e,n===`truncate`&&t.value.length>2&&(0,T.jsx)(v.Stack,{as:As,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1,type:`spring`,bounce:0},h:`full`,pr:`1`,pl:`8`,align:`center`,"aria-label":`${t.value.length-2} more selected`,position:`absolute`,right:`0`,style:{backgroundImage:`linear-gradient(to left, var(--tgph-surface-1) 0 60%, transparent 90% 100%)`},children:(0,T.jsxs)(b.Text,{as:`span`,size:`1`,style:{whiteSpace:`nowrap`},children:[`+`,r.map(e=>(0,T.jsx)(v.Box,{as:js,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1,type:`spring`,bounce:0},w:`2`,display:`inline-block`,children:e},e)),` `,`more`]})})]})},Ls=S.default.createContext({value:``}),Rs=({value:e,children:t,...n})=>(0,T.jsx)(Ls.Provider,{value:{value:e},children:(0,T.jsx)(w.Tag.Root,{as:js,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.1,type:`spring`,bounce:0},size:`1`,maxH:`5`,rounded:`1`,layout:`position`,...n,children:t})}),zs=({children:e,...t})=>{let n=S.default.useContext($),r=S.default.useContext(Ls),i=S.default.useMemo(()=>{let e=n.options.find(e=>e.value===r.value);if(e)return e.label||e.value;if(!n.value)return;let t=n.value.find(e=>O(e,n.legacyBehavior)===r.value);if(t)return t},[n.options,n.value,r.value,n.legacyBehavior]);return(0,T.jsx)(w.Tag.Text,{...t,children:e||i})},Bs=({children:e,...t})=>{let n=S.default.useContext($),r=S.default.useContext(Ls);return(0,T.jsx)(w.Tag.Button,{icon:{icon:x.X,alt:`Remove ${r.value}`},height:`full`,onClick:e=>{if(!n.onValueChange)return;let t=n.onValueChange,i=n.value.filter(e=>O(e,n.legacyBehavior)!==r.value);t?.(i),e.stopPropagation(),e.preventDefault()},"data-tgph-combobox-tag-button":!0,...t,children:e})},Vs=({value:e,children:t,...n})=>(0,T.jsxs)(Ws.Root,{value:e,...n,children:[(0,T.jsx)(Ws.Text,{children:t}),(0,T.jsx)(Ws.Button,{})]}),Hs=e=>(0,T.jsx)(v.Stack,{align:`center`,gap:`1`,...e}),Us=()=>{let e=S.default.useContext($);if(e.value&&E(e.value)){let t=e.layout||`truncate`;return e.value.length===0?(0,T.jsx)(Fs,{}):(0,T.jsx)(So,{features:Os,children:(0,T.jsx)(Is,{children:e.value.map((n,r)=>{let i=O(n,e.legacyBehavior);if(i&&(t===`truncate`&&r<=1||t===`wrap`))return(0,T.jsx)(C.RefToTgphRef,{children:(0,T.jsx)(Ws.Default,{value:i})},i)})})})}if(e&&D(e.value))return e.value?(0,T.jsx)(Ps,{}):(0,T.jsx)(Fs,{})},Ws={Root:Rs,Text:zs,Button:Bs,Default:Vs},Gs={TriggerIndicator:Ms,TriggerClear:Ns,TriggerText:Ps,TriggerPlaceholder:Fs,TriggerTagsContainer:Is,TriggerActionsContainer:Hs,TriggerTag:Ws,TriggerValue:Us},Ks=[`ArrowDown`,`PageUp`,`Home`],qs=[`ArrowUp`,`PageDown`,`End`],Js=[`Enter`,` `],$=S.default.createContext({value:void 0,onValueChange:()=>{},contentId:``,triggerId:``,open:!1,setOpen:()=>{},onOpenToggle:()=>{},clearable:!1,disabled:!1,options:[],legacyBehavior:!1}),Ys=({modal:e=!0,closeOnSelect:t=!0,clearable:n=!1,disabled:r=!1,legacyBehavior:i=!1,open:a,onOpenChange:o,defaultOpen:s,value:c,defaultValue:l,onValueChange:u,errored:d,placeholder:p,layout:m,defaultScrollToValue:h,children:g,..._})=>{let v=S.default.useId(),b=S.default.useId(),x=S.default.useRef(null),C=S.default.useRef(null),w=S.default.useRef(null),ee=S.default.useMemo(()=>re(g),[g]),[te,ne]=S.default.useState(``),[E=!1,D]=(0,f.useControllableState)({prop:a,defaultProp:s??!1,onChange:o}),[O,ie]=(0,f.useControllableState)({prop:c,defaultProp:l,onChange:u}),ae=S.default.useCallback(()=>{D(e=>!e)},[D]);return S.default.useEffect(()=>{E||ne(``)},[E]),(0,T.jsx)($.Provider,{value:{contentId:v,triggerId:b,value:O,onValueChange:ie,placeholder:p,open:E,setOpen:D,onOpenToggle:ae,closeOnSelect:t,clearable:n,disabled:r,searchQuery:te,setSearchQuery:ne,triggerRef:x,searchRef:C,contentRef:w,errored:d,layout:m,options:ee,legacyBehavior:i,defaultScrollToValue:h},children:(0,T.jsx)(y.Menu.Root,{open:E,onOpenChange:D,modal:e,..._,children:g})})},Xs=({size:e=`1`,children:t,...n})=>{let r=S.default.useContext($),i=E(r.value)&&r.value.length>0,a=S.default.useMemo(()=>{if(r.value){if(D(r.value))return ie(r.value,r.options,r.legacyBehavior);if(E(r.value))return r.value.map(e=>ie(e,r.options,r.legacyBehavior))}},[r.value,r.options,r.legacyBehavior]),o=S.default.useCallback(()=>a?D(a)?a?.label||a?.value||r.placeholder:E(a)&&a.map(e=>e?.label||e?.value).join(`, `)||r.placeholder:r.placeholder,[a,r.placeholder]);return(0,T.jsx)(y.Menu.Trigger,{...n,asChild:!0,onClick:e=>{e.preventDefault(),r.onOpenToggle(),r.triggerRef?.current?.focus()},onKeyDown:e=>{if(e.target===r.triggerRef?.current){if(e.key===`Tab`){e.stopPropagation();return}if(e.key===`ArrowDown`||Js.includes(e.key)){e.stopPropagation(),e.preventDefault(),r.onOpenToggle();return}}},tgphRef:r.triggerRef,children:(0,T.jsx)(m.Button.Root,{id:r.triggerId,type:`button`,bg:`surface-3`,variant:`outline`,align:`center`,minH:ne[e],h:`full`,w:`full`,py:`0_5`,pr:`1_5`,pl:i?`0_5`:`1_5`,size:e,color:r.errored?`red`:`gray`,justify:`space-between`,role:`combobox`,"aria-label":o(),"aria-controls":r.contentId,"aria-expanded":r.open,"aria-haspopup":`listbox`,"data-tgph-combobox-trigger":!0,"data-tgph-combobox-trigger-open":r.open,disabled:r.disabled,...n,children:t?typeof t==`function`?t({value:a}):t:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Gs.TriggerValue,{}),(0,T.jsxs)(Gs.TriggerActionsContainer,{children:[(0,T.jsx)(Gs.TriggerClear,{}),(0,T.jsx)(Gs.TriggerIndicator,{})]})]})})})},Zs=({style:e,children:t,tgphRef:n,...r})=>{let i=S.default.useContext($),a=S.default.useRef(!1),o=(0,h.useComposedRefs)(n,i.contentRef),s=S.default.useRef(null),[c,l]=S.default.useState(0),[u,f]=S.default.useState(!1),p=S.default.useCallback(e=>{let t=e?.getBoundingClientRect();t&&l(t.height),u||f(!0)},[u]);return S.default.useEffect(()=>{let e=new ResizeObserver(e=>{for(let t of e){let e=t.target;p(e)}});return s.current&&u&&e.observe(s.current),()=>e.disconnect()},[u,p]),S.default.useEffect(()=>{u===!0&&i.open===!1&&f(!1)},[i.open,u]),S.default.useEffect(()=>{let e;return i.open&&(e=setTimeout(()=>{p(s.current)},10)),()=>e&&clearTimeout(e)},[i.open,p]),(0,T.jsx)(d.DismissableLayer,{onEscapeKeyDown:e=>{i.open&&(e.stopPropagation(),e.preventDefault(),i.setOpen(!1))},children:(0,T.jsx)(y.Menu.Content,{className:`tgph`,mt:`1`,onCloseAutoFocus:e=>{a.current||i.triggerRef?.current?.focus(),a.current=!1,e.preventDefault()},bg:`surface-1`,style:{width:`var(--tgph-combobox-trigger-width)`,transition:`min-height 200ms ease-in-out`,minHeight:c?`${c}px`:`0`,...e,"--tgph-combobox-content-transform-origin":`var(--radix-popper-transform-origin)`,"--tgph-combobox-content-available-width":`var(--radix-popper-available-width)`,"--tgph-combobox-content-available-height":`calc(var(--radix-popper-available-height) - var(--tgph-spacing-8))`,"--tgph-combobox-trigger-width":`var(--radix-popper-anchor-width)`,"--tgph-combobox-trigger-height":`var(--radix-popper-anchor-height)`},...r,tgphRef:o,"data-tgph-combobox-content":!0,"data-tgph-combobox-content-open":i.open,role:void 0,"aria-orientation":void 0,onKeyDown:e=>{e.stopPropagation();let t=i.contentRef?.current?.querySelectorAll(`[data-tgph-combobox-option]`);document.activeElement===t?.[0]&&qs.includes(e.key)&&i.searchRef?.current?.focus()},children:(0,T.jsx)(v.Stack,{direction:`column`,gap:`1`,tgphRef:s,children:t})})})},Qs=({tgphRef:e,...t})=>{let n=S.default.useContext($),r=S.default.useRef(null),i=(0,h.useComposedRefs)(e,r);return S.default.useEffect(()=>{n.open&&r.current&&requestAnimationFrame(()=>{let e=(D(n.value)?O(n.value,n.legacyBehavior):E(n.value)&&n.value.length>0?O(n.value[0],n.legacyBehavior):null)??n.defaultScrollToValue;if(e){let t=r.current?.querySelectorAll(`[data-tgph-combobox-option]`),n=Array.from(t||[]).find(t=>t.getAttribute(`data-tgph-combobox-option-value`)===e);n&&typeof n.scrollIntoView==`function`&&n.scrollIntoView({block:`center`})}})},[n.open,n.value,n.legacyBehavior,n.defaultScrollToValue]),(0,T.jsx)(v.Stack,{id:n.contentId,direction:`column`,gap:`1`,style:{overflowY:`auto`,"--max-height":t.maxHeight?void 0:`calc(var(--tgph-combobox-content-available-height) - var(--tgph-spacing-12))`},role:`listbox`,tgphRef:i,...t})},$s=({value:e,label:t,selected:n,onSelect:r,children:i,...a})=>{let o=S.default.useContext($),[s,c]=S.default.useState(!1),l=o.value,u=!o.searchQuery||ae({children:t||i,value:e,searchQuery:o.searchQuery}),d=E(l)?l.some(t=>O(t,o.legacyBehavior)===e):O(l,o.legacyBehavior)===e,f=n=>{n.stopPropagation();let i=n;if(!(i.key&&!Js.includes(i.key))){if(n.preventDefault(),o.closeOnSelect===!0&&o.setOpen(!1),r)return r(n);if(D(l)){let n=o.onValueChange;o.legacyBehavior===!0?n?.({value:e,label:t}):n?.(e)}else if(E(l)){let n=o.onValueChange,r=o.value,i=d?r.filter(t=>O(t,o.legacyBehavior)!==e):[...r,o.legacyBehavior===!0?{value:e,label:t}:e];n?.(i)}o.triggerRef?.current?.focus()}};if(u)return(0,T.jsx)(y.Menu.Button,{type:`button`,onSelect:f,onKeyDown:f,selected:n===null?null:n??d,onFocus:()=>c(!0),onBlur:()=>c(!1),role:`option`,"aria-selected":d?`true`:`false`,"data-tgph-combobox-option":!0,"data-tgph-combobox-option-focused":s,"data-tgph-combobox-option-value":e,"data-tgph-combobox-option-label":t,...a,children:t||i||e})},ec=({label:e=`Search`,placeholder:t=`Search`,tgphRef:n,value:r,onValueChange:i,...a})=>{let o=S.default.useId(),s=S.default.useContext($),c=(0,h.useComposedRefs)(n,s.searchRef),l=r??s.searchQuery,u=i??s.setSearchQuery;return S.default.useEffect(()=>{let e=e=>{Ks.includes(e.key)&&s.contentRef?.current?.focus({preventScroll:!0}),e.key===`Escape`&&s.setOpen(!1),e.stopPropagation()},t=s.searchRef?.current;if(t)return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[s]),(0,T.jsxs)(v.Box,{borderBottom:`px`,px:`1`,pb:`1`,children:[(0,T.jsx)(p.Root,{children:(0,T.jsx)(b.Text,{as:`label`,htmlFor:o,children:e})}),(0,T.jsx)(_.Input,{id:o,variant:`ghost`,placeholder:t,value:l,onChange:e=>{u(e.target.value)},LeadingComponent:(0,T.jsx)(g.Icon,{icon:x.Search,alt:`Search Icon`}),TrailingComponent:s?.searchQuery&&s?.searchQuery?.length>0?(0,T.jsx)(m.Button,{variant:`ghost`,color:`gray`,icon:{icon:x.X,alt:`Clear Search Query`},onClick:()=>s.setSearchQuery?.(``)}):null,autoFocus:!0,"data-tgph-combobox-search":!0,"aria-controls":s.contentId,...a,tgphRef:c})]})},tc=({icon:e={icon:x.Search,alt:`Search Icon`},message:t=`No results found`,children:n,...r})=>{let i=S.default.useContext($),[a,o]=S.default.useState(!1);if(S.default.useEffect(()=>{i.contentRef?.current?.querySelectorAll(`[data-tgph-combobox-option]`)?.length===0?o(!0):o(!1)},[i.searchQuery,i.contentRef,n]),a)return(0,T.jsxs)(v.Stack,{gap:`1`,align:`center`,justify:`center`,w:`full`,my:`8`,"data-tgph-combobox-empty":!0,...r,children:[e===null?(0,T.jsx)(T.Fragment,{}):(0,T.jsx)(g.Icon,{...e}),t===null?(0,T.jsx)(T.Fragment,{}):(0,T.jsx)(b.Text,{as:`span`,children:t})]})},nc=({leadingText:e=`Create`,values:t,onCreate:n,selected:r=null,legacyBehavior:i=!1,...a})=>{let o=S.default.useContext($),s=S.default.useCallback(e=>!t||t?.length===0?!1:t.some(t=>O(t,i)===e),[t,i]);if(o.searchQuery&&!s(o.searchQuery))return(0,T.jsx)($s,{leadingIcon:{icon:x.Plus,"aria-hidden":!0},mx:`1`,value:o.searchQuery,label:`${e} "${o.searchQuery}"`,selected:r,onSelect:()=>{n&&o.searchQuery&&(n(i===!0?{value:o.searchQuery}:o.searchQuery),o.setSearchQuery?.(``))},...a})},rc={};Object.assign(rc,{Root:Ys,Trigger:Xs,Content:Zs,Options:Qs,Option:$s,Search:ec,Empty:tc,Create:nc,Primitives:Gs}),exports.Combobox=rc;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=e=>a.call(e,`module.exports`)?e[`module.exports`]:c(t({},`__esModule`,{value:!0}),e);let d=require(`@radix-ui/react-dismissable-layer`),f=require(`@radix-ui/react-use-controllable-state`),p=require(`@radix-ui/react-visually-hidden`);p=l(p);let m=require(`@telegraph/button`),h=require(`@telegraph/compose-refs`),g=require(`@telegraph/icon`),_=require(`@telegraph/input`),v=require(`@telegraph/layout`),y=require(`@telegraph/menu`),b=require(`@telegraph/typography`),x=require(`lucide-react`),S=require(`react`);S=l(S,1);let C=require(`@telegraph/helpers`),w=require(`@telegraph/tag`),ee=require(`@telegraph/tooltip`),te=require(`@telegraph/truncate`),T=require(`react/jsx-runtime`);var ne={0:`5`,1:`6`,2:`8`,3:`10`},E=e=>Array.isArray(e),D=e=>typeof e==`object`&&!Array.isArray(e)||typeof e==`string`||!e,re=e=>{let t=(e,n=[])=>(S.default.Children.toArray(e).forEach(e=>{if(S.default.isValidElement(e)){let r=e.props;r.value?n.push(e):r.children&&t(r.children,n)}}),n);return t(e).map(e=>{let t=e;return{value:t.props.value,label:t.props?.label||t.props.children||t.props.value}})},O=(e,t)=>{if(e)return t===!0?e?.value:e},ie=(e,t,n)=>{if(!e||!t||t.length===0)return;let r=t.find(t=>t.value===O(e,n));if(r)return r},ae=({children:e,value:t,searchQuery:n})=>{let r=oe(e);return t?.toLowerCase().includes(n.toLowerCase())||r.some(e=>e.toLowerCase().includes(n.toLowerCase()))},oe=e=>{let t=S.default.Children.toArray(e),n=[];return t.forEach(e=>{if(typeof e==`string`&&n.push(e),S.default.isValidElement(e)){let t=e.props;t.children&&n.push(...oe(t.children))}}),n},se=(0,S.createContext)({});function ce(e){let t=(0,S.useRef)(null);return t.current===null&&(t.current=e()),t.current}var le=typeof window<`u`?S.useLayoutEffect:S.useEffect,ue=(0,S.createContext)(null);function de(e,t){e.indexOf(t)===-1&&e.push(t)}function fe(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var k=(e,t,n)=>n>t?t:n<e?e:n;function pe(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var A=()=>{},j=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(A=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(pe(t,n))},j=(e,t,n)=>{if(!e)throw Error(pe(t,n))});var M={},me=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function he(e){return typeof e==`object`&&!!e}var ge=e=>/^0[^.\s]+$/u.test(e);function _e(e){let t;return()=>(t===void 0&&(t=e()),t)}var ve=e=>e,ye=(e,t)=>n=>t(e(n)),be=(...e)=>e.reduce(ye),xe=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Se=class{constructor(){this.subscriptions=[]}add(e){return de(this.subscriptions,e),()=>fe(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}},N=e=>e*1e3,P=e=>e/1e3;function Ce(e,t){return t?1e3/t*e:0}var we=new Set;function Te(e,t,n){e||we.has(t)||(console.warn(pe(t,n)),we.add(t))}var Ee=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,De=1e-7,Oe=12;function ke(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ee(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>De&&++s<Oe);return o}function Ae(e,t,n,r){if(e===t&&n===r)return ve;let i=t=>ke(t,0,1,e,n);return e=>e===0||e===1?e:Ee(i(e),t,r)}var je=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Me=e=>t=>1-e(1-t),Ne=Ae(.33,1.53,.69,.99),Pe=Me(Ne),Fe=je(Pe),Ie=e=>e>=1?1:(e*=2)<1?.5*Pe(e):.5*(2-2**(-10*(e-1))),Le=e=>1-Math.sin(Math.acos(e)),Re=Me(Le),ze=je(Le),Be=Ae(.42,0,1,1),Ve=Ae(0,0,.58,1),He=Ae(.42,0,.58,1),Ue=e=>Array.isArray(e)&&typeof e[0]!=`number`,We=e=>Array.isArray(e)&&typeof e[0]==`number`,Ge={linear:ve,easeIn:Be,easeInOut:He,easeOut:Ve,circIn:Le,circInOut:ze,circOut:Re,backIn:Pe,backInOut:Fe,backOut:Ne,anticipate:Ie},Ke=e=>typeof e==`string`,qe=e=>{if(We(e)){j(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Ae(t,n,r,i)}else if(Ke(e))return j(Ge[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),Ge[e];return e},Je=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Ye={value:null,addProjectionMetrics:null};function Xe(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Ye.value&&Ye.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ze=40;function Qe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Je.reduce((e,n)=>(e[n]=Xe(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=M.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ze),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Je.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Je.length;t++)o[Je[t]].cancel(e)},state:i,steps:o}}var{schedule:F,cancel:$e,state:et,steps:tt}=Qe(typeof requestAnimationFrame<`u`?requestAnimationFrame:ve,!0),nt;function rt(){nt=void 0}var I={now:()=>(nt===void 0&&I.set(et.isProcessing||M.useManualTiming?et.timestamp:performance.now()),nt),set:e=>{nt=e,queueMicrotask(rt)}},it={layout:0,mainThread:0,waapi:0},at=e=>t=>typeof t==`string`&&t.startsWith(e),ot=at(`--`),st=at(`var(--`),ct=e=>st(e)?lt.test(e.split(`/*`)[0].trim()):!1,lt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ut(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var L={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},dt={...L,transform:e=>k(0,1,e)},ft={...L,default:1},pt=e=>Math.round(e*1e5)/1e5,mt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ht(e){return e==null}var gt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_t=(e,t)=>n=>!!(typeof n==`string`&>.test(n)&&n.startsWith(e)||t&&!ht(n)&&Object.prototype.hasOwnProperty.call(n,t)),vt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(mt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},yt=e=>k(0,255,e),bt={...L,transform:e=>Math.round(yt(e))},R={test:_t(`rgb`,`red`),parse:vt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+bt.transform(e)+`, `+bt.transform(t)+`, `+bt.transform(n)+`, `+pt(dt.transform(r))+`)`};function xt(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 St={test:_t(`#`),parse:xt,transform:R.transform},Ct=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),z=Ct(`deg`),wt=Ct(`%`),B=Ct(`px`),Tt=Ct(`vh`),Et=Ct(`vw`),Dt={...wt,parse:e=>wt.parse(e)/100,transform:e=>wt.transform(e*100)},V={test:_t(`hsl`,`hue`),parse:vt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+wt.transform(pt(t))+`, `+wt.transform(pt(n))+`, `+pt(dt.transform(r))+`)`},H={test:e=>R.test(e)||St.test(e)||V.test(e),parse:e=>R.test(e)?R.parse(e):V.test(e)?V.parse(e):St.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?R.transform(e):V.transform(e),getAnimatableNone:e=>{let t=H.parse(e);return t.alpha=0,H.transform(t)}},Ot=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function kt(e){return isNaN(e)&&typeof e==`string`&&(e.match(mt)?.length||0)+(e.match(Ot)?.length||0)>0}var At=`number`,jt=`color`,Mt=`var`,Nt=`var(`,Pt="${}",Ft=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function U(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ft,e=>(H.test(e)?(r.color.push(a),i.push(jt),n.push(H.parse(e))):e.startsWith(Nt)?(r.var.push(a),i.push(Mt),n.push(e)):(r.number.push(a),i.push(At),n.push(parseFloat(e))),++a,Pt)).split(Pt),indexes:r,types:i}}function It(e){return U(e).values}function Lt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===At?i+=pt(r[a]):e===jt?i+=H.transform(r[a]):i+=r[a]}return i}}function Rt(e){return Lt(U(e))}var zt=e=>typeof e==`number`?0:H.test(e)?H.getAnimatableNone(e):e,Bt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zt(e);function Vt(e){let t=U(e);return Lt(t)(t.values.map((e,n)=>Bt(e,t.split[n])))}var W={test:kt,parse:It,createTransformer:Rt,getAnimatableNone:Vt};function Ht(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 Ut({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=Ht(s,r,e+1/3),a=Ht(s,r,e),o=Ht(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Wt(e,t){return n=>n>0?t:e}var Gt=(e,t,n)=>e+(t-e)*n,Kt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},qt=[St,R,V],Jt=e=>qt.find(t=>t.test(e));function Yt(e){let t=Jt(e);if(A(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===V&&(n=Ut(n)),n}var Xt=(e,t)=>{let n=Yt(e),r=Yt(t);if(!n||!r)return Wt(e,t);let i={...n};return e=>(i.red=Kt(n.red,r.red,e),i.green=Kt(n.green,r.green,e),i.blue=Kt(n.blue,r.blue,e),i.alpha=Gt(n.alpha,r.alpha,e),R.transform(i))},Zt=new Set([`none`,`hidden`]);function Qt(e,t){return Zt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $t(e,t){return n=>Gt(e,t,n)}function en(e){return typeof e==`number`?$t:typeof e==`string`?ct(e)?Wt:H.test(e)?Xt:an:Array.isArray(e)?tn:typeof e==`object`?H.test(e)?Xt:nn:Wt}function tn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>en(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nn(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=en(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function rn(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 an=(e,t)=>{let n=W.createTransformer(t),r=U(e),i=U(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?Zt.has(e)&&!i.values.length||Zt.has(t)&&!r.values.length?Qt(e,t):be(tn(rn(r,i),i.values),n):(A(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Wt(e,t))};function on(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Gt(e,t,n):en(e)(e,t)}var sn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>F.update(t,e),stop:()=>$e(t),now:()=>et.isProcessing?et.timestamp:I.now()}},cn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ln=2e4;function un(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function dn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(un(r),ln);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:P(i)}}var G={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function fn(e,t){return e*Math.sqrt(1-t*t)}var pn=12;function mn(e,t,n){let r=n;for(let n=1;n<pn;n++)r-=e(r)/t(r);return r}var hn=.001;function gn({duration:e=G.duration,bounce:t=G.bounce,velocity:n=G.velocity,mass:r=G.mass}){let i,a;A(e<=N(G.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=k(G.minDamping,G.maxDamping,o),e=k(G.minDuration,G.maxDuration,P(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=fn(t,o),c=Math.exp(-i);return hn-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=fn(t**2,o);return(-i(t)+hn>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-hn+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=mn(i,a,s);if(e=N(e),isNaN(c))return{stiffness:G.stiffness,damping:G.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var _n=[`duration`,`bounce`],vn=[`stiffness`,`damping`,`mass`];function yn(e,t){return t.some(t=>e[t]!==void 0)}function bn(e){let t={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...e};if(!yn(e,vn)&&yn(e,_n))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*k(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:G.mass,stiffness:i,damping:a}}else{let n=gn({...e,velocity:0});t={...t,...n,mass:G.mass},t.isResolvedFromDuration=!0}return t}function xn(e=G.visualDuration,t=G.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}=bn({...n,velocity:-P(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=P(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?G.restSpeed.granular:G.restSpeed.default,i||=v?G.restDelta.granular:G.restDelta.default;let y,b,x,S,C,w;if(h<1)x=fn(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let ee={calculatedDuration:p&&d||null,velocity:e=>N(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=N(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=N(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(un(ee),ln),t=cn(t=>ee.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return ee}xn.applyToOptions=e=>{let t=dn(e,100,xn);return e.ease=t.ease,e.duration=N(t.duration),e.type=`keyframes`,e};var Sn=5;function Cn(e,t,n){let r=Math.max(t-Sn,0);return Ce(n-e(r),t-r)}function wn({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=xn({keyframes:[f.value,m(f.value)],velocity:Cn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Tn(e,t,n){let r=[],i=n||M.mix||on,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=be(Array.isArray(t)?t[n]||ve:t,a)),r.push(a)}return r}function En(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(j(a===t.length,`Both input and output ranges must be the same length`,`range-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=Tn(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=xe(e[r],e[r+1],n);return s[r](i)};return n?t=>l(k(e[0],e[a-1],t)):l}function Dn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=xe(0,t,r);e.push(Gt(n,1,i))}}function On(e){let t=[0];return Dn(t,e.length-1),t}function kn(e,t){return e.map(e=>e*t)}function An(e,t){return e.map(()=>t||He).splice(0,e.length-1)}function jn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ue(r)?r.map(qe):qe(r),a={done:!1,value:t[0]},o=En(kn(n&&n.length===t.length?n:On(t),e),t,{ease:Array.isArray(i)?i:An(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Mn=e=>e!==null;function Nn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Mn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Pn={decay:wn,inertia:wn,tween:jn,keyframes:jn,spring:xn};function Fn(e){typeof e.type==`string`&&(e.type=Pn[e.type])}var In=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Ln=e=>e/100,Rn=class extends In{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==I.now()&&this.tick(I.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},it.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Fn(e);let{type:t=jn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||jn;process.env.NODE_ENV!==`production`&&s!==jn&&j(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==jn&&typeof o[0]!=`number`&&(this.mixKeyframes=be(Ln,on(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=un(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=k(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==wn&&(b.value=Nn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return P(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+P(e)}get time(){return P(this.currentTime)}set time(e){e=N(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Cn(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(I.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=P(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=sn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(I.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,it.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function zn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var K=e=>e*180/Math.PI,Bn=e=>Hn(K(Math.atan2(e[1],e[0]))),Vn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bn,rotateZ:Bn,skewX:e=>K(Math.atan(e[1])),skewY:e=>K(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hn=e=>(e%=360,e<0&&(e+=360),e),Un=Bn,Wn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Gn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Kn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wn,scaleY:Gn,scale:e=>(Wn(e)+Gn(e))/2,rotateX:e=>Hn(K(Math.atan2(e[6],e[5]))),rotateY:e=>Hn(K(Math.atan2(-e[2],e[0]))),rotateZ:Un,rotate:Un,skewX:e=>K(Math.atan(e[4])),skewY:e=>K(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qn(e){return+!!e.includes(`scale`)}function Jn(e,t){if(!e||e===`none`)return qn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Kn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Vn,i=t}if(!i)return qn(t);let a=r[t],o=i[1].split(`,`).map(Xn);return typeof a==`function`?a(o):o[a]}var Yn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Jn(n,t)};function Xn(e){return parseFloat(e.trim())}var Zn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],q=new Set(Zn),Qn=e=>e===L||e===B,$n=new Set([`x`,`y`,`z`]),er=Zn.filter(e=>!$n.has(e));function tr(e){let t=[];return er.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var J={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Jn(t,`x`),y:(e,{transform:t})=>Jn(t,`y`)};J.translateX=J.x,J.translateY=J.y;var Y=new Set,nr=!1,rr=!1,ir=!1;function ar(){if(rr){let e=Array.from(Y).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=tr(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}rr=!1,nr=!1,Y.forEach(e=>e.complete(ir)),Y.clear()}function or(){Y.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rr=!0)})}function sr(){ir=!0,or(),ar(),ir=!1}var cr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Y.add(this),nr||(nr=!0,F.read(or),F.resolveKeyframes(ar))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}zn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Y.delete(this)}cancel(){this.state===`scheduled`&&(Y.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},lr=e=>e.startsWith(`--`);function ur(e,t,n){lr(t)?e.style.setProperty(t,n):e.style[t]=n}var dr={};function fr(e,t){let n=_e(e);return()=>dr[t]??n()}var pr=fr(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),mr=fr(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),hr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:hr([0,.65,.55,1]),circOut:hr([.55,0,1,.45]),backIn:hr([.31,.01,.66,-.59]),backOut:hr([.33,1.53,.69,.99])};function _r(e,t){if(e)return typeof e==`function`?mr()?cn(e,t):`ease-out`:We(e)?hr(e):Array.isArray(e)?e.map(e=>_r(e,t)||gr.easeOut):gr[e]}function vr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=_r(s,i);Array.isArray(d)&&(u.easing=d),Ye.value&&it.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Ye.value&&p.finished.finally(()=>{it.waapi--}),p}function yr(e){return typeof e==`function`&&`applyToOptions`in e}function br({type:e,...t}){return yr(e)&&mr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var xr=class extends In{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,j(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=br(e);this.animation=vr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Nn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ur(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return P(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+P(e)}get time(){return P(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=N(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&pr()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ve):r(this)}},Sr={anticipate:Ie,backInOut:Fe,circInOut:ze};function Cr(e){return e in Sr}function wr(e){typeof e.ease==`string`&&Cr(e.ease)&&(e.ease=Sr[e.ease])}var Tr=10,Er=class extends xr{constructor(e){wr(e),Fn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Rn({...a,autoplay:!1}),s=Math.max(Tr,I.now()-this.startTime),c=k(0,Tr,s-Tr),l=o.sample(s).value,{name:u}=this.options;i&&u&&ur(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Dr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(W.test(e)||e===`0`)&&!e.startsWith(`url(`));function Or(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 kr(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=Dr(i,t),s=Dr(a,t);return A(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Or(e)||(n===`spring`||yr(n))&&r}function Ar(e){e.duration=0,e.type=`keyframes`}var jr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Mr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Nr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Mr.test(e[t]))return!0;return!1}var Pr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Fr=_e(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Ir(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Fr()&&n&&(jr.has(n)||Pr.has(n)&&Nr(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Lr=40,Rr=class extends In{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=I.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||cr)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=I.now();let u=!0;kr(e,i,a,o)||(u=!1,(M.instantAnimations||!s)&&l?.(Nn(e,n,t)),e[0]=e[e.length-1],Ar(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Lr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Ir(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Er({...d,element:p})}catch{m=new Rn(d)}else m=new Rn(d);m.finished.then(()=>{this.notifyFinished()}).catch(ve),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function zr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Br=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vr(e){let t=Br.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var Hr=4;function Ur(e,t,n=1){j(n<=Hr,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Vr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return me(e)?parseFloat(e):e}return ct(i)?Ur(i,t,n+1):i}var Wr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Gr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Kr={type:`keyframes`,duration:.8},qr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Jr=(e,{keyframes:t})=>t.length>2?Kr:q.has(e)?e.startsWith(`scale`)?Gr(t[1]):Wr:qr;function Yr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Xr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Yr(n,e)}var Zr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Qr(e){for(let t in e)if(!Zr.has(t))return!0;return!1}var $r=(e,t,n,r={},i,a)=>o=>{let s=Xr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=N(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};Qr(s)||Object.assign(u,Jr(e,u)),u.duration&&=N(u.duration),u.repeatDelay&&=N(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ar(u),u.delay===0&&(d=!0)),(M.instantAnimations||M.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Nn(u.keyframes,s);if(e!==void 0){F.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Rn(u):new Rr(u)};function ei(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ti(e,t,n,r){if(typeof t==`function`){let[i,a]=ei(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]=ei(r);t=t(n===void 0?e.custom:n,i,a)}return t}function X(e,t,n){let r=e.getProps();return ti(r,t,n===void 0?r.custom:n,e)}var ni=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Zn]),ri=30,ii=e=>!isNaN(parseFloat(e)),ai={current:void 0},oi=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=I.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ii(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&Te(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Se);let n=this.events[e].add(t);return e===`change`?()=>{n(),F.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ai.current&&ai.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ri)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ri);return Ce(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function si(e,t){return new oi(e,t)}var ci=e=>Array.isArray(e);function li(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,si(n))}function ui(e){return ci(e)?e[e.length-1]||0:e}function di(e,t){let{transitionEnd:n={},transition:r={},...i}=X(e,t)||{};i={...i,...n};for(let t in i)li(e,t,ui(i[t]))}var Z=e=>!!(e&&e.getVelocity);function fi(e){return!!(Z(e)&&e.add)}function pi(e,t){let n=e.getValue(`willChange`);if(fi(n))return n.add(t);if(!n&&M.WillChange){let n=new M.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function mi(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var hi=`data-`+mi(`framerAppearId`);function gi(e){return e.props[hi]}function _i({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Yr(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&_i(d,t))continue;let o={delay:n,...Xr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){F.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=gi(e);if(n){let e=window.MotionHandoffAnimation(n,t,F);e!==null&&(o.startTime=e,f=!0)}}pi(e,t);let p=l??e.shouldReduceMotion;r.start($r(t,r,i,p&&ni.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>F.update(()=>{o&&di(e,o)});u.length?Promise.all(u).then(t):t()}return u}function yi(e,t,n={}){let r=X(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(vi(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return bi(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function bi(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(yi(c,t,{...o,delay:n+(typeof r==`function`?0:r)+zr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function xi(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>yi(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=yi(e,t,n);else{let i=typeof t==`function`?X(e,t,n.custom):t;r=Promise.all(vi(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Si={test:e=>e===`auto`,parse:e=>e},Ci=e=>t=>t.test(e),wi=[L,B,wt,z,Et,Tt,Si],Ti=e=>wi.find(Ci(e));function Ei(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ge(e)}var Di=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Oi(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(mt)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Di.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ki=/\b([a-z-]*)\(.*?\)/gu,Ai={...W,getAnimatableNone:e=>{let t=e.match(ki);return t?t.map(Oi).join(` `):e}},ji={...W,getAnimatableNone:e=>{let t=W.parse(e);return W.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Mi={...L,transform:Math.round},Ni={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:ft,scaleX:ft,scaleY:ft,scaleZ:ft,skew:z,skewX:z,skewY:z,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:dt,originX:Dt,originY:Dt,originZ:B,zIndex:Mi,fillOpacity:dt,strokeOpacity:dt,numOctaves:Mi},Pi={...Ni,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:Ai,WebkitFilter:Ai,mask:ji,WebkitMask:ji},Fi=e=>Pi[e],Ii=new Set([Ai,ji]);function Li(e,t){let n=Fi(e);return Ii.has(n)||(n=W),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ri=new Set([`auto`,`none`,`0`]);function zi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ri.has(t)&&U(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Li(n,i)}var Bi=class extends cr{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(),ct(r))){let i=Ur(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ni.has(n)||e.length!==2)return;let[r,i]=e,a=Ti(r),o=Ti(i);if(ut(r)!==ut(i)&&J[n]){this.needsMeasurement=!0;return}if(a!==o)if(Qn(a)&&Qn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else J[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Ei(e[t]))&&n.push(t);n.length&&zi(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=J[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]=J[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()}};function Vi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Hi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Ui(e){return he(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Wi,cancel:Gi}=Qe(queueMicrotask,!1),Ki={x:!1,y:!1};function qi(){return Ki.x||Ki.y}function Ji(e,t){let n=Vi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Yi(e){return!(e.pointerType===`touch`||qi())}function Xi(e,t,n={}){let[r,i,a]=Ji(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Yi(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Zi=(e,t)=>t?e===t?!0:Zi(e,t.parentElement):!1,Qi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,$i=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ea(e){return $i.has(e.tagName)||e.isContentEditable===!0}var ta=new WeakSet;function na(e){return t=>{t.key===`Enter`&&e(t)}}function ra(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var ia=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=na(()=>{if(ta.has(n))return;ra(n,`down`);let e=na(()=>{ra(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ra(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function aa(e){return Qi(e)&&!qi()}var oa=new WeakSet;function sa(e,t,n={}){let[r,i,a]=Ji(e,n),o=e=>{let r=e.currentTarget;if(!aa(e)||oa.has(e))return;ta.add(r),n.stopPropagation&&oa.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ta.has(r)&&ta.delete(r),aa(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Zi(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Ui(e)&&(e.addEventListener(`focus`,e=>ia(e,i)),!ea(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var ca=[...wi,H,W],la=e=>ca.find(Ci(e)),ua=()=>({min:0,max:0}),da=()=>({x:ua(),y:ua()}),fa=new WeakMap;function pa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ma(e){return typeof e==`string`||Array.isArray(e)}var ha=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ga=[`initial`,...ha];function _a(e){return pa(e.animate)||ga.some(t=>ma(e[t]))}function va(e){return!!(_a(e)||e.variants)}function ya(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Z(i))e.addValue(r,i);else if(Z(a))e.addValue(r,si(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,si(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ba={current:null},xa={current:!1},Sa=typeof window<`u`;function Ca(){if(xa.current=!0,Sa)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ba.current=e.matches;e.addEventListener(`change`,t),t()}else ba.current=!1}var wa=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Ta={};function Ea(e){Ta=e}function Da(){return Ta}var Oa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=I.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,F.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=_a(t),this.isVariantNode=va(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Z(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,fa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(xa.current||Ca(),this.shouldReduceMotion=ba.current),process.env.NODE_ENV!==`production`&&Te(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$e(this.notifyUpdate),$e(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&jr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new xr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:N(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=q.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&F.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Ta){let t=Ta[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):da()}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<wa.length;t++){let n=wa[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=ya(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=si(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`&&(me(n)||ge(n))?n=parseFloat(n):!la(n)&&W.test(t)&&(n=Li(e,t)),this.setBaseTarget(e,Z(n)?n.get():n)),Z(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=ti(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&&!Z(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 Se),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Wi.render(this.render)}},ka=class extends Oa{constructor(){super(...arguments),this.KeyframeResolver=Bi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Z(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Aa=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function ja({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ma(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 Na(e,t){return ja(Ma(e.getBoundingClientRect(),t))}var Pa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Fa=Zn.length;function Ia(e,t,n){let r=``,i=!0;for(let a=0;a<Fa;a++){let o=Zn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Hi(s,Ni[o]);if(!c){i=!1;let t=Pa[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function La(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(q.has(e)){o=!0;continue}else if(ot(e)){i[e]=n;continue}else{let t=Hi(n,Ni[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ia(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ra(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function za(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ba={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(B.test(e))e=parseFloat(e);else return e;return`${za(e,t.target.x)}% ${za(e,t.target.y)}%`}},Va={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=W.parse(e);if(i.length>5)return r;let a=W.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=Gt(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Ha={borderRadius:{...Ba,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Ba,borderTopRightRadius:Ba,borderBottomLeftRadius:Ba,borderBottomRightRadius:Ba,boxShadow:Va};function Ua(e,{layout:t,layoutId:n}){return q.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ha[e]||e===`opacity`)}function Wa(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Z(r[t])||i&&Z(i[t])||Ua(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Ga(e){return window.getComputedStyle(e)}var Ka=class extends ka{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ra}readValueFromInstance(e,t){if(q.has(t))return this.projection?.isProjecting?qn(t):Yn(e,t);{let n=Ga(e),r=(ot(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Na(e,t)}build(e,t,n){La(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Wa(e,t,n)}},qa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ja={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ya(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?qa:Ja;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Xa=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Za(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(La(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Xa)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ya(d,i,a,o,!1)}var Qa=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`]),$a=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function eo(e,t,n,r){Ra(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Qa.has(n)?n:mi(n),t.attrs[n])}function to(e,t,n){let r=Wa(e,t,n);for(let n in e)if(Z(e[n])||Z(t[n])){let t=Zn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var no=class extends ka{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=da}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(q.has(t)){let e=Fi(t);return e&&e.default||0}return t=Qa.has(t)?t:mi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return to(e,t,n)}build(e,t,n){Za(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){eo(e,t,n,r)}mount(e){this.isSVGTag=$a(e.tagName),super.mount(e)}},ro=ga.length;function io(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&io(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ro;n++){let r=ga[n],i=e.props[r];(ma(i)||i===!1)&&(t[r]=i)}return t}function ao(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}var oo=[...ha].reverse(),so=ha.length;function co(e){return t=>Promise.all(t.map(({animation:t,options:n})=>xi(e,t,n)))}function lo(e){let t=co(e),n=fo(),r=!0,i=!1,a=t=>(n,r)=>{let i=X(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=io(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<so;t++){let p=oo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ma(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||pa(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=uo(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,ee={...w,...C},te=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in ee){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=ci(t)&&ci(n)?!ao(t,n):t!==n,r?t==null?u.add(e):te(e):t!==void 0&&u.has(e)?te(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let T=v&&y;b&&(!T||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!T&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=X(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=zr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=X(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fo(),i=!0}}}function uo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ao(t,e):!1}function Q(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fo(){return{animate:Q(!0),whileInView:Q(),whileHover:Q(),whileTap:Q(),whileDrag:Q(),whileFocus:Q(),exit:Q()}}function po(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mo(e){return Z(e)?e.get():e}var ho=(0,S.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),go=(0,S.createContext)({strict:!1}),_o={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`]},vo=!1;function yo(){if(vo)return;let e={};for(let t in _o)e[t]={isEnabled:e=>_o[t].some(t=>!!e[t])};Ea(e),vo=!0}function bo(){return yo(),Da()}function xo(e){let t=bo();for(let n in e)t[n]={...t[n],...e[n]};Ea(t)}function So({children:e,features:t,strict:n=!1}){let[,r]=(0,S.useState)(!Co(t)),i=(0,S.useRef)(void 0);if(!Co(t)){let{renderer:e,...n}=t;i.current=e,xo(n)}return(0,S.useEffect)(()=>{Co(t)&&t().then(({renderer:e,...t})=>{xo(t),i.current=e,r(!0)})},[]),(0,T.jsx)(go.Provider,{value:{renderer:i.current,strict:n},children:e})}function Co(e){return typeof e==`function`}var wo=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function To(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||wo.has(e)}var Eo=s({default:()=>Do}),Do,Oo=o((()=>{throw Do={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),ko=e=>!To(e);function Ao(e){typeof e==`function`&&(ko=t=>t.startsWith(`on`)?!To(t):e(t))}try{Ao((Oo(),u(Eo)).default)}catch{}function jo(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Z(e[i])||(ko(i)||n===!0&&To(i)||!t&&!To(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Mo=(0,S.createContext)({});function No(e,t){if(_a(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ma(t)?t:void 0,animate:ma(n)?n:void 0}}return e.inherit===!1?{}:t}function Po(e){let{initial:t,animate:n}=No(e,(0,S.useContext)(Mo));return(0,S.useMemo)(()=>({initial:t,animate:n}),[Fo(t),Fo(n)])}function Fo(e){return Array.isArray(e)?e.join(` `):e}var Io=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Lo(e,t,n){for(let r in t)!Z(t[r])&&!Ua(r,n)&&(e[r]=t[r])}function Ro({transformTemplate:e},t){return(0,S.useMemo)(()=>{let n=Io();return La(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zo(e,t){let n=e.style||{},r={};return Lo(r,n,e),Object.assign(r,Ro(e,t)),r}function Bo(e,t){let n={},r=zo(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}var Vo=()=>({...Io(),attrs:{}});function Ho(e,t,n,r){let i=(0,S.useMemo)(()=>{let n=Vo();return Za(n,t,$a(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Lo(t,e.style,e),i.style={...t,...i.style}}return i}var Uo=[`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 Wo(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Uo.indexOf(e)>-1||/[A-Z]/u.test(e))}function Go(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Wo(e)?Ho:Bo)(t,r,i,e),c=jo(t,typeof e==`string`,a),l=e===S.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,S.useMemo)(()=>Z(u)?u.get():u,[u]);return(0,S.createElement)(e,{...l,children:d})}function Ko({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:qo(n,r,i,e),renderState:t()}}function qo(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=mo(a[e]);let{initial:o,animate:s}=e,c=_a(e),l=va(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`&&!pa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ti(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 Jo=e=>(t,n)=>{let r=(0,S.useContext)(Mo),i=(0,S.useContext)(ue),a=()=>Ko(e,t,r,i);return n?a():ce(a)},Yo=Jo({scrapeMotionValuesFromProps:Wa,createRenderState:Io}),Xo=Jo({scrapeMotionValuesFromProps:to,createRenderState:Vo}),Zo=Symbol.for(`motionComponentSymbol`);function Qo(e,t,n){let r=(0,S.useRef)(n);(0,S.useInsertionEffect)(()=>{r.current=n});let i=(0,S.useRef)(null);return(0,S.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var $o=(0,S.createContext)({});function es(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function ts(e,t,n,r,i,a){let{visualElement:o}=(0,S.useContext)(Mo),s=(0,S.useContext)(go),c=(0,S.useContext)(ue),l=(0,S.useContext)(ho),u=l.reducedMotion,d=l.skipAnimations,f=(0,S.useRef)(null),p=(0,S.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,S.useContext)($o);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&ns(f.current,n,i,h);let g=(0,S.useRef)(!1);(0,S.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[hi],v=(0,S.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return le(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,S.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function ns(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:rs(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&es(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function rs(e){if(e)return e.options.allowProjection===!1?rs(e.parent):e.projection}function is(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&xo(r);let a=n?n===`svg`:Wo(e),o=a?Xo:Yo;function s(n,s){let c,l={...(0,S.useContext)(ho),...n,layoutId:as(n)},{isStatic:u}=l,d=Po(n),f=o(n,u);if(!u&&typeof window<`u`){os(l,r);let t=ss(l);c=t.MeasureLayout,d.visualElement=ts(e,f,l,i,t.ProjectionNode,a)}return(0,T.jsxs)(Mo.Provider,{value:d,children:[c&&d.visualElement?(0,T.jsx)(c,{visualElement:d.visualElement,...l}):null,Go(e,n,Qo(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,S.forwardRef)(s);return c[Zo]=e,c}function as({layoutId:e}){let t=(0,S.useContext)(se).id;return t&&e!==void 0?t+`-`+e:e}function os(e,t){let n=(0,S.useContext)(go).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?A(!1,t,`lazy-strict-mode`):j(!1,t,`lazy-strict-mode`)}}function ss(e){let{drag:t,layout:n}=bo();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var cs=(e,t)=>t.isSVG??Wo(e)?new no(t):new Ka(t,{allowProjection:e!==S.Fragment}),ls=class extends Aa{constructor(e){super(e),e.animationState||=lo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();pa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},us=0,ds={animation:{Feature:ls},exit:{Feature:class extends Aa{constructor(){super(...arguments),this.id=us++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=X(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function fs(e){return{point:{x:e.pageX,y:e.pageY}}}function ps(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&F.postRender(()=>i(t,fs(t)))}var ms=class extends Aa{mount(){let{current:e}=this.node;e&&(this.unmount=Xi(e,(e,t)=>(ps(this.node,t,`Start`),e=>ps(this.node,e,`End`))))}unmount(){}},hs=class extends Aa{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=be(po(this.node.current,`focus`,()=>this.onFocus()),po(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function gs(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&F.postRender(()=>i(t,fs(t)))}var _s=class extends Aa{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=sa(e,(e,t)=>(gs(this.node,t,`Start`),(e,{success:t})=>gs(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},vs=new WeakMap,ys=new WeakMap,bs=e=>{let t=vs.get(e.target);t&&t(e)},xs=e=>{e.forEach(bs)};function Ss({root:e,...t}){let n=e||document;ys.has(n)||ys.set(n,{});let r=ys.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xs,{root:e,...t})),r[i]}function Cs(e,t,n){let r=Ss(t);return vs.set(e,n),r.observe(e),()=>{vs.delete(e),r.unobserve(e)}}var ws={some:0,all:1},Ts=class extends Aa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:ws[r]};this.stopObserver=Cs(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(Es(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Es({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ds={inView:{Feature:Ts},tap:{Feature:_s},focus:{Feature:hs},hover:{Feature:ms}},Os={renderer:cs,...ds,...Ds};function ks(e,t){return is(e,t)}var As=ks(`div`),js=ks(`span`),Ms=({icon:e=x.ChevronsUpDown,"aria-hidden":t=!0,...n})=>{let r=S.default.useContext($);return(0,T.jsx)(m.Button.Icon,{as:js,animate:{rotate:r.open?180:0},transition:{duration:.15,type:`spring`,bounce:0},icon:e,"aria-hidden":t,...n})},Ns=({tooltipProps:e,...t})=>{let n=S.default.useContext($),r=()=>{if(E(n.value)){let e=n.onValueChange;e?.([])}if(D(n.value)){let e=n.onValueChange;e?.(void 0)}n.triggerRef?.current?.focus()};return S.default.useMemo(()=>{if(D(n.value))return n.clearable&&n.value;if(E(n.value))return n.clearable&&n.value?.length>0},[n.clearable,n.value])?(0,T.jsx)(ee.Tooltip,{label:`Clear field`,...e,children:(0,T.jsx)(m.Button,{type:`button`,icon:{icon:x.X,alt:`Clear field`},size:`0`,variant:`ghost`,onClick:e=>{n.value&&(e.stopPropagation(),r())},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.stopPropagation(),e.preventDefault(),r())},"data-tgph-combobox-clear":!0,style:{marginTop:`calc(-1 * var(--tgph-spacing-1)`,marginBottom:`calc(-1 * var(--tgph-spacing-1)`},...t})}):null},Ps=({children:e,...t})=>{let n=S.default.useContext($),r=S.default.useMemo(()=>{if(!D(n.value))return;let e=ie(n.value,n.options,n.legacyBehavior),t=e?.label||e?.value||n.placeholder;return n.legacyBehavior&&n?.value?.label||t},[n.value,n.options,n.legacyBehavior,n.placeholder]);return(0,T.jsx)(te.TooltipIfTruncated,{children:(0,T.jsx)(m.Button.Text,{color:n.value?`default`:`gray`,textOverflow:`ellipsis`,overflow:`hidden`,...t,children:e||r})})},Fs=({children:e,...t})=>{let n=S.default.useContext($);return(0,T.jsx)(te.TooltipIfTruncated,{children:(0,T.jsx)(m.Button.Text,{color:`gray`,textOverflow:`ellipsis`,overflow:`hidden`,...t,children:e||n.placeholder})})},Is=({children:e})=>{let t=S.default.useContext($);if(!E(t.value))return null;let n=t.layout||`truncate`,r=(t.value.length-2).toString().split(``);return(0,T.jsxs)(v.Stack,{gap:`0_5`,w:`full`,wrap:n===`wrap`?`wrap`:`nowrap`,align:`center`,style:{position:`relative`,flexGrow:1},children:[e,n===`truncate`&&t.value.length>2&&(0,T.jsx)(v.Stack,{as:As,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1,type:`spring`,bounce:0},h:`full`,pr:`1`,pl:`8`,align:`center`,"aria-label":`${t.value.length-2} more selected`,position:`absolute`,right:`0`,style:{backgroundImage:`linear-gradient(to left, var(--tgph-surface-1) 0 60%, transparent 90% 100%)`},children:(0,T.jsxs)(b.Text,{as:`span`,size:`1`,style:{whiteSpace:`nowrap`},children:[`+`,r.map(e=>(0,T.jsx)(v.Box,{as:js,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1,type:`spring`,bounce:0},w:`2`,display:`inline-block`,children:e},e)),` `,`more`]})})]})},Ls=S.default.createContext({value:``}),Rs=({value:e,children:t,...n})=>(0,T.jsx)(Ls.Provider,{value:{value:e},children:(0,T.jsx)(w.Tag.Root,{as:js,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.1,type:`spring`,bounce:0},size:`1`,maxH:`5`,rounded:`1`,layout:`position`,...n,children:t})}),zs=({children:e,...t})=>{let n=S.default.useContext($),r=S.default.useContext(Ls),i=S.default.useMemo(()=>{let e=n.options.find(e=>e.value===r.value);if(e)return e.label||e.value;if(!n.value)return;let t=n.value.find(e=>O(e,n.legacyBehavior)===r.value);if(t)return t},[n.options,n.value,r.value,n.legacyBehavior]);return(0,T.jsx)(w.Tag.Text,{...t,children:e||i})},Bs=({children:e,...t})=>{let n=S.default.useContext($),r=S.default.useContext(Ls);return(0,T.jsx)(w.Tag.Button,{icon:{icon:x.X,alt:`Remove ${r.value}`},height:`full`,onClick:e=>{if(!n.onValueChange)return;let t=n.onValueChange,i=n.value.filter(e=>O(e,n.legacyBehavior)!==r.value);t?.(i),e.stopPropagation(),e.preventDefault()},"data-tgph-combobox-tag-button":!0,...t,children:e})},Vs=({value:e,children:t,...n})=>(0,T.jsxs)(Ws.Root,{value:e,...n,children:[(0,T.jsx)(Ws.Text,{children:t}),(0,T.jsx)(Ws.Button,{})]}),Hs=e=>(0,T.jsx)(v.Stack,{align:`center`,gap:`1`,...e}),Us=()=>{let e=S.default.useContext($);if(e.value&&E(e.value)){let t=e.layout||`truncate`;return e.value.length===0?(0,T.jsx)(Fs,{}):(0,T.jsx)(So,{features:Os,children:(0,T.jsx)(Is,{children:e.value.map((n,r)=>{let i=O(n,e.legacyBehavior);if(i&&(t===`truncate`&&r<=1||t===`wrap`))return(0,T.jsx)(C.RefToTgphRef,{children:(0,T.jsx)(Ws.Default,{value:i})},i)})})})}if(e&&D(e.value))return e.value?(0,T.jsx)(Ps,{}):(0,T.jsx)(Fs,{})},Ws={Root:Rs,Text:zs,Button:Bs,Default:Vs},Gs={TriggerIndicator:Ms,TriggerClear:Ns,TriggerText:Ps,TriggerPlaceholder:Fs,TriggerTagsContainer:Is,TriggerActionsContainer:Hs,TriggerTag:Ws,TriggerValue:Us},Ks=[`ArrowDown`,`PageUp`,`Home`],qs=[`ArrowUp`,`PageDown`,`End`],Js=[`Enter`,` `],$=S.default.createContext({value:void 0,onValueChange:()=>{},contentId:``,triggerId:``,open:!1,setOpen:()=>{},onOpenToggle:()=>{},clearable:!1,disabled:!1,options:[],legacyBehavior:!1}),Ys=({modal:e=!0,closeOnSelect:t=!0,clearable:n=!1,disabled:r=!1,legacyBehavior:i=!1,open:a,onOpenChange:o,defaultOpen:s,value:c,defaultValue:l,onValueChange:u,errored:d,placeholder:p,layout:m,defaultScrollToValue:h,children:g,..._})=>{let v=S.default.useId(),b=S.default.useId(),x=S.default.useRef(null),C=S.default.useRef(null),w=S.default.useRef(null),ee=S.default.useMemo(()=>re(g),[g]),[te,ne]=S.default.useState(``),[E=!1,D]=(0,f.useControllableState)({prop:a,defaultProp:s??!1,onChange:o}),[O,ie]=(0,f.useControllableState)({prop:c,defaultProp:l,onChange:u}),ae=S.default.useCallback(()=>{D(e=>!e)},[D]);return S.default.useEffect(()=>{E||ne(``)},[E]),(0,T.jsx)($.Provider,{value:{contentId:v,triggerId:b,value:O,onValueChange:ie,placeholder:p,open:E,setOpen:D,onOpenToggle:ae,closeOnSelect:t,clearable:n,disabled:r,searchQuery:te,setSearchQuery:ne,triggerRef:x,searchRef:C,contentRef:w,errored:d,layout:m,options:ee,legacyBehavior:i,defaultScrollToValue:h},children:(0,T.jsx)(y.Menu.Root,{open:E,onOpenChange:D,modal:e,..._,children:g})})},Xs=({size:e=`1`,children:t,...n})=>{let r=S.default.useContext($),i=E(r.value)&&r.value.length>0,a=S.default.useMemo(()=>{if(r.value){if(D(r.value))return ie(r.value,r.options,r.legacyBehavior);if(E(r.value))return r.value.map(e=>ie(e,r.options,r.legacyBehavior))}},[r.value,r.options,r.legacyBehavior]),o=S.default.useCallback(()=>a?D(a)?a?.label||a?.value||r.placeholder:E(a)&&a.map(e=>e?.label||e?.value).join(`, `)||r.placeholder:r.placeholder,[a,r.placeholder]);return(0,T.jsx)(y.Menu.Trigger,{...n,asChild:!0,onClick:e=>{e.preventDefault(),r.onOpenToggle(),r.triggerRef?.current?.focus()},onKeyDown:e=>{if(e.target===r.triggerRef?.current){if(e.key===`Tab`){e.stopPropagation();return}if(e.key===`ArrowDown`||Js.includes(e.key)){e.stopPropagation(),e.preventDefault(),r.onOpenToggle();return}}},tgphRef:r.triggerRef,children:(0,T.jsx)(m.Button.Root,{id:r.triggerId,type:`button`,bg:`surface-1`,variant:`outline`,align:`center`,minH:ne[e],h:`full`,w:`full`,py:`0_5`,pr:`1_5`,pl:i?`0_5`:`1_5`,size:e,color:r.errored?`red`:`gray`,justify:`space-between`,role:`combobox`,"aria-label":o(),"aria-controls":r.contentId,"aria-expanded":r.open,"aria-haspopup":`listbox`,"data-tgph-combobox-trigger":!0,"data-tgph-combobox-trigger-open":r.open,disabled:r.disabled,...n,children:t?typeof t==`function`?t({value:a}):t:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Gs.TriggerValue,{}),(0,T.jsxs)(Gs.TriggerActionsContainer,{children:[(0,T.jsx)(Gs.TriggerClear,{}),(0,T.jsx)(Gs.TriggerIndicator,{})]})]})})})},Zs=({style:e,children:t,tgphRef:n,...r})=>{let i=S.default.useContext($),a=S.default.useRef(!1),o=(0,h.useComposedRefs)(n,i.contentRef),s=S.default.useRef(null),[c,l]=S.default.useState(0),[u,f]=S.default.useState(!1),p=S.default.useCallback(e=>{let t=e?.getBoundingClientRect();t&&l(t.height),u||f(!0)},[u]);return S.default.useEffect(()=>{let e=new ResizeObserver(e=>{for(let t of e){let e=t.target;p(e)}});return s.current&&u&&e.observe(s.current),()=>e.disconnect()},[u,p]),S.default.useEffect(()=>{u===!0&&i.open===!1&&f(!1)},[i.open,u]),S.default.useEffect(()=>{let e;return i.open&&(e=setTimeout(()=>{p(s.current)},10)),()=>e&&clearTimeout(e)},[i.open,p]),(0,T.jsx)(d.DismissableLayer,{onEscapeKeyDown:e=>{i.open&&(e.stopPropagation(),e.preventDefault(),i.setOpen(!1))},children:(0,T.jsx)(y.Menu.Content,{className:`tgph`,mt:`1`,onCloseAutoFocus:e=>{a.current||i.triggerRef?.current?.focus(),a.current=!1,e.preventDefault()},bg:`surface-1`,style:{width:`var(--tgph-combobox-trigger-width)`,transition:`min-height 200ms ease-in-out`,minHeight:c?`${c}px`:`0`,...e,"--tgph-combobox-content-transform-origin":`var(--radix-popper-transform-origin)`,"--tgph-combobox-content-available-width":`var(--radix-popper-available-width)`,"--tgph-combobox-content-available-height":`calc(var(--radix-popper-available-height) - var(--tgph-spacing-8))`,"--tgph-combobox-trigger-width":`var(--radix-popper-anchor-width)`,"--tgph-combobox-trigger-height":`var(--radix-popper-anchor-height)`},...r,tgphRef:o,"data-tgph-combobox-content":!0,"data-tgph-combobox-content-open":i.open,role:void 0,"aria-orientation":void 0,onKeyDown:e=>{e.stopPropagation();let t=i.contentRef?.current?.querySelectorAll(`[data-tgph-combobox-option]`);document.activeElement===t?.[0]&&qs.includes(e.key)&&i.searchRef?.current?.focus()},children:(0,T.jsx)(v.Stack,{direction:`column`,gap:`1`,tgphRef:s,children:t})})})},Qs=({tgphRef:e,...t})=>{let n=S.default.useContext($),r=S.default.useRef(null),i=(0,h.useComposedRefs)(e,r);return S.default.useEffect(()=>{n.open&&r.current&&requestAnimationFrame(()=>{let e=(D(n.value)?O(n.value,n.legacyBehavior):E(n.value)&&n.value.length>0?O(n.value[0],n.legacyBehavior):null)??n.defaultScrollToValue;if(e){let t=r.current?.querySelectorAll(`[data-tgph-combobox-option]`),n=Array.from(t||[]).find(t=>t.getAttribute(`data-tgph-combobox-option-value`)===e);n&&typeof n.scrollIntoView==`function`&&n.scrollIntoView({block:`center`})}})},[n.open,n.value,n.legacyBehavior,n.defaultScrollToValue]),(0,T.jsx)(v.Stack,{id:n.contentId,direction:`column`,gap:`1`,style:{overflowY:`auto`,"--max-height":t.maxHeight?void 0:`calc(var(--tgph-combobox-content-available-height) - var(--tgph-spacing-12))`},role:`listbox`,tgphRef:i,...t})},$s=({value:e,label:t,selected:n,onSelect:r,children:i,...a})=>{let o=S.default.useContext($),[s,c]=S.default.useState(!1),l=o.value,u=!o.searchQuery||ae({children:t||i,value:e,searchQuery:o.searchQuery}),d=E(l)?l.some(t=>O(t,o.legacyBehavior)===e):O(l,o.legacyBehavior)===e,f=n=>{n.stopPropagation();let i=n;if(!(i.key&&!Js.includes(i.key))){if(n.preventDefault(),o.closeOnSelect===!0&&o.setOpen(!1),r)return r(n);if(D(l)){let n=o.onValueChange;o.legacyBehavior===!0?n?.({value:e,label:t}):n?.(e)}else if(E(l)){let n=o.onValueChange,r=o.value,i=d?r.filter(t=>O(t,o.legacyBehavior)!==e):[...r,o.legacyBehavior===!0?{value:e,label:t}:e];n?.(i)}o.triggerRef?.current?.focus()}};if(u)return(0,T.jsx)(y.Menu.Button,{type:`button`,onSelect:f,onKeyDown:f,selected:n===null?null:n??d,onFocus:()=>c(!0),onBlur:()=>c(!1),role:`option`,"aria-selected":d?`true`:`false`,"data-tgph-combobox-option":!0,"data-tgph-combobox-option-focused":s,"data-tgph-combobox-option-value":e,"data-tgph-combobox-option-label":t,...a,children:t||i||e})},ec=({label:e=`Search`,placeholder:t=`Search`,tgphRef:n,value:r,onValueChange:i,...a})=>{let o=S.default.useId(),s=S.default.useContext($),c=(0,h.useComposedRefs)(n,s.searchRef),l=r??s.searchQuery,u=i??s.setSearchQuery;return S.default.useEffect(()=>{let e=e=>{Ks.includes(e.key)&&s.contentRef?.current?.focus({preventScroll:!0}),e.key===`Escape`&&s.setOpen(!1),e.stopPropagation()},t=s.searchRef?.current;if(t)return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[s]),(0,T.jsxs)(v.Box,{borderBottom:`px`,px:`1`,pb:`1`,children:[(0,T.jsx)(p.Root,{children:(0,T.jsx)(b.Text,{as:`label`,htmlFor:o,children:e})}),(0,T.jsx)(_.Input,{id:o,variant:`ghost`,placeholder:t,value:l,onChange:e=>{u(e.target.value)},LeadingComponent:(0,T.jsx)(g.Icon,{icon:x.Search,alt:`Search Icon`}),TrailingComponent:s?.searchQuery&&s?.searchQuery?.length>0?(0,T.jsx)(m.Button,{variant:`ghost`,color:`gray`,icon:{icon:x.X,alt:`Clear Search Query`},onClick:()=>s.setSearchQuery?.(``)}):null,autoFocus:!0,"data-tgph-combobox-search":!0,"aria-controls":s.contentId,...a,tgphRef:c})]})},tc=({icon:e={icon:x.Search,alt:`Search Icon`},message:t=`No results found`,children:n,...r})=>{let i=S.default.useContext($),[a,o]=S.default.useState(!1);if(S.default.useEffect(()=>{i.contentRef?.current?.querySelectorAll(`[data-tgph-combobox-option]`)?.length===0?o(!0):o(!1)},[i.searchQuery,i.contentRef,n]),a)return(0,T.jsxs)(v.Stack,{gap:`1`,align:`center`,justify:`center`,w:`full`,my:`8`,"data-tgph-combobox-empty":!0,...r,children:[e===null?(0,T.jsx)(T.Fragment,{}):(0,T.jsx)(g.Icon,{...e}),t===null?(0,T.jsx)(T.Fragment,{}):(0,T.jsx)(b.Text,{as:`span`,children:t})]})},nc=({leadingText:e=`Create`,values:t,onCreate:n,selected:r=null,legacyBehavior:i=!1,...a})=>{let o=S.default.useContext($),s=S.default.useCallback(e=>!t||t?.length===0?!1:t.some(t=>O(t,i)===e),[t,i]);if(o.searchQuery&&!s(o.searchQuery))return(0,T.jsx)($s,{leadingIcon:{icon:x.Plus,"aria-hidden":!0},mx:`1`,value:o.searchQuery,label:`${e} "${o.searchQuery}"`,selected:r,onSelect:()=>{n&&o.searchQuery&&(n(i===!0?{value:o.searchQuery}:o.searchQuery),o.setSearchQuery?.(``))},...a})},rc={};Object.assign(rc,{Root:Ys,Trigger:Xs,Content:Zs,Options:Qs,Option:$s,Search:ec,Empty:tc,Create:nc,Primitives:Gs}),exports.Combobox=rc;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|