ymy-components 0.0.60 → 0.0.62

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,3 @@
1
+ import { ReactElement } from 'react';
2
+ import { BadgeProps } from './Badge.types';
3
+ export declare function Badge({ value, label, variant, }: BadgeProps): ReactElement;
@@ -0,0 +1,7 @@
1
+ export declare const BadgeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
+ $variant: "primary" | "muted" | "success";
3
+ }>> & string;
4
+ export declare const BadgeValue: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
5
+ $variant: "primary" | "muted" | "success";
6
+ }>> & string;
7
+ export declare const BadgeLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export interface BadgeProps {
3
+ /** The primary value displayed prominently */
4
+ value: ReactNode;
5
+ /** Optional label displayed next to the value */
6
+ label?: string;
7
+ /** Visual variant (default: 'primary') */
8
+ variant?: 'primary' | 'muted' | 'success';
9
+ }
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),w=require("react"),Pr=require("react-dom"),q=require("styled-components"),Et=require("@reduxjs/toolkit"),Tr=e=>e&&e.__esModule?e:{default:e};function Er(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const L=Er(w),_=Tr(q);var It=De(),P=e=>Ce(e,It),At=De();P.write=e=>Ce(e,At);var et=De();P.onStart=e=>Ce(e,et);var Rt=De();P.onFrame=e=>Ce(e,Rt);var Ot=De();P.onFinish=e=>Ce(e,Ot);var ae=[];P.setTimeout=(e,t)=>{const n=P.now()+t,r=()=>{const s=ae.findIndex(o=>o.cancel==r);~s&&ae.splice(s,1),Z-=~s?1:0},i={time:n,handler:e,cancel:r};return ae.splice(An(n),0,i),Z+=1,Rn(),i};var An=e=>~(~ae.findIndex(t=>t.time>e)||~ae.length);P.cancel=e=>{et.delete(e),Rt.delete(e),Ot.delete(e),It.delete(e),At.delete(e)};P.sync=e=>{yt=!0,P.batchedUpdates(e),yt=!1};P.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,P.onStart(n)}return r.handler=e,r.cancel=()=>{et.delete(n),t=null},r};var jt=typeof window<"u"?window.requestAnimationFrame:()=>{};P.use=e=>jt=e;P.now=typeof performance<"u"?()=>performance.now():Date.now;P.batchedUpdates=e=>e();P.catch=console.error;P.frameLoop="always";P.advance=()=>{P.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):jn()};var X=-1,Z=0,yt=!1;function Ce(e,t){yt?(t.delete(e),e(0)):(t.add(e),Rn())}function Rn(){X<0&&(X=0,P.frameLoop!=="demand"&&jt(On))}function Ir(){X=-1}function On(){~X&&(jt(On),P.batchedUpdates(jn))}function jn(){const e=X;X=P.now();const t=An(X);if(t&&($n(ae.splice(0,t),n=>n.handler()),Z-=t),!Z){Ir();return}et.flush(),It.flush(e?Math.min(64,X-e):16.667),Rt.flush(),At.flush(),Ot.flush()}function De(){let e=new Set,t=e;return{add(n){Z+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Z-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Z-=t.size,$n(t,r=>r(n)&&e.add(r)),Z+=e.size,t=e)}}}function $n(e,t){e.forEach(n=>{try{t(n)}catch(r){P.catch(r)}})}var Ar=Object.defineProperty,Rr=(e,t)=>{for(var n in t)Ar(e,n,{get:t[n],enumerable:!0})},U={};Rr(U,{assign:()=>jr,colors:()=>J,createStringInterpolator:()=>Ct,skipAnimation:()=>Dn,to:()=>Cn,willAdvance:()=>Dt});function vt(){}var Or=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),p={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Q(e,t){if(p.arr(e)){if(!p.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var E=(e,t)=>e.forEach(t);function H(e,t,n){if(p.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var N=e=>p.und(e)?[]:p.arr(e)?e:[e];function be(e,t){if(e.size){const n=Array.from(e);e.clear(),E(n,t)}}var ve=(e,...t)=>be(e,n=>n(...t)),$t=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ct,Cn,J=null,Dn=!1,Dt=vt,jr=e=>{e.to&&(Cn=e.to),e.now&&(P.now=e.now),e.colors!==void 0&&(J=e.colors),e.skipAnimation!=null&&(Dn=e.skipAnimation),e.createStringInterpolator&&(Ct=e.createStringInterpolator),e.requestAnimationFrame&&P.use(e.requestAnimationFrame),e.batchedUpdates&&(P.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Dt=e.willAdvance),e.frameLoop&&(P.frameLoop=e.frameLoop)},we=new Set,z=[],ut=[],qe=0,tt={get idle(){return!we.size&&!z.length},start(e){qe>e.priority?(we.add(e),P.onStart($r)):(Nn(e),P(bt))},advance:bt,sort(e){if(qe)P.onFrame(()=>tt.sort(e));else{const t=z.indexOf(e);~t&&(z.splice(t,1),Ln(e))}},clear(){z=[],we.clear()}};function $r(){we.forEach(Nn),we.clear(),P(bt)}function Nn(e){z.includes(e)||Ln(e)}function Ln(e){z.splice(Cr(z,t=>t.priority>e.priority),0,e)}function bt(e){const t=ut;for(let n=0;n<z.length;n++){const r=z[n];qe=r.priority,r.idle||(Dt(r),r.advance(e),r.idle||t.push(r))}return qe=0,ut=z,ut.length=0,z=t,z.length>0}function Cr(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Dr={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},B="[-+]?\\d*\\.?\\d+",Qe=B+"%";function nt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Nr=new RegExp("rgb"+nt(B,B,B)),Lr=new RegExp("rgba"+nt(B,B,B,B)),Vr=new RegExp("hsl"+nt(B,Qe,Qe)),Mr=new RegExp("hsla"+nt(B,Qe,Qe,B)),zr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Fr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Br=/^#([0-9a-fA-F]{6})$/,Ur=/^#([0-9a-fA-F]{8})$/;function Gr(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Br.exec(e))?parseInt(t[1]+"ff",16)>>>0:J&&J[e]!==void 0?J[e]:(t=Nr.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|255)>>>0:(t=Lr.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|Qt(t[4]))>>>0:(t=zr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ur.exec(e))?parseInt(t[1],16)>>>0:(t=Fr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Vr.exec(e))?(Ht(qt(t[1]),Fe(t[2]),Fe(t[3]))|255)>>>0:(t=Mr.exec(e))?(Ht(qt(t[1]),Fe(t[2]),Fe(t[3]))|Qt(t[4]))>>>0:null}function lt(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ht(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=lt(i,r,e+1/3),o=lt(i,r,e),a=lt(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function se(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function qt(e){return(parseFloat(e)%360+360)%360/360}function Qt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Fe(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Wt(e){let t=Gr(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}var Se=(e,t,n)=>{if(p.fun(e))return e;if(p.arr(e))return Se({range:e,output:t,extrapolate:n});if(p.str(e.output[0]))return Ct(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const u=qr(c,s);return Hr(c,s[u],s[u+1],i[u],i[u+1],l,o,a,r.map)}};function Hr(e,t,n,r,i,s,o,a,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=s(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function qr(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Qr={linear:e=>e},ke=Symbol.for("FluidValue.get"),ue=Symbol.for("FluidValue.observers"),V=e=>!!(e&&e[ke]),C=e=>e&&e[ke]?e[ke]():e,Yt=e=>e[ue]||null;function Wr(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Pe(e,t){const n=e[ue];n&&n.forEach(r=>{Wr(r,t)})}var Vn=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Yr(this,e)}},Yr=(e,t)=>Mn(e,ke,t);function de(e,t){if(e[ke]){let n=e[ue];n||Mn(e,ue,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Te(e,t){const n=e[ue];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ue]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Mn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ue=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Kr=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Kt=new RegExp(`(${Ue.source})(%|[a-z]+)`,"i"),Xr=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,rt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,zn=e=>{const[t,n]=Zr(e);if(!t||$t())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&rt.test(n))return zn(n);if(n)return n}return e},Zr=e=>{const t=rt.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},dt,Jr=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Fn=e=>{dt||(dt=J?new RegExp(`(${Object.keys(J).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>C(s).replace(rt,zn).replace(Kr,Wt).replace(dt,Wt)),n=t.map(s=>s.match(Ue).map(Number)),i=n[0].map((s,o)=>n.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>Se({...e,output:s}));return s=>{var l;const o=!Kt.test(t[0])&&((l=t.find(c=>Kt.test(c)))==null?void 0:l.replace(Ue,""));let a=0;return t[0].replace(Ue,()=>`${i[a++](s)}${o||""}`).replace(Xr,Jr)}},Nt="react-spring: ",Bn=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Nt}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},ei=Bn(console.warn);function ti(){ei(`${Nt}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ni=Bn(console.warn);function ri(){ni(`${Nt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function it(e){return p.str(e)&&(e[0]=="#"||/\d/.test(e)||!$t()&&rt.test(e)||e in(J||{}))}var Lt=$t()?w.useEffect:w.useLayoutEffect,ii=()=>{const e=w.useRef(!1);return Lt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Un(){const e=w.useState()[1],t=ii();return()=>{t.current&&e(Math.random())}}function si(e,t){const[n]=w.useState(()=>({inputs:t,result:e()})),r=w.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&oi(t,s.inputs)||(s={inputs:t,result:e()}):s=n,w.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function oi(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Gn=e=>w.useEffect(e,ai),ai=[];function Xt(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}var Ee=Symbol.for("Animated:node"),ci=e=>!!e&&e[Ee]===e,G=e=>e&&e[Ee],Vt=(e,t)=>Or(e,Ee,t),st=e=>e&&e[Ee]&&e[Ee].getPayload(),Hn=class{constructor(){Vt(this,this)}getPayload(){return this.payload||[]}},Ne=class extends Hn{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,p.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Ne(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return p.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,p.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ie=class extends Ne{constructor(e){super(0),this._string=null,this._toString=Se({output:[e,e]})}static create(e){return new Ie(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(p.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Se({output:[this.getValue(),e]})),this._value=0,super.reset()}},We={dependencies:null},ot=class extends Hn{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return H(this.source,(n,r)=>{ci(n)?t[r]=n.getValue(e):V(n)?t[r]=C(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&E(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return H(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){We.dependencies&&V(e)&&We.dependencies.add(e);const t=st(e);t&&E(t,n=>this.add(n))}},qn=class extends ot{constructor(e){super(e)}static create(e){return new qn(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(ui)),!0)}};function ui(e){return(it(e)?Ie:Ne).create(e)}function wt(e){const t=G(e);return t?t.constructor:p.arr(e)?qn:it(e)?Ie:Ne}var Zt=(e,t)=>{const n=!p.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((r,i)=>{const s=w.useRef(null),o=n&&w.useCallback(y=>{s.current=fi(i,y)},[i]),[a,l]=di(r,t),c=Un(),u=()=>{const y=s.current;if(n&&!y)return;(y?t.applyAnimatedValues(y,a.getValue(!0)):!1)===!1&&c()},d=new li(u,l),f=w.useRef();Lt(()=>(f.current=d,E(l,y=>de(y,d)),()=>{f.current&&(E(f.current.deps,y=>Te(y,f.current)),P.cancel(f.current.update))})),w.useEffect(u,[]),Gn(()=>()=>{const y=f.current;E(y.deps,m=>Te(m,y))});const g=t.getComponentProps(a.getValue());return L.createElement(e,{...g,ref:o})})},li=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&P.write(this.update)}};function di(e,t){const n=new Set;return We.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ot(e),We.dependencies=null,[e,n]}function fi(e,t){return e&&(p.fun(e)?e(t):e.current=t),t}var Jt=Symbol.for("AnimatedComponent"),hi=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new ot(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const a=en(o)||"Anonymous";return p.str(o)?o=s[o]||(s[o]=Zt(o,i)):o=o[Jt]||(o[Jt]=Zt(o,i)),o.displayName=`Animated(${a})`,o};return H(e,(o,a)=>{p.arr(e)&&(a=en(o)),s[a]=s(o)}),{animated:s}},en=e=>p.str(e)?e:e&&p.str(e.displayName)?e.displayName:p.fun(e)&&e.name||null;function ne(e,...t){return p.fun(e)?e(...t):e}var xe=(e,t)=>e===!0||!!(t&&e&&(p.fun(e)?e(t):N(e).includes(t))),Qn=(e,t)=>p.obj(e)?t&&e[t]:e,Wn=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,pi=e=>e,Mt=(e,t=pi)=>{let n=mi;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const s=t(e[i],i);p.und(s)||(r[i]=s)}return r},mi=["config","onProps","onStart","onChange","onPause","onResume","onRest"],gi={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yi(e){const t={};let n=0;if(H(e,(r,i)=>{gi[i]||(t[i]=r,n++)}),n)return t}function Yn(e){const t=yi(e);if(t){const n={to:t};return H(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ae(e){return e=C(e),p.arr(e)?e.map(Ae):it(e)?U.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function vi(e){for(const t in e)return!0;return!1}function xt(e){return p.fun(e)||p.arr(e)&&p.obj(e[0])}function bi(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function wi(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var xi={default:{tension:170,friction:26}},_t={...xi.default,mass:1,damping:1,easing:Qr.linear,clamp:!1},_i=class{constructor(){this.velocity=0,Object.assign(this,_t)}};function Si(e,t,n){n&&(n={...n},tn(n,t),t={...n,...t}),tn(e,t),Object.assign(e,t);for(const o in _t)e[o]==null&&(e[o]=_t[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return p.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r),e}function tn(e,t){if(!p.und(t.decay))e.duration=void 0;else{const n=!p.und(t.tension)||!p.und(t.friction);(n||!p.und(t.frequency)||!p.und(t.damping)||!p.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var nn=[],ki=class{constructor(){this.changed=!1,this.values=nn,this.toValues=null,this.fromValues=nn,this.config=new _i,this.immediate=!1}};function Kn(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,a)=>{let l,c,u=xe(n.cancel??(r==null?void 0:r.cancel),t);if(u)g();else{p.und(n.pause)||(i.paused=xe(n.pause,t));let y=r==null?void 0:r.pause;y!==!0&&(y=i.paused||xe(y,t)),l=ne(n.delay||0,t),y?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),l=c.time-P.now()}function f(){l>0&&!U.skipAnimation?(i.delayed=!0,c=P.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{s.start({...n,callId:e,cancel:u},o)}catch(y){a(y)}}})}var zt=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ce(e.get()):t.every(n=>n.noop)?Xn(e.get()):F(e.get(),t.every(n=>n.finished)),Xn=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),F=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ce=e=>({value:e,cancelled:!0,finished:!1});function Zn(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:l}=n;return!s&&e===a&&!t.reset?l:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=Mt(t,(v,b)=>b==="onRest"?void 0:v);let u,d;const f=new Promise((v,b)=>(u=v,d=b)),g=v=>{const b=i<=(n.cancelId||0)&&ce(r)||i!==n.asyncId&&F(r,!1);if(b)throw v.result=b,d(v),v},y=(v,b)=>{const S=new rn,x=new sn;return(async()=>{if(U.skipAnimation)throw Re(n),x.result=F(r,!1),d(x),x;g(S);const T=p.obj(v)?{...v}:{...b,to:v};T.parentId=i,H(c,(A,R)=>{p.und(T[R])&&(T[R]=A)});const k=await r.start(T);return g(S),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),k})()};let m;if(U.skipAnimation)return Re(n),F(r,!1);try{let v;p.arr(e)?v=(async b=>{for(const S of b)await y(S)})(e):v=Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([v.then(u),f]),m=F(r.get(),!0,!1)}catch(v){if(v instanceof rn)m=v.result;else if(v instanceof sn)m=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?l:void 0)}return p.fun(o)&&P.batchedUpdates(()=>{o(m,r,r.item)}),m})()}function Re(e,t){be(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var rn=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},sn=class extends Error{constructor(){super("SkipAnimationSignal")}},St=e=>e instanceof Ft,Pi=1,Ft=class extends Vn{constructor(){super(...arguments),this.id=Pi++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=G(this);return e&&e.getValue()}to(...e){return U.to(this,e)}interpolate(...e){return ti(),U.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Pe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||tt.sort(this),Pe(this,{type:"priority",parent:this,priority:e})}},re=Symbol.for("SpringPhase"),Jn=1,er=2,tr=4,ft=e=>(e[re]&Jn)>0,K=e=>(e[re]&er)>0,fe=e=>(e[re]&tr)>0,on=(e,t)=>t?e[re]|=er|Jn:e[re]&=-3,an=(e,t)=>t?e[re]|=tr:e[re]&=-5,Ti=class extends Ft{constructor(e,t){if(super(),this.animation=new ki,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!p.und(e)||!p.und(t)){const n=p.obj(e)?{...e}:{...t,from:e};p.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(K(this)||this._state.asyncTo)||fe(this)}get goal(){return C(this.animation.to)}get velocity(){const e=G(this);return e instanceof Ne?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ft(this)}get isAnimating(){return K(this)}get isPaused(){return fe(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,o=st(r.to);!o&&V(r.to)&&(i=N(C(r.to))),r.values.forEach((c,u)=>{if(c.done)return;const d=c.constructor==Ie?1:o?o[u].lastPosition:i[u];let f=r.immediate,g=d;if(!f){if(g=c.lastPosition,s.tension<=0){c.done=!0;return}let y=c.elapsedTime+=e;const m=r.fromValues[u],v=c.v0!=null?c.v0:c.v0=p.arr(s.velocity)?s.velocity[u]:s.velocity;let b;const S=s.precision||(m==d?.005:Math.min(1,Math.abs(d-m)*.001));if(p.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,T=Math.exp(-(1-x)*y);g=m+v/(1-x)*(1-T),f=Math.abs(c.lastPosition-g)<=S,b=v*T}else{b=c.lastVelocity==null?v:c.lastVelocity;const x=s.restVelocity||S/10,T=s.clamp?0:s.bounce,k=!p.und(T),A=m==d?c.v0>0:m<d;let R,ie=!1;const O=1,te=Math.ceil(e/O);for(let D=0;D<te&&(R=Math.abs(b)>x,!(!R&&(f=Math.abs(d-g)<=S,f)));++D){k&&(ie=g==d||g>d==A,ie&&(b=-b*T,g=d));const W=-s.tension*1e-6*(g-d),Y=-s.friction*.001*b,kr=(W+Y)/s.mass;b=b+kr*O,g=g+b*O}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,c.durationProgress>0&&(c.elapsedTime=s.duration*c.durationProgress,y=c.elapsedTime+=e)),x=(s.progress||0)+y/this._memoizedDuration,x=x>1?1:x<0?0:x,c.durationProgress=x),g=m+s.easing(x)*(d-m),b=(g-c.lastPosition)/e,f=x==1}c.lastVelocity=b,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(g,s.round)&&(n=!0)});const a=G(this),l=a.getValue();if(t){const c=C(r.to);(l!==c||n)&&!s.decay?(a.setValue(c),this._onChange(c)):n&&s.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return P.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(K(this)){const{to:e,config:t}=this.animation;P.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return p.und(e)?(n=this.queue||[],this.queue=[]):n=[p.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>zt(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Re(this._state,e&&this._lastCallId),P.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=p.obj(n)?n[t]:n,(n==null||xt(n))&&(n=void 0),r=p.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return ft(this)||(e.reverse&&([n,r]=[r,n]),r=C(r),p.und(r)?G(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Mt(e,(o,a)=>/^on/.test(a)?Qn(o,n):o)),un(this,e,"onProps"),pe(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Kn(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{fe(this)||(an(this,!0),ve(s.pauseQueue),pe(this,"onPause",F(this,he(this,this.animation.to)),this))},resume:()=>{fe(this)&&(an(this,!1),K(this)&&this._resume(),ve(s.resumeQueue),pe(this,"onResume",F(this,he(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=nr(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ce(this));const r=!p.und(e.to),i=!p.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ce(this));const{key:s,defaultProps:o,animation:a}=this,{to:l,from:c}=a;let{to:u=l,from:d=c}=e;i&&!r&&(!t.default||p.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Q(d,c);f&&(a.from=d),d=C(d);const g=!Q(u,l);g&&this._focus(u);const y=xt(t.to),{config:m}=a,{decay:v,velocity:b}=m;(r||i)&&(m.velocity=0),t.config&&!y&&Si(m,ne(t.config,s),t.config!==o.config?ne(o.config,s):void 0);let S=G(this);if(!S||p.und(u))return n(F(this,!0));const x=p.und(t.reset)?i&&!t.default:!p.und(d)&&xe(t.reset,s),T=x?d:this.get(),k=Ae(u),A=p.num(k)||p.arr(k)||it(k),R=!y&&(!A||xe(o.immediate||t.immediate,s));if(g){const D=wt(u);if(D!==S.constructor)if(R)S=this._set(k);else throw Error(`Cannot animate between ${S.constructor.name} and ${D.name}, as the "to" prop suggests`)}const ie=S.constructor;let O=V(u),te=!1;if(!O){const D=x||!ft(this)&&f;(g||D)&&(te=Q(Ae(T),k),O=!te),(!Q(a.immediate,R)&&!R||!Q(m.decay,v)||!Q(m.velocity,b))&&(O=!0)}if(te&&K(this)&&(a.changed&&!x?O=!0:O||this._stop(l)),!y&&((O||V(l))&&(a.values=S.getPayload(),a.toValues=V(u)?null:ie==Ie?[1]:N(k)),a.immediate!=R&&(a.immediate=R,!R&&!x&&this._set(l)),O)){const{onRest:D}=a;E(Ii,Y=>un(this,t,Y));const W=F(this,he(this,l));ve(this._pendingCalls,W),this._pendingCalls.add(n),a.changed&&P.batchedUpdates(()=>{var Y;a.changed=!x,D==null||D(W,this),x?ne(o.onRest,W):(Y=a.onStart)==null||Y.call(a,W,this)})}x&&this._set(T),y?n(Zn(t.to,t,this._state,this)):O?this._start():K(this)&&!g?this._pendingCalls.add(n):n(Xn(T))}_focus(e){const t=this.animation;e!==t.to&&(Yt(this)&&this._detach(),t.to=e,Yt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;V(t)&&(de(t,this),St(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;V(e)&&Te(e,this)}_set(e,t=!0){const n=C(e);if(!p.und(n)){const r=G(this);if(!r||!Q(n,r.getValue())){const i=wt(n);!r||r.constructor!=i?Vt(this,i.create(n)):r.setValue(n),r&&P.batchedUpdates(()=>{this._onChange(n,t)})}}return G(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,pe(this,"onStart",F(this,he(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ne(this.animation.onChange,e,this)),ne(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;G(this).reset(C(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(on(this,!0),fe(this)||this._resume())}_resume(){U.skipAnimation?this.finish():tt.start(this)}_stop(e,t){if(K(this)){on(this,!1);const n=this.animation;E(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Pe(this,{type:"idle",parent:this});const r=t?ce(this.get()):F(this.get(),he(this,e??n.to));ve(this._pendingCalls,r),n.changed&&(n.changed=!1,pe(this,"onRest",r,this))}}};function he(e,t){const n=Ae(t),r=Ae(e.get());return Q(r,n)}function nr(e,t=e.loop,n=e.to){const r=ne(t);if(r){const i=r!==!0&&Yn(r),s=(i||e).reverse,o=!i||i.reset;return Oe({...e,loop:t,default:!1,pause:void 0,to:!s||xt(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Oe(e){const{to:t,from:n}=e=Yn(e),r=new Set;return p.obj(t)&&cn(t,r),p.obj(n)&&cn(n,r),e.keys=r.size?Array.from(r):null,e}function Ei(e){const t=Oe(e);return p.und(t.default)&&(t.default=Mt(t)),t}function cn(e,t){H(e,(n,r)=>n!=null&&t.add(r))}var Ii=["onStart","onRest","onChange","onPause","onResume"];function un(e,t,n){e.animation[n]=t[n]!==Wn(t,n)?Qn(t[n],e.key):void 0}function pe(e,t,...n){var r,i,s,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(s=e.defaultProps)[t])==null||o.call(s,...n)}var Ai=["onStart","onChange","onRest"],Ri=1,Oi=class{constructor(t,n){this.id=Ri++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];p.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(Oe(t)),this}start(t){let{queue:n}=this;return t?n=N(t).map(Oe):this.queue=[],this._flush?this._flush(this,n):(ar(this,n),kt(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;E(N(n),i=>r[i].stop(!!t))}else Re(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(p.und(t))this.start({pause:!0});else{const n=this.springs;E(N(t),r=>n[r].pause())}return this}resume(t){if(p.und(t))this.start({pause:!1});else{const n=this.springs;E(N(t),r=>n[r].resume())}return this}each(t){H(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,be(t,([l,c])=>{c.value=this.get(),l(c,this,this._item)}));const o=!i&&this._started,a=s||o&&r.size?this.get():null;s&&n.size&&be(n,([l,c])=>{c.value=a,l(c,this,this._item)}),o&&(this._started=!1,be(r,([l,c])=>{c.value=a,l(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;P.onFrame(this._onFrame)}};function kt(e,t){return Promise.all(t.map(n=>rr(e,n))).then(n=>zt(e,n))}async function rr(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:a,onResolve:l}=t,c=p.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const u=p.arr(i)||p.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):E(Ai,m=>{const v=t[m];if(p.fun(v)){const b=e._events[m];t[m]=({finished:S,cancelled:x})=>{const T=b.get(v);T?(S||(T.finished=!1),x&&(T.cancelled=!0)):b.set(v,{value:null,finished:S||!1,cancelled:x||!1})},c&&(c[m]=t[m])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,ve(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||Wn(t,"cancel")===!0;(u||g&&d.asyncId)&&f.push(Kn(++e._lastAsyncId,{props:t,state:d,actions:{pause:vt,resume:vt,start(m,v){g?(Re(d,e._lastAsyncId),v(ce(e))):(m.onRest=a,v(Zn(u,m,d,e)))}}})),d.paused&&await new Promise(m=>{d.resumeQueue.add(m)});const y=zt(e,await Promise.all(f));if(o&&y.finished&&!(n&&y.noop)){const m=nr(t,o,i);if(m)return ar(e,[m]),rr(e,m,!0)}return l&&P.batchedUpdates(()=>l(y,e,e.item)),y}function ln(e,t){const n={...e.springs};return t&&E(N(t),r=>{p.und(r.keys)&&(r=Oe(r)),p.obj(r.to)||(r={...r,to:void 0}),or(n,r,i=>sr(i))}),ir(e,n),n}function ir(e,t){H(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,de(n,e))})}function sr(e,t){const n=new Ti;return n.key=e,t&&de(n,t),n}function or(e,t,n){t.keys&&E(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ar(e,t){E(t,n=>{or(e.springs,n,r=>sr(r,e))})}var at=({children:e,...t})=>{const n=w.useContext(Ye),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=si(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=Ye;return L.createElement(s,{value:t},e)},Ye=ji(at,{});at.Provider=Ye.Provider;at.Consumer=Ye.Consumer;function ji(e,t){return Object.assign(e,L.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var $i=()=>{const e=[],t=function(r){ri();const i=[];return E(e,(s,o)=>{if(p.und(r))i.push(s.start());else{const a=n(r,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return E(e,r=>r.pause(...arguments)),this},t.resume=function(){return E(e,r=>r.resume(...arguments)),this},t.set=function(r){E(e,(i,s)=>{const o=p.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return E(e,(s,o)=>{if(p.und(r))i.push(s.start());else{const a=this._getProps(r,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return E(e,r=>r.stop(...arguments)),this},t.update=function(r){return E(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return p.fun(r)?r(s,i):r};return t._getProps=n,t};function Ci(e,t,n){const r=p.fun(t)&&t;r&&!n&&(n=[]);const i=w.useMemo(()=>r||arguments.length==3?$i():void 0,[]),s=w.useRef(0),o=Un(),a=w.useMemo(()=>({ctrls:[],queue:[],flush(b,S){const x=ln(b,S);return s.current>0&&!a.queue.length&&!Object.keys(x).some(k=>!b.springs[k])?kt(b,S):new Promise(k=>{ir(b,x),a.queue.push(()=>{k(kt(b,S))}),o()})}}),[]),l=w.useRef([...a.ctrls]),c=[],u=Xt(e)||0;w.useMemo(()=>{E(l.current.slice(e,u),b=>{bi(b,i),b.stop(!0)}),l.current.length=e,d(u,e)},[e]),w.useMemo(()=>{d(0,Math.min(u,e))},n);function d(b,S){for(let x=b;x<S;x++){const T=l.current[x]||(l.current[x]=new Oi(null,a.flush)),k=r?r(x,T):t[x];k&&(c[x]=Ei(k))}}const f=l.current.map((b,S)=>ln(b,c[S])),g=w.useContext(at),y=Xt(g),m=g!==y&&vi(g);Lt(()=>{s.current++,a.ctrls=l.current;const{queue:b}=a;b.length&&(a.queue=[],E(b,S=>S())),E(l.current,(S,x)=>{i==null||i.add(S),m&&S.start({default:g});const T=c[x];T&&(wi(S,T.ref),S.ref?S.queue.push(T):S.start(T))})}),Gn(()=>()=>{E(a.ctrls,b=>b.stop(!0))});const v=f.map(b=>({...b}));return i?[v,i]:v}function Le(e,t){const n=p.fun(e),[[r],i]=Ci(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var Di=class extends Ft{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Se(...t);const n=this._get(),r=wt(n);Vt(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Q(t,n)||(G(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&dn(this._active)&&ht(this)}_get(){const e=p.arr(this.source)?this.source.map(C):N(C(this.source));return this.calc(...e)}_start(){this.idle&&!dn(this._active)&&(this.idle=!1,E(st(this),e=>{e.done=!1}),U.skipAnimation?(P.batchedUpdates(()=>this.advance()),ht(this)):tt.start(this))}_attach(){let e=1;E(N(this.source),t=>{V(t)&&de(t,this),St(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){E(N(this.source),e=>{V(e)&&Te(e,this)}),this._active.clear(),ht(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=N(this.source).reduce((t,n)=>Math.max(t,(St(n)?n.priority:0)+1),0))}};function Ni(e){return e.idle!==!1}function dn(e){return!e.size||Array.from(e).every(Ni)}function ht(e){e.idle||(e.idle=!0,E(st(e),t=>{t.done=!0}),Pe(e,{type:"idle",parent:e}))}U.assign({createStringInterpolator:Fn,to:(e,t)=>new Di(e,t)});var cr=/^--/;function Li(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!cr.test(e)&&!(_e.hasOwnProperty(e)&&_e[e])?t+"px":(""+t).trim()}var fn={};function Vi(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:fn[f]||(fn[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));s!==void 0&&(e.textContent=s);for(const f in i)if(i.hasOwnProperty(f)){const g=Li(f,i[f]);cr.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,u[g])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var _e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mi=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),zi=["Webkit","Ms","Moz","O"];_e=Object.keys(_e).reduce((e,t)=>(zi.forEach(n=>e[Mi(n,t)]=e[t]),e),_e);var Fi=/^(matrix|translate|scale|rotate|skew)/,Bi=/^(translate)/,Ui=/^(rotate|skew)/,pt=(e,t)=>p.num(e)&&e!==0?e+t:e,Ge=(e,t)=>p.arr(e)?e.every(n=>Ge(n,t)):p.num(e)?e===t:parseFloat(e)===t,Gi=class extends ot{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(o=>[`translate3d(${o.map(a=>pt(a,"px")).join(",")})`,Ge(o,0)])),H(r,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(l=>[l,l===""]);else if(Fi.test(a)){if(delete r[a],p.und(o))return;const l=Bi.test(a)?"px":Ui.test(a)?"deg":"";i.push(N(o)),s.push(a==="rotate3d"?([c,u,d,f])=>[`rotate3d(${c},${u},${d},${pt(f,l)})`,Ge(f,0)]:c=>[`${a}(${c.map(u=>pt(u,l)).join(",")})`,Ge(c,a.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Hi(i,s)),super(r)}},Hi=class extends Vn{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return E(this.inputs,(n,r)=>{const i=C(n[0]),[s,o]=this.transforms[r](p.arr(i)?i:n.map(C));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&E(this.inputs,t=>E(t,n=>V(n)&&de(n,this)))}observerRemoved(e){e==0&&E(this.inputs,t=>E(t,n=>V(n)&&Te(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Pe(this,e)}},qi=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];U.assign({batchedUpdates:Pr.unstable_batchedUpdates,createStringInterpolator:Fn,colors:Dr});var Qi=hi(qi,{applyAnimatedValues:Vi,createAnimatedStyle:e=>new Gi(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),le=Qi.animated;function Bt({animate:e=!0,content:t,textStyles:n,htmlElement:r,fadeIn:i,characterPreference:s="simplified",maxDelay:o=15e3}){const a=r??"div",[l,c]=w.useState(!1),[u,d]=Le(()=>({opacity:i?0:1,transform:i?"scale(0)":"scale(1)",config:{duration:200}})),f=w.useRef(e);w.useEffect(()=>{if(!e){f.current=e;return}const te=!f.current&&e;f.current=e;const D=te?500:Math.floor(Math.random()*(o-3500+1))+3500,W=setTimeout(()=>{d.start({opacity:0,transform:"translateY(15px)",onRest:()=>{c(Y=>!Y),d.start({opacity:1,transform:"translateY(0px)"})}})},D);return()=>clearTimeout(W)},[l,e,d,o]);const g=s==="traditional"?t.traditional:t.simplified,y=e&&l?g:t.english,{fontSize:m,fontFamily:v,fontWeight:b,fontStyle:S,letterSpacing:x,lineHeight:T,...k}=n||{},A={fontSize:m,fontFamily:v,fontWeight:b,fontStyle:S,letterSpacing:x,lineHeight:T},R={...k,display:"inline-grid",alignContent:"center"},ie={...A,gridArea:"1 / 1"},O={...A,gridArea:"1 / 1",visibility:"hidden"};return h.jsx(le.div,{style:{...u,display:"inline-block"},children:h.jsxs(a,{style:R,children:[h.jsx("span",{style:ie,children:y}),h.jsx("span",{style:O,children:t.english}),h.jsx("span",{style:O,children:t.simplified}),h.jsx("span",{style:O,children:t.traditional})]})})}const Wi=q.keyframes`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),w=require("react"),Pr=require("react-dom"),N=require("styled-components"),Et=require("@reduxjs/toolkit"),Tr=e=>e&&e.__esModule?e:{default:e};function Er(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const V=Er(w),_=Tr(N);var It=De(),P=e=>Ce(e,It),At=De();P.write=e=>Ce(e,At);var et=De();P.onStart=e=>Ce(e,et);var Rt=De();P.onFrame=e=>Ce(e,Rt);var Ot=De();P.onFinish=e=>Ce(e,Ot);var ae=[];P.setTimeout=(e,t)=>{const n=P.now()+t,r=()=>{const s=ae.findIndex(o=>o.cancel==r);~s&&ae.splice(s,1),Z-=~s?1:0},i={time:n,handler:e,cancel:r};return ae.splice(An(n),0,i),Z+=1,Rn(),i};var An=e=>~(~ae.findIndex(t=>t.time>e)||~ae.length);P.cancel=e=>{et.delete(e),Rt.delete(e),Ot.delete(e),It.delete(e),At.delete(e)};P.sync=e=>{yt=!0,P.batchedUpdates(e),yt=!1};P.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,P.onStart(n)}return r.handler=e,r.cancel=()=>{et.delete(n),t=null},r};var jt=typeof window<"u"?window.requestAnimationFrame:()=>{};P.use=e=>jt=e;P.now=typeof performance<"u"?()=>performance.now():Date.now;P.batchedUpdates=e=>e();P.catch=console.error;P.frameLoop="always";P.advance=()=>{P.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):jn()};var X=-1,Z=0,yt=!1;function Ce(e,t){yt?(t.delete(e),e(0)):(t.add(e),Rn())}function Rn(){X<0&&(X=0,P.frameLoop!=="demand"&&jt(On))}function Ir(){X=-1}function On(){~X&&(jt(On),P.batchedUpdates(jn))}function jn(){const e=X;X=P.now();const t=An(X);if(t&&($n(ae.splice(0,t),n=>n.handler()),Z-=t),!Z){Ir();return}et.flush(),It.flush(e?Math.min(64,X-e):16.667),Rt.flush(),At.flush(),Ot.flush()}function De(){let e=new Set,t=e;return{add(n){Z+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Z-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Z-=t.size,$n(t,r=>r(n)&&e.add(r)),Z+=e.size,t=e)}}}function $n(e,t){e.forEach(n=>{try{t(n)}catch(r){P.catch(r)}})}var Ar=Object.defineProperty,Rr=(e,t)=>{for(var n in t)Ar(e,n,{get:t[n],enumerable:!0})},G={};Rr(G,{assign:()=>jr,colors:()=>J,createStringInterpolator:()=>Ct,skipAnimation:()=>Dn,to:()=>Cn,willAdvance:()=>Dt});function vt(){}var Or=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),p={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Q(e,t){if(p.arr(e)){if(!p.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var E=(e,t)=>e.forEach(t);function q(e,t,n){if(p.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var L=e=>p.und(e)?[]:p.arr(e)?e:[e];function be(e,t){if(e.size){const n=Array.from(e);e.clear(),E(n,t)}}var ve=(e,...t)=>be(e,n=>n(...t)),$t=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ct,Cn,J=null,Dn=!1,Dt=vt,jr=e=>{e.to&&(Cn=e.to),e.now&&(P.now=e.now),e.colors!==void 0&&(J=e.colors),e.skipAnimation!=null&&(Dn=e.skipAnimation),e.createStringInterpolator&&(Ct=e.createStringInterpolator),e.requestAnimationFrame&&P.use(e.requestAnimationFrame),e.batchedUpdates&&(P.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Dt=e.willAdvance),e.frameLoop&&(P.frameLoop=e.frameLoop)},we=new Set,F=[],ut=[],qe=0,tt={get idle(){return!we.size&&!F.length},start(e){qe>e.priority?(we.add(e),P.onStart($r)):(Ln(e),P(bt))},advance:bt,sort(e){if(qe)P.onFrame(()=>tt.sort(e));else{const t=F.indexOf(e);~t&&(F.splice(t,1),Nn(e))}},clear(){F=[],we.clear()}};function $r(){we.forEach(Ln),we.clear(),P(bt)}function Ln(e){F.includes(e)||Nn(e)}function Nn(e){F.splice(Cr(F,t=>t.priority>e.priority),0,e)}function bt(e){const t=ut;for(let n=0;n<F.length;n++){const r=F[n];qe=r.priority,r.idle||(Dt(r),r.advance(e),r.idle||t.push(r))}return qe=0,ut=F,ut.length=0,F=t,F.length>0}function Cr(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Dr={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},U="[-+]?\\d*\\.?\\d+",Qe=U+"%";function nt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Lr=new RegExp("rgb"+nt(U,U,U)),Nr=new RegExp("rgba"+nt(U,U,U,U)),Vr=new RegExp("hsl"+nt(U,Qe,Qe)),zr=new RegExp("hsla"+nt(U,Qe,Qe,U)),Mr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Fr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Br=/^#([0-9a-fA-F]{6})$/,Ur=/^#([0-9a-fA-F]{8})$/;function Gr(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Br.exec(e))?parseInt(t[1]+"ff",16)>>>0:J&&J[e]!==void 0?J[e]:(t=Lr.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|255)>>>0:(t=Nr.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|Qt(t[4]))>>>0:(t=Mr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ur.exec(e))?parseInt(t[1],16)>>>0:(t=Fr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Vr.exec(e))?(Ht(qt(t[1]),Fe(t[2]),Fe(t[3]))|255)>>>0:(t=zr.exec(e))?(Ht(qt(t[1]),Fe(t[2]),Fe(t[3]))|Qt(t[4]))>>>0:null}function lt(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ht(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=lt(i,r,e+1/3),o=lt(i,r,e),a=lt(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function se(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function qt(e){return(parseFloat(e)%360+360)%360/360}function Qt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Fe(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Wt(e){let t=Gr(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}var Se=(e,t,n)=>{if(p.fun(e))return e;if(p.arr(e))return Se({range:e,output:t,extrapolate:n});if(p.str(e.output[0]))return Ct(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const u=qr(c,s);return Hr(c,s[u],s[u+1],i[u],i[u+1],l,o,a,r.map)}};function Hr(e,t,n,r,i,s,o,a,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=s(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function qr(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Qr={linear:e=>e},ke=Symbol.for("FluidValue.get"),ue=Symbol.for("FluidValue.observers"),z=e=>!!(e&&e[ke]),C=e=>e&&e[ke]?e[ke]():e,Yt=e=>e[ue]||null;function Wr(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Pe(e,t){const n=e[ue];n&&n.forEach(r=>{Wr(r,t)})}var Vn=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Yr(this,e)}},Yr=(e,t)=>zn(e,ke,t);function de(e,t){if(e[ke]){let n=e[ue];n||zn(e,ue,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Te(e,t){const n=e[ue];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ue]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var zn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ue=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Kr=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Kt=new RegExp(`(${Ue.source})(%|[a-z]+)`,"i"),Xr=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,rt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Mn=e=>{const[t,n]=Zr(e);if(!t||$t())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&rt.test(n))return Mn(n);if(n)return n}return e},Zr=e=>{const t=rt.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},dt,Jr=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Fn=e=>{dt||(dt=J?new RegExp(`(${Object.keys(J).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>C(s).replace(rt,Mn).replace(Kr,Wt).replace(dt,Wt)),n=t.map(s=>s.match(Ue).map(Number)),i=n[0].map((s,o)=>n.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>Se({...e,output:s}));return s=>{var l;const o=!Kt.test(t[0])&&((l=t.find(c=>Kt.test(c)))==null?void 0:l.replace(Ue,""));let a=0;return t[0].replace(Ue,()=>`${i[a++](s)}${o||""}`).replace(Xr,Jr)}},Lt="react-spring: ",Bn=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Lt}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},ei=Bn(console.warn);function ti(){ei(`${Lt}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ni=Bn(console.warn);function ri(){ni(`${Lt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function it(e){return p.str(e)&&(e[0]=="#"||/\d/.test(e)||!$t()&&rt.test(e)||e in(J||{}))}var Nt=$t()?w.useEffect:w.useLayoutEffect,ii=()=>{const e=w.useRef(!1);return Nt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Un(){const e=w.useState()[1],t=ii();return()=>{t.current&&e(Math.random())}}function si(e,t){const[n]=w.useState(()=>({inputs:t,result:e()})),r=w.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&oi(t,s.inputs)||(s={inputs:t,result:e()}):s=n,w.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function oi(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Gn=e=>w.useEffect(e,ai),ai=[];function Xt(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}var Ee=Symbol.for("Animated:node"),ci=e=>!!e&&e[Ee]===e,H=e=>e&&e[Ee],Vt=(e,t)=>Or(e,Ee,t),st=e=>e&&e[Ee]&&e[Ee].getPayload(),Hn=class{constructor(){Vt(this,this)}getPayload(){return this.payload||[]}},Le=class extends Hn{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,p.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Le(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return p.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,p.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ie=class extends Le{constructor(e){super(0),this._string=null,this._toString=Se({output:[e,e]})}static create(e){return new Ie(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(p.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Se({output:[this.getValue(),e]})),this._value=0,super.reset()}},We={dependencies:null},ot=class extends Hn{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return q(this.source,(n,r)=>{ci(n)?t[r]=n.getValue(e):z(n)?t[r]=C(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&E(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return q(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){We.dependencies&&z(e)&&We.dependencies.add(e);const t=st(e);t&&E(t,n=>this.add(n))}},qn=class extends ot{constructor(e){super(e)}static create(e){return new qn(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(ui)),!0)}};function ui(e){return(it(e)?Ie:Le).create(e)}function wt(e){const t=H(e);return t?t.constructor:p.arr(e)?qn:it(e)?Ie:Le}var Zt=(e,t)=>{const n=!p.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((r,i)=>{const s=w.useRef(null),o=n&&w.useCallback(y=>{s.current=fi(i,y)},[i]),[a,l]=di(r,t),c=Un(),u=()=>{const y=s.current;if(n&&!y)return;(y?t.applyAnimatedValues(y,a.getValue(!0)):!1)===!1&&c()},d=new li(u,l),f=w.useRef();Nt(()=>(f.current=d,E(l,y=>de(y,d)),()=>{f.current&&(E(f.current.deps,y=>Te(y,f.current)),P.cancel(f.current.update))})),w.useEffect(u,[]),Gn(()=>()=>{const y=f.current;E(y.deps,m=>Te(m,y))});const g=t.getComponentProps(a.getValue());return V.createElement(e,{...g,ref:o})})},li=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&P.write(this.update)}};function di(e,t){const n=new Set;return We.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ot(e),We.dependencies=null,[e,n]}function fi(e,t){return e&&(p.fun(e)?e(t):e.current=t),t}var Jt=Symbol.for("AnimatedComponent"),hi=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new ot(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const a=en(o)||"Anonymous";return p.str(o)?o=s[o]||(s[o]=Zt(o,i)):o=o[Jt]||(o[Jt]=Zt(o,i)),o.displayName=`Animated(${a})`,o};return q(e,(o,a)=>{p.arr(e)&&(a=en(o)),s[a]=s(o)}),{animated:s}},en=e=>p.str(e)?e:e&&p.str(e.displayName)?e.displayName:p.fun(e)&&e.name||null;function ne(e,...t){return p.fun(e)?e(...t):e}var xe=(e,t)=>e===!0||!!(t&&e&&(p.fun(e)?e(t):L(e).includes(t))),Qn=(e,t)=>p.obj(e)?t&&e[t]:e,Wn=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,pi=e=>e,zt=(e,t=pi)=>{let n=mi;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const s=t(e[i],i);p.und(s)||(r[i]=s)}return r},mi=["config","onProps","onStart","onChange","onPause","onResume","onRest"],gi={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yi(e){const t={};let n=0;if(q(e,(r,i)=>{gi[i]||(t[i]=r,n++)}),n)return t}function Yn(e){const t=yi(e);if(t){const n={to:t};return q(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ae(e){return e=C(e),p.arr(e)?e.map(Ae):it(e)?G.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function vi(e){for(const t in e)return!0;return!1}function xt(e){return p.fun(e)||p.arr(e)&&p.obj(e[0])}function bi(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function wi(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var xi={default:{tension:170,friction:26}},_t={...xi.default,mass:1,damping:1,easing:Qr.linear,clamp:!1},_i=class{constructor(){this.velocity=0,Object.assign(this,_t)}};function Si(e,t,n){n&&(n={...n},tn(n,t),t={...n,...t}),tn(e,t),Object.assign(e,t);for(const o in _t)e[o]==null&&(e[o]=_t[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return p.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r),e}function tn(e,t){if(!p.und(t.decay))e.duration=void 0;else{const n=!p.und(t.tension)||!p.und(t.friction);(n||!p.und(t.frequency)||!p.und(t.damping)||!p.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var nn=[],ki=class{constructor(){this.changed=!1,this.values=nn,this.toValues=null,this.fromValues=nn,this.config=new _i,this.immediate=!1}};function Kn(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,a)=>{let l,c,u=xe(n.cancel??(r==null?void 0:r.cancel),t);if(u)g();else{p.und(n.pause)||(i.paused=xe(n.pause,t));let y=r==null?void 0:r.pause;y!==!0&&(y=i.paused||xe(y,t)),l=ne(n.delay||0,t),y?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),l=c.time-P.now()}function f(){l>0&&!G.skipAnimation?(i.delayed=!0,c=P.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{s.start({...n,callId:e,cancel:u},o)}catch(y){a(y)}}})}var Mt=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ce(e.get()):t.every(n=>n.noop)?Xn(e.get()):B(e.get(),t.every(n=>n.finished)),Xn=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),B=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ce=e=>({value:e,cancelled:!0,finished:!1});function Zn(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:l}=n;return!s&&e===a&&!t.reset?l:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=zt(t,(v,b)=>b==="onRest"?void 0:v);let u,d;const f=new Promise((v,b)=>(u=v,d=b)),g=v=>{const b=i<=(n.cancelId||0)&&ce(r)||i!==n.asyncId&&B(r,!1);if(b)throw v.result=b,d(v),v},y=(v,b)=>{const S=new rn,x=new sn;return(async()=>{if(G.skipAnimation)throw Re(n),x.result=B(r,!1),d(x),x;g(S);const T=p.obj(v)?{...v}:{...b,to:v};T.parentId=i,q(c,(A,R)=>{p.und(T[R])&&(T[R]=A)});const k=await r.start(T);return g(S),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),k})()};let m;if(G.skipAnimation)return Re(n),B(r,!1);try{let v;p.arr(e)?v=(async b=>{for(const S of b)await y(S)})(e):v=Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([v.then(u),f]),m=B(r.get(),!0,!1)}catch(v){if(v instanceof rn)m=v.result;else if(v instanceof sn)m=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?l:void 0)}return p.fun(o)&&P.batchedUpdates(()=>{o(m,r,r.item)}),m})()}function Re(e,t){be(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var rn=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},sn=class extends Error{constructor(){super("SkipAnimationSignal")}},St=e=>e instanceof Ft,Pi=1,Ft=class extends Vn{constructor(){super(...arguments),this.id=Pi++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=H(this);return e&&e.getValue()}to(...e){return G.to(this,e)}interpolate(...e){return ti(),G.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Pe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||tt.sort(this),Pe(this,{type:"priority",parent:this,priority:e})}},re=Symbol.for("SpringPhase"),Jn=1,er=2,tr=4,ft=e=>(e[re]&Jn)>0,K=e=>(e[re]&er)>0,fe=e=>(e[re]&tr)>0,on=(e,t)=>t?e[re]|=er|Jn:e[re]&=-3,an=(e,t)=>t?e[re]|=tr:e[re]&=-5,Ti=class extends Ft{constructor(e,t){if(super(),this.animation=new ki,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!p.und(e)||!p.und(t)){const n=p.obj(e)?{...e}:{...t,from:e};p.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(K(this)||this._state.asyncTo)||fe(this)}get goal(){return C(this.animation.to)}get velocity(){const e=H(this);return e instanceof Le?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ft(this)}get isAnimating(){return K(this)}get isPaused(){return fe(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,o=st(r.to);!o&&z(r.to)&&(i=L(C(r.to))),r.values.forEach((c,u)=>{if(c.done)return;const d=c.constructor==Ie?1:o?o[u].lastPosition:i[u];let f=r.immediate,g=d;if(!f){if(g=c.lastPosition,s.tension<=0){c.done=!0;return}let y=c.elapsedTime+=e;const m=r.fromValues[u],v=c.v0!=null?c.v0:c.v0=p.arr(s.velocity)?s.velocity[u]:s.velocity;let b;const S=s.precision||(m==d?.005:Math.min(1,Math.abs(d-m)*.001));if(p.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,T=Math.exp(-(1-x)*y);g=m+v/(1-x)*(1-T),f=Math.abs(c.lastPosition-g)<=S,b=v*T}else{b=c.lastVelocity==null?v:c.lastVelocity;const x=s.restVelocity||S/10,T=s.clamp?0:s.bounce,k=!p.und(T),A=m==d?c.v0>0:m<d;let R,ie=!1;const O=1,te=Math.ceil(e/O);for(let D=0;D<te&&(R=Math.abs(b)>x,!(!R&&(f=Math.abs(d-g)<=S,f)));++D){k&&(ie=g==d||g>d==A,ie&&(b=-b*T,g=d));const W=-s.tension*1e-6*(g-d),Y=-s.friction*.001*b,kr=(W+Y)/s.mass;b=b+kr*O,g=g+b*O}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,c.durationProgress>0&&(c.elapsedTime=s.duration*c.durationProgress,y=c.elapsedTime+=e)),x=(s.progress||0)+y/this._memoizedDuration,x=x>1?1:x<0?0:x,c.durationProgress=x),g=m+s.easing(x)*(d-m),b=(g-c.lastPosition)/e,f=x==1}c.lastVelocity=b,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?c.done=!0:t=!1,c.setValue(g,s.round)&&(n=!0)});const a=H(this),l=a.getValue();if(t){const c=C(r.to);(l!==c||n)&&!s.decay?(a.setValue(c),this._onChange(c)):n&&s.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return P.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(K(this)){const{to:e,config:t}=this.animation;P.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return p.und(e)?(n=this.queue||[],this.queue=[]):n=[p.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Mt(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Re(this._state,e&&this._lastCallId),P.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=p.obj(n)?n[t]:n,(n==null||xt(n))&&(n=void 0),r=p.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return ft(this)||(e.reverse&&([n,r]=[r,n]),r=C(r),p.und(r)?H(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,zt(e,(o,a)=>/^on/.test(a)?Qn(o,n):o)),un(this,e,"onProps"),pe(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Kn(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{fe(this)||(an(this,!0),ve(s.pauseQueue),pe(this,"onPause",B(this,he(this,this.animation.to)),this))},resume:()=>{fe(this)&&(an(this,!1),K(this)&&this._resume(),ve(s.resumeQueue),pe(this,"onResume",B(this,he(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=nr(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ce(this));const r=!p.und(e.to),i=!p.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ce(this));const{key:s,defaultProps:o,animation:a}=this,{to:l,from:c}=a;let{to:u=l,from:d=c}=e;i&&!r&&(!t.default||p.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Q(d,c);f&&(a.from=d),d=C(d);const g=!Q(u,l);g&&this._focus(u);const y=xt(t.to),{config:m}=a,{decay:v,velocity:b}=m;(r||i)&&(m.velocity=0),t.config&&!y&&Si(m,ne(t.config,s),t.config!==o.config?ne(o.config,s):void 0);let S=H(this);if(!S||p.und(u))return n(B(this,!0));const x=p.und(t.reset)?i&&!t.default:!p.und(d)&&xe(t.reset,s),T=x?d:this.get(),k=Ae(u),A=p.num(k)||p.arr(k)||it(k),R=!y&&(!A||xe(o.immediate||t.immediate,s));if(g){const D=wt(u);if(D!==S.constructor)if(R)S=this._set(k);else throw Error(`Cannot animate between ${S.constructor.name} and ${D.name}, as the "to" prop suggests`)}const ie=S.constructor;let O=z(u),te=!1;if(!O){const D=x||!ft(this)&&f;(g||D)&&(te=Q(Ae(T),k),O=!te),(!Q(a.immediate,R)&&!R||!Q(m.decay,v)||!Q(m.velocity,b))&&(O=!0)}if(te&&K(this)&&(a.changed&&!x?O=!0:O||this._stop(l)),!y&&((O||z(l))&&(a.values=S.getPayload(),a.toValues=z(u)?null:ie==Ie?[1]:L(k)),a.immediate!=R&&(a.immediate=R,!R&&!x&&this._set(l)),O)){const{onRest:D}=a;E(Ii,Y=>un(this,t,Y));const W=B(this,he(this,l));ve(this._pendingCalls,W),this._pendingCalls.add(n),a.changed&&P.batchedUpdates(()=>{var Y;a.changed=!x,D==null||D(W,this),x?ne(o.onRest,W):(Y=a.onStart)==null||Y.call(a,W,this)})}x&&this._set(T),y?n(Zn(t.to,t,this._state,this)):O?this._start():K(this)&&!g?this._pendingCalls.add(n):n(Xn(T))}_focus(e){const t=this.animation;e!==t.to&&(Yt(this)&&this._detach(),t.to=e,Yt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;z(t)&&(de(t,this),St(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;z(e)&&Te(e,this)}_set(e,t=!0){const n=C(e);if(!p.und(n)){const r=H(this);if(!r||!Q(n,r.getValue())){const i=wt(n);!r||r.constructor!=i?Vt(this,i.create(n)):r.setValue(n),r&&P.batchedUpdates(()=>{this._onChange(n,t)})}}return H(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,pe(this,"onStart",B(this,he(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ne(this.animation.onChange,e,this)),ne(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;H(this).reset(C(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(on(this,!0),fe(this)||this._resume())}_resume(){G.skipAnimation?this.finish():tt.start(this)}_stop(e,t){if(K(this)){on(this,!1);const n=this.animation;E(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Pe(this,{type:"idle",parent:this});const r=t?ce(this.get()):B(this.get(),he(this,e??n.to));ve(this._pendingCalls,r),n.changed&&(n.changed=!1,pe(this,"onRest",r,this))}}};function he(e,t){const n=Ae(t),r=Ae(e.get());return Q(r,n)}function nr(e,t=e.loop,n=e.to){const r=ne(t);if(r){const i=r!==!0&&Yn(r),s=(i||e).reverse,o=!i||i.reset;return Oe({...e,loop:t,default:!1,pause:void 0,to:!s||xt(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Oe(e){const{to:t,from:n}=e=Yn(e),r=new Set;return p.obj(t)&&cn(t,r),p.obj(n)&&cn(n,r),e.keys=r.size?Array.from(r):null,e}function Ei(e){const t=Oe(e);return p.und(t.default)&&(t.default=zt(t)),t}function cn(e,t){q(e,(n,r)=>n!=null&&t.add(r))}var Ii=["onStart","onRest","onChange","onPause","onResume"];function un(e,t,n){e.animation[n]=t[n]!==Wn(t,n)?Qn(t[n],e.key):void 0}function pe(e,t,...n){var r,i,s,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(s=e.defaultProps)[t])==null||o.call(s,...n)}var Ai=["onStart","onChange","onRest"],Ri=1,Oi=class{constructor(t,n){this.id=Ri++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];p.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(Oe(t)),this}start(t){let{queue:n}=this;return t?n=L(t).map(Oe):this.queue=[],this._flush?this._flush(this,n):(ar(this,n),kt(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;E(L(n),i=>r[i].stop(!!t))}else Re(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(p.und(t))this.start({pause:!0});else{const n=this.springs;E(L(t),r=>n[r].pause())}return this}resume(t){if(p.und(t))this.start({pause:!1});else{const n=this.springs;E(L(t),r=>n[r].resume())}return this}each(t){q(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,be(t,([l,c])=>{c.value=this.get(),l(c,this,this._item)}));const o=!i&&this._started,a=s||o&&r.size?this.get():null;s&&n.size&&be(n,([l,c])=>{c.value=a,l(c,this,this._item)}),o&&(this._started=!1,be(r,([l,c])=>{c.value=a,l(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;P.onFrame(this._onFrame)}};function kt(e,t){return Promise.all(t.map(n=>rr(e,n))).then(n=>Mt(e,n))}async function rr(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:a,onResolve:l}=t,c=p.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const u=p.arr(i)||p.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):E(Ai,m=>{const v=t[m];if(p.fun(v)){const b=e._events[m];t[m]=({finished:S,cancelled:x})=>{const T=b.get(v);T?(S||(T.finished=!1),x&&(T.cancelled=!0)):b.set(v,{value:null,finished:S||!1,cancelled:x||!1})},c&&(c[m]=t[m])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,ve(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||Wn(t,"cancel")===!0;(u||g&&d.asyncId)&&f.push(Kn(++e._lastAsyncId,{props:t,state:d,actions:{pause:vt,resume:vt,start(m,v){g?(Re(d,e._lastAsyncId),v(ce(e))):(m.onRest=a,v(Zn(u,m,d,e)))}}})),d.paused&&await new Promise(m=>{d.resumeQueue.add(m)});const y=Mt(e,await Promise.all(f));if(o&&y.finished&&!(n&&y.noop)){const m=nr(t,o,i);if(m)return ar(e,[m]),rr(e,m,!0)}return l&&P.batchedUpdates(()=>l(y,e,e.item)),y}function ln(e,t){const n={...e.springs};return t&&E(L(t),r=>{p.und(r.keys)&&(r=Oe(r)),p.obj(r.to)||(r={...r,to:void 0}),or(n,r,i=>sr(i))}),ir(e,n),n}function ir(e,t){q(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,de(n,e))})}function sr(e,t){const n=new Ti;return n.key=e,t&&de(n,t),n}function or(e,t,n){t.keys&&E(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ar(e,t){E(t,n=>{or(e.springs,n,r=>sr(r,e))})}var at=({children:e,...t})=>{const n=w.useContext(Ye),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=si(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=Ye;return V.createElement(s,{value:t},e)},Ye=ji(at,{});at.Provider=Ye.Provider;at.Consumer=Ye.Consumer;function ji(e,t){return Object.assign(e,V.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var $i=()=>{const e=[],t=function(r){ri();const i=[];return E(e,(s,o)=>{if(p.und(r))i.push(s.start());else{const a=n(r,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return E(e,r=>r.pause(...arguments)),this},t.resume=function(){return E(e,r=>r.resume(...arguments)),this},t.set=function(r){E(e,(i,s)=>{const o=p.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return E(e,(s,o)=>{if(p.und(r))i.push(s.start());else{const a=this._getProps(r,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return E(e,r=>r.stop(...arguments)),this},t.update=function(r){return E(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return p.fun(r)?r(s,i):r};return t._getProps=n,t};function Ci(e,t,n){const r=p.fun(t)&&t;r&&!n&&(n=[]);const i=w.useMemo(()=>r||arguments.length==3?$i():void 0,[]),s=w.useRef(0),o=Un(),a=w.useMemo(()=>({ctrls:[],queue:[],flush(b,S){const x=ln(b,S);return s.current>0&&!a.queue.length&&!Object.keys(x).some(k=>!b.springs[k])?kt(b,S):new Promise(k=>{ir(b,x),a.queue.push(()=>{k(kt(b,S))}),o()})}}),[]),l=w.useRef([...a.ctrls]),c=[],u=Xt(e)||0;w.useMemo(()=>{E(l.current.slice(e,u),b=>{bi(b,i),b.stop(!0)}),l.current.length=e,d(u,e)},[e]),w.useMemo(()=>{d(0,Math.min(u,e))},n);function d(b,S){for(let x=b;x<S;x++){const T=l.current[x]||(l.current[x]=new Oi(null,a.flush)),k=r?r(x,T):t[x];k&&(c[x]=Ei(k))}}const f=l.current.map((b,S)=>ln(b,c[S])),g=w.useContext(at),y=Xt(g),m=g!==y&&vi(g);Nt(()=>{s.current++,a.ctrls=l.current;const{queue:b}=a;b.length&&(a.queue=[],E(b,S=>S())),E(l.current,(S,x)=>{i==null||i.add(S),m&&S.start({default:g});const T=c[x];T&&(wi(S,T.ref),S.ref?S.queue.push(T):S.start(T))})}),Gn(()=>()=>{E(a.ctrls,b=>b.stop(!0))});const v=f.map(b=>({...b}));return i?[v,i]:v}function Ne(e,t){const n=p.fun(e),[[r],i]=Ci(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var Di=class extends Ft{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Se(...t);const n=this._get(),r=wt(n);Vt(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Q(t,n)||(H(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&dn(this._active)&&ht(this)}_get(){const e=p.arr(this.source)?this.source.map(C):L(C(this.source));return this.calc(...e)}_start(){this.idle&&!dn(this._active)&&(this.idle=!1,E(st(this),e=>{e.done=!1}),G.skipAnimation?(P.batchedUpdates(()=>this.advance()),ht(this)):tt.start(this))}_attach(){let e=1;E(L(this.source),t=>{z(t)&&de(t,this),St(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){E(L(this.source),e=>{z(e)&&Te(e,this)}),this._active.clear(),ht(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=L(this.source).reduce((t,n)=>Math.max(t,(St(n)?n.priority:0)+1),0))}};function Li(e){return e.idle!==!1}function dn(e){return!e.size||Array.from(e).every(Li)}function ht(e){e.idle||(e.idle=!0,E(st(e),t=>{t.done=!0}),Pe(e,{type:"idle",parent:e}))}G.assign({createStringInterpolator:Fn,to:(e,t)=>new Di(e,t)});var cr=/^--/;function Ni(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!cr.test(e)&&!(_e.hasOwnProperty(e)&&_e[e])?t+"px":(""+t).trim()}var fn={};function Vi(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:fn[f]||(fn[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));s!==void 0&&(e.textContent=s);for(const f in i)if(i.hasOwnProperty(f)){const g=Ni(f,i[f]);cr.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,u[g])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var _e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zi=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Mi=["Webkit","Ms","Moz","O"];_e=Object.keys(_e).reduce((e,t)=>(Mi.forEach(n=>e[zi(n,t)]=e[t]),e),_e);var Fi=/^(matrix|translate|scale|rotate|skew)/,Bi=/^(translate)/,Ui=/^(rotate|skew)/,pt=(e,t)=>p.num(e)&&e!==0?e+t:e,Ge=(e,t)=>p.arr(e)?e.every(n=>Ge(n,t)):p.num(e)?e===t:parseFloat(e)===t,Gi=class extends ot{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(o=>[`translate3d(${o.map(a=>pt(a,"px")).join(",")})`,Ge(o,0)])),q(r,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(l=>[l,l===""]);else if(Fi.test(a)){if(delete r[a],p.und(o))return;const l=Bi.test(a)?"px":Ui.test(a)?"deg":"";i.push(L(o)),s.push(a==="rotate3d"?([c,u,d,f])=>[`rotate3d(${c},${u},${d},${pt(f,l)})`,Ge(f,0)]:c=>[`${a}(${c.map(u=>pt(u,l)).join(",")})`,Ge(c,a.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Hi(i,s)),super(r)}},Hi=class extends Vn{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return E(this.inputs,(n,r)=>{const i=C(n[0]),[s,o]=this.transforms[r](p.arr(i)?i:n.map(C));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&E(this.inputs,t=>E(t,n=>z(n)&&de(n,this)))}observerRemoved(e){e==0&&E(this.inputs,t=>E(t,n=>z(n)&&Te(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Pe(this,e)}},qi=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];G.assign({batchedUpdates:Pr.unstable_batchedUpdates,createStringInterpolator:Fn,colors:Dr});var Qi=hi(qi,{applyAnimatedValues:Vi,createAnimatedStyle:e=>new Gi(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),le=Qi.animated;function Bt({animate:e=!0,content:t,textStyles:n,htmlElement:r,fadeIn:i,characterPreference:s="simplified",maxDelay:o=15e3}){const a=r??"div",[l,c]=w.useState(!1),[u,d]=Ne(()=>({opacity:i?0:1,transform:i?"scale(0)":"scale(1)",config:{duration:200}})),f=w.useRef(e);w.useEffect(()=>{if(!e){f.current=e;return}const te=!f.current&&e;f.current=e;const D=te?500:Math.floor(Math.random()*(o-3500+1))+3500,W=setTimeout(()=>{d.start({opacity:0,transform:"translateY(15px)",onRest:()=>{c(Y=>!Y),d.start({opacity:1,transform:"translateY(0px)"})}})},D);return()=>clearTimeout(W)},[l,e,d,o]);const g=s==="traditional"?t.traditional:t.simplified,y=e&&l?g:t.english,{fontSize:m,fontFamily:v,fontWeight:b,fontStyle:S,letterSpacing:x,lineHeight:T,...k}=n||{},A={fontSize:m,fontFamily:v,fontWeight:b,fontStyle:S,letterSpacing:x,lineHeight:T},R={...k,display:"inline-grid",alignContent:"center"},ie={...A,gridArea:"1 / 1"},O={...A,gridArea:"1 / 1",visibility:"hidden"};return h.jsx(le.div,{style:{...u,display:"inline-block"},children:h.jsxs(a,{style:R,children:[h.jsx("span",{style:ie,children:y}),h.jsx("span",{style:O,children:t.english}),h.jsx("span",{style:O,children:t.simplified}),h.jsx("span",{style:O,children:t.traditional})]})})}const Wi=N.keyframes`
2
2
  0% {
3
3
  transform: scale(1);
4
4
  }
@@ -45,7 +45,7 @@
45
45
  @media (min-width: 640px) {
46
46
  margin-right: 0.25rem;
47
47
  }
48
- `;var ur={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hn=L.default.createContext&&L.default.createContext(ur),Zi=["attr","size","title"];function Ji(e,t){if(e==null)return{};var n=es(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function es(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ke.apply(this,arguments)}function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pn(Object(n),!0).forEach(function(r){ts(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ts(e,t,n){return t=ns(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ns(e){var t=rs(e,"string");return typeof t=="symbol"?t:t+""}function rs(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lr(e){return e&&e.map((t,n)=>L.default.createElement(t.tag,Xe({key:n},t.attr),lr(t.child)))}function ee(e){return t=>L.default.createElement(is,Ke({attr:Xe({},e.attr)},t),lr(e.child))}function is(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=Ji(e,Zi),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),L.default.createElement("svg",Ke({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:Xe(Xe({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&L.default.createElement("title",null,s),e.children)};return hn!==void 0?L.default.createElement(hn.Consumer,null,n=>t(n)):t(ur)}function ss(e){return ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function os(e){return ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}const as=({iconComponent:e,buttonText:t,buttonType:n="primary",onClick:r,characterPreference:i,animate:s=!0})=>{let o;e==="plus"?o=h.jsx(ss,{}):e==="send"&&(o=h.jsx(os,{}));const a=()=>{r&&r()};return h.jsx(Yi,{onClick:a,children:h.jsxs(Ki,{className:n,children:[h.jsx(Xi,{children:o}),h.jsx(Bt,{textStyles:{lineHeight:"0.8rem",minWidth:"3rem"},content:t,animate:s,characterPreference:i})]})})},cs=_.default(le.div)`
48
+ `;var ur={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hn=V.default.createContext&&V.default.createContext(ur),Zi=["attr","size","title"];function Ji(e,t){if(e==null)return{};var n=es(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function es(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ke.apply(this,arguments)}function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pn(Object(n),!0).forEach(function(r){ts(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ts(e,t,n){return t=ns(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ns(e){var t=rs(e,"string");return typeof t=="symbol"?t:t+""}function rs(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lr(e){return e&&e.map((t,n)=>V.default.createElement(t.tag,Xe({key:n},t.attr),lr(t.child)))}function ee(e){return t=>V.default.createElement(is,Ke({attr:Xe({},e.attr)},t),lr(e.child))}function is(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=Ji(e,Zi),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),V.default.createElement("svg",Ke({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:Xe(Xe({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&V.default.createElement("title",null,s),e.children)};return hn!==void 0?V.default.createElement(hn.Consumer,null,n=>t(n)):t(ur)}function ss(e){return ee({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function os(e){return ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}const as=({iconComponent:e,buttonText:t,buttonType:n="primary",onClick:r,characterPreference:i,animate:s=!0})=>{let o;e==="plus"?o=h.jsx(ss,{}):e==="send"&&(o=h.jsx(os,{}));const a=()=>{r&&r()};return h.jsx(Yi,{onClick:a,children:h.jsxs(Ki,{className:n,children:[h.jsx(Xi,{children:o}),h.jsx(Bt,{textStyles:{lineHeight:"0.8rem",minWidth:"3rem"},content:t,animate:s,characterPreference:i})]})})},cs=_.default(le.div)`
49
49
  width: 2.5rem;
50
50
  height: 2.5rem;
51
51
  border-radius: 50%;
@@ -58,7 +58,7 @@
58
58
  display: flex;
59
59
  color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSurface)||"black"}};
60
60
  font-size: 1.125rem;
61
- `;function ls(e){return ee({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"},child:[]}]})(e)}function ds(e){return ee({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 .5A.5.5 0 0 1 .5 0h3a.5.5 0 0 1 0 1H1v2.5a.5.5 0 0 1-1 0zm12 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V1h-2.5a.5.5 0 0 1-.5-.5M.5 12a.5.5 0 0 1 .5.5V15h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H15v-2.5a.5.5 0 0 1 .5-.5M4 4h1v1H4z"},child:[]},{tag:"path",attr:{d:"M7 2H2v5h5zM3 3h3v3H3zm2 8H4v1h1z"},child:[]},{tag:"path",attr:{d:"M7 9H2v5h5zm-4 1h3v3H3zm8-6h1v1h-1z"},child:[]},{tag:"path",attr:{d:"M9 2h5v5H9zm1 1v3h3V3zM8 8v2h1v1H8v1h2v-2h1v2h1v-1h2v-1h-3V8zm2 2H9V9h1zm4 2h-1v1h-2v1h3zm-4 2v-1H8v1z"},child:[]},{tag:"path",attr:{d:"M12 9h2V8h-2z"},child:[]}]})(e)}const fs=({iconComponent:e,onClick:t})=>{const n=Le({from:{opacity:0,transform:"scale(0.5)"},to:{opacity:1,transform:"scale(1)"}}),r=()=>{t&&t()};let i;return e==="person"?i=h.jsx(ls,{}):e==="qr"&&(i=h.jsx(ds,{})),h.jsx(cs,{style:n,onClick:r,children:h.jsx(us,{children:i})})};function hs(e){return ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(e)}const ps=({size:e,onClick:t})=>{const n=()=>{t&&t()};return h.jsx(hs,{size:e??"1.5rem",onClick:n})},dr=q.keyframes`
61
+ `;function ls(e){return ee({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"},child:[]}]})(e)}function ds(e){return ee({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 .5A.5.5 0 0 1 .5 0h3a.5.5 0 0 1 0 1H1v2.5a.5.5 0 0 1-1 0zm12 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V1h-2.5a.5.5 0 0 1-.5-.5M.5 12a.5.5 0 0 1 .5.5V15h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H15v-2.5a.5.5 0 0 1 .5-.5M4 4h1v1H4z"},child:[]},{tag:"path",attr:{d:"M7 2H2v5h5zM3 3h3v3H3zm2 8H4v1h1z"},child:[]},{tag:"path",attr:{d:"M7 9H2v5h5zm-4 1h3v3H3zm8-6h1v1h-1z"},child:[]},{tag:"path",attr:{d:"M9 2h5v5H9zm1 1v3h3V3zM8 8v2h1v1H8v1h2v-2h1v2h1v-1h2v-1h-3V8zm2 2H9V9h1zm4 2h-1v1h-2v1h3zm-4 2v-1H8v1z"},child:[]},{tag:"path",attr:{d:"M12 9h2V8h-2z"},child:[]}]})(e)}const fs=({iconComponent:e,onClick:t})=>{const n=Ne({from:{opacity:0,transform:"scale(0.5)"},to:{opacity:1,transform:"scale(1)"}}),r=()=>{t&&t()};let i;return e==="person"?i=h.jsx(ls,{}):e==="qr"&&(i=h.jsx(ds,{})),h.jsx(cs,{style:n,onClick:r,children:h.jsx(us,{children:i})})};function hs(e){return ee({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(e)}const ps=({size:e,onClick:t})=>{const n=()=>{t&&t()};return h.jsx(hs,{size:e??"1.5rem",onClick:n})},dr=N.keyframes`
62
62
  0% {
63
63
  transform: scale(0);
64
64
  opacity: 0.6;
@@ -180,42 +180,42 @@
180
180
  transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1),
181
181
  background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
182
182
  pointer-events: none;
183
- `,fr=({checked:e,defaultChecked:t=!1,onChange:n,disabled:r=!1})=>{const[i,s]=w.useState(t),o=e!==void 0,a=o?e:i,l=c=>{if(r)return;c.target.blur();const u=!a;o||s(u),n==null||n(u)};return h.jsxs(ks,{$checked:a,onClick:c=>c.stopPropagation(),children:[h.jsx(Ss,{type:"checkbox",checked:a,onChange:l,disabled:r}),h.jsx(Ps,{$checked:a}),h.jsx(Pt,{$checked:a}),h.jsx(Ts,{$checked:a})]})},Es={translate:ws,sunny:_s,character:({size:e})=>h.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},Is=({icon:e,text:t,textContent:n,characterPreference:r,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:l,switchChecked:c,onSwitchChange:u})=>{const d=Es[e],[f,g]=w.useState(null),y=v=>{const b=v.currentTarget.getBoundingClientRect(),S=v.clientX-b.left,x=v.clientY-b.top;g({x:S,y:x,key:Date.now()}),o==="switch"&&u?u(!c):a&&a()},m=()=>o==="switch"?h.jsx(fr,{checked:c,onChange:u}):h.jsx(xs,{});return h.jsxs(gs,{onClick:y,style:l,children:[f&&h.jsx(je,{$x:f.x,$y:f.y},f.key),h.jsxs(ys,{children:[h.jsxs(vs,{children:[h.jsx(mn,{children:h.jsx(d,{size:"1rem"})}),h.jsx(bs,{children:n?h.jsx(Bt,{content:n,characterPreference:r,animate:i,maxDelay:s}):t})]}),h.jsx(mn,{children:m()})]})]})},Ze={tension:200,friction:25},As={tension:150,friction:25},Rs={tension:Ze.tension+125,friction:Ze.friction+5},$e={tension:300,friction:30},Os={tension:$e.tension*2.5,friction:$e.friction},js={tension:$e.tension*3,friction:$e.friction},$s={tension:185,friction:25},Cs={tension:50,friction:20},Ds={tension:280,friction:22,mass:1},Ns={tension:220,friction:26,mass:1},Ve="cubic-bezier(0.4, 0.0, 0.2, 1)",Ls=q.keyframes`
183
+ `,fr=({checked:e,defaultChecked:t=!1,onChange:n,disabled:r=!1})=>{const[i,s]=w.useState(t),o=e!==void 0,a=o?e:i,l=c=>{if(r)return;c.target.blur();const u=!a;o||s(u),n==null||n(u)};return h.jsxs(ks,{$checked:a,onClick:c=>c.stopPropagation(),children:[h.jsx(Ss,{type:"checkbox",checked:a,onChange:l,disabled:r}),h.jsx(Ps,{$checked:a}),h.jsx(Pt,{$checked:a}),h.jsx(Ts,{$checked:a})]})},Es={translate:ws,sunny:_s,character:({size:e})=>h.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},Is=({icon:e,text:t,textContent:n,characterPreference:r,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:l,switchChecked:c,onSwitchChange:u})=>{const d=Es[e],[f,g]=w.useState(null),y=v=>{const b=v.currentTarget.getBoundingClientRect(),S=v.clientX-b.left,x=v.clientY-b.top;g({x:S,y:x,key:Date.now()}),o==="switch"&&u?u(!c):a&&a()},m=()=>o==="switch"?h.jsx(fr,{checked:c,onChange:u}):h.jsx(xs,{});return h.jsxs(gs,{onClick:y,style:l,children:[f&&h.jsx(je,{$x:f.x,$y:f.y},f.key),h.jsxs(ys,{children:[h.jsxs(vs,{children:[h.jsx(mn,{children:h.jsx(d,{size:"1rem"})}),h.jsx(bs,{children:n?h.jsx(Bt,{content:n,characterPreference:r,animate:i,maxDelay:s}):t})]}),h.jsx(mn,{children:m()})]})]})},Ze={tension:200,friction:25},As={tension:150,friction:25},Rs={tension:Ze.tension+125,friction:Ze.friction+5},$e={tension:300,friction:30},Os={tension:$e.tension*2.5,friction:$e.friction},js={tension:$e.tension*3,friction:$e.friction},$s={tension:185,friction:25},Cs={tension:50,friction:20},Ds={tension:280,friction:22,mass:1},Ls={tension:220,friction:26,mass:1},Ve="cubic-bezier(0.4, 0.0, 0.2, 1)",Ns=N.keyframes`
184
184
  0% {
185
185
  transform: translate(-50%, -50%) rotate(0deg);
186
186
  }
187
187
  100% {
188
188
  transform: translate(-50%, -50%) rotate(-360deg);
189
189
  }
190
- `,Vs=q.keyframes`
190
+ `,Vs=N.keyframes`
191
191
  0%, 100% {
192
192
  transform: scale(1);
193
193
  }
194
194
  40% {
195
195
  transform: scale(0.5);
196
196
  }
197
- `,Ms=q.keyframes`
197
+ `,zs=N.keyframes`
198
198
  0% {
199
199
  transform: rotate(0deg);
200
200
  }
201
201
  100% {
202
202
  transform: rotate(540deg);
203
203
  }
204
- `,zs=q.keyframes`
204
+ `,Ms=N.keyframes`
205
205
  0% {
206
206
  transform: translateX(-50%) rotate(0deg);
207
207
  }
208
208
  100% {
209
209
  transform: translateX(-50%) rotate(-900deg);
210
210
  }
211
- `,Fs=q.keyframes`
211
+ `,Fs=N.keyframes`
212
212
  0% {
213
213
  transform: translate(-50%, -50%) rotate(0deg);
214
214
  }
215
215
  100% {
216
216
  transform: translate(-50%, -50%) rotate(-1620deg);
217
217
  }
218
- `,hr=q.keyframes`
218
+ `,hr=N.keyframes`
219
219
  0% {
220
220
  opacity: 0;
221
221
  }
@@ -236,7 +236,7 @@
236
236
  width: 200px;
237
237
  height: 200px;
238
238
  opacity: 0;
239
- animation: ${hr} 0.25s ease-out forwards, ${Ms} 1.75s ${Ve} 0.25s infinite;
239
+ animation: ${hr} 0.25s ease-out forwards, ${zs} 1.75s ${Ve} 0.25s infinite;
240
240
  will-change: transform, opacity;
241
241
  `,gn=_.default.span`
242
242
  position: absolute;
@@ -246,7 +246,7 @@
246
246
  color: ${({$color:e,theme:t})=>{var n;return e||((n=t.colors)==null?void 0:n.secondaryLight)||"#ffb652"}};
247
247
  ${({$position:e})=>e==="top"?"top: 0;":"bottom: 0;"}
248
248
  transform: translateX(-50%);
249
- animation: ${zs} 1.75s ${Ve} 0.25s infinite;
249
+ animation: ${Ms} 1.75s ${Ve} 0.25s infinite;
250
250
  will-change: transform;
251
251
  text-shadow: 1px 1px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
252
252
  2px 2px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
@@ -279,7 +279,7 @@
279
279
  filter: drop-shadow(0 0 30px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadow)||"rgba(0, 0, 0, 0.26)"}});
280
280
  transform-origin: center;
281
281
  opacity: 0;
282
- animation: ${hr} 0.15s ease-out forwards, ${Ls} 2s ${Ve} infinite forwards;
282
+ animation: ${hr} 0.15s ease-out forwards, ${Ns} 2s ${Ve} infinite forwards;
283
283
  will-change: transform, opacity;
284
284
  pointer-events: none;
285
285
  z-index: -1;
@@ -295,7 +295,7 @@
295
295
  position: absolute;
296
296
  width: 0;
297
297
  height: 0;
298
- `,Ws=({isLoading:e,onExitComplete:t,orbitingContent:n="有",centerContent:r="没",orbitingColor:i,centerColor:s})=>{const[o,a]=w.useState(!0),[l,c]=Le(()=>({opacity:1,scale:1}));return w.useEffect(()=>{e||c.start({opacity:0,scale:1.1,config:Ze,onRest:()=>{a(!1),t==null||t()}})},[e,c,t]),o?h.jsxs(Bs,{style:{opacity:l.opacity,transform:l.scale.to(u=>`scale(${u})`)},children:[h.jsx(Qs,{children:h.jsx("defs",{children:h.jsx("clipPath",{id:"rounded-pentagon",clipPathUnits:"objectBoundingBox",children:h.jsx("path",{d:"M 0.5 0.05 Q 0.52 0.05, 0.54 0.07 L 0.93 0.34 Q 0.97 0.37, 0.96 0.41 L 0.81 0.92 Q 0.80 0.97, 0.75 0.97 L 0.25 0.97 Q 0.20 0.97, 0.19 0.92 L 0.04 0.41 Q 0.03 0.37, 0.07 0.34 L 0.46 0.07 Q 0.48 0.05, 0.5 0.05 Z"})})})}),h.jsx(Hs,{children:h.jsx(qs,{})}),h.jsxs(Us,{children:[h.jsx(gn,{$position:"top",$color:i,children:n}),h.jsx(Gs,{$color:s,children:r}),h.jsx(gn,{$position:"bottom",$color:i,children:n})]})]}):null},Ys=q.keyframes`
298
+ `,Ws=({isLoading:e,onExitComplete:t,orbitingContent:n="有",centerContent:r="没",orbitingColor:i,centerColor:s})=>{const[o,a]=w.useState(!0),[l,c]=Ne(()=>({opacity:1,scale:1}));return w.useEffect(()=>{e||c.start({opacity:0,scale:1.1,config:Ze,onRest:()=>{a(!1),t==null||t()}})},[e,c,t]),o?h.jsxs(Bs,{style:{opacity:l.opacity,transform:l.scale.to(u=>`scale(${u})`)},children:[h.jsx(Qs,{children:h.jsx("defs",{children:h.jsx("clipPath",{id:"rounded-pentagon",clipPathUnits:"objectBoundingBox",children:h.jsx("path",{d:"M 0.5 0.05 Q 0.52 0.05, 0.54 0.07 L 0.93 0.34 Q 0.97 0.37, 0.96 0.41 L 0.81 0.92 Q 0.80 0.97, 0.75 0.97 L 0.25 0.97 Q 0.20 0.97, 0.19 0.92 L 0.04 0.41 Q 0.03 0.37, 0.07 0.34 L 0.46 0.07 Q 0.48 0.05, 0.5 0.05 Z"})})})}),h.jsx(Hs,{children:h.jsx(qs,{})}),h.jsxs(Us,{children:[h.jsx(gn,{$position:"top",$color:i,children:n}),h.jsx(Gs,{$color:s,children:r}),h.jsx(gn,{$position:"bottom",$color:i,children:n})]})]}):null},Ys=N.keyframes`
299
299
  0%, 100% { transform: translateX(0); }
300
300
  20%, 60% { transform: translateX(-4px); }
301
301
  40%, 80% { transform: translateX(4px); }
@@ -395,7 +395,7 @@
395
395
  letter-spacing: 0.1em;
396
396
  opacity: ${({$visible:e})=>e?1:0};
397
397
  transition: opacity 0.1s ease;
398
- `,Js=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),mt=0,eo=2.5,to=3.5,no=le(Xs),Be={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},ro=400,pr=w.memo(({onKeyPress:e,onBackspace:t,onSubmit:n,disabled:r=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:l=!1})=>{const[c,u]=w.useState(""),d=w.useRef(null),f=k=>k?Js.has(k)?eo:to:mt,[g,y]=Le(()=>({height:mt,config:{tension:300,friction:26}}));w.useEffect(()=>(i?(d.current&&(clearTimeout(d.current),d.current=null),u(i),y.start({height:f(i)})):c&&(d.current=setTimeout(()=>{y.start({height:mt}),setTimeout(()=>u(""),250)},ro)),()=>{d.current&&clearTimeout(d.current)}),[i,c,y]);const m=w.useCallback(k=>{!r&&!(s!=null&&s.has(k))&&e(k)},[e,r,s]),v=w.useCallback(()=>{!r&&t&&t()},[t,r]),b=w.useCallback(()=>{!r&&n&&n()},[n,r]),S=w.useCallback(k=>r?!0:(s==null?void 0:s.has(k))??!1,[r,s]),x=w.useCallback(k=>o!=null&&o.has(k)?"correct":a!=null&&a.has(k)?"incorrect":null,[o,a]),T=(k,A)=>h.jsx(ge,{onClick:()=>m(k),disabled:S(k),$status:x(k),children:h.jsx(ye,{children:k})},`${k}-${A}`);return h.jsxs(Ks,{$shaking:l,children:[h.jsx(no,{style:{height:g.height.to(k=>`${k}rem`)},children:h.jsx(Zs,{$visible:!!i,children:c})}),h.jsx(me,{children:Be.row1.map(T)}),h.jsx(me,{children:Be.row2.map(T)}),h.jsx(me,{children:Be.row3.map(T)}),h.jsx(me,{children:Be.row4.map(T)}),h.jsxs(me,{$justify:"flex-start",children:[h.jsx(ge,{$variant:"backspace",$width:"wide",$muted:!i,onClick:v,disabled:r,children:h.jsx(ye,{children:"⌫"})}),h.jsx(ge,{$variant:"tone",$width:"space",onClick:()=>m("ˉ"),disabled:S("ˉ"),$status:x("ˉ"),children:h.jsx(ye,{children:"ˉ"})}),h.jsx(ge,{onClick:()=>m("ㄦ"),disabled:S("ㄦ"),$status:x("ㄦ"),children:h.jsx(ye,{children:"ㄦ"})}),n&&h.jsx(ge,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:b,disabled:r,children:h.jsx(ye,{children:"⏎"})})]})]})});pr.displayName="ZhuyinKeyboard";const io=_.default.div`
398
+ `,Js=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),mt=0,eo=2.5,to=3.5,no=le(Xs),Be={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},ro=400,pr=w.memo(({onKeyPress:e,onBackspace:t,onSubmit:n,disabled:r=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:l=!1})=>{const[c,u]=w.useState(""),d=w.useRef(null),f=k=>k?Js.has(k)?eo:to:mt,[g,y]=Ne(()=>({height:mt,config:{tension:300,friction:26}}));w.useEffect(()=>(i?(d.current&&(clearTimeout(d.current),d.current=null),u(i),y.start({height:f(i)})):c&&(d.current=setTimeout(()=>{y.start({height:mt}),setTimeout(()=>u(""),250)},ro)),()=>{d.current&&clearTimeout(d.current)}),[i,c,y]);const m=w.useCallback(k=>{!r&&!(s!=null&&s.has(k))&&e(k)},[e,r,s]),v=w.useCallback(()=>{!r&&t&&t()},[t,r]),b=w.useCallback(()=>{!r&&n&&n()},[n,r]),S=w.useCallback(k=>r?!0:(s==null?void 0:s.has(k))??!1,[r,s]),x=w.useCallback(k=>o!=null&&o.has(k)?"correct":a!=null&&a.has(k)?"incorrect":null,[o,a]),T=(k,A)=>h.jsx(ge,{onClick:()=>m(k),disabled:S(k),$status:x(k),children:h.jsx(ye,{children:k})},`${k}-${A}`);return h.jsxs(Ks,{$shaking:l,children:[h.jsx(no,{style:{height:g.height.to(k=>`${k}rem`)},children:h.jsx(Zs,{$visible:!!i,children:c})}),h.jsx(me,{children:Be.row1.map(T)}),h.jsx(me,{children:Be.row2.map(T)}),h.jsx(me,{children:Be.row3.map(T)}),h.jsx(me,{children:Be.row4.map(T)}),h.jsxs(me,{$justify:"flex-start",children:[h.jsx(ge,{$variant:"backspace",$width:"wide",$muted:!i,onClick:v,disabled:r,children:h.jsx(ye,{children:"⌫"})}),h.jsx(ge,{$variant:"tone",$width:"space",onClick:()=>m("ˉ"),disabled:S("ˉ"),$status:x("ˉ"),children:h.jsx(ye,{children:"ˉ"})}),h.jsx(ge,{onClick:()=>m("ㄦ"),disabled:S("ㄦ"),$status:x("ㄦ"),children:h.jsx(ye,{children:"ㄦ"})}),n&&h.jsx(ge,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:b,disabled:r,children:h.jsx(ye,{children:"⏎"})})]})]})});pr.displayName="ZhuyinKeyboard";const io=_.default.div`
399
399
  position: relative;
400
400
  display: flex;
401
401
  flex-direction: column;
@@ -431,7 +431,7 @@
431
431
  transition:
432
432
  color 0.2s ease,
433
433
  font-weight 0.2s ease;
434
- `,ao=_.default.span``;function co({options:e,value:t,onChange:n,onClose:r,closeOnSameValue:i=!0}){const s=w.useRef(null),[o,a]=w.useState(null),l=e.findIndex(u=>u.value===t),c=(u,d)=>{const f=u.currentTarget.getBoundingClientRect(),g=u.clientX-f.left,y=u.clientY-f.top;if(a({x:g,y,key:Date.now(),target:d.value}),d.value===t){i&&r&&r();return}if(n(d.value),r){const m=s.current;if(m){const v=()=>{m.removeEventListener("transitionend",v),r()};m.addEventListener("transitionend",v)}else r()}};return h.jsxs(io,{children:[h.jsx(so,{ref:s,$index:l}),e.map(u=>h.jsxs(oo,{$isSelected:t===u.value,onClick:d=>c(d,u),children:[o&&o.target===u.value&&h.jsx(je,{$x:o.x,$y:o.y},o.key),h.jsx(ao,{children:u.label})]},u.value))]})}function uo(e,t,n){return Math.max(t,Math.min(e,n))}const j={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function yn(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function vn(e,t,n,r=.15){return r===0?uo(e,t,n):e<t?-yn(t-e,n-t,r)+t:e>n?+yn(e-n,n-t,r)+n:e}function lo(e,[t,n],[r,i]){const[[s,o],[a,l]]=e;return[vn(t,s,o,r),vn(n,a,l,i)]}function fo(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ho(e){var t=fo(e,"string");return typeof t=="symbol"?t:String(t)}function $(e,t,n){return t=ho(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bn(Object(n),!0).forEach(function(r){$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const mr={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function wn(e){return e?e[0].toUpperCase()+e.slice(1):""}const po=["enter","leave"];function mo(e=!1,t){return e&&!po.includes(t)}function go(e,t="",n=!1){const r=mr[e],i=r&&r[t]||t;return"on"+wn(e)+wn(i)+(mo(n,i)?"Capture":"")}const yo=["gotpointercapture","lostpointercapture"];function vo(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=yo.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(r);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function bo(e,t=""){const n=mr[e],r=n&&n[t]||t;return e+r}function ct(e){return"touches"in e}function gr(e){return ct(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function wo(e){return Array.from(e.touches).filter(t=>{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,t.target))})}function xo(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function yr(e){return ct(e)?xo(e)[0]:e}function _o(e){return wo(e).map(t=>t.identifier)}function gt(e){const t=yr(e);return ct(e)?t.identifier:t.pointerId}function xn(e){const t=yr(e);return[t.clientX,t.clientY]}function So(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s})}return t}function Je(e,...t){return typeof e=="function"?e(...t):e}function ko(){}function Po(...e){return e.length===0?ko:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function _n(e,t){return Object.assign({},t,e||{})}const To=32;class Eo{constructor(t,n,r){this.ctrl=t,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:r,args:i}=this;n[r]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=i,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=r.from?Je(r.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:r,shared:i}=this;n.args=this.args;let s=0;if(t&&(n.event=t,r.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,So(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const A=n._delta.map(Math.abs);j.addTo(n._distance,A)}this.axisIntent&&this.axisIntent(t);const[o,a]=n._movement,[l,c]=r.threshold,{_step:u,values:d}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(o)>=l&&d[0]),u[1]===!1&&(u[1]=Math.abs(a)>=c&&d[1])):(u[0]===!1&&(u[0]=Math.abs(o)>=l&&Math.sign(o)*l),u[1]===!1&&(u[1]=Math.abs(a)>=c&&Math.sign(a)*c)),n.intentional=u[0]!==!1||u[1]!==!1,!n.intentional)return;const f=[0,0];if(r.hasCustomTransform){const[A,R]=d;f[0]=u[0]!==!1?A-u[0]:0,f[1]=u[1]!==!1?R-u[1]:0}else f[0]=u[0]!==!1?o-u[0]:0,f[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(f);const g=n.offset,y=n._active&&!n._blocked||n.active;y&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=i[this.ingKey]=n._active,t&&(n.first&&("bounds"in r&&(n._bounds=Je(r.bounds,n)),this.setup&&this.setup()),n.movement=f,this.computeOffset()));const[m,v]=n.offset,[[b,S],[x,T]]=n._bounds;n.overflow=[m<b?-1:m>S?1:0,v<x?-1:v>T?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const k=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=lo(n._bounds,n.offset,k),n.delta=j.sub(n.offset,g),this.computeMovement(),y&&(!n.last||s>To)){n.delta=j.sub(n.offset,g);const A=n.delta.map(Math.abs);j.addTo(n.distance,A),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&s>0&&(n.velocity=[A[0]/s,A[1]/s],n.timeDelta=s)}}emit(){const t=this.state,n=this.shared,r=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!r.triggerAllEvents)return;const i=this.handler(I(I(I({},n),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Io([e,t],n){const r=Math.abs(e),i=Math.abs(t);if(r>i&&r>n)return"x";if(i>r&&i>n)return"y"}class Ao extends Eo{constructor(...t){super(...t),$(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=j.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=j.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,r=this.config;if(!n.axis&&t){const i=typeof r.axisThreshold=="object"?r.axisThreshold[gr(t)]:r.axisThreshold;n.axis=Io(n._movement,i)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Sn=e=>e,kn=.15,Ut={enabled(e=!0){return e},eventOptions(e,t,n){return I(I({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[kn,kn];case!1:return[0,0];default:return j.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return j.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;if(this.hasCustomTransform=!!r,process.env.NODE_ENV==="development"){const i=r||Sn;return s=>{const o=i(s);return(!isFinite(o[0])||!isFinite(o[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${o[0]},${[1]}]`),o}}return r||Sn},threshold(e){return j.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Ut,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const Ro=0,Me=I(I({},Ut),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Ro){return e},bounds(e={}){if(typeof e=="function")return s=>Me.bounds(e(s));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),Pn={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class Oo extends Ao{constructor(...t){super(...t),$(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),r=t.currentTarget.getBoundingClientRect(),i={left:n.left-r.left+t.offset[0],right:n.right-r.right+t.offset[0],top:n.top-r.top+t.offset[1],bottom:n.bottom-r.bottom+t.offset[1]};t._bounds=Me.bounds(i)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,r=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&r._pointerActive)&&(this.start(t),this.setupPointer(t),r._pointerId=gt(t),r._pointerActive=!0,this.computeValues(xn(t)),this.computeInitial(),n.preventScrollAxis&&gr(t)!=="mouse"?(r._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,r=this.config;if(!n._pointerActive)return;const i=gt(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const s=xn(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=j.sub(s,n._values),this.computeValues(s)),j.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{process.env.NODE_ENV==="development"&&console.warn("[@use-gesture]: If you see this message, it's likely that you're using an outdated version of `@react-three/fiber`. \n\nPlease upgrade to the latest version.")}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const i=gt(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=n._distance;if(n.tap=s<=r.tapsThreshold&&o<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[a,l]=n._delta,[c,u]=n._movement,[d,f]=r.swipe.velocity,[g,y]=r.swipe.distance,m=r.swipe.duration;if(n.elapsedTime<m){const v=Math.abs(a/n.timeDelta),b=Math.abs(l/n.timeDelta);v>d&&Math.abs(c)>g&&(n.swipe[0]=Math.sign(a)),b>f&&Math.abs(u)>y&&(n.swipe[1]=Math.sign(l))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,r=n.device;if(process.env.NODE_ENV==="development")try{if(r==="pointer"&&n.preventScrollDelay===void 0){const i="uv"in t?t.sourceEvent.currentTarget:t.currentTarget;window.getComputedStyle(i).touchAction==="auto"&&console.warn("[@use-gesture]: The drag target has its `touch-action` style property set to `auto`. It is recommended to add `touch-action: 'none'` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\n\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.",i)}}catch{}n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,jo(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=Pn[t.key];if(n){const r=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),r._delta=n(this.config.keyboardDisplacement,i),r._keyboardActive=!0,j.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Pn&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function jo(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const ze=typeof window<"u"&&window.document&&window.document.createElement;function vr(){return ze&&"ontouchstart"in window}function $o(){return vr()||ze&&window.navigator.maxTouchPoints>1}function Co(){return ze&&"onpointerdown"in window}function Do(){return ze&&"exitPointerLock"in window.document}function No(){try{return"constructor"in GestureEvent}catch{return!1}}const M={isBrowser:ze,gesture:No(),touch:vr(),touchscreen:$o(),pointer:Co(),pointerLock:Do()},Lo=250,Vo=180,Mo=.5,zo=50,Fo=250,Bo=10,Tn={mouse:0,touch:0,pen:8},br=I(I({},Me),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&M.pointerLock,M.touch&&n?"touch":this.pointerLock?"mouse":M.pointer&&!i?"pointer":M.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?Lo:void 0,!(!M.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:i=void 0}){const s=j.toVector(e,n?r:i?1:0);return this.filterTaps=n,this.tapsThreshold=r,s},swipe({velocity:e=Mo,distance:t=zo,duration:n=Fo}={}){return{velocity:this.transform(j.toVector(e)),distance:this.transform(j.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return Vo;case!1:return 0;default:return e}},axisThreshold(e){return e?I(I({},Tn),e):Tn},keyboardDisplacement(e=Bo){return e}});process.env.NODE_ENV==="development"&&Object.assign(br,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}});I(I({},Ut),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!M.touch&&M.gesture)return"gesture";if(M.touch&&r)return"touch";if(M.touchscreen){if(M.pointer)return"pointer";if(M.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=o=>{const a=_n(Je(n,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=_n(Je(r,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof n!="function"&&typeof r!="function"?[i(),s()]:o=>[i(o),s(o)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",j.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});I(I({},Me),{},{mouseOnly:(e=!0)=>e});I(I({},Me),{},{mouseOnly:(e=!0)=>e});const wr=new Map,Tt=new Map;function Uo(e){wr.set(e.key,e.engine),Tt.set(e.key,e.resolver)}const Go={key:"drag",engine:Oo,resolver:br};function Ho(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function qo(e,t){if(e==null)return{};var n=Ho(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const Qo={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=M.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},Wo=["target","eventOptions","window","enabled","transform"];function He(e={},t){const n={};for(const[r,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const s=i.call(n,e[r],r,e);Number.isNaN(s)||(n[r]=s)}else n[r]=i.call(n,e[r],r,e);break;case"object":n[r]=He(e[r],i);break;case"boolean":i&&(n[r]=e[r]);break}return n}function Yo(e,t,n={}){const r=e,{target:i,eventOptions:s,window:o,enabled:a,transform:l}=r,c=qo(r,Wo);if(n.shared=He({target:i,eventOptions:s,window:o,enabled:a,transform:l},Qo),t){const u=Tt.get(t);n[t]=He(I({shared:n.shared},c),u)}else for(const u in c){const d=Tt.get(u);if(d)n[u]=He(I({shared:n.shared},c[u]),d);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(u)){if(u==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${u}\` was used. Please read the documentation for further information.`)}}return n}class xr{constructor(t,n){$(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,i,s){const o=this._listeners,a=bo(n,r),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=I(I({},l),s);t.addEventListener(a,i,c);const u=()=>{t.removeEventListener(a,i,c),o.delete(u)};return o.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class Ko{constructor(){$(this,"_timeouts",new Map)}add(t,n,r=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(n,r,...i))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class Xo{constructor(t){$(this,"gestures",new Set),$(this,"_targetEventStore",new xr(this)),$(this,"gestureEventStores",{}),$(this,"gestureTimeoutStores",{}),$(this,"handlers",{}),$(this,"config",{}),$(this,"pointerIds",new Set),$(this,"touchIds",new Set),$(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Zo(this,t)}setEventIds(t){if(ct(t))return this.touchIds=new Set(_o(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=Yo(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,r={};let i;if(!(n.target&&(i=n.target(),!i))){if(n.enabled){for(const o of this.gestures){const a=this.config[o],l=En(r,a.eventOptions,!!i);if(a.enabled){const c=wr.get(o);new c(this,t,o).bind(l)}}const s=En(r,n.eventOptions,!!i);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](I(I({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in r)r[s]=Po(...r[s]);if(!i)return r;for(const s in r){const{device:o,capture:a,passive:l}=vo(s);this._targetEventStore.add(i,o,"",r[s],{capture:a,passive:l})}}}}function oe(e,t){e.gestures.add(t),e.gestureEventStores[t]=new xr(e,t),e.gestureTimeoutStores[t]=new Ko}function Zo(e,t){t.drag&&oe(e,"drag"),t.wheel&&oe(e,"wheel"),t.scroll&&oe(e,"scroll"),t.move&&oe(e,"move"),t.pinch&&oe(e,"pinch"),t.hover&&oe(e,"hover")}const En=(e,t,n)=>(r,i,s,o={},a=!1)=>{var l,c;const u=(l=o.capture)!==null&&l!==void 0?l:t.capture,d=(c=o.passive)!==null&&c!==void 0?c:t.passive;let f=a?r:go(r,i,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(s)};function Jo(e,t={},n,r){const i=L.default.useMemo(()=>new Xo(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),L.default.useEffect(i.effect.bind(i)),L.default.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function ea(e,t){return Uo(Go),Jo({drag:e},t||{},"drag")}const ta=_.default.div`
434
+ `,ao=_.default.span``;function co({options:e,value:t,onChange:n,onClose:r,closeOnSameValue:i=!0}){const s=w.useRef(null),[o,a]=w.useState(null),l=e.findIndex(u=>u.value===t),c=(u,d)=>{const f=u.currentTarget.getBoundingClientRect(),g=u.clientX-f.left,y=u.clientY-f.top;if(a({x:g,y,key:Date.now(),target:d.value}),d.value===t){i&&r&&r();return}if(n(d.value),r){const m=s.current;if(m){const v=()=>{m.removeEventListener("transitionend",v),r()};m.addEventListener("transitionend",v)}else r()}};return h.jsxs(io,{children:[h.jsx(so,{ref:s,$index:l}),e.map(u=>h.jsxs(oo,{$isSelected:t===u.value,onClick:d=>c(d,u),children:[o&&o.target===u.value&&h.jsx(je,{$x:o.x,$y:o.y},o.key),h.jsx(ao,{children:u.label})]},u.value))]})}function uo(e,t,n){return Math.max(t,Math.min(e,n))}const j={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function yn(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function vn(e,t,n,r=.15){return r===0?uo(e,t,n):e<t?-yn(t-e,n-t,r)+t:e>n?+yn(e-n,n-t,r)+n:e}function lo(e,[t,n],[r,i]){const[[s,o],[a,l]]=e;return[vn(t,s,o,r),vn(n,a,l,i)]}function fo(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ho(e){var t=fo(e,"string");return typeof t=="symbol"?t:String(t)}function $(e,t,n){return t=ho(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bn(Object(n),!0).forEach(function(r){$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const mr={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function wn(e){return e?e[0].toUpperCase()+e.slice(1):""}const po=["enter","leave"];function mo(e=!1,t){return e&&!po.includes(t)}function go(e,t="",n=!1){const r=mr[e],i=r&&r[t]||t;return"on"+wn(e)+wn(i)+(mo(n,i)?"Capture":"")}const yo=["gotpointercapture","lostpointercapture"];function vo(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=yo.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(r);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function bo(e,t=""){const n=mr[e],r=n&&n[t]||t;return e+r}function ct(e){return"touches"in e}function gr(e){return ct(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function wo(e){return Array.from(e.touches).filter(t=>{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,t.target))})}function xo(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function yr(e){return ct(e)?xo(e)[0]:e}function _o(e){return wo(e).map(t=>t.identifier)}function gt(e){const t=yr(e);return ct(e)?t.identifier:t.pointerId}function xn(e){const t=yr(e);return[t.clientX,t.clientY]}function So(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s})}return t}function Je(e,...t){return typeof e=="function"?e(...t):e}function ko(){}function Po(...e){return e.length===0?ko:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function _n(e,t){return Object.assign({},t,e||{})}const To=32;class Eo{constructor(t,n,r){this.ctrl=t,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:r,args:i}=this;n[r]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=i,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=r.from?Je(r.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:r,shared:i}=this;n.args=this.args;let s=0;if(t&&(n.event=t,r.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,So(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const A=n._delta.map(Math.abs);j.addTo(n._distance,A)}this.axisIntent&&this.axisIntent(t);const[o,a]=n._movement,[l,c]=r.threshold,{_step:u,values:d}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(o)>=l&&d[0]),u[1]===!1&&(u[1]=Math.abs(a)>=c&&d[1])):(u[0]===!1&&(u[0]=Math.abs(o)>=l&&Math.sign(o)*l),u[1]===!1&&(u[1]=Math.abs(a)>=c&&Math.sign(a)*c)),n.intentional=u[0]!==!1||u[1]!==!1,!n.intentional)return;const f=[0,0];if(r.hasCustomTransform){const[A,R]=d;f[0]=u[0]!==!1?A-u[0]:0,f[1]=u[1]!==!1?R-u[1]:0}else f[0]=u[0]!==!1?o-u[0]:0,f[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(f);const g=n.offset,y=n._active&&!n._blocked||n.active;y&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=i[this.ingKey]=n._active,t&&(n.first&&("bounds"in r&&(n._bounds=Je(r.bounds,n)),this.setup&&this.setup()),n.movement=f,this.computeOffset()));const[m,v]=n.offset,[[b,S],[x,T]]=n._bounds;n.overflow=[m<b?-1:m>S?1:0,v<x?-1:v>T?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const k=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=lo(n._bounds,n.offset,k),n.delta=j.sub(n.offset,g),this.computeMovement(),y&&(!n.last||s>To)){n.delta=j.sub(n.offset,g);const A=n.delta.map(Math.abs);j.addTo(n.distance,A),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&s>0&&(n.velocity=[A[0]/s,A[1]/s],n.timeDelta=s)}}emit(){const t=this.state,n=this.shared,r=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!r.triggerAllEvents)return;const i=this.handler(I(I(I({},n),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Io([e,t],n){const r=Math.abs(e),i=Math.abs(t);if(r>i&&r>n)return"x";if(i>r&&i>n)return"y"}class Ao extends Eo{constructor(...t){super(...t),$(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=j.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=j.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,r=this.config;if(!n.axis&&t){const i=typeof r.axisThreshold=="object"?r.axisThreshold[gr(t)]:r.axisThreshold;n.axis=Io(n._movement,i)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Sn=e=>e,kn=.15,Ut={enabled(e=!0){return e},eventOptions(e,t,n){return I(I({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[kn,kn];case!1:return[0,0];default:return j.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return j.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;if(this.hasCustomTransform=!!r,process.env.NODE_ENV==="development"){const i=r||Sn;return s=>{const o=i(s);return(!isFinite(o[0])||!isFinite(o[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${o[0]},${[1]}]`),o}}return r||Sn},threshold(e){return j.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Ut,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const Ro=0,ze=I(I({},Ut),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Ro){return e},bounds(e={}){if(typeof e=="function")return s=>ze.bounds(e(s));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),Pn={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class Oo extends Ao{constructor(...t){super(...t),$(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),r=t.currentTarget.getBoundingClientRect(),i={left:n.left-r.left+t.offset[0],right:n.right-r.right+t.offset[0],top:n.top-r.top+t.offset[1],bottom:n.bottom-r.bottom+t.offset[1]};t._bounds=ze.bounds(i)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,r=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&r._pointerActive)&&(this.start(t),this.setupPointer(t),r._pointerId=gt(t),r._pointerActive=!0,this.computeValues(xn(t)),this.computeInitial(),n.preventScrollAxis&&gr(t)!=="mouse"?(r._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,r=this.config;if(!n._pointerActive)return;const i=gt(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const s=xn(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=j.sub(s,n._values),this.computeValues(s)),j.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{process.env.NODE_ENV==="development"&&console.warn("[@use-gesture]: If you see this message, it's likely that you're using an outdated version of `@react-three/fiber`. \n\nPlease upgrade to the latest version.")}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const i=gt(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=n._distance;if(n.tap=s<=r.tapsThreshold&&o<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[a,l]=n._delta,[c,u]=n._movement,[d,f]=r.swipe.velocity,[g,y]=r.swipe.distance,m=r.swipe.duration;if(n.elapsedTime<m){const v=Math.abs(a/n.timeDelta),b=Math.abs(l/n.timeDelta);v>d&&Math.abs(c)>g&&(n.swipe[0]=Math.sign(a)),b>f&&Math.abs(u)>y&&(n.swipe[1]=Math.sign(l))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,r=n.device;if(process.env.NODE_ENV==="development")try{if(r==="pointer"&&n.preventScrollDelay===void 0){const i="uv"in t?t.sourceEvent.currentTarget:t.currentTarget;window.getComputedStyle(i).touchAction==="auto"&&console.warn("[@use-gesture]: The drag target has its `touch-action` style property set to `auto`. It is recommended to add `touch-action: 'none'` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\n\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.",i)}}catch{}n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,jo(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=Pn[t.key];if(n){const r=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),r._delta=n(this.config.keyboardDisplacement,i),r._keyboardActive=!0,j.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Pn&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function jo(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Me=typeof window<"u"&&window.document&&window.document.createElement;function vr(){return Me&&"ontouchstart"in window}function $o(){return vr()||Me&&window.navigator.maxTouchPoints>1}function Co(){return Me&&"onpointerdown"in window}function Do(){return Me&&"exitPointerLock"in window.document}function Lo(){try{return"constructor"in GestureEvent}catch{return!1}}const M={isBrowser:Me,gesture:Lo(),touch:vr(),touchscreen:$o(),pointer:Co(),pointerLock:Do()},No=250,Vo=180,zo=.5,Mo=50,Fo=250,Bo=10,Tn={mouse:0,touch:0,pen:8},br=I(I({},ze),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&M.pointerLock,M.touch&&n?"touch":this.pointerLock?"mouse":M.pointer&&!i?"pointer":M.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?No:void 0,!(!M.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:i=void 0}){const s=j.toVector(e,n?r:i?1:0);return this.filterTaps=n,this.tapsThreshold=r,s},swipe({velocity:e=zo,distance:t=Mo,duration:n=Fo}={}){return{velocity:this.transform(j.toVector(e)),distance:this.transform(j.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return Vo;case!1:return 0;default:return e}},axisThreshold(e){return e?I(I({},Tn),e):Tn},keyboardDisplacement(e=Bo){return e}});process.env.NODE_ENV==="development"&&Object.assign(br,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}});I(I({},Ut),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!M.touch&&M.gesture)return"gesture";if(M.touch&&r)return"touch";if(M.touchscreen){if(M.pointer)return"pointer";if(M.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=o=>{const a=_n(Je(n,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=_n(Je(r,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof n!="function"&&typeof r!="function"?[i(),s()]:o=>[i(o),s(o)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",j.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});I(I({},ze),{},{mouseOnly:(e=!0)=>e});I(I({},ze),{},{mouseOnly:(e=!0)=>e});const wr=new Map,Tt=new Map;function Uo(e){wr.set(e.key,e.engine),Tt.set(e.key,e.resolver)}const Go={key:"drag",engine:Oo,resolver:br};function Ho(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function qo(e,t){if(e==null)return{};var n=Ho(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const Qo={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=M.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},Wo=["target","eventOptions","window","enabled","transform"];function He(e={},t){const n={};for(const[r,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const s=i.call(n,e[r],r,e);Number.isNaN(s)||(n[r]=s)}else n[r]=i.call(n,e[r],r,e);break;case"object":n[r]=He(e[r],i);break;case"boolean":i&&(n[r]=e[r]);break}return n}function Yo(e,t,n={}){const r=e,{target:i,eventOptions:s,window:o,enabled:a,transform:l}=r,c=qo(r,Wo);if(n.shared=He({target:i,eventOptions:s,window:o,enabled:a,transform:l},Qo),t){const u=Tt.get(t);n[t]=He(I({shared:n.shared},c),u)}else for(const u in c){const d=Tt.get(u);if(d)n[u]=He(I({shared:n.shared},c[u]),d);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(u)){if(u==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${u}\` was used. Please read the documentation for further information.`)}}return n}class xr{constructor(t,n){$(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,i,s){const o=this._listeners,a=bo(n,r),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=I(I({},l),s);t.addEventListener(a,i,c);const u=()=>{t.removeEventListener(a,i,c),o.delete(u)};return o.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class Ko{constructor(){$(this,"_timeouts",new Map)}add(t,n,r=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(n,r,...i))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class Xo{constructor(t){$(this,"gestures",new Set),$(this,"_targetEventStore",new xr(this)),$(this,"gestureEventStores",{}),$(this,"gestureTimeoutStores",{}),$(this,"handlers",{}),$(this,"config",{}),$(this,"pointerIds",new Set),$(this,"touchIds",new Set),$(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Zo(this,t)}setEventIds(t){if(ct(t))return this.touchIds=new Set(_o(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=Yo(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,r={};let i;if(!(n.target&&(i=n.target(),!i))){if(n.enabled){for(const o of this.gestures){const a=this.config[o],l=En(r,a.eventOptions,!!i);if(a.enabled){const c=wr.get(o);new c(this,t,o).bind(l)}}const s=En(r,n.eventOptions,!!i);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](I(I({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in r)r[s]=Po(...r[s]);if(!i)return r;for(const s in r){const{device:o,capture:a,passive:l}=vo(s);this._targetEventStore.add(i,o,"",r[s],{capture:a,passive:l})}}}}function oe(e,t){e.gestures.add(t),e.gestureEventStores[t]=new xr(e,t),e.gestureTimeoutStores[t]=new Ko}function Zo(e,t){t.drag&&oe(e,"drag"),t.wheel&&oe(e,"wheel"),t.scroll&&oe(e,"scroll"),t.move&&oe(e,"move"),t.pinch&&oe(e,"pinch"),t.hover&&oe(e,"hover")}const En=(e,t,n)=>(r,i,s,o={},a=!1)=>{var l,c;const u=(l=o.capture)!==null&&l!==void 0?l:t.capture,d=(c=o.passive)!==null&&c!==void 0?c:t.passive;let f=a?r:go(r,i,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(s)};function Jo(e,t={},n,r){const i=V.default.useMemo(()=>new Xo(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),V.default.useEffect(i.effect.bind(i)),V.default.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function ea(e,t){return Uo(Go),Jo({drag:e},t||{},"drag")}const ta=_.default.div`
435
435
  position: absolute;
436
436
  inset: 0;
437
437
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrim)||"rgba(0, 0, 0, 0.4)"}};
@@ -459,7 +459,7 @@
459
459
  clip: rect(0, 0, 0, 0);
460
460
  white-space: nowrap;
461
461
  border: 0;
462
- `;function oa(e){return 8*(Math.log(e+1)-2)}function aa({isOpen:e,onClose:t,children:n,title:r="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25,onExitComplete:a}){const l=w.useRef(null),[c,u]=w.useState(e),[d,f]=Le(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));w.useEffect(()=>{var m,v;if(e){u(!0);const b=((m=l.current)==null?void 0:m.offsetHeight)||i;f.set({y:b,opacity:0}),f.start({y:0,opacity:1})}else{const b=((v=l.current)==null?void 0:v.offsetHeight)||i;f.start({y:b,opacity:0,onRest:()=>{u(!1),a==null||a()}})}},[e,f,i,a]);const g=w.useCallback(()=>{t()},[t]),y=ea(({active:m,movement:[,v],velocity:[,b],direction:[,S],cancel:x})=>{if(v<-10){x();return}const T=Math.max(0,v);if(m){const k=v<0?oa(-v)*-.5:T;f.start({y:k,immediate:!0});const A=Math.min(T/i,1);f.start({opacity:1-A*.5,immediate:!0})}else b>s&&S>0||T>i*o?g():f.start({y:0,opacity:1})},{from:()=>[0,d.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0,eventOptions:{passive:!1}});return c?h.jsxs(h.Fragment,{children:[h.jsx(le.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:d.opacity,pointerEvents:e?"auto":"none"},onClick:g,children:h.jsx(ta,{})}),h.jsx(le.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:d.y.to(m=>`translateY(${m}px)`)},children:h.jsxs(na,{ref:l,children:[h.jsx(sa,{children:r}),h.jsx("div",{...y(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:h.jsx(ra,{})}),h.jsx(ia,{children:n})]})})]}):h.jsx(h.Fragment,{})}function _r(){const[e,t]=w.useState(null),n=w.useCallback((i,s)=>{const o=i.currentTarget.getBoundingClientRect();t({x:i.clientX-o.left,y:i.clientY-o.top,key:Date.now(),target:s})},[]),r=w.useCallback(i=>e!==null&&e.target===i,[e]);return{ripple:e,trigger:n,isTarget:r}}const ca=_.default.div`
462
+ `;function oa(e){return 8*(Math.log(e+1)-2)}function aa({isOpen:e,onClose:t,children:n,title:r="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25,onExitComplete:a}){const l=w.useRef(null),[c,u]=w.useState(e),[d,f]=Ne(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));w.useEffect(()=>{var m,v;if(e){u(!0);const b=((m=l.current)==null?void 0:m.offsetHeight)||i;f.set({y:b,opacity:0}),f.start({y:0,opacity:1})}else{const b=((v=l.current)==null?void 0:v.offsetHeight)||i;f.start({y:b,opacity:0,onRest:()=>{u(!1),a==null||a()}})}},[e,f,i,a]);const g=w.useCallback(()=>{t()},[t]),y=ea(({active:m,movement:[,v],velocity:[,b],direction:[,S],cancel:x})=>{if(v<-10){x();return}const T=Math.max(0,v);if(m){const k=v<0?oa(-v)*-.5:T;f.start({y:k,immediate:!0});const A=Math.min(T/i,1);f.start({opacity:1-A*.5,immediate:!0})}else b>s&&S>0||T>i*o?g():f.start({y:0,opacity:1})},{from:()=>[0,d.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0,eventOptions:{passive:!1}});return c?h.jsxs(h.Fragment,{children:[h.jsx(le.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:d.opacity,pointerEvents:e?"auto":"none"},onClick:g,children:h.jsx(ta,{})}),h.jsx(le.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:d.y.to(m=>`translateY(${m}px)`)},children:h.jsxs(na,{ref:l,children:[h.jsx(sa,{children:r}),h.jsx("div",{...y(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:h.jsx(ra,{})}),h.jsx(ia,{children:n})]})})]}):h.jsx(h.Fragment,{})}function _r(){const[e,t]=w.useState(null),n=w.useCallback((i,s)=>{const o=i.currentTarget.getBoundingClientRect();t({x:i.clientX-o.left,y:i.clientY-o.top,key:Date.now(),target:s})},[]),r=w.useCallback(i=>e!==null&&e.target===i,[e]);return{ripple:e,trigger:n,isTarget:r}}const ca=_.default.div`
463
463
  display: flex;
464
464
  flex-direction: column;
465
465
  gap: 0.5rem;
@@ -490,4 +490,30 @@
490
490
  outline: none;
491
491
  overflow: hidden;
492
492
  -webkit-tap-highlight-color: transparent;
493
- `;function da({message:e,description:t,confirmLabel:n,cancelLabel:r,destructive:i=!1,onConfirm:s,onCancel:o}){const{ripple:a,trigger:l,isTarget:c}=_r(),u=f=>{l(f,"confirm"),s()},d=f=>{l(f,"cancel"),o()};return h.jsxs(ca,{children:[h.jsx(ua,{children:e}),t&&h.jsx(la,{children:t}),h.jsxs(In,{$destructive:i,onClick:u,children:[c("confirm")&&a&&h.jsx(je,{$x:a.x,$y:a.y},a.key),n]}),h.jsxs(In,{onClick:d,children:[c("cancel")&&a&&h.jsx(je,{$x:a.x,$y:a.y},a.key),r]})]})}const fa={cardPosition:"transit-to-home"},Gt=Et.createSlice({name:"navigation",initialState:fa,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:ba}=Gt.actions;Gt.reducer;const ha=Et.combineReducers({navigation:Gt.reducer}),pa=Et.configureStore({reducer:ha});function ma(){const[e,t]=w.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return w.useEffect(()=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=i=>t(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function ga(e=100){const[t,n]=w.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return w.useEffect(()=>{let r;const i=()=>{clearTimeout(r),r=setTimeout(()=>{n({width:window.innerWidth,height:window.innerHeight})},e)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{clearTimeout(r),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i)}},[e]),t}function Sr(e,t){let n=0,r=null;const i=(...s)=>{const o=Date.now(),a=o-n;a>=t?(n=o,e(...s)):r||(r=setTimeout(()=>{n=Date.now(),r=null,e(...s)},t-a))};return i.cancel=()=>{r&&(clearTimeout(r),r=null)},i}function ya(e,t={}){const{enabled:n=!0,includeMargins:r=!0,throttleMs:i=16}=t,s=w.useRef(null),o=w.useRef(null),a=w.useRef(null),l=w.useRef(e);w.useEffect(()=>{l.current=e},[e]);const c=w.useCallback(()=>{if(!s.current||!n)return;const d=s.current.getBoundingClientRect();let f=0,g=0;if(r){const m=getComputedStyle(s.current);f=parseFloat(m.marginTop)||0,g=parseFloat(m.marginBottom)||0}const y={top:d.top-f,left:d.left,width:d.width,height:d.height+f+g,right:d.right,bottom:d.bottom+g,x:d.x,y:d.y-f};if(a.current){const m=Math.abs(y.top-a.current.top),v=Math.abs(y.height-a.current.height),b=Math.abs(y.width-a.current.width);if(m<.5&&v<.5&&b<.5)return}a.current=y,l.current(y)},[n,r]);return w.useEffect(()=>{if(!s.current||!n)return;const d=Sr(c,i),f=requestAnimationFrame(c),g=new ResizeObserver(d);g.observe(s.current),o.current=g;const y=m=>{const v=m.target;v!==document&&v!==document.documentElement||d()};return window.addEventListener("scroll",y,{passive:!0,capture:!0}),window.addEventListener("resize",d),()=>{cancelAnimationFrame(f),g.disconnect(),d.cancel(),window.removeEventListener("scroll",y,{capture:!0}),window.removeEventListener("resize",d)}},[c,n,i]),d=>{s.current=d}}exports.AnimatedText=Bt;exports.BackButton=ps;exports.BannerButton=as;exports.BottomSheet=aa;exports.CircleIconButton=fs;exports.ConfirmDialog=da;exports.ListItem=Is;exports.LoadingScreen=Ws;exports.OptionPicker=co;exports.Ripple=je;exports.SPRING_COMFORTABLE=Ze;exports.SPRING_COMFORTABLE_SLOW=As;exports.SPRING_GENTLE=$s;exports.SPRING_INSTANT=js;exports.SPRING_LANDING=Ds;exports.SPRING_RESPONSIVE=$e;exports.SPRING_RISING=Ns;exports.SPRING_SNAPPY=Rs;exports.SPRING_STAGGERED=Os;exports.SPRING_VERY_SLOW=Cs;exports.ToggleSwitch=fr;exports.UnorderedListItemContainer=ms;exports.ZhuyinKeyboard=pr;exports.rippleAnimation=dr;exports.throttle=Sr;exports.useReducedMotion=ma;exports.useReportPosition=ya;exports.useRipple=_r;exports.useViewportSize=ga;exports.ymyStore=pa;
493
+ `;function da({message:e,description:t,confirmLabel:n,cancelLabel:r,destructive:i=!1,onConfirm:s,onCancel:o}){const{ripple:a,trigger:l,isTarget:c}=_r(),u=f=>{l(f,"confirm"),s()},d=f=>{l(f,"cancel"),o()};return h.jsxs(ca,{children:[h.jsx(ua,{children:e}),t&&h.jsx(la,{children:t}),h.jsxs(In,{$destructive:i,onClick:u,children:[c("confirm")&&a&&h.jsx(je,{$x:a.x,$y:a.y},a.key),n]}),h.jsxs(In,{onClick:d,children:[c("cancel")&&a&&h.jsx(je,{$x:a.x,$y:a.y},a.key),r]})]})}const fa={primary:N.css`
494
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.whiteLow)||"rgba(255, 255, 255, 0.2)"}};
495
+ `,muted:N.css`
496
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.surfaceVariant)||"rgba(0, 0, 0, 0.06)"}};
497
+ `,success:N.css`
498
+ background: rgba(34, 197, 94, 0.15);
499
+ `},ha=_.default.div`
500
+ display: flex;
501
+ align-items: center;
502
+ justify-content: center;
503
+ gap: 0.25rem;
504
+ padding: 0.75rem 1rem;
505
+ border-radius: 1rem;
506
+ min-width: 4rem;
507
+ ${({$variant:e})=>fa[e]}
508
+ `,pa=_.default.span`
509
+ font-size: 1.25rem;
510
+ font-weight: 600;
511
+ line-height: 1;
512
+ color: ${({$variant:e,theme:t})=>{var n,r;return e==="success"?"#16a34a":((n=t.colors)==null?void 0:n.primaryDarker)||((r=t.colors)==null?void 0:r.primary)||"#333"}};
513
+ `,ma=_.default.span`
514
+ font-size: 0.625rem;
515
+ font-weight: 500;
516
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSurface)||"#333"}};
517
+ text-transform: uppercase;
518
+ letter-spacing: 0.05em;
519
+ `;function ga({value:e,label:t,variant:n="primary"}){return h.jsxs(ha,{$variant:n,children:[h.jsx(pa,{$variant:n,children:e}),t&&h.jsx(ma,{children:t})]})}const ya={cardPosition:"transit-to-home"},Gt=Et.createSlice({name:"navigation",initialState:ya,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:ka}=Gt.actions;Gt.reducer;const va=Et.combineReducers({navigation:Gt.reducer}),ba=Et.configureStore({reducer:va});function wa(){const[e,t]=w.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return w.useEffect(()=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=i=>t(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function xa(e=100){const[t,n]=w.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return w.useEffect(()=>{let r;const i=()=>{clearTimeout(r),r=setTimeout(()=>{n({width:window.innerWidth,height:window.innerHeight})},e)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{clearTimeout(r),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i)}},[e]),t}function Sr(e,t){let n=0,r=null;const i=(...s)=>{const o=Date.now(),a=o-n;a>=t?(n=o,e(...s)):r||(r=setTimeout(()=>{n=Date.now(),r=null,e(...s)},t-a))};return i.cancel=()=>{r&&(clearTimeout(r),r=null)},i}function _a(e,t={}){const{enabled:n=!0,includeMargins:r=!0,throttleMs:i=16}=t,s=w.useRef(null),o=w.useRef(null),a=w.useRef(null),l=w.useRef(e);w.useEffect(()=>{l.current=e},[e]);const c=w.useCallback(()=>{if(!s.current||!n)return;const d=s.current.getBoundingClientRect();let f=0,g=0;if(r){const m=getComputedStyle(s.current);f=parseFloat(m.marginTop)||0,g=parseFloat(m.marginBottom)||0}const y={top:d.top-f,left:d.left,width:d.width,height:d.height+f+g,right:d.right,bottom:d.bottom+g,x:d.x,y:d.y-f};if(a.current){const m=Math.abs(y.top-a.current.top),v=Math.abs(y.height-a.current.height),b=Math.abs(y.width-a.current.width);if(m<.5&&v<.5&&b<.5)return}a.current=y,l.current(y)},[n,r]);return w.useEffect(()=>{if(!s.current||!n)return;const d=Sr(c,i),f=requestAnimationFrame(c),g=new ResizeObserver(d);g.observe(s.current),o.current=g;const y=m=>{const v=m.target;v!==document&&v!==document.documentElement||d()};return window.addEventListener("scroll",y,{passive:!0,capture:!0}),window.addEventListener("resize",d),()=>{cancelAnimationFrame(f),g.disconnect(),d.cancel(),window.removeEventListener("scroll",y,{capture:!0}),window.removeEventListener("resize",d)}},[c,n,i]),d=>{s.current=d}}exports.AnimatedText=Bt;exports.BackButton=ps;exports.Badge=ga;exports.BannerButton=as;exports.BottomSheet=aa;exports.CircleIconButton=fs;exports.ConfirmDialog=da;exports.ListItem=Is;exports.LoadingScreen=Ws;exports.OptionPicker=co;exports.Ripple=je;exports.SPRING_COMFORTABLE=Ze;exports.SPRING_COMFORTABLE_SLOW=As;exports.SPRING_GENTLE=$s;exports.SPRING_INSTANT=js;exports.SPRING_LANDING=Ds;exports.SPRING_RESPONSIVE=$e;exports.SPRING_RISING=Ls;exports.SPRING_SNAPPY=Rs;exports.SPRING_STAGGERED=Os;exports.SPRING_VERY_SLOW=Cs;exports.ToggleSwitch=fr;exports.UnorderedListItemContainer=ms;exports.ZhuyinKeyboard=pr;exports.rippleAnimation=dr;exports.throttle=Sr;exports.useReducedMotion=wa;exports.useReportPosition=_a;exports.useRipple=_r;exports.useViewportSize=xa;exports.ymyStore=ba;