intlayer-editor 9.5.0 → 9.5.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.
@@ -0,0 +1,41 @@
1
+ import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-CwJFpaho.js";import{n as r,t as i}from"./dist-CcmWBeAo.js";var a=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),o=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s={locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],requiredLocales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],strictMode:`strict`,defaultLocale:`en`},c={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{path:`/`}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},l={editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!1,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},u={mode:`default`,prefix:`\x1B[38;5;239m[intlayer] \x1B[0m`},d=e(n(),1),f=r(),p=({children:e,value:t,additionalProps:n})=>{let r=(0,d.isValidElement)(e)?e:(0,f.jsx)(f.Fragment,{children:e});return new Proxy(r,{get(e,r,i){if(r===`value`)return t;if(r===Symbol.toPrimitive)return()=>t??``;if(r===`toString`)return()=>String(t??``);if(r===`valueOf`)return()=>t;if(n&&Object.hasOwn(n,r))return n[r];if(t!=null&&typeof r==`string`&&r!==`constructor`&&!(r in e)){let e=Object(t);if(r in e){let n=e[r];return typeof n==`function`?n.bind(t):n}}return Reflect.get(e,r,i)}})},m=new WeakMap,h=0,g=e=>{if(!e)return`base`;let t=m.get(e);if(t)return t;h+=1;let n=`p${h}`;return m.set(e,n),n},_=256,v=new WeakMap,y=e=>typeof e==`object`&&!!e,b=(e,t,n)=>`${e}_${t}_${g(n)}`,x=(e,t)=>{if(!y(e))return{hit:!1};let n=v.get(e);return n?.has(t)?{hit:!0,content:n.get(t)}:{hit:!1}},S=(e,t,n)=>{if(!y(e))return n;let r=v.get(e);return r||(r=new Map,v.set(e,r)),r.size>=_&&r.clear(),r.set(t,n),n},C=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},w=`translation`,T=`enumeration`,E=`plural`,D=`condition`,O=`insertion`,k=`file`,A=`object`,j=`array`,ee=`nested`,M=`reactNode`,te=`preactNode`,ne=`solidNode`,N=`markdown`,re=`html`,ie=`text`,ae=`number`,oe=`boolean`,se=`gender`,ce=`select`,le=`null`,ue=`unknown`,de=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,(e,t)=>de(e,t));if(typeof e!=`object`||!e||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0||typeof e==`function`)return e;if(Array.isArray(e))return e.map((e,n)=>de(e,{...t,children:e,keyPath:[...t.keyPath,{type:j,key:n}]}));let n={};for(let r in e){let i={...t,children:e[r],keyPath:[...t.keyPath,{type:A,key:r}]};if(t.eager){n[r]=de(e[r],i);continue}Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let t=de(e[r],i);return Object.defineProperty(this,r,{value:t,enumerable:!0,configurable:!0}),t}})}return n},fe=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),pe=`default`,me=/[^A-Za-z0-9._&=-]/g,he=/[^A-Za-z0-9._-]/g,ge=e=>`%${e.charCodeAt(0).toString(16).toUpperCase().padStart(4,`0`)}`,_e=(e,t)=>{if(e===``)return`%`;let n=e.replace(t,ge);return n===`.`||n===`..`?n.replace(/\./g,`%002E`):n},ve=e=>e===void 0?pe:typeof e==`string`?_e(e,me):Object.keys(e).sort().map(t=>`${_e(t,he)}=${_e(String(e[t]),he)}`).join(`&`),ye=e=>Array.isArray(e)?e.length===0?[pe]:e.map(ve):[ve(e)],be=(e,t)=>{for(let n of e)if(t(n))return n;return t(`default`)?pe:e[0]??`default`},xe=(e,t,n,r)=>{let i=e.split(`/`);return t.every((e,t)=>e===`variant`?i[t]===r:n?.item===void 0||i[t]===String(n.item))},Se=e=>typeof e==`object`&&!!e&&`qualifierTypes`in e&&Array.isArray(e.qualifierTypes)&&`content`in e,Ce=(e,t)=>{let n=t.split(`/`),r={key:e.key,content:e.content[t]};return e.qualifierTypes.forEach((e,t)=>{e===`variant`?r.variant=n[t]:e===`item`&&(r.item=Number(n[t]))}),r},we=(e,t)=>{if(!Se(e))return e;let{qualifierTypes:n,content:r}=e,i=n.includes(`item`)&&t?.item===void 0,a=Object.keys(r),o=n.indexOf(`variant`),s=o===-1?pe:be(ye(t?.variant),e=>a.some(t=>t.split(`/`)[o]===e)),c=a.filter(e=>xe(e,n,t,s)).map(t=>Ce(e,t));return i?c.sort((e,t)=>(e.item??0)-(t.item??0)):c[0]??null},Te=e=>typeof e==`object`&&e?{locale:e.locale,selector:e}:{locale:e},Ee=e=>e?Object.keys(e).filter(e=>e!==`locale`).sort().map(t=>{let n=e[t];return`${t}:${t===`variant`?ye(n).join(`,`):String(n)}`}).join(`|`):``,De=`\x1B[0m`,Oe=`\x1B[34m`,ke=`\x1B[31m`,Ae=`\x1B[32m`,je=`\x1B[38;5;3m`,Me=e=>e,Ne=(e,t)=>{let n=t?.config??{},r=n.mode??`default`;if(r===`disabled`||t?.isVerbose&&r!==`verbose`)return;let i=Me(n.prefix),a=i?[i,...[e].flat()]:[e].flat(),o=t?.level??`info`;(n[o]??console[o]??n.log??console.log)(...a)},Pe=(e,t)=>(n,r)=>Ne(n,{...r??{},config:{...e?.log,...t?.config,...r?.config??{}}}),Fe=(e,t,n)=>t&&typeof window>`u`?`${t}${e}${n?typeof n==`boolean`?De:n:De}`:e,Ie=(e,t=je,n=De)=>[e].flat().map(e=>Fe(e,t,n)).join(`, `);Fe(`✗`,ke),Fe(`✓`,Ae),Fe(`⏲`,Oe);var Le=()=>({}),Re=new Set([`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`]),ze=(e=``)=>new Proxy((()=>e),{get:(t,n)=>n===`toJSON`||n===Symbol.toPrimitive||n===`toString`||n===`valueOf`?()=>e:n===`then`?void 0:Re.has(n)?Object.prototype[n].bind(t):n===Symbol.iterator?function*(){yield e}:ze(e?`${e}.${String(n)}`:String(n))}),Be=new Set,Ve=(e,t,n)=>{let r=Le()[e];return r?ot(r,t,n):(Be.has(e)||(Pe({log:u})(typeof window>`u`?`Dictionary ${Ie(e)} was not found. Using fallback proxy.`:`Dictionary ${e} was not found. Using fallback proxy.`,{level:`warn`}),Be.add(e)),ze(e))},He=e=>{if(typeof e!=`object`||!e||typeof e.then==`function`||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Array.isArray(e)},Ue=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e))return e;if(He(e)&&He(t)){let n={...e};for(let r of Object.keys(t))r!==`__proto__`&&r!==`constructor`&&t[r]!==void 0&&(n[r]=e[r]===void 0?t[r]:Ue(e[r],t[r]));return n}return e},We=(e,t,n)=>{let r=t=>e[t],i=new Set,a=[],o=e=>{e&&!i.has(e)&&(i.add(e),a.push(e))};o(t),t.includes(`-`)&&o(t.split(`-`)[0]),o(n),n?.includes(`-`)&&o(n.split(`-`)[0]);let s=[];for(let e of a){let t=r(e);if(t!==void 0){if(typeof t==`string`){if(s.length===0)return t;continue}s.push(t)}}if(s.length!==0)return s.length===1||Array.isArray(s[0])?s[0]:s.reduce((e,t)=>Ue(e,t))},Ge=e=>{if(typeof e!=`object`||!e||!(`nodeType`in e))return!1;let{nodeType:t}=e;return!1},Ke=e=>{if(typeof e==`string`)return e;if(Ge(e))return e.nodeType===`html`?e[re]:e[N]},qe=(e,t)=>{if(typeof e==`string`)return t;if(Ge(e)){let n=e.nodeType===`html`?re:N;return{...e,[n]:t}}return e},Je=(e,t,n,r,i)=>{let a=qe(e,fe(Ke(e),t));return i(a,{...n,plugins:r,children:a})},P={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},Ye=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?P:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=n.translation??{},o={};for(let e in a){let t={...r,children:a[e],keyPath:[...r.keyPath,{type:w,key:e}]};o[e]=i(a[e],t)}return We(o,e,t)}},Xe=P,Ze=e=>P,Qe={}.INTLAYER_NODE_TYPE_CONDITION===`false`?P:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[D],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:D,key:e}]})}return e=>{let t=typeof e==`boolean`?e:e.value,n=C(i,t);return typeof n==`function`&&typeof e==`object`?n(e):n}}},$e={}.INTLAYER_NODE_TYPE_INSERTION===`false`?P:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:O}],i=e[O],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||Ge(e),transform:(e,n,r)=>{if(Ge(e))return i=>Je(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=fe(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},et=P,tt=P,nt=e=>P,rt=P,it=(e,t=!0)=>[Ye(e??s.defaultLocale,t?s.defaultLocale:void 0),Xe,Qe,$e,nt(e??s.defaultLocale),rt,et,tt],at=(e,t,n=[])=>de(e,{...t,plugins:n}),ot=(e,t,n)=>{let{locale:r,selector:i}=Te(t),a=b(r??s.defaultLocale,Ee(i),n),o=x(e,a);if(o.hit)return o.content;let c=n??it(r),l=we(e,i),u=e=>{let t={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:c,nestedDictionaries:e.nestedDictionaries};return at(e.content,t,c)};return l===null?S(e,a,null):Array.isArray(l)?S(e,a,l.map(u)):S(e,a,u(l))},st=[`en`],ct=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,lt=/\{\{\s*(.*?)\s*\}\}/g,ut=(e,t={})=>{if(!Object.values(t).some(ct))return{isSimple:!0,parts:e.replace(lt,(e,n)=>(t[n.trim()]??``).toString())};let n=e.split(lt),r=[];for(let e=0;e<n.length;e++)if(e%2==0)n[e]&&r.push(n[e]);else{let i=t[n[e].trim()];i!=null&&r.push(i)}return{isSimple:!1,parts:r}},dt={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>p({...n,value:n.children,children:n.children})},ft=P,pt=(e,t)=>{let n=ut(e,t);return n.isSimple?n.parts:(0,d.createElement)(d.Fragment,null,...n.parts.map((e,t)=>(0,d.createElement)(d.Fragment,{key:t},e)))},mt={}.INTLAYER_NODE_TYPE_INSERTION===`false`?P:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:O}],i=e[O],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||Ge(e),transform:(e,n,r)=>{if(Ge(e))return i=>Je(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=pt(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return typeof i==`object`&&i&&`nodeType`in i&&[`enumeration`,`condition`].includes(i.nodeType)?e=>t=>{let n=o(t);return typeof n==`function`?n(e):n}:o}},ht=P,gt=P,_t=new Map,vt=(e,t=!0)=>{let n=`${e??s.defaultLocale}_${t}`;if(_t.has(n))return _t.get(n);let r=[Ye(e??s.defaultLocale,t?s.defaultLocale:void 0),Xe,Ze(e??s.defaultLocale),Qe,nt(e??s.defaultLocale),rt,et,tt,dt,ft,mt,ht,gt];return _t.set(n,r),r},yt=(e,t)=>Ve(e,t,vt(typeof t==`object`&&t?t.locale:t)),bt=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),xt=e=>{if(typeof e==`number`)return Date.now()+e*1e3;if(typeof e==`string`){let t=Date.parse(e);return Number.isNaN(t)?void 0:t}},St=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`);let i=xt(n.expires);return i!==void 0&&r.push(`Expires=${new Date(i).toUTCString()}`),n.secure&&r.push(`Secure`),n.sameSite&&r.push(`SameSite=${n.sameSite}`),r.join(`; `)},Ct={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var wt={getCookie:e=>document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1],getLocaleStorage:e=>localStorage.getItem(e),getSessionStorage:e=>sessionStorage.getItem(e),isCookieEnabled:!0,setCookieStore:(e,t,n)=>cookieStore.set({name:e,value:t,path:n.path,domain:n.domain,expires:n.expires,sameSite:n.sameSite}),setCookieString:(e,t)=>{document.cookie=t},setSessionStorage:(e,t)=>sessionStorage.setItem(e,t),setLocaleStorage:(e,t)=>localStorage.setItem(e,t)},Tt=(e=wt)=>{let{locales:t}=s;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!Ct)for(let t=0;t<(c.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(c.storage.cookies[t].name);if(n(r))return r}catch{}},Et=(e,t)=>{if(t?.isCookieEnabled!==!1&&!Ct&&c.storage.cookies)for(let n=0;n<c.storage.cookies.length;n++){let{name:r,attributes:i}=c.storage.cookies[n];try{t?.setCookieStore&&t.setCookieStore(r,e,{...i,expires:xt(i.expires)})}catch{try{t?.setCookieString&&t.setCookieString(r,St(r,e,i))}catch{}}}},Dt=Tt(wt),Ot=(e,t)=>Et(e,{...wt,isCookieEnabled:t}),kt=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},At=(e,t=s?.locales)=>{let n=bt(e),r=e;e?.endsWith(`/`)&&(r=e.slice(0,-1));let i=n?new URL(r):new URL(r,`http://e.com`),a=i.pathname;a.startsWith(`/`)||(i.pathname=`/${a}`);{let e=a.split(`/`),n=e[1];t?.includes(n)&&(e.splice(1,1),i.pathname=e.join(`/`)??`/`)}return n?i.toString():i.toString().replace(`http://e.com`,``)},jt=(e,t,n)=>(n??c?.rewrite,e),Mt=(e={})=>({...e,defaultLocale:e.defaultLocale??s?.defaultLocale??`en`,mode:e.mode??c?.mode??`prefix-no-default`,locales:e.locales??s?.locales??st,rewrite:e.rewrite??c?.rewrite,domains:e.domains??c?.domains}),Nt=(e,t)=>!!e&&(t??s.locales).includes(e),Pt=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=Mt(t);return!e||!Nt(e,i)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},Ft=(e,t,n)=>({path:e,isRewritten:!1}),It=(e,t=s?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:c}=Mt(n),l=At(e,a),u=new URL(l,`http://e.com`),d=Ft(jt(u.pathname,void 0,void 0),t,void 0).path,{prefix:f}=Pt(t,{defaultLocale:r,mode:i,locales:a,domains:c}),p=`/${f}${d}`.replace(/\/+/g,`/`);return p.length>1&&p.endsWith(`/`)&&(p=p.slice(0,-1)),`${p}${u.search}${u.hash}`},Lt=(e,t=s?.defaultLocale,n={})=>{let{domains:r,currentDomain:i}=Mt(n),a=bt(e),o=a?new URL(e):new URL(e,`http://e.com`);return`${a?`${o.protocol}//${o.host}`:``}${It(`${o.pathname}${o.search}${o.hash}`,t,n)}`},Rt=(e,t=s?.locales,n=s?.defaultLocale)=>{let r=[e].flat(),i=e=>e.trim().toLowerCase();try{for(let e of r){let n=i(e),r=t.find(e=>i(e)===n);if(r)return r;let[a]=n.split(`-`),o=t.find(e=>i(e).split(`-`)[0]===a);if(o)return o}}catch{}return n},zt=(0,d.createContext)({locale:Dt??s?.defaultLocale,setLocale:()=>null,isCookieEnabled:!0}),Bt=({locale:e,defaultLocale:t,variant:n,children:r,setLocale:i,disableEditor:a,isCookieEnabled:o})=>{let{locales:c,defaultLocale:l}=s??{},[u,p]=(0,d.useState)(e??Dt??t??l);(0,d.useEffect)(()=>{e&&e!==u&&p(e)},[e]),(0,d.useEffect)(()=>{kt()},[]);let m=i??(e=>{if(u.toString()!==e.toString()){if(!c?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}p(e),Ot(e,o)}}),h=Rt(u);return(0,f.jsx)(zt.Provider,{value:{locale:h,setLocale:m,variant:n,disableEditor:a},children:r})},Vt=(e,t)=>{let{locale:n,variant:r}=(0,d.useContext)(zt)??{},i=t??n,a=typeof i==`object`&&i?`${i.locale??``}|${Ee(i)}`:i;return(0,d.useMemo)(()=>yt(e,i),[e,a])},Ht=e(o(),1),Ut=Object.defineProperty,Wt=(e,t)=>Ut(e,`name`,{value:t,configurable:!0}),Gt=!!(typeof window<`u`&&window.document&&window.document.createElement);function F(e,t,{checkForDefaultPrevented:n=!0}={}){return Wt(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Wt(F,`composeEventHandlers`);function Kt(e){if(!Gt)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Wt(Kt,`getOwnerWindow`);function qt(e){if(!Gt)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Wt(qt,`getOwnerDocument`);function Jt(e,t=!1){let{activeElement:n}=qt(e);if(!n?.nodeName)return null;if(Yt(n)&&n.contentDocument)return Jt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=qt(n).getElementById(e);if(t)return t}}return n}Wt(Jt,`getActiveElement`);function Yt(e){return e.tagName===`IFRAME`}Wt(Yt,`isFrame`);var Xt=Object.defineProperty,Zt=(e,t)=>Xt(e,`name`,{value:t,configurable:!0});function Qt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Zt(Qt,`setRef`);function $t(...e){return t=>{let n=!1,r=e.map(e=>{let r=Qt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Qt(e[t],null)}}}}Zt($t,`composeRefs`);function I(...e){return d.useCallback($t(...e),e)}Zt(I,`useComposedRefs`);var en=Object.defineProperty,tn=(e,t)=>en(e,`name`,{value:t,configurable:!0});function nn(e,t){let n=d.createContext(t);n.displayName=e+`Context`;let r=tn(e=>{let{children:t,...r}=e,i=d.useMemo(()=>r,Object.values(r));return(0,f.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=d.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return tn(i,`useContext`),[r,i]}tn(nn,`createContext`);function rn(e,t=[]){let n=[];function r(t,r){let i=d.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=tn(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=d.useMemo(()=>o,Object.values(o));return(0,f.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=d.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return tn(s,`useContext`),[o,s]}tn(r,`createContext`);let i=tn(()=>{let t=n.map(e=>d.createContext(e));return tn(function(n){let r=n?.[e]||t;return d.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,an(i,...t)]}tn(rn,`createContextScope`);function an(...e){let t=e[0];if(e.length===1)return t;let n=tn(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return tn(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}tn(an,`composeContextScopes`);var on=Object.defineProperty,sn=(e,t)=>on(e,`name`,{value:t,configurable:!0});function cn(e){let t=d.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];_n(r)&&typeof xn==`function`&&(r=xn(r._payload)),d.Children.forEach(r,e=>{if(hn(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;_n(n)&&typeof xn==`function`&&(n=xn(n._payload)),a=fn(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=d.cloneElement(a,void 0,s):!o&&d.Children.count(r)===1&&d.isValidElement(r)&&(a=r);let c=a?mn(a):void 0,l=I(n,c);if(!a){if(r||r===0)throw Error(o?bn(e):yn(e));return r}let u=pn(i,a.props??{});return a.type!==d.Fragment&&(u.ref=n?l:c),d.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}sn(cn,`createSlot`);var ln=cn(`Slot`),un=Symbol.for(`radix.slottable`);function dn(e){let t=sn(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=un,t}sn(dn,`createSlottable`);var fn=sn((e,t)=>{if(`child`in e.props){let t=e.props.child;return d.isValidElement(t)?d.cloneElement(t,void 0,e.props.children(t.props.children)):null}return d.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function pn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}sn(pn,`mergeProps`);function mn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}sn(mn,`getElementRef`);function hn(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===un}sn(hn,`isSlottable`);var gn=Symbol.for(`react.lazy`);function _n(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===gn&&`_payload`in e&&vn(e._payload)}sn(_n,`isLazyComponent`);function vn(e){return typeof e==`object`&&!!e&&`then`in e}sn(vn,`isPromiseLike`);var yn=sn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),bn=sn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),xn=d.use,Sn=Object.defineProperty,L=(e,t)=>Sn(e,`name`,{value:t,configurable:!0});function Cn(e){let t=e+`CollectionProvider`,[n,r]=rn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=L(e=>{let{scope:t,children:n}=e,r=d.useRef(null),a=d.useRef(new Map).current;return(0,f.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=cn(s),l=d.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=I(t,a(s,n).collectionRef);return(0,f.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=cn(u),h=d.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=d.useRef(null),s=I(t,o),c=a(u,n);return d.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,f.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=u;function g(t){let n=a(e+`CollectionConsumer`,t);return d.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return L(g,`useCollection`),[{Provider:o,Slot:l,ItemSlot:h},g,r]}L(Cn,`createCollection`);var wn=new WeakMap,Tn=class e extends Map{static{L(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],wn.set(this,!0)}set(e,t){return wn.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=On(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=En(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=En(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return En(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function En(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Dn(e,t);return n===-1?void 0:e[n]}L(En,`at`);function Dn(e,t){let n=e.length,r=On(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}L(Dn,`toSafeIndex`);function On(e){return e!==e||e===0?0:Math.trunc(e)}L(On,`toSafeInteger`);function kn(e){let t=e+`CollectionProvider`,[n,r]=rn(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Tn,setItemMap:L(()=>void 0,`setItemMap`)}),o=L(({state:e,...t})=>e?(0,f.jsx)(c,{...t,state:e}):(0,f.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=L(e=>{let t=_();return(0,f.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=L(e=>{let{scope:t,children:n,state:r}=e,a=d.useRef(null),[o,s]=d.useState(null),c=I(a,s),[l,u]=r;return d.useEffect(()=>{if(!o)return;let e=Nn(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,f.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=cn(l),p=d.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=I(t,a(l,n).collectionRef);return(0,f.jsx)(u,{ref:i,children:r})});p.displayName=l;let m=e+`CollectionItemSlot`,h=cn(m),g=d.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=d.useRef(null),[s,c]=d.useState(null),l=I(t,o,c),{setItemMap:u}=a(m,n),p=d.useRef(i);An(p.current,i)||(p.current=i);let g=p.current;return d.useEffect(()=>{let e=g;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Mn):(t.set(s,{...e,element:s}),t.toSorted(Mn)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Tn(e)))}},[s,g,u]),(0,f.jsx)(h,{"data-radix-collection-item":``,ref:l,children:r})});g.displayName=m;function _(){return d.useState(new Tn)}L(_,`useInitCollection`);function v(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return L(v,`useCollection`),[{Provider:o,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:v,useInitCollection:_}]}L(kn,`createCollection`);function An(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}L(An,`shallowEqual`);function jn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}L(jn,`isElementPreceding`);function Mn(e,t){return!e[1].element||!t[1].element?0:jn(e[1].element,t[1].element)?-1:1}L(Mn,`sortByDocumentPosition`);function Nn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}L(Nn,`getChildListObserver`);var Pn=Object.defineProperty,Fn=(e,t)=>Pn(e,`name`,{value:t,configurable:!0}),R=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=cn(`Primitive.${t}`),r=d.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,f.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function In(e,t){e&&Ht.flushSync(()=>e.dispatchEvent(t))}Fn(In,`dispatchDiscreteCustomEvent`);var Ln=Object.defineProperty,Rn=(e,t)=>Ln(e,`name`,{value:t,configurable:!0});function zn(e){let t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>((...e)=>t.current?.(...e)),[])}Rn(zn,`useCallbackRef`);var Bn=Object.defineProperty,z=(e,t)=>Bn(e,`name`,{value:t,configurable:!0}),Vn=`dismissableLayer.update`,Hn=`dismissableLayer.pointerDownOutside`,Un=`dismissableLayer.focusOutside`,Wn,Gn=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Kn=d.forwardRef(z(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=d.useContext(Gn),[p,m]=d.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=d.useState({}),_=I(t,m),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=d.useRef(!1),T=Xn(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:d.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return C&&!t},[u.branches,C])}),E=Zn(e=>{if(r&&w.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},h),D=p?x===v.length-1:!1,O=zn(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return d.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),d.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Qn(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(p),u.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Wn))}},[p,h,n,u]),d.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Qn())},[p,u]),d.useEffect(()=>{let e=z(()=>g({}),`handleUpdate`);return document.addEventListener(Vn,e),()=>document.removeEventListener(Vn,e)},[]),(0,f.jsx)(R.div,{...l,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,E.onFocusCapture),onBlurCapture:F(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`)),qn=d.forwardRef(z(function(e,t){let n=d.useContext(Gn),r=d.useRef(null),i=I(t,r);return d.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,f.jsx)(R.div,{...e,ref:i})},`DismissableLayerBranch`));function Jn(){let e=d.useContext(Gn),[t,n]=d.useState(null);return d.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}z(Jn,`useDismissableLayerSurface`);var Yn=z(()=>!0,`IS_TRUE`);function Xn(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Yn}=t,s=zn(e),c=d.useRef(!1),l=d.useRef(!1),u=d.useRef(new Map),f=d.useRef(()=>{});return d.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}z(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}z(t,`isOutsideInteractionIntercepted`);function d(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&f.current()},0)}z(d,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}z(p,`handleInteractionBubble`);let m=z(a=>{if(a.target&&!c.current){let d=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||$n(Hn,s,p,{discrete:!0})};if(z(d,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?d():(n.removeEventListener(`click`,f.current),f.current=d,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,d,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,d,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:z(()=>c.current=!0,`onPointerDownCapture`)}}z(Xn,`usePointerDownOutside`);function Zn(e,t=globalThis?.document){let n=zn(e),r=d.useRef(!1);return d.useEffect(()=>{let e=z(e=>{e.target&&!r.current&&$n(Un,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:z(()=>r.current=!0,`onFocusCapture`),onBlurCapture:z(()=>r.current=!1,`onBlurCapture`)}}z(Zn,`useFocusOutside`);function Qn(){let e=new CustomEvent(Vn);document.dispatchEvent(e)}z(Qn,`dispatchUpdate`);function $n(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?In(i,a):i.dispatchEvent(a)}z($n,`handleAndDispatchCustomEvent`);var er=Kn,tr=qn,B=globalThis?.document?d.useLayoutEffect:()=>{},nr=Object.defineProperty,rr=d.forwardRef(((e,t)=>nr(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=d.useState(!1);B(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Ht.createPortal((0,f.jsx)(R.div,{...r,ref:t}),o):null},`Portal`)),ir=Object.defineProperty,ar=(e,t)=>ir(e,`name`,{value:t,configurable:!0});function or(e,t){return d.useReducer((e,n)=>t[e][n]??e,e)}ar(or,`useStateMachine`);var sr=ar(e=>{let{present:t,children:n}=e,r=cr(t),i=typeof n==`function`?n({present:r.isPresent}):d.Children.only(n),a=ur(r.ref,fr(i));return typeof n==`function`||r.isPresent?d.cloneElement(i,{ref:a}):null},`Presence`);function cr(e){let[t,n]=d.useState(),r=d.useRef(null),i=d.useRef(e),a=d.useRef(`none`),o=d.useRef(void 0),[s,c]=or(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return d.useEffect(()=>{s===`mounted`?(a.current=o.current??dr(r.current),o.current=void 0):a.current=`none`},[s]),B(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=dr(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ar(a=>{let o=dr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=ar(e=>{e.target===t&&(a.current=dr(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:d.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=dr(t)}else r.current=null;n(e)},[])}}ar(cr,`usePresence`);function lr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ar(lr,`setRef`);function ur(...e){let t=d.useRef(e);return t.current=e,d.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=lr(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():lr(n[e],null)}}},[])}ar(ur,`useStableComposedRefs`);function dr(e){return e?.animationName||`none`}ar(dr,`getAnimationName`);function fr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ar(fr,`getElementRef`);var pr=Object.defineProperty,mr=(e,t)=>pr(e,`name`,{value:t,configurable:!0}),hr=d.useEffectEvent,gr=d.useInsertionEffect;function _r(e){if(typeof hr==`function`)return hr(e);let t=d.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof gr==`function`?gr(()=>{t.current=e}):B(()=>{t.current=e}),d.useMemo(()=>((...e)=>t.current?.(...e)),[])}mr(_r,`useEffectEvent`);var vr=Object.defineProperty,yr=(e,t)=>vr(e,`name`,{value:t,configurable:!0}),br=d.useInsertionEffect||B;function xr({prop:e,defaultProp:t,onChange:n=yr(()=>{},`onChange`),caller:r}){let[i,a,o]=Sr({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,d.useCallback(t=>{if(s){let n=Cr(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}yr(xr,`useControllableState`);function Sr({defaultProp:e,onChange:t}){let[n,r]=d.useState(e),i=d.useRef(n),a=d.useRef(t);return br(()=>{a.current=t},[t]),d.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}yr(Sr,`useUncontrolledState`);function Cr(e){return typeof e==`function`}yr(Cr,`isFunction`);var wr=Symbol(`RADIX:SYNC_STATE`);function Tr(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=_r(o),u=[{...n,state:a}];r&&u.push(r);let[f,p]=d.useReducer((t,n)=>{if(n.type===wr)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=f.state,h=d.useRef(m);d.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=d.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return d.useEffect(()=>{c&&!Object.is(i,f.state)&&p({type:wr,state:i})},[i,f.state,c]),[g,p]}yr(Tr,`useControllableStateReducer`);var Er=Object.defineProperty,Dr=(e,t)=>Er(e,`name`,{value:t,configurable:!0}),Or=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),kr=d.forwardRef(Dr(function(e,t){return(0,f.jsx)(R.span,{...e,ref:t,style:{...Or,...e.style}})},`VisuallyHidden`));function Ar(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ar(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function jr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ar(e))&&(r&&(r+=` `),r+=t);return r}var Mr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Nr=jr,Pr=(e,t)=>n=>{if(t?.variants==null)return Nr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Mr(t)||Mr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Nr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Fr=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ir(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Fr(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Lr=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},Rr=e=>{let t=Lr(e);return t.charAt(0).toUpperCase()+t.slice(1)},zr=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Br={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Vr(e){return e!=null}function Hr(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Br.width,a=e.size??e.height??Br.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?zr(...c):zr(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Br[`stroke-width`])*Number(e.size??e.width??Br.width)/Number(t.size??t.width??Br.width):t.strokeWidth??Br[`stroke-width`];return[`svg`,{...Object.entries(Br).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Vr(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Vr(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Vr(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Ur(e,t={}){return Hr(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Wr=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gr=(0,d.createContext)({}),Kr=()=>(0,d.useContext)(Gr),qr=(0,d.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Kr()??{},b=!!c||Wr(f),[x,S,C=[]]=Ur(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:zr(y,s),hasA11yProp:b,attributes:f});return(0,d.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Jr(e,t=[],n=[]){let r=typeof e==`string`?Ir(e,t,n):e,i=(0,d.forwardRef)(({className:e,...t},n)=>(0,d.createElement)(qr,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Rr(r.name)),i}var Yr={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Yr.node;var Xr=Jr(Yr),Zr={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Zr.node;var Qr=Jr(Zr),$r={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};$r.node;var ei=Jr($r),ti={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};ti.node;var ni=Jr(ti),ri={name:`copy-check`,size:24,node:[[`path`,{d:`m12 15 2 2 4-4`,key:`2c609p`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};ri.node;var ii=Jr(ri),ai={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};ai.node;var oi=Jr(ai),si={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};si.node;var ci=Jr(si),li={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};li.node;var ui=Jr(li),di={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};di.node;var fi=Jr(di),pi=(0,d.createContext)({});function mi(e){let t=(0,d.useRef)(null);return t.current===null&&(t.current=e()),t.current}var hi=typeof window<`u`?d.useLayoutEffect:d.useEffect,gi=(0,d.createContext)(null);function _i(e,t){e.indexOf(t)===-1&&e.push(t)}function vi(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var yi=(e,t,n)=>n>t?t:n<e?e:n,bi={},xi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Si=e=>typeof e==`object`&&!!e,Ci=e=>/^0[^.\s]+$/u.test(e);function wi(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ti=e=>e,Ei=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Di=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},Oi=class{constructor(){this.subscriptions=[]}add(e){return _i(this.subscriptions,e),()=>vi(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}},ki=e=>e*1e3,Ai=e=>e/1e3,ji=(e,t)=>t?1e3/t*e:0,Mi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ni=1e-7,Pi=12;function Fi(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Mi(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Ni&&++s<Pi);return o}function Ii(e,t,n,r){if(e===t&&n===r)return Ti;let i=t=>Fi(t,0,1,e,n);return e=>e===0||e===1?e:Mi(i(e),t,r)}var Li=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ri=e=>t=>1-e(1-t),zi=Ii(.33,1.53,.69,.99),Bi=Ri(zi),Vi=Li(Bi),Hi=e=>e>=1?1:(e*=2)<1?.5*Bi(e):.5*(2-2**(-10*(e-1))),Ui=e=>1-Math.sin(Math.acos(e)),Wi=Ri(Ui),Gi=Li(Ui),Ki=Ii(.42,0,1,1),qi=Ii(0,0,.58,1),Ji=Ii(.42,0,.58,1),Yi=e=>Array.isArray(e)&&typeof e[0]!=`number`,Xi=e=>Array.isArray(e)&&typeof e[0]==`number`,Zi={linear:Ti,easeIn:Ki,easeInOut:Ji,easeOut:qi,circIn:Ui,circInOut:Gi,circOut:Wi,backIn:Bi,backInOut:Vi,backOut:zi,anticipate:Hi},Qi=e=>typeof e==`string`,$i=e=>{if(Xi(e)){e.length;let[t,n,r,i]=e;return Ii(t,n,r,i)}return Qi(e)?(Zi[e],`${e}`,Zi[e]):e},ea=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function ta(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var na=40;function ra(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ea.reduce((e,t)=>(e[t]=ta(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=bi.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,na),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:ea.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<ea.length;t++)o[ea[t]].cancel(e)},state:i,steps:o}}var{schedule:V,cancel:ia,state:H,steps:aa}=ra(typeof requestAnimationFrame<`u`?requestAnimationFrame:Ti,!0),oa;function sa(){oa=void 0}var U={now:()=>(oa===void 0&&U.set(H.isProcessing||bi.useManualTiming?H.timestamp:performance.now()),oa),set:e=>{oa=e,queueMicrotask(sa)}},ca=e=>t=>typeof t==`string`&&t.startsWith(e),la=ca(`--`),ua=ca(`var(--`),da=e=>ua(e)?fa.test(e.split(`/*`)[0].trim()):!1,fa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function pa(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var ma={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},ha={...ma,transform:e=>yi(0,1,e)},ga={...ma,default:1},_a=e=>Math.round(e*1e5)/1e5,va=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ya(e){return e==null}var ba=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xa=(e,t)=>n=>!!(typeof n==`string`&&ba.test(n)&&n.startsWith(e)||t&&!ya(n)&&Object.prototype.hasOwnProperty.call(n,t)),Sa=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(va);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ca=e=>yi(0,255,e),wa={...ma,transform:e=>Math.round(Ca(e))},Ta={test:xa(`rgb`,`red`),parse:Sa(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+wa.transform(e)+`, `+wa.transform(t)+`, `+wa.transform(n)+`, `+_a(ha.transform(r))+`)`};function Ea(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 Da={test:xa(`#`),parse:Ea,transform:Ta.transform},Oa=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ka=Oa(`deg`),Aa=Oa(`%`),W=Oa(`px`),ja=Oa(`vh`),Ma=Oa(`vw`),Na={...Aa,parse:e=>Aa.parse(e)/100,transform:e=>Aa.transform(e*100)},Pa={test:xa(`hsl`,`hue`),parse:Sa(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Aa.transform(_a(t))+`, `+Aa.transform(_a(n))+`, `+_a(ha.transform(r))+`)`},G={test:e=>Ta.test(e)||Da.test(e)||Pa.test(e),parse:e=>Ta.test(e)?Ta.parse(e):Pa.test(e)?Pa.parse(e):Da.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ta.transform(e):Pa.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},Fa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ia(e){return isNaN(e)&&typeof e==`string`&&(e.match(va)?.length||0)+(e.match(Fa)?.length||0)>0}var La=`number`,Ra=`color`,za=`var`,Ba=`var(`,Va="${}",Ha=/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 Ua(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ha,e=>(G.test(e)?(r.color.push(a),i.push(Ra),n.push(G.parse(e))):e.startsWith(Ba)?(r.var.push(a),i.push(za),n.push(e)):(r.number.push(a),i.push(La),n.push(parseFloat(e))),++a,Va)).split(Va),indexes:r,types:i}}function Wa(e){return Ua(e).values}function Ga({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];i+=e===La?_a(r[a]):e===Ra?G.transform(r[a]):r[a]}return i}}function Ka(e){return Ga(Ua(e))}var qa=e=>typeof e==`number`?0:G.test(e)?G.getAnimatableNone(e):e,Ja=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:qa(e);function Ya(e){let t=Ua(e);return Ga(t)(t.values.map((e,n)=>Ja(e,t.split[n])))}var Xa={test:Ia,parse:Wa,createTransformer:Ka,getAnimatableNone:Ya};function Za(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 Qa({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=Za(s,r,e+1/3),a=Za(s,r,e),o=Za(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function $a(e,t){return n=>n>0?t:e}var K=(e,t,n)=>e+(t-e)*n,eo=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},to=[Da,Ta,Pa],no=e=>to.find(t=>t.test(e));function ro(e){let t=no(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Pa&&(n=Qa(n)),n}var io=(e,t)=>{let n=ro(e),r=ro(t);if(!n||!r)return $a(e,t);let i={...n};return e=>(i.red=eo(n.red,r.red,e),i.green=eo(n.green,r.green,e),i.blue=eo(n.blue,r.blue,e),i.alpha=K(n.alpha,r.alpha,e),Ta.transform(i))},ao=new Set([`none`,`hidden`]);function oo(e,t){return ao.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function so(e,t){return n=>K(e,t,n)}function co(e){return typeof e==`number`?so:typeof e==`string`?da(e)?$a:G.test(e)?io:po:Array.isArray(e)?lo:typeof e==`object`?G.test(e)?io:uo:$a}function lo(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>co(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function uo(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=co(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function fo(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]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var po=(e,t)=>{let n=Xa.createTransformer(t),r=Ua(e),i=Ua(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?ao.has(e)&&!i.values.length||ao.has(t)&&!r.values.length?oo(e,t):Ei(lo(fo(r,i),i.values),n):(`${e}${t}`,$a(e,t))};function mo(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?K(e,t,n):co(e)(e,t)}var ho=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>V.update(t,e),stop:()=>ia(t),now:()=>H.isProcessing?H.timestamp:U.now()}},go=(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)})`},_o=2e4;function vo(e,t=50,n=_o,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function yo(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(vo(r),_o);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Ai(i)}}var q={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 bo(e,t){return e*Math.sqrt(1-t*t)}var xo=12;function So(e,t,n){let r=n;for(let n=1;n<xo;n++)r-=e(r)/t(r);return r}var Co=.001;function wo({duration:e=q.duration,bounce:t=q.bounce,velocity:n=q.velocity,mass:r=q.mass}){let i,a;q.maxDuration;let o=1-t;o=yi(q.minDamping,q.maxDamping,o),e=yi(q.minDuration,q.maxDuration,Ai(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=bo(t,o),c=Math.exp(-i);return Co-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o*o*t*t*e,c=Math.exp(-r),l=bo(t*t,o);return(-i(t)+Co>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=So(i,a,s);if(e=ki(e),isNaN(c))return{stiffness:q.stiffness,damping:q.damping,duration:e};{let t=c*c*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var To=[`duration`,`bounce`],Eo=[`stiffness`,`damping`,`mass`];function Do(e,t){return t.some(t=>e[t]!==void 0)}function Oo(e){let t={velocity:q.velocity,stiffness:q.stiffness,damping:q.damping,mass:q.mass,isResolvedFromDuration:!1,...e};if(!Do(e,Eo)&&Do(e,To)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*yi(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:q.mass,stiffness:i,damping:a}}else{let n=wo({...e,velocity:0});t={...t,...n,mass:q.mass},t.isResolvedFromDuration=!0}}return t}function ko(e=q.visualDuration,t=q.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}=Oo({...n,velocity:-Ai(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Ai(Math.sqrt(c/u)),v=h*_,y=Math.abs(g)<5;r||=y?q.restSpeed.granular:q.restSpeed.default,i||=y?q.restDelta.granular:q.restDelta.default;let b,x;if(h<1){let e=bo(_,h),t=(m+v*g)/e,n=v*t+g*e,r=v*g-t*e,i=-1,a=0,s=0,c=c=>{if(c!==i){i=c;let l=Math.exp(-v*c),u=Math.sin(e*c),d=Math.cos(e*c);a=o-l*(t*u+g*d),s=l*(n*u+r*d)}};b=e=>(c(e),a),x=e=>(c(e),s)}else if(h===1){b=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;x=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);b=t=>{let n=Math.exp(-v*t),r=Math.min(e*t,300);return o-n*((m+v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+v*g)/e,n=v*t-g*e,r=v*g-t*e;x=t=>{let i=Math.exp(-v*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let S={calculatedDuration:p&&d||null,velocity:e=>ki(x(e)),next:e=>{let t=b(e);if(p)s.done=e>=d;else{let n=ki(x(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(vo(S),_o),t=go(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}ko.applyToOptions=e=>{let t=yo(e,100,ko);return e.ease=t.ease,e.duration=ki(t.duration),e.type=`keyframes`,e};function Ao({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=>e<s||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=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=ko({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function jo(e,t,n){let r=[],i=n||bi.mix||mo,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Ei(Array.isArray(t)?t[n]||Ti:t,a)),r.push(a)}return r}function Mo(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=jo(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=Di(e[r],e[r+1],n);return s[r](i)};return n?t=>l(yi(e[0],e[a-1],t)):l}function No(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Di(0,t,r);e.push(K(n,1,i))}}function Po(e){let t=[0];return No(t,e.length-1),t}function Fo(e,t){return e.map(e=>e*t)}function Io(e,t){return e.map(()=>t||Ji).splice(0,e.length-1)}function Lo({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Yi(r)?r.map($i):$i(r),a={done:!1,value:t[0]},o=Mo(Fo(n&&n.length===t.length?n:Po(t),e),t,{ease:Array.isArray(i)?i:Io(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Ro=5;function zo(e,t,n){let r=Math.max(t-Ro,0);return ji(n-e(r),t-r)}var Bo=e=>e!==null;function Vo(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Bo),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ho={decay:Ao,inertia:Ao,tween:Lo,keyframes:Lo,spring:ko};function Uo(e){typeof e.type==`string`&&(e.type=Ho[e.type])}var Wo=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)}},Go=e=>e/100,Ko=class extends Wo{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!==U.now()&&this.tick(U.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Uo(e);let{type:t=Lo,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Lo;s!==Lo&&typeof o[0]!=`number`&&(this.mixKeyframes=Ei(Go,mo(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=vo(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.currentTime=this.holdTime===null?t: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=yi(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!==Ao&&(b.value=Vo(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 Ai(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Ai(e)}get time(){return Ai(this.currentTime)}set time(e){e=ki(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 zo(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(U.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Ai(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=ho,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(U.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}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 qo(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Jo=e=>e*180/Math.PI,Yo=e=>Zo(Jo(Math.atan2(e[1],e[0]))),Xo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yo,rotateZ:Yo,skewX:e=>Jo(Math.atan(e[1])),skewY:e=>Jo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zo=e=>(e%=360,e<0&&(e+=360),e),Qo=Yo,$o=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),es=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ts={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$o,scaleY:es,scale:e=>($o(e)+es(e))/2,rotateX:e=>Zo(Jo(Math.atan2(e[6],e[5]))),rotateY:e=>Zo(Jo(Math.atan2(-e[2],e[0]))),rotateZ:Qo,rotate:Qo,skewX:e=>Jo(Math.atan(e[4])),skewY:e=>Jo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ns(e){return+!!e.includes(`scale`)}function rs(e,t){if(!e||e===`none`)return ns(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=ts,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Xo,i=t}if(!i)return ns(t);let a=r[t],o=i[1].split(`,`).map(as);return typeof a==`function`?a(o):o[a]}var is=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return rs(n,t)};function as(e){return parseFloat(e.trim())}var os=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],ss=new Set([...os,`pathRotation`]),cs=e=>e===ma||e===W,ls=new Set([`x`,`y`,`z`]),us=os.filter(e=>!ls.has(e));function ds(e){let t=[];return us.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var fs={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})=>rs(t,`x`),y:(e,{transform:t})=>rs(t,`y`)};fs.translateX=fs.x,fs.translateY=fs.y;var ps=new Set,ms=!1,hs=!1,gs=!1;function _s(){if(hs){let e=Array.from(ps).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=ds(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)})}hs=!1,ms=!1,ps.forEach(e=>e.complete(gs)),ps.clear()}function vs(){ps.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hs=!0)})}function ys(){gs=!0,vs(),_s(),gs=!1}var bs=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?(ps.add(this),ms||(ms=!0,V.read(vs),V.resolveKeyframes(_s))):(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])}qo(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ps.delete(this)}cancel(){this.state===`scheduled`&&(ps.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},xs=e=>e.startsWith(`--`);function Ss(e,t,n){xs(t)?e.style.setProperty(t,n):e.style[t]=n}var Cs={};function ws(e,t){let n=wi(e);return()=>Cs[t]??n()}var Ts=ws(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Es=ws(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ds=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Os={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ds([0,.65,.55,1]),circOut:Ds([.55,0,1,.45]),backIn:Ds([.31,.01,.66,-.59]),backOut:Ds([.33,1.53,.69,.99])};function ks(e,t){if(e)return typeof e==`function`?Es()?go(e,t):`ease-out`:Xi(e)?Ds(e):Array.isArray(e)?e.map(e=>ks(e,t)||Os.easeOut):Os[e]}function As(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=ks(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function js(e){return typeof e==`function`&&`applyToOptions`in e}function Ms({type:e,...t}){return js(e)&&Es()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Ns=class extends Wo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Ms(e);this.animation=As(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Vo(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Ss(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 Ai(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Ai(e)}get time(){return Ai(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ki(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&&Ts()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Ti):r(this)}},Ps={anticipate:Hi,backInOut:Vi,circInOut:Gi};function Fs(e){return e in Ps}function Is(e){typeof e.ease==`string`&&Fs(e.ease)&&(e.ease=Ps[e.ease])}var Ls=10,Rs=class extends Ns{constructor(e){Is(e),Uo(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 Ko({...a,autoplay:!1}),s=Math.max(Ls,U.now()-this.startTime),c=yi(0,Ls,s-Ls),l=o.sample(s).value,{name:u}=this.options;i&&u&&Ss(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},zs=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Xa.test(e)||e===`0`)&&!e.startsWith(`url(`));function Bs(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 Vs(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=zs(i,t),s=zs(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Bs(e)||(n===`spring`||js(n))&&r}function Hs(e){e.duration=0,e.type=`keyframes`}var Us=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Ws=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Gs(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Ws.test(e[t]))return!0;return!1}var Ks=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),qs=wi(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Js(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return qs()&&n&&(Us.has(n)||Ks.has(n)&&Gs(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Ys=40,Xs=class extends Wo{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=U.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||bs;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=U.now();let u=!0;Vs(e,i,a,o)||(u=!1,(bi.instantAnimations||!s)&&l?.(Vo(e,n,t)),e[0]=e[e.length-1],Hs(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Ys?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Js(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Rs({...d,element:p})}catch{m=new Ko(d)}else m=new Ko(d);m.finished.then(()=>{this.notifyFinished()}).catch(Ti),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(),ys()),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 Zs(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 Qs=30,$s=e=>!isNaN(parseFloat(e)),ec={current:void 0},tc=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=U.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=U.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=$s(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Oi);let n=this.events[e].add(t);return e===`change`?()=>{n(),V.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 ec.current&&ec.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=U.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Qs)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Qs);return ji(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 nc(e,t){return new tc(e,t)}function rc(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function ic(e,t){let n=e?.[t]??e?.default??e;return n===e?n:rc(n,e)}var ac={type:`spring`,stiffness:500,damping:25,restSpeed:10},oc=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sc={type:`keyframes`,duration:.8},cc={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},lc=(e,{keyframes:t})=>t.length>2?sc:ss.has(e)?e.startsWith(`scale`)?oc(t[1]):ac:cc,uc=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function dc(e){for(let t in e)if(!uc.has(t))return!0;return!1}var fc=(e,t,n,r={},i,a)=>o=>{let s=ic(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ki(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};dc(s)||Object.assign(u,lc(e,u)),u.duration&&=ki(u.duration),u.repeatDelay&&=ki(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Hs(u),u.delay===0&&(d=!0)),(bi.instantAnimations||bi.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Hs(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Vo(u.keyframes,s);if(e!==void 0){V.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Ko(u):new Xs(u)},pc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mc(e){let t=pc.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function hc(e,t,n=1){`${e}`;let[r,i]=mc(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return xi(e)?parseFloat(e):e}return da(i)?hc(i,t,n+1):i}function gc(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function _c(e,t,n,r){if(typeof t==`function`){let[i,a]=gc(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]=gc(r);t=t(n===void 0?e.custom:n,i,a)}return t}function vc(e,t,n){let r=e.getProps();return _c(r,t,n===void 0?r.custom:n,e)}var yc=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...os]),bc=e=>Array.isArray(e);function xc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,nc(n))}function Sc(e){return bc(e)?e[e.length-1]||0:e}function Cc(e,t){let{transitionEnd:n={},transition:r={},...i}=vc(e,t)||{};i={...i,...n};for(let t in i)xc(e,t,Sc(i[t]))}var J=e=>!!(e&&e.getVelocity);function wc(e){return!!(J(e)&&e.add)}function Tc(e,t){let n=e.getValue(`willChange`);if(wc(n))return n.add(t);if(!n&&bi.WillChange){let n=new bi.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ec(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Dc=`data-`+Ec(`framerAppearId`);function Oc(e){return e.props[Dc]}var kc=typeof window<`u`;function Ac({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?rc(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ac(f,t))continue;let o={delay:n,...ic(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){V.update(()=>r.set(i));continue}let p=!1;if(kc&&window.MotionHandoffAnimation){let n=Oc(e);if(n){let e=window.MotionHandoffAnimation(n,t,V);e!==null&&(o.startTime=e,p=!0)}}Tc(e,t);let m=l??e.shouldReduceMotion;r.start(fc(t,r,i,m&&yc.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>V.update(()=>{o&&Cc(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Mc(e,t,n={}){let r=vc(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(jc(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Nc(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())}return Promise.all([a(),o(n.delay)])}function Nc(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(Mc(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Zs(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Pc(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Mc(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Mc(e,t,n);else{let i=typeof t==`function`?vc(e,t,n.custom):t;r=Promise.all(jc(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Fc={test:e=>e===`auto`,parse:e=>e},Ic=e=>t=>t.test(e),Lc=[ma,W,Aa,ka,Ma,ja,Fc],Rc=e=>Lc.find(Ic(e));function zc(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||Ci(e)}var Bc=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Vc(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(va)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Bc.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Hc=/\b([a-z-]*)\(.*?\)/gu,Uc={...Xa,getAnimatableNone:e=>{let t=e.match(Hc);return t?t.map(Vc).join(` `):e}},Wc={...Xa,getAnimatableNone:e=>{let t=Xa.parse(e);return Xa.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Gc={...ma,transform:Math.round},Kc={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:ka,pathRotation:ka,rotateX:ka,rotateY:ka,rotateZ:ka,scale:ga,scaleX:ga,scaleY:ga,scaleZ:ga,skew:ka,skewX:ka,skewY:ka,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:ha,originX:Na,originY:Na,originZ:W,zIndex:Gc,fillOpacity:ha,strokeOpacity:ha,numOctaves:Gc},qc={...Kc,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:Uc,WebkitFilter:Uc,mask:Wc,WebkitMask:Wc},Jc=e=>qc[e],Yc=new Set([Uc,Wc]);function Xc(e,t){let n=Jc(e);return Yc.has(n)||(n=Xa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Zc=new Set([`auto`,`none`,`0`]);function Qc(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Zc.has(t)&&Ua(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Xc(n,i)}var $c=class extends bs{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(),da(r))){let i=hc(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!yc.has(n)||e.length!==2)return;let[r,i]=e,a=Rc(r),o=Rc(i);if(pa(r)!==pa(i)&&fs[n]){this.needsMeasurement=!0;return}if(a!==o){if(cs(a)&&cs(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else fs[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||zc(e[t]))&&n.push(t);n.length&&Qc(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=fs[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]=fs[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()}},el=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function tl(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 nl=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function rl(e){return Si(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:il,cancel:al}=ra(queueMicrotask,!1),ol={x:!1,y:!1};function sl(){return ol.x||ol.y}function cl(e){return e===`x`||e===`y`?ol[e]?null:(ol[e]=!0,()=>{ol[e]=!1}):ol.x||ol.y?null:(ol.x=ol.y=!0,()=>{ol.x=ol.y=!1})}function ll(e,t){let n=tl(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ul(e){return!(e.pointerType===`touch`||sl())}function dl(e,t,n={}){let[r,i,a]=ll(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(!ul(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 fl=(e,t)=>t?e===t||fl(e,t.parentElement):!1,pl=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ml=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function hl(e){return ml.has(e.tagName)||e.isContentEditable===!0}var gl=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function _l(e){return gl.has(e.tagName)||e.isContentEditable===!0}var vl=new WeakSet;function yl(e){return t=>{t.key===`Enter`&&e(t)}}function bl(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var xl=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=yl(()=>{if(vl.has(n))return;bl(n,`down`);let e=yl(()=>{bl(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>bl(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Sl(e){return pl(e)&&!sl()}var Cl=new WeakSet;function wl(e,t,n={}){let[r,i,a]=ll(e,n),o=e=>{let r=e.currentTarget;if(!Sl(e)||Cl.has(e))return;vl.add(r),n.stopPropagation&&Cl.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),vl.has(r)&&vl.delete(r),Sl(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||fl(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),rl(e)&&(e.addEventListener(`focus`,e=>xl(e,i)),!hl(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Tl(e){return Si(e)&&`ownerSVGElement`in e}var El=new WeakMap,Dl,Ol=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Tl(r)&&`getBBox`in r?r.getBBox()[t]:r[n],kl=Ol(`inline`,`width`,`offsetWidth`),Al=Ol(`block`,`height`,`offsetHeight`);function jl({target:e,borderBoxSize:t}){El.get(e)?.forEach(n=>{n(e,{get width(){return kl(e,t)},get height(){return Al(e,t)}})})}function Ml(e){e.forEach(jl)}function Nl(){typeof ResizeObserver>`u`||(Dl=new ResizeObserver(Ml))}function Pl(e,t){Dl||Nl();let n=tl(e);return n.forEach(e=>{let n=El.get(e);n||(n=new Set,El.set(e,n)),n.add(t),Dl?.observe(e)}),()=>{n.forEach(e=>{let n=El.get(e);n?.delete(t),n?.size||Dl?.unobserve(e)})}}var Fl=new Set,Il;function Ll(){Il=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Fl.forEach(t=>t(e))},window.addEventListener(`resize`,Il)}function Rl(e){return Fl.add(e),Il||Ll(),()=>{Fl.delete(e),!Fl.size&&typeof Il==`function`&&(window.removeEventListener(`resize`,Il),Il=void 0)}}function zl(e,t){return typeof e==`function`?Rl(e):Pl(e,t)}var Bl={value:null,addProjectionMetrics:null};function Vl(e){return Tl(e)&&e.tagName===`svg`}var Hl=[...Lc,G,Xa],Ul=e=>Hl.find(Ic(e)),Wl=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gl=()=>({x:Wl(),y:Wl()}),Kl=()=>({min:0,max:0}),Y=()=>({x:Kl(),y:Kl()}),ql=new WeakMap;function Jl(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Yl(e){return typeof e==`string`||Array.isArray(e)}var Xl=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Zl=[`initial`,...Xl];function Ql(e){return Jl(e.animate)||Zl.some(t=>Yl(e[t]))}function $l(e){return!!(Ql(e)||e.variants)}function eu(e,t,n){for(let r in t){let i=t[r],a=n[r];if(J(i))e.addValue(r,i);else if(J(a))e.addValue(r,nc(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,nc(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var tu={current:null},nu={current:!1},ru=typeof window<`u`;function iu(){if(nu.current=!0,ru){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>tu.current=e.matches;e.addEventListener(`change`,t),t()}else tu.current=!1}}var au=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ou={};function su(e){ou=e}function cu(){return ou}var lu=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=bs,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=U.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,V.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=Ql(t),this.isVariantNode=$l(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&&J(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,ql.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:(nu.current||iu(),this.shouldReduceMotion=tu.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ia(this.notifyUpdate),ia(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&&Us.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Ns({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ki(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=ss.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&V.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()})}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 ou){let t=ou[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<au.length;t++){let n=au[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=eu(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=nc(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`&&(xi(n)||Ci(n))?n=parseFloat(n):!Ul(n)&&Xa.test(t)&&(n=Xc(e,t)),this.setBaseTarget(e,J(n)?n.get():n)),J(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=_c(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&&!J(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 Oi),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){il.render(this.render)}},uu=class extends lu{constructor(){super(...arguments),this.KeyframeResolver=$c}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;J(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},du=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function fu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function pu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mu(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 hu(e){return e===void 0||e===1}function gu({scale:e,scaleX:t,scaleY:n}){return!hu(e)||!hu(t)||!hu(n)}function _u(e){return gu(e)||vu(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vu(e){return yu(e.x)||yu(e.y)}function yu(e){return e&&e!==`0%`}function bu(e,t,n){return n+t*(e-n)}function xu(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function Su(e,t=0,n=1,r,i){e.min=xu(e.min,t,n,r,i),e.max=xu(e.max,t,n,r,i)}function Cu(e,{x:t,y:n}){Su(e.x,t.translate,t.scale,t.originPoint),Su(e.y,n.translate,n.scale,n.originPoint)}var wu=.999999999999,Tu=1.0000000000001;function Eu(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Du(e.x,-a.scroll.offset.x),Du(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Cu(e,o)),r&&_u(a.latestValues)&&Au(e,a.latestValues,a.layout?.layoutBox))}t.x<Tu&&t.x>wu&&(t.x=1),t.y<Tu&&t.y>wu&&(t.y=1)}function Du(e,t){e.min+=t,e.max+=t}function Ou(e,t,n,r,i=.5){Su(e,t,n,K(e.min,e.max,i),r)}function ku(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Au(e,t,n){let r=n??e;Ou(e.x,ku(t.x,r.x),t.scaleX,t.scale,t.originX),Ou(e.y,ku(t.y,r.y),t.scaleY,t.scale,t.originY)}function ju(e,t){return fu(mu(e.getBoundingClientRect(),t))}function Mu(e,t,n){let r=ju(e,n),{scroll:i}=t;return i&&(Du(r.x,i.offset.x),Du(r.y,i.offset.y)),r}var Nu={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Pu=os.length;function Fu(e,t,n){let r=``,i=!0;for(let a=0;a<Pu;a++){let o=os[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=nl(s,Kc[o]);if(!c){i=!1;let t=Nu[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${nl(a,Kc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Iu(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(ss.has(e)){o=!0;continue}if(la(e)){i[e]=n;continue}{let t=nl(n,Kc[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Fu(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 Lu(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 Ru(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var zu={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(W.test(e))e=parseFloat(e);else return e}return`${Ru(e,t.target.x)}% ${Ru(e,t.target.y)}%`}},Bu={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Xa.parse(e);if(i.length>5)return r;let a=Xa.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=K(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Vu={borderRadius:{...zu,applyTo:[...el]},borderTopLeftRadius:zu,borderTopRightRadius:zu,borderBottomLeftRadius:zu,borderBottomRightRadius:zu,boxShadow:Bu};function Hu(e,{layout:t,layoutId:n}){return ss.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Vu[e]||e===`opacity`)}function Uu(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(J(r[t])||i&&J(i[t])||Hu(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Wu(e){return window.getComputedStyle(e)}var Gu=class extends uu{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Lu}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(ss.has(t))return this.projection?.isProjecting?ns(t):is(e,t);{let n=Wu(e),r=(la(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ju(e,t)}build(e,t,n){Iu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Uu(e,t,n)}},Ku={offset:`stroke-dashoffset`,array:`stroke-dasharray`},qu={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ju(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Ku:qu;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Yu=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Xu(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Iu(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;for(let e of Yu)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ju(d,i,a,o,!1)}var Zu=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`]),Qu=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function $u(e,t,n,r){Lu(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Zu.has(n)?n:Ec(n),t.attrs[n])}function ed(e,t,n){let r=Uu(e,t,n);for(let n in e)if(J(e[n])||J(t[n])){let t=os.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var td=class extends uu{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ss.has(t)){let e=Jc(t);return e&&e.default||0}if(Yu.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Zu.has(t)?t:Ec(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ed(e,t,n)}build(e,t,n){Xu(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){$u(e,t,n,r)}mount(e){this.isSVGTag=Qu(e.tagName),super.mount(e)}},nd=Zl.length;function rd(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&rd(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<nd;n++){let r=Zl[n],i=e.props[r];(Yl(i)||i===!1)&&(t[r]=i)}return t}function id(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 ad=[...Xl].reverse(),od=Xl.length;function sd(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Pc(e,t,n)))}function cd(e){let t=sd(e),n=dd(),r=!0,i=!1,a=t=>(n,r)=>{let i=vc(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=rd(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<od;t++){let p=ad[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Yl(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||Jl(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=ld(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=bc(t)&&bc(n)?!id(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=vc(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Zs(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=vc(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=dd(),i=!0}}}function ld(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!id(t,e):!1}function ud(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dd(){return{animate:ud(!0),whileInView:ud(),whileHover:ud(),whileTap:ud(),whileDrag:ud(),whileFocus:ud(),exit:ud()}}function fd(e,t){e.min=t.min,e.max=t.max}function pd(e,t){fd(e.x,t.x),fd(e.y,t.y)}function md(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var hd=.9999,gd=1.0001,_d=-.01,vd=.01;function X(e){return e.max-e.min}function yd(e,t,n){return Math.abs(e-t)<=n}function bd(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=X(n)/X(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hd&&e.scale<=gd||isNaN(e.scale))&&(e.scale=1),(e.translate>=_d&&e.translate<=vd||isNaN(e.translate))&&(e.translate=0)}function xd(e,t,n,r){bd(e.x,t.x,n.x,r?r.originX:void 0),bd(e.y,t.y,n.y,r?r.originY:void 0)}function Sd(e,t,n,r=0){e.min=(r?K(n.min,n.max,r):n.min)+t.min,e.max=e.min+X(t)}function Cd(e,t,n,r){Sd(e.x,t.x,n.x,r?.x),Sd(e.y,t.y,n.y,r?.y)}function wd(e,t,n,r=0){let i=r?K(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+X(t)}function Td(e,t,n,r){wd(e.x,t.x,n.x,r?.x),wd(e.y,t.y,n.y,r?.y)}function Ed(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function Dd(e,t=0,n=1,r=.5,i,a=e,o=e){if(Aa.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=K(a.min,a.max,r);e===a&&(s-=t),e.min=Ed(e.min,t,n,s,i),e.max=Ed(e.max,t,n,s,i)}function Od(e,t,[n,r,i],a,o){Dd(e,t[n],t[r],t[i],t.scale,a,o)}var kd=[`x`,`scaleX`,`originX`],Ad=[`y`,`scaleY`,`originY`];function jd(e,t,n,r){Od(e.x,t,kd,n?n.x:void 0,r?r.x:void 0),Od(e.y,t,Ad,n?n.y:void 0,r?r.y:void 0)}function Md(e){return e.translate===0&&e.scale===1}function Nd(e){return Md(e.x)&&Md(e.y)}function Pd(e,t){return e.min===t.min&&e.max===t.max}function Fd(e,t){return Pd(e.x,t.x)&&Pd(e.y,t.y)}function Id(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ld(e,t){return Id(e.x,t.x)&&Id(e.y,t.y)}function Rd(e){return X(e.x)/X(e.y)}function zd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Bd(e){return[e(`x`),e(`y`)]}function Vd(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Hd=el.length,Ud=e=>typeof e==`string`?parseFloat(e):e,Wd=e=>typeof e==`number`||W.test(e);function Gd(e,t,n,r,i,a){i?(e.opacity=K(0,n.opacity??1,qd(r)),e.opacityExit=K(t.opacity??1,0,Jd(r))):a&&(e.opacity=K(t.opacity??1,n.opacity??1,r));for(let i=0;i<Hd;i++){let a=el[i],o=Kd(t,a),s=Kd(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Wd(o)===Wd(s)?(e[a]=Math.max(K(Ud(o),Ud(s),r),0),(Aa.test(s)||Aa.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=K(t.rotate||0,n.rotate||0,r))}function Kd(e,t){return e[t]===void 0?e.borderRadius:e[t]}var qd=Yd(0,.5,Wi),Jd=Yd(.5,.95,Ti);function Yd(e,t,n){return r=>r<e?0:r>t?1:n(Di(e,t,r))}function Xd(e,t,n){let r=J(e)?e:nc(e);return r.start(fc(``,r,t,n)),r.animation}function Zd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Qd=(e,t)=>e.depth-t.depth,$d=class{constructor(){this.children=[],this.isDirty=!1}add(e){_i(this.children,e),this.isDirty=!0}remove(e){vi(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Qd),this.isDirty=!1,this.children.forEach(e)}};function ef(e,t){let n=U.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(ia(r),e(a-t))};return V.setup(r,!0),()=>ia(r)}function tf(e){return J(e)?e.get():e}var nf=class{constructor(){this.members=[]}add(e){_i(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(vi(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(vi(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1},af={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},of=[``,`X`,`Y`,`Z`],sf=1e3,cf=0;function lf(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function uf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Oc(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,V,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&uf(r)}function df({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=cf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Bl.value&&(af.nodes=af.calculatedTargetDeltas=af.calculatedProjections=0),this.nodes.forEach(mf),this.nodes.forEach(Cf),this.nodes.forEach(wf),this.nodes.forEach(hf),Bl.addProjectionMetrics&&Bl.addProjectionMetrics(af)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new $d)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Oi),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Tl(t)&&!Vl(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;V.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ef(i,250),rf.hasAnimatedSinceResize&&(rf.hasAnimatedSinceResize=!1,this.nodes.forEach(Sf)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||jf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Ld(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ic(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Sf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ia(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Tf),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&uf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(vf),this.nodes.forEach(_f);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(yf);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(bf),this.nodes.forEach(xf),this.nodes.forEach(ff),this.nodes.forEach(pf)):this.nodes.forEach(yf),this.clearAllSnapshots();let e=U.now();H.delta=yi(0,1e3/60,e-H.timestamp),H.timestamp=e,H.isProcessing=!0,aa.update.process(H),aa.preRender.process(H),aa.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,il.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gf),this.sharedNodes.forEach(Ef)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!X(this.snapshot.measuredBox.x)&&!X(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Nd(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||_u(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ff(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Y();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Lf))){let{scroll:e}=this.root;e&&(Du(t.x,e.offset.x),Du(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(pd(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&pd(t,e),Du(t.x,i.offset.x),Du(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Y();pd(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Du(r.x,-n.scroll.offset.x),Du(r.y,-n.scroll.offset.y)),_u(n.latestValues)&&Au(r,n.latestValues,n.layout?.layoutBox)}return _u(this.latestValues)&&Au(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Y();pd(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!_u(n.latestValues))continue;let r;n.instance&&(gu(n.latestValues)&&n.updateSnapshot(),r=Y(),pd(r,n.measurePageBox())),jd(t,n.latestValues,n.snapshot?.layoutBox,r)}return _u(this.latestValues)&&jd(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=H.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):pd(this.target,this.layout.layoutBox),Cu(this.target,this.targetDelta)):pd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Bl.value&&af.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||gu(this.parent.latestValues)||vu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Td(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),pd(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===H.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;pd(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Eu(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Y());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(md(this.prevProjectionDelta.x,this.projectionDelta.x),md(this.prevProjectionDelta.y,this.projectionDelta.y)),xd(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!zd(this.projectionDelta.x,this.prevProjectionDelta.x)||!zd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Bl.value&&af.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gl(),this.projectionDelta=Gl(),this.projectionDeltaWithTransform=Gl()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Gl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Y(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(Af));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=K(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=K(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Df(o.x,e.x,n),Df(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Td(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),kf(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Fd(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Y(),pd(f,this.relativeTarget)),c&&(this.animationValues=a,Gd(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(ia(this.pendingAnimation),void 0),this.pendingAnimation=V.update(()=>{rf.hasAnimatedSinceResize=!0,this.motionValue||=nc(0),this.motionValue.jump(0,!1),this.currentAnimation=Xd(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&If(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=X(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=X(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}pd(t,n),Au(t,i),xd(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new nf),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&lf(`z`,e,r,this.animationValues);for(let t=0;t<of.length;t++)lf(`rotate${of[t]}`,e,r,this.animationValues),lf(`skew${of[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=tf(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=tf(t?.pointerEvents)||``),this.hasProjected&&!_u(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Vd(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Vu){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Vu[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?tf(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(_f),this.root.sharedNodes.clear()}}}function ff(e){e.updateLayout()}function pf(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Bd(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=X(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;fd(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else If(i,t.layoutBox,n)&&Bd(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=X(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Gl();xd(o,n,t.layoutBox);let s=Gl();a?xd(s,e.applyTransform(r,!0),t.measuredBox):xd(s,n,t.layoutBox);let c=!Nd(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Y();Td(s,t.layoutBox,i.layoutBox,o);let c=Y();Td(c,n,a.layoutBox,o),Ld(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function mf(e){Bl.value&&af.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function hf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gf(e){e.clearSnapshot()}function _f(e){e.clearMeasurements()}function vf(e){e.isLayoutDirty=!0,e.updateLayout()}function yf(e){e.isLayoutDirty=!1}function bf(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function xf(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Sf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Cf(e){e.resolveTargetDelta()}function wf(e){e.calcProjection()}function Tf(e){e.resetSkewAndRotation()}function Ef(e){e.removeLeadSnapshot()}function Df(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Of(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function kf(e,t,n,r){Of(e.x,t.x,n.x,r),Of(e.y,t.y,n.y,r)}function Af(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var jf={duration:.45,ease:[.4,0,.1,1]},Mf=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nf=Mf(`applewebkit/`)&&!Mf(`chrome/`)?Math.round:Ti;function Pf(e){e.min=Nf(e.min),e.max=Nf(e.max)}function Ff(e){Pf(e.x),Pf(e.y)}function If(e,t,n){return e===`position`||e===`preserve-aspect`&&!yd(Rd(t),Rd(n),.2)}function Lf(e){return e!==e.root&&e.scroll?.wasRoot}var Rf=df({attachResizeListener:(e,t)=>Zd(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),zf={current:void 0},Bf=df({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zf.current){let e=new Rf({});e.mount(window),e.setOptions({layoutScroll:!0}),zf.current=e}return zf.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Vf=(0,d.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Hf(e=!0){let t=(0,d.useContext)(gi);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,d.useId)();(0,d.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,d.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Uf=(0,d.createContext)({strict:!1}),Wf={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`]},Gf=!1;function Kf(){if(Gf)return;let e={};for(let t in Wf)e[t]={isEnabled:e=>Wf[t].some(t=>!!e[t])};su(e),Gf=!0}function qf(){return Kf(),cu()}function Jf(e){let t=qf();for(let n in e)t[n]={...t[n],...e[n]};su(t)}var Yf=(0,d.createContext)({});function Xf(e,t){if(Ql(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Yl(t)?t:void 0,animate:Yl(n)?n:void 0}}return e.inherit===!1?{}:t}function Zf(e){let{initial:t,animate:n}=Xf(e,(0,d.useContext)(Yf));return(0,d.useMemo)(()=>({initial:t,animate:n}),[Qf(t),Qf(n)])}function Qf(e){return Array.isArray(e)?e.join(` `):e}var $f=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ep(e,t,n){for(let r in t)!J(t[r])&&!Hu(r,n)&&(e[r]=t[r])}function tp({transformTemplate:e},t){return(0,d.useMemo)(()=>{let n=$f();return Iu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function np(e,t){let n=e.style||{},r={};return ep(r,n,e),Object.assign(r,tp(e,t)),r}function rp(e,t){let n={},r=np(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 ip=()=>({...$f(),attrs:{}});function ap(e,t,n,r){let i=(0,d.useMemo)(()=>{let n=ip();return Xu(n,t,Qu(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ep(t,e.style,e),i.style={...t,...i.style}}return i}var op=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 sp(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||op.has(e)}function cp(e,t){return e.startsWith(`on`)?!sp(e):t?.(e)??!sp(e)}function lp(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(J(e[a])||(cp(a,r)||n===!0&&sp(a)||!t&&!sp(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var up=[`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 dp(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(up.indexOf(e)>-1||/[A-Z]/u.test(e))}function fp(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??dp(e)?ap:rp)(t,r,i,e),l=lp(t,typeof e==`string`,a,s),u=e===d.Fragment?{}:{...l,...c,ref:n},{children:f}=t,p=(0,d.useMemo)(()=>J(f)?f.get():f,[f]);return(0,d.createElement)(e,{...u,children:p})}function pp({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:mp(n,r,i,e),renderState:t()}}function mp(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=tf(a[e]);let{initial:o,animate:s}=e,c=Ql(e),l=$l(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`&&!Jl(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=_c(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 hp=e=>(t,n)=>{let r=(0,d.useContext)(Yf),i=(0,d.useContext)(gi),a=()=>pp(e,t,r,i);return n?a():mi(a)},gp=hp({scrapeMotionValuesFromProps:Uu,createRenderState:$f}),_p=hp({scrapeMotionValuesFromProps:ed,createRenderState:ip}),vp=Symbol.for(`motionComponentSymbol`);function yp(e,t,n){let r=(0,d.useRef)(n);(0,d.useInsertionEffect)(()=>{r.current=n});let i=(0,d.useRef)(null);return(0,d.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());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])}var bp=(0,d.createContext)({});function xp(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Sp(e,t,n,r,i,a){let{visualElement:o}=(0,d.useContext)(Yf),s=(0,d.useContext)(Uf),c=(0,d.useContext)(gi),l=(0,d.useContext)(Vf),u=l.reducedMotion,f=l.skipAnimations,p=(0,d.useRef)(null),m=(0,d.useRef)(!1);r||=s.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,g=(0,d.useContext)(bp);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&Cp(p.current,n,i,g);let _=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[Dc],y=(0,d.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return hi(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,d.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function Cp(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:wp(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&xp(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function wp(e){if(e)return e.options.allowProjection===!1?wp(e.parent):e.projection}function Tp(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Jf(r);let a=n?n===`svg`:dp(e),o=a?_p:gp;function s(n,s){let c,l={...(0,d.useContext)(Vf),...n,layoutId:Ep(n)},{isStatic:u,isValidProp:p}=l,m=Zf(n),h=o(n,u);if(!u&&typeof window<`u`){Dp(l,r);let t=Op(l);c=t.MeasureLayout,m.visualElement=Sp(e,h,l,i,t.ProjectionNode,a)}return(0,f.jsxs)(Yf.Provider,{value:m,children:[c&&m.visualElement?(0,f.jsx)(c,{visualElement:m.visualElement,...l}):null,fp(e,n,yp(h,m.visualElement,s),h,u,t,a,p)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,d.forwardRef)(s);return c[vp]=e,c}function Ep({layoutId:e}){let t=(0,d.useContext)(pi).id;return t&&e!==void 0?t+`-`+e:e}function Dp(e,t){(0,d.useContext)(Uf).strict}function Op(e){let{drag:t,layout:n}=qf();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function kp(e,t){if(typeof Proxy>`u`)return Tp;let n=new Map,r=(n,r)=>Tp(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Tp(a,void 0,e,t)),n.get(a))})}var Ap=(e,t)=>t.isSVG??dp(e)?new td(t):new Gu(t,{allowProjection:e!==d.Fragment}),jp=class extends du{constructor(e){super(e),e.animationState||=cd(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Jl(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?.()}},Mp=0,Np={animation:{Feature:jp},exit:{Feature:class extends du{constructor(){super(...arguments),this.id=Mp++,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`||typeof e==`object`&&e&&!Array.isArray(e)){let n=vc(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 Pp(e){return{point:{x:e.pageX,y:e.pageY}}}var Fp=e=>t=>pl(t)&&e(t,Pp(t));function Ip(e,t,n,r){return Zd(e,t,Fp(n),r)}var Lp=({current:e})=>e?e.ownerDocument.defaultView:null,Rp=(e,t)=>Math.abs(e-t);function zp(e,t){let n=Rp(e.x,t.x),r=Rp(e.y,t.y);return Math.sqrt(n**2+r**2)}var Bp=new Set([`auto`,`scroll`]),Vp=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Hp(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Wp(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=zp(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=H;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Hp(t,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Wp(e.type===`pointercancel`?this.lastMoveEventInfo:Hp(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!pl(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Hp(Pp(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=H;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Wp(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=Ei(Ip(this.contextWindow,`pointermove`,this.handlePointerMove,d),Ip(this.contextWindow,`pointerup`,this.handlePointerUp,d),Ip(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Bp.has(e.overflowX)||Bp.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ia(this.updatePoint)}};function Hp(e,t){return t?{point:t(e.point)}:e}function Up(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wp({point:e},t){return{point:e,delta:Up(e,Kp(t)),offset:Up(e,Gp(t)),velocity:qp(t,.1)}}function Gp(e){return e[0]}function Kp(e){return e[e.length-1]}function qp(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Kp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ki(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ki(t)*2&&(r=e[1]);let a=Ai(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Jp(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function Yp(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Xp(e,{top:t,left:n,bottom:r,right:i}){return{x:Yp(e.x,n,i),y:Yp(e.y,t,r)}}function Zp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Qp(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function $p(e,t){let n=.5,r=X(e),i=X(t);return i>r?n=Di(t.min,t.max-r,e.min):r>i&&(n=Di(e.min,e.max-i,t.min)),yi(0,1,n)}function em(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var tm=.35;function nm(e=tm){return e===!1?e=0:e===!0&&(e=tm),{x:rm(e,`left`,`right`),y:rm(e,`top`,`bottom`)}}function rm(e,t,n){return{min:im(e,t),max:im(e,n)}}function im(e,t){return typeof e==`number`?e:e[t]||0}var am=new WeakMap,om=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Pp(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=cl(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bd(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Aa.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=X(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&V.update(()=>i(e,t),!1,!0),Tc(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=um(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&V.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Vp(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Lp(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&V.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!lm(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Jp(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&xp(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Xp(n.layoutBox,e):!1,this.elastic=nm(t),r!==this.constraints&&!xp(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Bd(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=em(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xp(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Mu(n,r.root,this.visualElement.getTransformPagePoint()),a=Qp(r.layout.layoutBox,i);if(t){let e=t(pu(a));this.hasMutatedConstraints=!!e,e&&(a=fu(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Bd(o=>{if(!lm(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Tc(this.visualElement,e),n.start(fc(e,n,0,t,this.visualElement,!1))}stopAnimation(){Bd(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Bd(t=>{let{drag:n}=this.getProps();if(!lm(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-K(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!xp(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Bd(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=$p({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Bd(t=>{if(!lm(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(K(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;am.set(this.visualElement,this);let e=this.visualElement.current,t=Ip(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&_l(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();xp(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=cm(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(r);let o=Zd(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Bd(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=tm,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function sm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function cm(e,t,n){let r=zl(e,sm(n)),i=zl(t,sm(n));return()=>{r(),i()}}function lm(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function um(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var dm=class extends du{constructor(e){super(e),this.removeGroupControls=Ti,this.removeListeners=Ti,this.controls=new om(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ti}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},fm=e=>(t,n)=>{e&&V.update(()=>e(t,n),!1,!0)},pm=class extends du{constructor(){super(...arguments),this.removePointerDownListener=Ti}onPointerDown(e){this.session=new Vp(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lp(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:fm(e),onStart:fm(t),onMove:fm(n),onEnd:(e,t)=>{delete this.session,r&&V.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Ip(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},mm=!1,hm=class extends d.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),mm&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),mm=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||V.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),il.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;mm=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function gm(e){let[t,n]=Hf(),r=(0,d.useContext)(pi);return(0,f.jsx)(hm,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(bp),isPresent:t,safeToRemove:n})}var _m={pan:{Feature:pm},drag:{Feature:dm,ProjectionNode:Bf,MeasureLayout:gm}};function vm(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&V.postRender(()=>i(t,Pp(t)))}var ym=class extends du{mount(){let{current:e}=this.node;e&&(this.unmount=dl(e,(e,t)=>(vm(this.node,t,`Start`),e=>vm(this.node,e,`End`))))}unmount(){}},bm=class extends du{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=Ei(Zd(this.node.current,`focus`,()=>this.onFocus()),Zd(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function xm(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&&V.postRender(()=>i(t,Pp(t)))}var Sm=class extends du{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=wl(e,(e,t)=>(xm(this.node,t,`Start`),(e,{success:t})=>xm(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Cm=new WeakMap,wm=new WeakMap,Tm=e=>{let t=Cm.get(e.target);t&&t(e)},Em=e=>{e.forEach(Tm)};function Dm({root:e,...t}){let n=e||document;wm.has(n)||wm.set(n,{});let r=wm.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Em,{root:e,...t})),r[i]}function Om(e,t,n){let r=Dm(t);return Cm.set(e,n),r.observe(e),()=>{Cm.delete(e),r.unobserve(e)}}var km={some:0,all:1},Am=class extends du{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:km[r]},o=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)};this.stopObserver=Om(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(jm(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function jm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Mm={inView:{Feature:Am},tap:{Feature:Sm},focus:{Feature:bm},hover:{Feature:ym}},Nm={layout:{ProjectionNode:Bf,MeasureLayout:gm}},Pm=kp({...Np,...Mm,..._m,...Nm},Ap),Fm=({className:e,strokeWidth:t=4})=>(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:i(`size-full`,e),children:(0,f.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,f.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,f.jsx)(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,f.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),(0,f.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,f.jsx)(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,f.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),Im=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...a})=>(0,f.jsx)(f.Fragment,{children:t&&n?(0,f.jsxs)(`div`,{className:`relative size-full`,children:[(0,f.jsx)(`div`,{className:i(`absolute top-0 left-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...a,children:(0,f.jsx)(Fm,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,f.jsx)(`div`,{className:i(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...a,children:(0,f.jsx)(Fm,{className:`size-10 max-h-full max-w-full`})}):e??(0,f.jsx)(f.Fragment,{})}),Lm=Pr(`flex-none shrink-0`,{variants:{size:{xs:`size-2`,sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-5`,"icon-xl":`size-6`,custom:``}},defaultVariants:{size:`md`}}),Rm=Pr(`relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{xs:`min-h-7 px-3 text-xs max-md:py-1`,sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-1.5`,"icon-xl":`p-3`,custom:``},color:{neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,foreground:`text-foreground ring-foreground/20 *:text-foreground-opposite`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current! bg-current/0 *:text-current!`,`hover:border-transparent hover:bg-current/30! focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/5`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-left`,center:`justify-center text-center`,right:`justify-end text-right`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`text`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),zm=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:o,iconClassName:s,isLoading:c=!1,isActive:l,isSelected:u,isFullWidth:d,roundedSize:p,textAlign:m,disabled:h,label:g,className:_,type:v=`button`,"aria-describedby":y,"aria-expanded":b,"aria-haspopup":x,"aria-pressed":S,...C})=>{let w=e===`link`||e===`invisible-link`,T=!r&&(a||o),E={"aria-label":T?g??void 0:void 0,"aria-labelledby":void 0,"aria-describedby":y,"aria-expanded":b,"aria-haspopup":x,"aria-pressed":l===void 0?S:l,"aria-busy":c,"aria-current":l?`page`:void 0,"aria-disabled":h||c,"aria-selected":u},D=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return(0,f.jsxs)(`button`,{disabled:c||h,role:w?`link`:`button`,type:v,className:Rm({variant:e,size:t,color:n,isFullWidth:d,roundedSize:p,textAlign:m??(o?`left`:`center`),className:_}),...E,...C,children:[a&&!c&&(0,f.jsx)(a,{className:Lm({size:t,className:i(!D&&`mr-3`,s)}),"aria-hidden":`true`}),(0,f.jsx)(`div`,{className:i(`flex items-center justify-center transition-[width] duration-300`,c&&t===`sm`&&`w-3`,c&&t===`md`&&`w-4`,c&&t===`lg`&&`w-6`,c&&t===`xl`&&`w-8`),children:(0,f.jsx)(Im,{className:Lm({size:t,className:i(!D&&`mr-3`,s)}),isLoading:c,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,f.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&T&&(0,f.jsx)(`span`,{className:`sr-only`,children:g}),o&&(0,f.jsx)(o,{className:Lm({size:t,className:i(!D&&`ml-3`,s)}),"aria-hidden":`true`})]})},Bm=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:a=!1,minHeight:o=0,...s})=>(0,f.jsx)(`div`,{"aria-hidden":a?t:void 0,tabIndex:a?0:void 0,role:a?`button`:`none`,className:i(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-[grid-template-rows] duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,a&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...s,children:(0,f.jsx)(`div`,{style:{minHeight:`${o}px`},className:i(r&&`group-hover/height-smoother:visible`,a&&`group-focus/height-smoother:visible`,n),children:e})}),Vm=new Set,Hm=null,Um=()=>{Hm=null;let e=[...Vm];Vm.clear();for(let t of e)t()},Wm=e=>typeof requestAnimationFrame>`u`?()=>{}:(Vm.add(e),Hm??=requestAnimationFrame(Um),()=>{Vm.delete(e),Vm.size===0&&Hm!==null&&(cancelAnimationFrame(Hm),Hm=null)}),Gm=e=>e?.getAttribute(`aria-selected`)===`true`,Km=[`aria-selected`,`data-active`,`data-indicator`],qm=150,Jm=(e,{selector:t=Gm,isHoverable:n=!1,orientation:r=`horizontal`}={selector:Gm,isHoverable:!1,orientation:`horizontal`})=>{let[i,a]=(0,d.useState)(null),o=(0,d.useRef)(null),s=(0,d.useRef)(null),c=(0,d.useRef)(null),l=(0,d.useRef)(null),u=(0,d.useRef)(t);u.current=t;let f=(0,d.useRef)(r);f.current=r;let p=e.current.length,m=(0,d.useCallback)(()=>{let t=o.current??e.current.find(u.current)??null;o.current&&s.current&&(clearTimeout(s.current),s.current=null);let n=f.current===`vertical`;if(!t){if(c.current?.opacity===0)return;let e=n?{top:c.current?.top??0,height:c.current?.height??0,opacity:0}:{left:c.current?.left??0,width:c.current?.width??0,opacity:0};a(e),c.current=e;return}if(n){let e=t.offsetTop,n=t.offsetHeight,r=c.current;if(r?.top===e&&r.height===n&&r.opacity===1)return;let i={top:e,height:n,opacity:1};a(i),c.current=i;return}let r=t.offsetLeft,i=t.offsetWidth,l=c.current;if(l?.left===r&&l.width===i&&l.opacity===1)return;let d={left:r,width:i,opacity:1};a(d),c.current=d},[e]),h=(0,d.useCallback)(()=>{l.current===null&&(l.current=Wm(()=>{l.current=null,m()}))},[m]);return(0,d.useEffect)(()=>{h(),window.addEventListener(`resize`,h,{passive:!0}),window.addEventListener(`DOMContentLoaded`,h);let t=e.current.filter(Boolean),r=new MutationObserver(h),i=new ResizeObserver(h),a=e=>{s.current&&=(clearTimeout(s.current),null),o.current=e.currentTarget,h()},c=()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,h()},qm)};for(let e of t)r.observe(e,{attributes:!0,attributeFilter:Km}),i.observe(e),n&&(e.addEventListener(`mouseenter`,a,{passive:!0}),e.addEventListener(`mouseleave`,c,{passive:!0}));return()=>{if(l.current?.(),l.current=null,s.current&&=(clearTimeout(s.current),null),window.removeEventListener(`resize`,h),window.removeEventListener(`DOMContentLoaded`,h),r.disconnect(),i.disconnect(),n)for(let e of t)e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,c)}},[e,p,n,r,h]),{choiceIndicatorPosition:i,calculatePosition:m,scheduleMeasurement:h,orientation:r}},Ym=Pr(`flex flex-col text-foreground backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{neutral:``,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:`backdrop-blur-none`,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),Xm=({children:e,roundedSize:t,padding:n,transparency:r,separator:a,className:o,border:s,borderColor:c,background:l,gap:u,...d})=>(0,f.jsx)(`div`,{className:i(Ym({roundedSize:t,transparency:r,padding:n,separator:a,border:typeof s==`boolean`?s?`with`:`none`:void 0,background:l,borderColor:c,gap:u}),o),...d,children:e}),Zm=(e,t)=>{let[n,r]=(0,d.useState)(()=>typeof t==`function`?t():t);(0,d.useEffect)(()=>{let t=localStorage?.getItem(e);if(!(!t||t===`undefined`))try{r(JSON.parse(t))}catch(e){console.error(e)}},[e]);let i=(0,d.useCallback)(t=>{r(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},[e,r]),a=(0,d.useCallback)(()=>{let t=localStorage?.getItem(e);t&&r(JSON.parse(t))},[e,r]),o=(0,d.useCallback)(()=>{localStorage?.removeItem(e),r(void 0)},[e]);return(0,d.useMemo)(()=>[n,i,a,o],[n,i,a,o])},Qm=Object.defineProperty,$m=(e,t)=>Qm(e,`name`,{value:t,configurable:!0});function eh(e,[t,n]){return Math.min(n,Math.max(t,e))}$m(eh,`clamp`);var th=Object.defineProperty,nh=(e,t)=>th(e,`name`,{value:t,configurable:!0}),rh=d.createContext(void 0);function ih(e){let t=d.useContext(rh);return e||t||`ltr`}nh(ih,`useDirection`);var ah=Object.defineProperty,oh=(e,t)=>ah(e,`name`,{value:t,configurable:!0}),sh=0,ch=null;function lh(e){return uh(),e.children}oh(lh,`FocusGuards`);function uh(){d.useEffect(()=>{ch||={start:dh(),end:dh()};let{start:e,end:t}=ch;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),sh++,()=>{sh===1&&(ch?.start.remove(),ch?.end.remove(),ch=null),sh=Math.max(0,sh-1)}},[])}oh(uh,`useFocusGuards`);function dh(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}oh(dh,`createFocusGuard`);var fh=Object.defineProperty,Z=(e,t)=>fh(e,`name`,{value:t,configurable:!0}),ph=`focusScope.autoFocusOnMount`,mh=`focusScope.autoFocusOnUnmount`,hh={bubbles:!1,cancelable:!0},gh=d.forwardRef(Z(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=d.useState(null),l=zn(i),u=zn(a),p=d.useRef(null),m=I(t,c),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:Ch(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Ch(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Ch(s)};Z(e,`handleFocusIn`),Z(t,`handleFocusOut`),Z(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),d.useEffect(()=>{if(s){wh.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ph,hh);s.addEventListener(ph,l),s.dispatchEvent(t),t.defaultPrevented||(_h(Dh(yh(s)),{select:!0}),document.activeElement===e&&Ch(s))}return()=>{s.removeEventListener(ph,l),setTimeout(()=>{let t=new CustomEvent(mh,hh);s.addEventListener(mh,u),s.dispatchEvent(t),t.defaultPrevented||Ch(e??document.body,{select:!0}),s.removeEventListener(mh,u),wh.remove(h)},0)}}},[s,l,u,h]);let g=d.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=vh(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Ch(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Ch(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,f.jsx)(R.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})},`FocusScope`));function _h(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Ch(r,{select:t}),document.activeElement!==n)return}Z(_h,`focusFirst`);function vh(e){let t=yh(e);return[bh(t,e),bh(t.reverse(),e)]}Z(vh,`getTabbableEdges`);function yh(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Z(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Z(yh,`getTabbableCandidates`);function bh(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):xh(r,{upTo:t})))return r}Z(bh,`findVisible`);function xh(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Z(xh,`isHidden`);function Sh(e){return e instanceof HTMLInputElement&&`select`in e}Z(Sh,`isSelectableInput`);function Ch(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sh(e)&&t&&e.select()}}Z(Ch,`focus`);var wh=Th();function Th(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Eh(e,t),e.unshift(t)},remove(t){e=Eh(e,t),e[0]?.resume()}}}Z(Th,`createFocusScopesStack`);function Eh(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Z(Eh,`arrayRemove`);function Dh(e){return e.filter(e=>e.tagName!==`A`)}Z(Dh,`removeLinks`);var Oh=Object.defineProperty,kh=(e,t)=>Oh(e,`name`,{value:t,configurable:!0}),Ah=d.useId||(()=>void 0),jh=0;function Mh(e){let[t,n]=d.useState(Ah());return B(()=>{e||n(e=>e??String(jh++))},[e]),e||(t?`radix-${t}`:``)}kh(Mh,`useId`);var Nh=[`top`,`right`,`bottom`,`left`],Ph=[`start`,`end`],Fh=Nh.reduce((e,t)=>e.concat(t,t+`-`+Ph[0],t+`-`+Ph[1]),[]),Ih=Math.min,Lh=Math.max,Rh=Math.round,zh=Math.floor,Bh=e=>({x:e,y:e}),Vh={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Hh(e,t,n){return Lh(e,Ih(t,n))}function Uh(e,t){return typeof e==`function`?e(t):e}function Wh(e){return e.split(`-`)[0]}function Gh(e){return e.split(`-`)[1]}function Kh(e){return e===`x`?`y`:`x`}function qh(e){return e===`y`?`height`:`width`}function Jh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Yh(e){return Kh(Jh(e))}function Xh(e,t,n){n===void 0&&(n=!1);let r=Gh(e),i=Yh(e),a=qh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ag(o)),[o,ag(o)]}function Zh(e){let t=ag(e);return[Qh(e),t,Qh(t)]}function Qh(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var $h=[`left`,`right`],eg=[`right`,`left`],tg=[`top`,`bottom`],ng=[`bottom`,`top`];function rg(e,t,n){switch(e){case`top`:case`bottom`:return n?t?eg:$h:t?$h:eg;case`left`:case`right`:return t?tg:ng;default:return[]}}function ig(e,t,n,r){let i=Gh(e),a=rg(Wh(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Qh)))),a}function ag(e){let t=Wh(e);return Vh[t]+e.slice(t.length)}function og(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function sg(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:og(e)}function cg(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function lg(e,t,n){let{reference:r,floating:i}=e,a=Jh(t),o=Yh(t),s=qh(o),c=Wh(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Gh(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ug(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Uh(t,e),p=sg(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=cg(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=cg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var dg=50,fg=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ug},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=lg(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<dg&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=lg(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},pg=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Uh(e,t)||{};if(l==null)return{};let d=sg(u),f={x:n,y:r},p=Yh(i),m=qh(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ih(d[_],T),D=Ih(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Hh(E,k,O),j=!c.arrow&&Gh(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ee=j?k<E?k-E:k-O:0;return{[p]:f[p]+ee,data:{[p]:A,centerOffset:k-A-ee,...j&&{alignmentOffset:ee}},reset:j}}});function mg(e,t,n){return(e?[...n.filter(t=>Gh(t)===e),...n.filter(t=>Gh(t)!==e)]:n.filter(e=>Wh(e)===e)).filter(n=>!e||Gh(n)===e||(t?Qh(n)!==n:!1))}var hg=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Fh,autoAlignment:u=!0,...d}=Uh(e,t),f=c!==void 0||l===Fh?mg(c||null,u,l):l,p=r.autoPlacement?.index||0,m=f[p];if(m==null)return{};if(i!==m)return{reset:{placement:f[0]}};let h=await a.detectOverflow(t,d),g=Xh(m,n,await(a.isRTL==null?void 0:a.isRTL(o.floating))),_=[h[Wh(m)],h[g[0]],h[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:m,overflows:_}],y=f[p+1];if(y)return{data:{index:p+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Gh(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Gh(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:p+1,overflows:v},reset:{placement:x}}}}},gg=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Uh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Wh(r),_=Jh(o),v=Wh(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ag(o)]:Zh(o)),x=p!==`none`;!d&&x&&b.push(...ig(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Xh(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Jh(t)||T.every(e=>Jh(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Jh(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function _g(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vg(e){return Nh.some(t=>e[t]>=0)}var yg=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Uh(e,t);switch(i){case`referenceHidden`:{let e=_g(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:vg(e)}}}case`escaped`:{let e=_g(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:vg(e)}}}default:return{}}}}};function bg(e){let t=Ih(...e.map(e=>e.left)),n=Ih(...e.map(e=>e.top)),r=Lh(...e.map(e=>e.right)),i=Lh(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function xg(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>cg(bg(e)))}var Sg=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Uh(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=xg(u),f=cg(bg(u)),p=sg(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(Jh(n)===`y`){let e=d[0],t=d[d.length-1],r=Wh(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return cg({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=Wh(n)===`left`,t=Lh(...d.map(e=>e.right)),r=Ih(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return cg({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Cg=new Set([`left`,`top`]);async function wg(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wh(n),s=Gh(n),c=Jh(n)===`y`,l=Cg.has(o)?-1:1,u=a&&c?-1:1,d=Uh(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Tg=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await wg(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Eg=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Uh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Jh(i),p=Kh(f),m=u[p],h=u[f],g=(e,t)=>Hh(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Dg=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Uh(e,t),u={x:n,y:r},d=Jh(i),f=Kh(d),p=u[f],m=u[d],h=Uh(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Cg.has(Wh(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Og=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Uh(e,t),c=await i.detectOverflow(t,s),l=Wh(n),u=Gh(n),d=Jh(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ih(p-c[m],g),y=Ih(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Lh(c.left,c.right):S=p-2*Lh(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function kg(){return typeof window<`u`}function Ag(e){return Mg(e)?(e.nodeName||``).toLowerCase():`#document`}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jg(e){return((Mg(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mg(e){return kg()?e instanceof Node||e instanceof Q(e).Node:!1}function Ng(e){return kg()?e instanceof Element||e instanceof Q(e).Element:!1}function Pg(e){return kg()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Fg(e){return!kg()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ig(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lg(e){return/^(table|td|th)$/.test(Ag(e))}function Rg(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zg=/transform|translate|scale|rotate|perspective|filter/,Bg=/paint|layout|strict|content/,Vg=e=>!!e&&e!==`none`,Hg;function Ug(e){let t=Ng(e)?qg(e):e;return Vg(t.transform)||Vg(t.translate)||Vg(t.scale)||Vg(t.rotate)||Vg(t.perspective)||!Gg()&&(Vg(t.backdropFilter)||Vg(t.filter))||zg.test(t.willChange||``)||Bg.test(t.contain||``)}function Wg(e){let t=Yg(e);for(;Pg(t)&&!Kg(t);){if(Ug(t))return t;if(Rg(t))return null;t=Yg(t)}return null}function Gg(){return Hg??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hg}function Kg(e){return/^(html|body|#document)$/.test(Ag(e))}function qg(e){return Q(e).getComputedStyle(e)}function Jg(e){return Ng(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yg(e){if(Ag(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fg(e)&&e.host||jg(e);return Fg(t)?t.host:t}function Xg(e){let t=Yg(e);return Kg(t)?(e.ownerDocument||e).body:Pg(t)&&Ig(t)?t:Xg(t)}function Zg(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xg(e),i=r===e.ownerDocument?.body,a=Q(r);if(i){let e=Qg(a);return t.concat(a,a.visualViewport||[],Ig(r)?r:[],e&&n?Zg(e):[])}return t.concat(r,Zg(r,[],n))}function Qg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $g(e){let t=qg(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pg(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rh(n)!==a||Rh(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function e_(e){return Ng(e)?e:e.contextElement}function t_(e){let t=e_(e);if(!Pg(t))return Bh(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$g(t),o=(a?Rh(n.width):n.width)/r,s=(a?Rh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var n_=Bh(0);function r_(e){let t=Q(e);return!Gg()||!t.visualViewport?n_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i_(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Q(e)}function a_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=e_(e),o=Bh(1);t&&(r?Ng(r)&&(o=t_(r)):o=t_(e));let s=i_(a,n,r)?r_(a):Bh(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Q(a),t=Ng(r)?Q(r):r,n=e,i=Qg(n);for(;i&&t!==n;){let e=t_(i),t=i.getBoundingClientRect(),r=qg(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Q(i),i=Qg(n)}}return cg({width:u,height:d,x:c,y:l})}function o_(e,t){let n=Jg(e).scrollLeft;return t?t.left+n:a_(jg(e)).left+n}function s_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-o_(e,n),y:n.top+t.scrollTop}}function c_(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jg(r),s=t?Rg(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Bh(1),u=Bh(0),d=Pg(r);if((d||!a)&&((Ag(r)!==`body`||Ig(o))&&(c=Jg(r)),d)){let e=a_(r);l=t_(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?s_(o,c):Bh(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function l_(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function u_(e){let t=Jg(e),n=e.ownerDocument.body,r=Lh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Lh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+o_(e),o=-t.scrollTop;return qg(n).direction===`rtl`&&(a+=Lh(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var d_=25;function f_(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Q(e),a=jg(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Gg()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(o_(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=d_&&(s-=o)}return{width:s,height:c,x:l,y:u}}function p_(e,t){let n=a_(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=t_(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function m_(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=f_(e,n,t);else if(t===`document`)r=u_(jg(e));else if(Ng(t))r=p_(t,n);else{let n=r_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cg(r)}function h_(e,t){let n=t.get(e);if(n)return n;let r=Zg(e,[],!1).filter(e=>Ng(e)&&Ag(e)!==`body`),i=null,a=qg(e).position===`fixed`,o=a?Yg(e):e;for(;Ng(o)&&!Kg(o);){let e=qg(o),t=Ug(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Yg(o)}return t.set(e,r),r}function g_(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rg(t)?[]:h_(t,this._c):[].concat(n),r],o=m_(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=m_(t,a[e],i);s=Lh(n.top,s),c=Ih(n.right,c),l=Ih(n.bottom,l),u=Lh(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function __(e){let{width:t,height:n}=$g(e);return{width:t,height:n}}function v_(e,t,n){let r=Pg(t),i=jg(t),a=n===`fixed`,o=a_(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Bh(0);if((r||!a)&&((Ag(t)!==`body`||Ig(i))&&(s=Jg(t)),r)){let e=a_(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=o_(i));let l=i&&!r&&!a?s_(i,s):Bh(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function y_(e){return qg(e).position===`static`}function b_(e,t){if(!Pg(e)||qg(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jg(e)===n&&(n=n.ownerDocument.body),n}function x_(e,t){let n=Q(e);if(Rg(e))return n;if(!Pg(e)){let t=Yg(e);for(;t&&!Kg(t);){if(Ng(t)&&!y_(t))return t;t=Yg(t)}return n}let r=b_(e,t);for(;r&&Lg(r)&&y_(r);)r=b_(r,t);return r&&Kg(r)&&y_(r)&&!Ug(r)?n:r||Wg(e)||n}var S_=async function(e){let t=this.getOffsetParent||x_,n=this.getDimensions,r=await n(e.floating);return{reference:v_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C_(e){return qg(e).direction===`rtl`}var w_={convertOffsetParentRelativeRectToViewportRelativeRect:c_,getDocumentElement:jg,getClippingRect:g_,getOffsetParent:x_,getElementRects:S_,getClientRects:l_,getDimensions:__,getScale:t_,isElement:Ng,isRTL:C_};function T_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function E_(e,t,n){let r=null,i,a=jg(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=zh(d),h=zh(a.clientWidth-(u+f)),g=zh(a.clientHeight-(d+p)),_=zh(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Lh(0,Ih(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!T_(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Q(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function D_(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=e_(e),u=i||a?[...l?Zg(l):[],...t?Zg(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?E_(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?a_(e):null;c&&g();function g(){let t=a_(e);h&&!T_(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var O_=Tg,k_=hg,A_=Eg,j_=gg,M_=Og,N_=yg,P_=pg,F_=Sg,I_=Dg,L_=(e,t,n)=>{let r=new Map,i=n??{},a={...w_,...i.platform,_c:r};return fg(e,t,{...i,platform:a})},R_=typeof document<`u`?d.useLayoutEffect:function(){};function z_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!z_(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!z_(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function B_(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V_(e,t){let n=B_(e);return Math.round(t*n)/n}function H_(e){let t=d.useRef(e);return R_(()=>{t.current=e}),t}function U_(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=d.useState(r);z_(p,r)||m(r);let[h,g]=d.useState(null),[_,v]=d.useState(null),y=d.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=d.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=d.useRef(null),w=d.useRef(null),T=d.useRef(u),E=c!=null,D=H_(c),O=H_(i),k=H_(l),A=d.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),L_(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!z_(T.current,t)&&(T.current=t,Ht.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);R_(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=d.useRef(!1);R_(()=>(j.current=!0,()=>{j.current=!1}),[]),R_(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=d.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),M=d.useMemo(()=>({reference:x,floating:S}),[x,S]),te=d.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=V_(M.floating,u.x),r=V_(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...B_(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:A,refs:ee,elements:M,floatingStyles:te}),[u,A,ee,M,te])}var W_=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:P_({element:r.current,padding:i}).fn(n):r?P_({element:r,padding:i}).fn(n):{}}}},G_=(e,t)=>{let n=O_(e);return{name:n.name,fn:n.fn,options:[e,t]}},K_=(e,t)=>{let n=A_(e);return{name:n.name,fn:n.fn,options:[e,t]}},q_=(e,t)=>({fn:I_(e).fn,options:[e,t]}),J_=(e,t)=>{let n=j_(e);return{name:n.name,fn:n.fn,options:[e,t]}},Y_=(e,t)=>{let n=M_(e);return{name:n.name,fn:n.fn,options:[e,t]}},X_=(e,t)=>{let n=N_(e);return{name:n.name,fn:n.fn,options:[e,t]}},Z_=(e,t)=>{let n=W_(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q_=Object.defineProperty,$_=(e,t)=>Q_(e,`name`,{value:t,configurable:!0});function ev(e){let[t,n]=d.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}$_(ev,`useSize`);var tv=Object.defineProperty,nv=(e,t)=>tv(e,`name`,{value:t,configurable:!0}),rv=`Popper`,[iv,av]=rn(rv),[ov,sv]=iv(rv),cv=nv(e=>{let{__scopePopper:t,children:n}=e,[r,i]=d.useState(null),[a,o]=d.useState(void 0);return(0,f.jsx)(ov,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),lv=`PopperAnchor`,uv=d.forwardRef(nv(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=sv(lv,n),o=d.useRef(null),s=a.onAnchorChange,c=I(t,d.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=d.useRef(null);d.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&_v(a.placementState),p=u?.[0],m=u?.[1];return r?null:(0,f.jsx)(R.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:c})},`PopperAnchor`)),dv=`PopperContent`,[fv,pv]=iv(dv),mv=d.forwardRef(nv(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=sv(dv,n),[y,b]=d.useState(null),x=I(t,b),[S,C]=d.useState(null),w=ev(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(hv),altBoundary:A},{refs:ee,floatingStyles:M,placement:te,isPositioned:ne,middlewareData:N}=U_({strategy:`fixed`,placement:D,whileElementsMounted:nv((...e)=>D_(...e,{animationFrame:h===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[G_({mainAxis:i+E,alignmentAxis:o}),c&&K_({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?q_():void 0,...j}),c&&J_({...j}),Y_({...j,apply:nv(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Z_({element:S,padding:s}),gv({arrowWidth:T,arrowHeight:E}),m&&X_({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),re=v.setPlacementState;B(()=>(re(te),()=>{re(void 0)}),[te,re]);let[ie,ae]=_v(te),oe=zn(g);B(()=>{ne&&oe?.()},[ne,oe]);let se=N.arrow?.x,ce=N.arrow?.y,le=N.arrow?.centerOffset!==0,[ue,de]=d.useState();return B(()=>{y&&de(window.getComputedStyle(y).zIndex)},[y]),(0,f.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ne?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,f.jsx)(fv,{scope:n,placedSide:ie,placedAlign:ae,onArrowChange:C,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,f.jsx)(R.div,{"data-side":ie,"data-align":ae,..._,ref:x,style:{..._.style,animation:ne?_.style?.animation:`none`}})})})},`PopperContent`));function hv(e){return e!==null}nv(hv,`isNotNull`);var gv=nv(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_v(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function _v(e){let[t,n=`center`]=e.split(`-`);return[t,n]}nv(_v,`getSideAndAlignFromPlacement`);var vv=cv,yv=uv,bv=mv,xv=Object.defineProperty,Sv=(e,t)=>xv(e,`name`,{value:t,configurable:!0});function Cv(e){let t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Sv(Cv,`usePrevious`);var wv=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Tv=new WeakMap,Ev=new WeakMap,Dv={},Ov=0,kv=function(e){return e&&(e.host||kv(e.parentNode))},Av=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=kv(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},jv=function(e,t,n,r){var i=Av(t,Array.isArray(e)?e:[e]);Dv[n]||(Dv[n]=new WeakMap);var a=Dv[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Tv.get(e)||0)+1,l=(a.get(e)||0)+1;Tv.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ev.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ov++,function(){o.forEach(function(e){var t=Tv.get(e)-1,i=a.get(e)-1;Tv.set(e,t),a.set(e,i),t||(Ev.has(e)||e.removeAttribute(r),Ev.delete(e)),i||e.removeAttribute(n)}),Ov--,Ov||(Tv=new WeakMap,Tv=new WeakMap,Ev=new WeakMap,Dv={})}},Mv=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||wv(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),jv(r,i,n,`aria-hidden`)):function(){return null}},Nv=function(){return Nv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Nv.apply(this,arguments)};function Pv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Fv(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Iv=`right-scroll-bar-position`,Lv=`width-before-scroll-bar`,Rv=`with-scroll-bars-hidden`,zv=`--removed-body-scroll-bar-size`;function Bv(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Vv(e,t){var n=(0,d.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Hv=typeof window<`u`?d.useLayoutEffect:d.useEffect,Uv=new WeakMap;function Wv(e,t){var n=Vv(t||null,function(t){return e.forEach(function(e){return Bv(e,t)})});return Hv(function(){var t=Uv.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Bv(e,null)}),i.forEach(function(e){r.has(e)||Bv(e,a)})}Uv.set(n,e)},[e]),n}function Gv(e){return e}function Kv(e,t){t===void 0&&(t=Gv);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function qv(e){e===void 0&&(e={});var t=Kv(null);return t.options=Nv({async:!0,ssr:!1},e),t}var Jv=function(e){var t=e.sideCar,n=Pv(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return d.createElement(r,Nv({},n))};Jv.isSideCarExport=!0;function Yv(e,t){return e.useMedium(t),Jv}var Xv=qv(),Zv=function(){},Qv=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Zv,onWheelCapture:Zv,onTouchMoveCapture:Zv}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Pv(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Wv([n,t]),w=Nv(Nv({},x),i);return d.createElement(d.Fragment,null,u&&d.createElement(S,{sideCar:Xv,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?d.cloneElement(d.Children.only(s),Nv(Nv({},w),{ref:C})):d.createElement(y,Nv({},w,{className:c,ref:C}),s))});Qv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qv.classNames={fullWidth:Lv,zeroRight:Iv};var $v=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ey(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=$v();return t&&e.setAttribute(`nonce`,t),e}function ty(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ny(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ry=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ey())&&(ty(t,n),ny(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iy=function(){var e=ry();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ay=function(){var e=iy();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},oy={left:0,top:0,right:0,gap:0},sy=function(e){return parseInt(e||``,10)||0},cy=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[sy(n),sy(r),sy(i)]},ly=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return oy;var t=cy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},uy=ay(),dy=`data-scroll-locked`,fy=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${Rv} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${dy}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${Iv} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${Lv} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${Iv} .${Iv} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${Lv} .${Lv} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${dy}] {
36
+ ${zv}: ${s}px;
37
+ }
38
+ `},py=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},my=function(){d.useEffect(function(){return document.body.setAttribute(dy,(py()+1).toString()),function(){var e=py()-1;e<=0?document.body.removeAttribute(dy):document.body.setAttribute(dy,e.toString())}},[])},hy=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;my();var a=d.useMemo(function(){return ly(i)},[i]);return d.createElement(uy,{styles:fy(a,!t,i,n?``:`!important`)})},gy=!1;if(typeof window<`u`)try{var _y=Object.defineProperty({},"passive",{get:function(){return gy=!0,!0}});window.addEventListener(`test`,_y,_y),window.removeEventListener(`test`,_y,_y)}catch{gy=!1}var vy=gy?{passive:!1}:!1,yy=function(e){return e.tagName===`TEXTAREA`},by=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!yy(e)&&n[t]===`visible`)},xy=function(e){return by(e,`overflowY`)},Sy=function(e){return by(e,`overflowX`)},Cy=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ey(e,r)){var i=Dy(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wy=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ty=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ey=function(e,t){return e===`v`?xy(t):Sy(t)},Dy=function(e,t){return e===`v`?wy(t):Ty(t)},Oy=function(e,t){return e===`h`&&t===`rtl`?-1:1},ky=function(e,t,n,r,i){var a=Oy(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Dy(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ey(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ay=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jy=function(e){return[e.deltaX,e.deltaY]},My=function(e){return e&&`current`in e?e.current:e},Ny=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Py=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},Fy=0,Iy=[];function Ly(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(Fy++)[0],a=d.useState(ay)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Fv([e.lockRef.current],(e.shards||[]).map(My),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ay(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Cy(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Cy(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ky(h,t,e,h===`h`?s:c,!0)},[]),c=d.useCallback(function(e){var n=e;if(!(!Iy.length||Iy[Iy.length-1]!==a)){var r=`deltaY`in n?jy(n):Ay(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ny(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(My).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=d.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ry(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=d.useCallback(function(e){n.current=Ay(e),r.current=void 0},[]),f=d.useCallback(function(t){l(t.type,jy(t),t.target,s(t,e.lockRef.current))},[]),p=d.useCallback(function(t){l(t.type,Ay(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return Iy.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,vy),document.addEventListener(`touchmove`,c,vy),document.addEventListener(`touchstart`,u,vy),function(){Iy=Iy.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vy),document.removeEventListener(`touchmove`,c,vy),document.removeEventListener(`touchstart`,u,vy)}},[]);var m=e.removeScrollBar,h=e.inert;return d.createElement(d.Fragment,null,h?d.createElement(a,{styles:Py(i)}):null,m?d.createElement(hy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ry(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zy=Yv(Xv,Ly),By=d.forwardRef(function(e,t){return d.createElement(Qv,Nv({},e,{ref:t,sideCar:zy}))});By.classNames=Qv.classNames;var Vy=Object.defineProperty,$=(e,t)=>Vy(e,`name`,{value:t,configurable:!0}),Hy=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Uy=[` `,`Enter`],Wy=`Select`,[Gy,Ky,qy]=Cn(Wy),[Jy,Yy]=rn(Wy,[qy,av]),Xy=av(),[Zy,Qy]=Jy(Wy),[$y,eb]=Jy(Wy);function tb(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:p,disabled:m,required:h,form:g,internal_do_not_use_render:_}=e,v=Xy(t),[y,b]=d.useState(null),[x,S]=d.useState(null),[C,w]=d.useState(!1),T=ih(l),[E,D]=xr({prop:r,defaultProp:i??!1,onChange:a,caller:Wy}),[O,k]=xr({prop:o,defaultProp:s,onChange:c,caller:Wy}),A=d.useRef(null),j=d.useRef(O);d.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=$(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,k]);let ee=!y||!!g||!!y.closest(`form`),[M,te]=d.useState(new Set),ne=Mh(),N=Array.from(M).map(e=>e.props.value).join(`;`),re=d.useCallback(e=>{te(t=>new Set(t).add(e))},[]),ie=d.useCallback(e=>{te(t=>{let n=new Set(t);return n.delete(e),n})},[]),ae={required:h,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:ne,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:m,name:u,autoComplete:p,form:g,nativeOptions:M,nativeSelectKey:N,isFormControl:ee};return(0,f.jsx)(vv,{...v,children:(0,f.jsx)(Zy,{scope:t,...ae,children:(0,f.jsx)(Gy.Provider,{scope:t,children:(0,f.jsx)($y,{scope:t,onNativeOptionAdd:re,onNativeOptionRemove:ie,children:Kb(_)?_(ae):n})})})})}$(tb,`SelectProvider`);var nb=$(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,f.jsx)(tb,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,f.jsxs)(f.Fragment,{children:[n,e?(0,f.jsx)(Gb,{__scopeSelect:t}):null]})})},`Select`),rb=`SelectTrigger`,ib=d.forwardRef($(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Xy(n),o=Qy(rb,n),s=o.disabled||r,c=I(t,o.onTriggerChange),l=Ky(n),u=d.useRef(`touch`),[p,m,h]=Jb(e=>{let t=l().filter(e=>!e.disabled),n=Yb(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),g=$(e=>{s||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,f.jsx)(yv,{asChild:!0,...a,children:(0,f.jsx)(R.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":qb(o.value)?``:void 0,...i,ref:c,onClick:F(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:F(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:F(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&Hy.includes(e.key)&&(g(),e.preventDefault())})})})},`SelectTrigger`)),ab=`SelectValue`,ob=d.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Qy(ab,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,p=I(t,c.onValueNodeChange);B(()=>{l(u)},[l,u]);let m=qb(c.value);return(0,f.jsx)(R.span,{...s,asChild:!m&&s.asChild,ref:p,style:{pointerEvents:`none`},children:(0,f.jsx)(d.Fragment,{children:m?o:a},m?`placeholder`:`value`)})},`SelectValue`)),sb=d.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,f.jsx)(R.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[cb,lb]=Jy(`SelectPortal`,{forceMount:void 0}),ub=$(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,f.jsx)(cb,{scope:e.__scopeSelect,forceMount:n,children:(0,f.jsx)(rr,{asChild:!0,...r})})},`SelectPortal`),db=`SelectContent`,fb=d.forwardRef($(function(e,t){let n=lb(db,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Qy(db,e.__scopeSelect),[o,s]=d.useState();return B(()=>{s(new DocumentFragment)},[]),(0,f.jsx)(sr,{present:r||a.open,children:({present:e})=>e?(0,f.jsx)(vb,{...i,ref:t}):(0,f.jsx)(pb,{...i,fragment:o})})},`SelectContent`)),pb=d.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Ht.createPortal((0,f.jsx)(hb,{scope:n,children:(0,f.jsx)(Gy.Slot,{scope:n,children:(0,f.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),mb=10,[hb,gb]=Jy(db),_b=cn(`SelectContent.RemoveScroll`),vb=d.forwardRef($(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=Qy(db,n),[x,S]=d.useState(null),[C,w]=d.useState(null),T=I(t,S),[E,D]=d.useState(null),[O,k]=d.useState(null),A=Ky(n),[j,ee]=d.useState(!1),M=d.useRef(!1);d.useEffect(()=>{if(x)return Mv(x)},[x]),uh();let te=d.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),ne=d.useCallback(()=>te([E,x]),[te,E,x]);d.useEffect(()=>{j&&ne()},[j,ne]);let{onOpenChange:N,triggerPointerDownPosRef:re}=b;d.useEffect(()=>{if(x){let e={x:0,y:0},t=$(t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},`handlePointerMove`),n=$(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||N(!1),document.removeEventListener(`pointermove`,t),re.current=null},`handlePointerUp`);return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,N,re]),d.useEffect(()=>{let e=$(()=>N(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[N]);let[ie,ae]=Jb(e=>{let t=A().filter(e=>!e.disabled),n=Yb(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),oe=d.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(M.current=!0))},[b.value]),se=d.useCallback(()=>x?.focus(),[x]),ce=d.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),le=r===`popper`?bb:yb,ue=le===bb?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,f.jsx)(hb,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:oe,selectedItem:E,onItemLeave:se,itemTextRefCallback:ce,focusSelectedItem:ne,selectedItemText:O,position:r,isPositioned:j,searchRef:ie,children:(0,f.jsx)(By,{as:_b,allowPinchZoom:!0,children:(0,f.jsx)(gh,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:F(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,f.jsx)(Kn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,f.jsx)(le,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ue,onPlaced:()=>ee(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:F(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ae(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>te(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),yb=d.forwardRef($(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Qy(db,n),o=gb(db,n),[s,c]=d.useState(null),[l,u]=d.useState(null),p=I(t,u),m=Ky(n),h=d.useRef(!1),g=d.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-mb,d=eh(a,[mb,Math.max(mb,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-mb,d=eh(a,[mb,Math.max(mb,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=m(),c=window.innerHeight-mb*2,u=_.scrollHeight,d=window.getComputedStyle(l),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+p+u+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-mb,D=c-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}s.style.margin=`${mb}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,s,l,_,v,y,a.dir,r]);B(()=>x(),[x]);let[S,C]=d.useState();B(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=d.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]);return(0,f.jsx)(xb,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:w,children:(0,f.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,f.jsx)(R.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),bb=d.forwardRef($(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=mb,...a}=e,o=Xy(n);return(0,f.jsx)(bv,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[xb,Sb]=Jy(db,{}),Cb=`SelectViewport`,wb=d.forwardRef($(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=gb(Cb,n),o=Sb(Cb,n),s=I(t,a.onViewportChange),c=d.useRef(0);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,f.jsx)(Gy.Slot,{scope:n,children:(0,f.jsx)(R.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:F(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-mb*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Tb,Eb]=Jy(`SelectGroup`),Db=d.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=Mh();return(0,f.jsx)(Tb,{scope:n,id:i,children:(0,f.jsx)(R.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),Ob=`SelectLabel`,kb=d.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=Eb(Ob,n);return(0,f.jsx)(R.div,{id:i.id,...r,ref:t})},`SelectLabel`)),Ab=`SelectItem`,[jb,Mb]=Jy(Ab),Nb=d.forwardRef($(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Qy(Ab,n),c=gb(Ab,n),l=s.value===r,[u,p]=d.useState(a??``),[m,h]=d.useState(!1),g=I(t,zn(e=>c.itemRefCallback?.(e,r,i))),_=Mh(),v=d.useRef(`touch`),y=$(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,f.jsx)(jb,{scope:n,value:r,disabled:i,textId:_,isSelected:l,onItemTextChange:d.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,f.jsx)(Gy.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,f.jsx)(R.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":l&&m,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:F(o.onFocus,()=>h(!0)),onBlur:F(o.onBlur,()=>h(!1)),onClick:F(o.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:F(o.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:F(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:F(o.onPointerMove,e=>{v.current=e.pointerType,i?c.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:F(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Uy.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Pb=`SelectItemText`,Fb=d.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Qy(Pb,n),s=gb(Pb,n),c=Mb(Pb,n),l=eb(Pb,n),[u,p]=d.useState(null),m=zn(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),h=I(t,p,c.onItemTextChange,m),g=u?.textContent,_=d.useMemo(()=>(0,f.jsx)(`option`,{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return B(()=>(v(_),()=>y(_)),[v,y,_]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(R.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!qb(o.value)?Ht.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Ib=`SelectItemIndicator`,Lb=d.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return Mb(Ib,n).isSelected?(0,f.jsx)(R.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Rb=`SelectScrollUpButton`,zb=d.forwardRef($(function(e,t){let n=gb(Rb,e.__scopeSelect),r=Sb(Rb,e.__scopeSelect),[i,a]=d.useState(!1),o=I(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};$(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,f.jsx)(Hb,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Bb=`SelectScrollDownButton`,Vb=d.forwardRef($(function(e,t){let n=gb(Bb,e.__scopeSelect),r=Sb(Bb,e.__scopeSelect),[i,a]=d.useState(!1),o=I(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};$(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,f.jsx)(Hb,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Hb=d.forwardRef($(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=gb(`SelectScrollButton`,n),o=d.useRef(null),s=Ky(n),c=d.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),B(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,f.jsx)(R.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:F(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:F(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:F(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Ub=d.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return(0,f.jsx)(R.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),Wb=`SelectBubbleInput`,Gb=d.forwardRef($(function({__scopeSelect:e,...t},n){let r=Qy(Wb,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=d.useRef(null),g=I(n,h),_=i??``,v=Cv(_),y=Array.from(p).some(e=>(e.props.value??``)===``);return d.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,f.jsxs)(R.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Or,...t.style},ref:g,defaultValue:_,children:[qb(i)&&!y?(0,f.jsx)(`option`,{value:``}):null,Array.from(p)]},m)},`SelectBubbleInput`));function Kb(e){return typeof e==`function`}$(Kb,`isFunction`);function qb(e){return e===``||e===void 0}$(qb,`shouldShowPlaceholder`);function Jb(e){let t=zn(e),n=d.useRef(``),r=d.useRef(0),i=d.useCallback(e=>{let i=n.current+e;t(i),$((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=d.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}$(Jb,`useTypeaheadSearch`);function Yb(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Xb(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}$(Yb,`findNextItem`);function Xb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(Xb,`wrapArray`);var Zb=nb,Qb=Db,$b=ob,ex=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,f.jsxs)(ib,{suppressHydrationWarning:!0,className:i(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-foreground`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,f.jsx)(sb,{asChild:!0,children:(0,f.jsx)(ni,{className:`size-4 opacity-50`})})]}),tx=({className:e,...t})=>(0,f.jsx)(zb,{className:i(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,f.jsx)(ei,{})}),nx=({className:e,...t})=>(0,f.jsx)(Vb,{className:i(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,f.jsx)(Qr,{})}),rx=({className:e,children:t,position:n=`popper`,...r})=>(0,f.jsx)(ub,{children:(0,f.jsxs)(fb,{className:i(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-foreground`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,f.jsx)(tx,{}),(0,f.jsx)(wb,{className:i(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,f.jsx)(nx,{})]})}),ix=({className:e,...t})=>(0,f.jsx)(kb,{className:i(`px-1 py-0.5 font-semibold text-sm`,e),...t}),ax=({className:e,children:t,...n})=>(0,f.jsxs)(Nb,{className:i(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,f.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,f.jsx)(Lb,{children:(0,f.jsx)(Xr,{className:`size-4`})})}),(0,f.jsx)(Fb,{children:t})]}),ox=({className:e,...t})=>(0,f.jsx)(Ub,{className:i(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),sx=Zb;sx.Group=Qb,sx.Value=$b,sx.Trigger=ex,sx.ScrollUpButton=tx,sx.ScrollDownButton=nx,sx.Content=rx,sx.Label=ix,sx.Item=ax,sx.Separator=ox;var cx=Pr(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:underline hover:underline-offset-6 hover:opacity-80`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1`,button:`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,"button-outlined":`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current! px-6 text-center font-medium text-sm text-text ring-0 *:text-text hover:bg-current/30! hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,hoverable:`block rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},color:{neutral:`text-neutral`,text:`text-text`,error:`text-error`,success:`text-success`,"text-inverse":`text-text-opposite`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 text-xs max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 text-sm max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 text-lg max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 text-xl max-md:py-4`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`custom`}}),lx=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(typeof e!=`string`||e.trim()===``||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},ux=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(ux):(0,d.isValidElement)(e)?ux(e.props.children):!1,dx=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:a,label:o,className:s,isActive:c,underlined:l,locale:u,size:d,isExternalLink:p,isPageSection:m,href:h,rel:g,target:_,...v}=e,y=t===`button`||t===`button-outlined`,b=d??(y?`md`:`custom`),x=p??lx(e),S=m??h?.startsWith(`#`)??!1,C=ux(a),w=x?`noopener noreferrer nofollow`:g,T=x?`_blank`:_??`_self`,E=u&&h&&!x&&!S?Lt(h,u):h,D=E===``?void 0:E;return(0,f.jsxs)(`a`,{...v,href:D,"aria-label":o,rel:w,target:T,"aria-current":c?`page`:void 0,suppressHydrationWarning:!0,className:i(cx({variant:t,color:n,roundedSize:r,underlined:l,size:b,className:s})),children:[y&&C?(0,f.jsx)(`span`,{children:a}):a,x&&C&&(0,f.jsx)(ci,{className:`ml-2 inline-block size-4`}),S&&(0,f.jsx)(ui,{className:`ml-2 inline-block size-4`})]})},fx=e=>{let[t,n]=(0,d.useState)(e);return(0,d.useEffect)(()=>{n(e??window.document.body)},[e]),t},px=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},mx=()=>!1,hx=e=>{let{disableScroll:t=!1,element:n,key:r=`unnamed_blocker`}=e??{},i=fx(n);(0,d.useEffect)(()=>{let e=n??window.document.body;return t?px.addBlockage(r,e):px.removeBlockage(r,e),()=>{px.removeBlockage(r,e)}},[t,n,r]);let a=(0,d.useCallback)(()=>i?px.isElementScrollBlocked(i):!1,[i]);return{isScrollBlocked:(0,d.useSyncExternalStore)(px.subscribe,a,mx)}},gx=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,_x=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,vx=({className:e,...t})=>(0,f.jsx)(`h1`,{className:i(`text-3xl`,e),...t}),yx=({className:e,...t})=>(0,f.jsx)(`h2`,{className:i(`mb-2 text-2xl`,gx,e),...t}),bx=({className:e,...t})=>(0,f.jsx)(`h3`,{className:i(`mb-2 text-xl`,gx,e),...t}),xx=({className:e,...t})=>(0,f.jsx)(`h4`,{className:i(`text-lg`,gx,e),...t}),Sx=({className:e,...t})=>(0,f.jsx)(`h5`,{className:i(`text-base`,gx,e),...t}),Cx=({className:e,...t})=>(0,f.jsx)(`h6`,{className:i(`ml-3 text-base`,gx,e),...t}),wx=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Tx=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Ex=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},Dx=({H:e,children:t,className:n,isClickable:r,...a})=>{let o=typeof t==`string`?wx(t):void 0;return(0,f.jsx)(e,{id:o,onClick:r?e=>{let{id:t}=e.currentTarget;if(Ex(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Tx(t)}}:void 0,"aria-label":r?`Click to scroll to section ${o} and copy the link to the clipboard`:void 0,className:i(r&&_x,n),...a,children:t})},Ox=({isClickable:e,...t})=>(0,f.jsx)(vx,{...t}),kx=({isClickable:e=!1,...t})=>(0,f.jsx)(Dx,{H:yx,isClickable:e,...t}),Ax=({isClickable:e=!1,...t})=>(0,f.jsx)(Dx,{H:bx,isClickable:e,...t}),jx=({isClickable:e=!1,...t})=>(0,f.jsx)(Dx,{H:xx,isClickable:e,...t}),Mx=({isClickable:e=!1,...t})=>(0,f.jsx)(Dx,{H:Sx,isClickable:e,...t}),Nx=({isClickable:e=!1,...t})=>(0,f.jsx)(Dx,{H:Cx,isClickable:e,...t}),Px=Pr(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),Fx={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},Ix=Pm.create(Xm),Lx=({children:e,isOpen:t,container:n,onClose:r,hasCloseButton:a=!1,title:o,size:s=`md`,className:c,isScrollable:l=!1,disableScroll:u=!0,padding:p=`none`,...m})=>{let h=fx(n);if(hx({key:`modal`,disableScroll:t&&u}),(0,d.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t&&r&&r()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,r]),!h)return(0,f.jsx)(f.Fragment,{});let g=!!o,_=Fx[p||`none`];return(0,Ht.createPortal)((0,f.jsx)(Pm.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:t?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:e=>{e.stopPropagation(),r?.()},"aria-hidden":!t,children:(0,f.jsxs)(Ix,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:Px({size:s,className:c}),role:`dialog`,"aria-modal":!0,padding:`none`,...m,children:[(0,f.jsxs)(`div`,{className:i(`relative flex-none px-4 pt-4`,a&&g?`flex items-start`:a?`flex justify-end`:g?`items-center`:`hidden`),children:[g&&(0,f.jsx)(Ax,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:o}),a&&(0,f.jsx)(zm,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:fi,size:`icon-md`})]}),(0,f.jsx)(`div`,{className:i(`flex min-h-0 w-full flex-1 flex-col`,l===!0&&`overflow-auto`,l===`y`&&`overflow-y-auto overflow-x-hidden`,l===`x`&&`overflow-x-auto overflow-y-hidden`,!l&&`overflow-visible`),children:(0,f.jsx)(`div`,{className:i(`flex size-full flex-1 flex-col`,_),children:e})})]})}),h)},Rx=Pr(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{error:`border-error bg-error text-error`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-foreground`}},defaultVariants:{color:`text`}}),zx=Pr(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{error:`bg-error/10 aria-selected:text-foreground`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-foreground-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),Bx=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`text`,hoverable:a=!1,orientation:o=`horizontal`,className:s})=>{let c=(0,d.useRef)([]),l=(0,d.useRef)(null),{choiceIndicatorPosition:u,scheduleMeasurement:p}=Jm(c,{isHoverable:a,orientation:o});return(0,d.useEffect)(()=>{p()},[t]),(0,f.jsxs)(`div`,{className:i(Rx({color:r}),s),"aria-orientation":o,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,d.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{c.current[r]=e}})}),u&&(0,f.jsx)(`div`,{className:i(zx({color:r,orientation:o})),style:u,ref:l},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},Vx=({content:e,...t})=>{let[n,r]=(0,d.useState)(!1),[i,a]=(0,d.useState)(!1),{label:o}=Vt(`copy-button`),s=async()=>{try{a(!1);let t=typeof e==`function`?await e():e;await navigator.clipboard.writeText(t),r(!0)}catch(e){console.error(`Failed to copy text: `,e),a(!0)}};(0,d.useEffect)(()=>{if(n||i){let e=setTimeout(()=>{r(!1),a(!1)},1e3);return()=>clearTimeout(e)}},[n,i]);let c=()=>n?`Content copied to clipboard`:i?`Failed to copy content`:t.label??o.value;return(0,f.jsx)(zm,{Icon:n?ii:oi,onClick:s,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:c(),...t,label:c(),"aria-describedby":n?`copy-success`:i?`copy-error`:void 0})},Hx=(0,d.createContext)(null),Ux=e=>{let t=(0,d.useContext)(Hx)??e;return{triggerId:`unrollable-panel-button-${t}`,panelId:`unrollable-panel-${t}`}},Wx=({children:e,className:t,identifier:n,...r})=>{let a=`${n}${(0,d.useId)()}`,{triggerId:o}=Ux(a);return(0,f.jsx)(Hx,{value:a,children:(0,f.jsx)(`div`,{className:i(`group/popover relative flex cursor-pointer`,t),id:o,"aria-haspopup":!0,...r,children:e})})},Gx=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:a=`start`,yAlign:o=`below`,identifier:s,className:c,displayArrow:l=!0,...u})=>{let{triggerId:d,panelId:p}=Ux(s);return(0,f.jsx)(Xm,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":d,id:p,className:i(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,a===`start`&&`left-0`,a===`center`&&`left-1/2 -translate-x-1/2`,a===`end`&&`right-0`,o===`below`&&`top-[calc(100%+1rem)]`,o===`above`&&`bottom-[calc(100%+1rem)]`,l&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,l&&a===`start`&&`before:left-2`,l&&a===`center`&&`before:left-1/2 before:-translate-x-1/2`,l&&a===`end`&&`before:right-2`,l&&o===`below`&&`before:-top-2.5 before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,l&&o===`above`&&`before:-bottom-2.5 before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,c),...u,children:e})};Wx.Detail=Gx;var Kx=16,qx=16,Jx=e=>(0,f.jsx)(Wx,{...e}),Yx=({xAlign:e=`start`,yAlign:t=`below`,...n})=>{let r=(0,d.useRef)(null),{triggerId:i}=Ux(n.identifier),[a,o]=(0,d.useState)(e),[s,c]=(0,d.useState)(t),[l,u]=(0,d.useState)(void 0);return(0,d.useLayoutEffect)(()=>{let n=null,a=null,s=!1,l=()=>{let n=r.current,s=document.getElementById(i);if(!n||!s)return;let l=s.getBoundingClientRect(),d=window.innerWidth,f=window.innerHeight,p=d-l.left-qx,m=l.right-qx;u(Math.max(p,m));let h=n.classList.contains(`invisible`);h&&(n.style.visibility=`hidden`,n.classList.remove(`invisible`)),a=Wm(()=>{a=null;let r=n.getBoundingClientRect();h&&(n.style.visibility=``,n.classList.add(`invisible`));let i=t,s=f-l.bottom-Kx,u=l.top-Kx;t===`below`&&s<r.height?u>=r.height&&(i=`above`):t===`above`&&u<r.height&&s>=r.height&&(i=`below`);let p=e,m=d-l.left-qx,g=l.right-qx;e===`start`&&m<r.width?g>=r.width&&(p=`end`):e===`end`&&g<r.width&&m>=r.width&&(p=`start`),c(i),o(p)})},d=()=>{n||=Wm(()=>{n=null,l()})},f=()=>{s||(s=!0,window.addEventListener(`scroll`,d,{passive:!0,capture:!0})),d()},p=()=>{s&&(s=!1,window.removeEventListener(`scroll`,d,!0))},m=document.getElementById(i);m&&(m.addEventListener(`mouseenter`,f,{passive:!0}),m.addEventListener(`focusin`,f,{passive:!0}),m.addEventListener(`mouseleave`,p,{passive:!0}),m.addEventListener(`focusout`,p,{passive:!0}));let h=new ResizeObserver(()=>{s&&d()});return r.current&&h.observe(r.current),window.addEventListener(`resize`,d,{passive:!0}),()=>{n?.(),a?.(),m&&(m.removeEventListener(`mouseenter`,f),m.removeEventListener(`focusin`,f),m.removeEventListener(`mouseleave`,p),m.removeEventListener(`focusout`,p)),h.disconnect(),window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[i,e,t]),(0,f.jsx)(Gx,{...n,xAlign:a,yAlign:s,ref:r,style:{...n.style,maxWidth:l?`${l}px`:void 0}})},Xx=Jx;Xx.Detail=Yx;export{Xr as $,l as $t,Zm as A,Ve as At,Jf as B,N as Bt,F_ as C,zt as Ct,Mh as D,ot as Dt,M_ as E,vt as Et,Im as F,T as Ft,gi as G,E as Gt,Hf as H,le as Ht,Pm as I,k as It,pi as J,ce as Jt,hi as K,te as Kt,Mm as L,se as Lt,Jm as M,j as Mt,Bm as N,oe as Nt,gh as O,it as Ot,zm as P,D as Pt,Qr as Q,ue as Qt,Np as R,re as Rt,N_ as S,Vt as St,A_ as T,Ot as Tt,Vf as U,ae as Ut,Uf as V,ee as Vt,rl as W,A as Wt,oi as X,ie as Xt,fi as Y,ne as Yt,ii as Z,w as Zt,P_ as _,cn as _t,Ox as a,sr as at,L_ as b,I as bt,jx as c,tr as ct,hx as d,Jn as dt,s as en,Jr as et,fx as f,zn as ft,Mv as g,ln as gt,By as h,Cn as ht,Lx as i,xr as it,Xm as j,Ee as jt,uh as k,at as kt,Mx as l,Kn as lt,sx as m,In as mt,Vx as n,Nr as nt,kx as o,rr as ot,dx as p,R as pt,mi as q,M as qt,Bx as r,kr as rt,Ax as s,B as st,Xx as t,o as tn,Pr as tt,Nx as u,er as ut,k_ as v,rn as vt,O_ as w,Bt as wt,j_ as x,F as xt,D_ as y,$t as yt,Ap as z,O as zt};