ymy-components 0.0.56 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs +66 -66
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),v=require("react"),wr=require("react-dom"),_=require("styled-components"),kt=require("@reduxjs/toolkit");function xr(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 Pt=xr(v);var Et=$e(),k=e=>Oe(e,Et),Tt=$e();k.write=e=>Oe(e,Tt);var Xe=$e();k.onStart=e=>Oe(e,Xe);var It=$e();k.onFrame=e=>Oe(e,It);var At=$e();k.onFinish=e=>Oe(e,At);var se=[];k.setTimeout=(e,t)=>{const n=k.now()+t,r=()=>{const s=se.findIndex(o=>o.cancel==r);~s&&se.splice(s,1),K-=~s?1:0},i={time:n,handler:e,cancel:r};return se.splice(En(n),0,i),K+=1,Tn(),i};var En=e=>~(~se.findIndex(t=>t.time>e)||~se.length);k.cancel=e=>{Xe.delete(e),It.delete(e),At.delete(e),Et.delete(e),Tt.delete(e)};k.sync=e=>{pt=!0,k.batchedUpdates(e),pt=!1};k.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,k.onStart(n)}return r.handler=e,r.cancel=()=>{Xe.delete(n),t=null},r};var Rt=typeof window<"u"?window.requestAnimationFrame:()=>{};k.use=e=>Rt=e;k.now=typeof performance<"u"?()=>performance.now():Date.now;k.batchedUpdates=e=>e();k.catch=console.error;k.frameLoop="always";k.advance=()=>{k.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):An()};var Y=-1,K=0,pt=!1;function Oe(e,t){pt?(t.delete(e),e(0)):(t.add(e),Tn())}function Tn(){Y<0&&(Y=0,k.frameLoop!=="demand"&&Rt(In))}function _r(){Y=-1}function In(){~Y&&(Rt(In),k.batchedUpdates(An))}function An(){const e=Y;Y=k.now();const t=En(Y);if(t&&(Rn(se.splice(0,t),n=>n.handler()),K-=t),!K){_r();return}Xe.flush(),Et.flush(e?Math.min(64,Y-e):16.667),It.flush(),Tt.flush(),At.flush()}function $e(){let e=new Set,t=e;return{add(n){K+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return K-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,K-=t.size,Rn(t,r=>r(n)&&e.add(r)),K+=e.size,t=e)}}}function Rn(e,t){e.forEach(n=>{try{t(n)}catch(r){k.catch(r)}})}var Sr=Object.defineProperty,kr=(e,t)=>{for(var n in t)Sr(e,n,{get:t[n],enumerable:!0})},B={};kr(B,{assign:()=>Er,colors:()=>X,createStringInterpolator:()=>$t,skipAnimation:()=>$n,to:()=>On,willAdvance:()=>jt});function mt(){}var Pr=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),h={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 H(e,t){if(h.arr(e)){if(!h.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 T=(e,t)=>e.forEach(t);function G(e,t,n){if(h.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=>h.und(e)?[]:h.arr(e)?e:[e];function ye(e,t){if(e.size){const n=Array.from(e);e.clear(),T(n,t)}}var ge=(e,...t)=>ye(e,n=>n(...t)),Ot=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),$t,On,X=null,$n=!1,jt=mt,Er=e=>{e.to&&(On=e.to),e.now&&(k.now=e.now),e.colors!==void 0&&(X=e.colors),e.skipAnimation!=null&&($n=e.skipAnimation),e.createStringInterpolator&&($t=e.createStringInterpolator),e.requestAnimationFrame&&k.use(e.requestAnimationFrame),e.batchedUpdates&&(k.batchedUpdates=e.batchedUpdates),e.willAdvance&&(jt=e.willAdvance),e.frameLoop&&(k.frameLoop=e.frameLoop)},ve=new Set,M=[],ot=[],Ue=0,Ze={get idle(){return!ve.size&&!M.length},start(e){Ue>e.priority?(ve.add(e),k.onStart(Tr)):(jn(e),k(gt))},advance:gt,sort(e){if(Ue)k.onFrame(()=>Ze.sort(e));else{const t=M.indexOf(e);~t&&(M.splice(t,1),Cn(e))}},clear(){M=[],ve.clear()}};function Tr(){ve.forEach(jn),ve.clear(),k(gt)}function jn(e){M.includes(e)||Cn(e)}function Cn(e){M.splice(Ir(M,t=>t.priority>e.priority),0,e)}function gt(e){const t=ot;for(let n=0;n<M.length;n++){const r=M[n];Ue=r.priority,r.idle||(jt(r),r.advance(e),r.idle||t.push(r))}return Ue=0,ot=M,ot.length=0,M=t,M.length>0}function Ir(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Ar={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},F="[-+]?\\d*\\.?\\d+",Ge=F+"%";function Je(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Rr=new RegExp("rgb"+Je(F,F,F)),Or=new RegExp("rgba"+Je(F,F,F,F)),$r=new RegExp("hsl"+Je(F,Ge,Ge)),jr=new RegExp("hsla"+Je(F,Ge,Ge,F)),Cr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Dr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Lr=/^#([0-9a-fA-F]{6})$/,Nr=/^#([0-9a-fA-F]{8})$/;function Vr(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Lr.exec(e))?parseInt(t[1]+"ff",16)>>>0:X&&X[e]!==void 0?X[e]:(t=Rr.exec(e))?(re(t[1])<<24|re(t[2])<<16|re(t[3])<<8|255)>>>0:(t=Or.exec(e))?(re(t[1])<<24|re(t[2])<<16|re(t[3])<<8|Ht(t[4]))>>>0:(t=Cr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Nr.exec(e))?parseInt(t[1],16)>>>0:(t=Dr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=$r.exec(e))?(Ut(Gt(t[1]),Ve(t[2]),Ve(t[3]))|255)>>>0:(t=jr.exec(e))?(Ut(Gt(t[1]),Ve(t[2]),Ve(t[3]))|Ht(t[4]))>>>0:null}function at(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 Ut(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=at(i,r,e+1/3),o=at(i,r,e),a=at(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function re(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Gt(e){return(parseFloat(e)%360+360)%360/360}function Ht(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Ve(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function qt(e){let t=Vr(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 xe=(e,t,n)=>{if(h.fun(e))return e;if(h.arr(e))return xe({range:e,output:t,extrapolate:n});if(h.str(e.output[0]))return $t(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",d=r.easing||(c=>c);return c=>{const u=zr(c,s);return Mr(c,s[u],s[u+1],i[u],i[u+1],d,o,a,r.map)}};function Mr(e,t,n,r,i,s,o,a,d){let c=d?d(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 zr(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Fr={linear:e=>e},_e=Symbol.for("FluidValue.get"),ae=Symbol.for("FluidValue.observers"),N=e=>!!(e&&e[_e]),C=e=>e&&e[_e]?e[_e]():e,Qt=e=>e[ae]||null;function Br(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Se(e,t){const n=e[ae];n&&n.forEach(r=>{Br(r,t)})}var Dn=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Ur(this,e)}},Ur=(e,t)=>Ln(e,_e,t);function ue(e,t){if(e[_e]){let n=e[ae];n||Ln(e,ae,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ke(e,t){const n=e[ae];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ae]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Ln=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ze=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Gr=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Wt=new RegExp(`(${ze.source})(%|[a-z]+)`,"i"),Hr=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,et=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Nn=e=>{const[t,n]=qr(e);if(!t||Ot())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&&et.test(n))return Nn(n);if(n)return n}return e},qr=e=>{const t=et.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ct,Qr=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Vn=e=>{ct||(ct=X?new RegExp(`(${Object.keys(X).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>C(s).replace(et,Nn).replace(Gr,qt).replace(ct,qt)),n=t.map(s=>s.match(ze).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=>xe({...e,output:s}));return s=>{var d;const o=!Wt.test(t[0])&&((d=t.find(c=>Wt.test(c)))==null?void 0:d.replace(ze,""));let a=0;return t[0].replace(ze,()=>`${i[a++](s)}${o||""}`).replace(Hr,Qr)}},Ct="react-spring: ",Mn=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Ct}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},Wr=Mn(console.warn);function Yr(){Wr(`${Ct}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Kr=Mn(console.warn);function Xr(){Kr(`${Ct}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 tt(e){return h.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ot()&&et.test(e)||e in(X||{}))}var Dt=Ot()?v.useEffect:v.useLayoutEffect,Zr=()=>{const e=v.useRef(!1);return Dt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function zn(){const e=v.useState()[1],t=Zr();return()=>{t.current&&e(Math.random())}}function Jr(e,t){const[n]=v.useState(()=>({inputs:t,result:e()})),r=v.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&ei(t,s.inputs)||(s={inputs:t,result:e()}):s=n,v.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function ei(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 Fn=e=>v.useEffect(e,ti),ti=[];function Yt(e){const t=v.useRef();return v.useEffect(()=>{t.current=e}),t.current}var Pe=Symbol.for("Animated:node"),ni=e=>!!e&&e[Pe]===e,U=e=>e&&e[Pe],Lt=(e,t)=>Pr(e,Pe,t),nt=e=>e&&e[Pe]&&e[Pe].getPayload(),Bn=class{constructor(){Lt(this,this)}getPayload(){return this.payload||[]}},je=class extends Bn{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,h.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new je(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return h.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,h.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ee=class extends je{constructor(e){super(0),this._string=null,this._toString=xe({output:[e,e]})}static create(e){return new Ee(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(h.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=xe({output:[this.getValue(),e]})),this._value=0,super.reset()}},He={dependencies:null},rt=class extends Bn{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return G(this.source,(n,r)=>{ni(n)?t[r]=n.getValue(e):N(n)?t[r]=C(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&T(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return G(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){He.dependencies&&N(e)&&He.dependencies.add(e);const t=nt(e);t&&T(t,n=>this.add(n))}},Un=class extends rt{constructor(e){super(e)}static create(e){return new Un(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(ri)),!0)}};function ri(e){return(tt(e)?Ee:je).create(e)}function yt(e){const t=U(e);return t?t.constructor:h.arr(e)?Un:tt(e)?Ee:je}var Kt=(e,t)=>{const n=!h.fun(e)||e.prototype&&e.prototype.isReactComponent;return v.forwardRef((r,i)=>{const s=v.useRef(null),o=n&&v.useCallback(y=>{s.current=oi(i,y)},[i]),[a,d]=si(r,t),c=zn(),u=()=>{const y=s.current;if(n&&!y)return;(y?t.applyAnimatedValues(y,a.getValue(!0)):!1)===!1&&c()},l=new ii(u,d),f=v.useRef();Dt(()=>(f.current=l,T(d,y=>ue(y,l)),()=>{f.current&&(T(f.current.deps,y=>ke(y,f.current)),k.cancel(f.current.update))})),v.useEffect(u,[]),Fn(()=>()=>{const y=f.current;T(y.deps,m=>ke(m,y))});const g=t.getComponentProps(a.getValue());return Pt.createElement(e,{...g,ref:o})})},ii=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&k.write(this.update)}};function si(e,t){const n=new Set;return He.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new rt(e),He.dependencies=null,[e,n]}function oi(e,t){return e&&(h.fun(e)?e(t):e.current=t),t}var Xt=Symbol.for("AnimatedComponent"),ai=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new rt(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const a=Zt(o)||"Anonymous";return h.str(o)?o=s[o]||(s[o]=Kt(o,i)):o=o[Xt]||(o[Xt]=Kt(o,i)),o.displayName=`Animated(${a})`,o};return G(e,(o,a)=>{h.arr(e)&&(a=Zt(o)),s[a]=s(o)}),{animated:s}},Zt=e=>h.str(e)?e:e&&h.str(e.displayName)?e.displayName:h.fun(e)&&e.name||null;function ee(e,...t){return h.fun(e)?e(...t):e}var be=(e,t)=>e===!0||!!(t&&e&&(h.fun(e)?e(t):L(e).includes(t))),Gn=(e,t)=>h.obj(e)?t&&e[t]:e,Hn=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ci=e=>e,Nt=(e,t=ci)=>{let n=ui;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);h.und(s)||(r[i]=s)}return r},ui=["config","onProps","onStart","onChange","onPause","onResume","onRest"],li={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 di(e){const t={};let n=0;if(G(e,(r,i)=>{li[i]||(t[i]=r,n++)}),n)return t}function qn(e){const t=di(e);if(t){const n={to:t};return G(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Te(e){return e=C(e),h.arr(e)?e.map(Te):tt(e)?B.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function fi(e){for(const t in e)return!0;return!1}function vt(e){return h.fun(e)||h.arr(e)&&h.obj(e[0])}function hi(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function pi(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var mi={default:{tension:170,friction:26}},bt={...mi.default,mass:1,damping:1,easing:Fr.linear,clamp:!1},gi=class{constructor(){this.velocity=0,Object.assign(this,bt)}};function yi(e,t,n){n&&(n={...n},Jt(n,t),t={...n,...t}),Jt(e,t),Object.assign(e,t);for(const o in bt)e[o]==null&&(e[o]=bt[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return h.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 Jt(e,t){if(!h.und(t.decay))e.duration=void 0;else{const n=!h.und(t.tension)||!h.und(t.friction);(n||!h.und(t.frequency)||!h.und(t.damping)||!h.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var en=[],vi=class{constructor(){this.changed=!1,this.values=en,this.toValues=null,this.fromValues=en,this.config=new gi,this.immediate=!1}};function Qn(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,a)=>{let d,c,u=be(n.cancel??(r==null?void 0:r.cancel),t);if(u)g();else{h.und(n.pause)||(i.paused=be(n.pause,t));let y=r==null?void 0:r.pause;y!==!0&&(y=i.paused||be(y,t)),d=ee(n.delay||0,t),y?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function l(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),d=c.time-k.now()}function f(){d>0&&!B.skipAnimation?(i.delayed=!0,c=k.setTimeout(g,d),i.pauseQueue.add(l),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(l),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{s.start({...n,callId:e,cancel:u},o)}catch(y){a(y)}}})}var Vt=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?oe(e.get()):t.every(n=>n.noop)?Wn(e.get()):z(e.get(),t.every(n=>n.finished)),Wn=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),z=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),oe=e=>({value:e,cancelled:!0,finished:!1});function Yn(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:d}=n;return!s&&e===a&&!t.reset?d:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=Nt(t,(w,b)=>b==="onRest"?void 0:w);let u,l;const f=new Promise((w,b)=>(u=w,l=b)),g=w=>{const b=i<=(n.cancelId||0)&&oe(r)||i!==n.asyncId&&z(r,!1);if(b)throw w.result=b,l(w),w},y=(w,b)=>{const S=new tn,x=new nn;return(async()=>{if(B.skipAnimation)throw Ie(n),x.result=z(r,!1),l(x),x;g(S);const E=h.obj(w)?{...w}:{...b,to:w};E.parentId=i,G(c,(A,R)=>{h.und(E[R])&&(E[R]=A)});const P=await r.start(E);return g(S),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),P})()};let m;if(B.skipAnimation)return Ie(n),z(r,!1);try{let w;h.arr(e)?w=(async b=>{for(const S of b)await y(S)})(e):w=Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([w.then(u),f]),m=z(r.get(),!0,!1)}catch(w){if(w instanceof tn)m=w.result;else if(w instanceof nn)m=w.result;else throw w}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?d:void 0)}return h.fun(o)&&k.batchedUpdates(()=>{o(m,r,r.item)}),m})()}function Ie(e,t){ye(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var tn=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.")}},nn=class extends Error{constructor(){super("SkipAnimationSignal")}},wt=e=>e instanceof Mt,bi=1,Mt=class extends Dn{constructor(){super(...arguments),this.id=bi++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=U(this);return e&&e.getValue()}to(...e){return B.to(this,e)}interpolate(...e){return Yr(),B.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){Se(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ze.sort(this),Se(this,{type:"priority",parent:this,priority:e})}},te=Symbol.for("SpringPhase"),Kn=1,Xn=2,Zn=4,ut=e=>(e[te]&Kn)>0,W=e=>(e[te]&Xn)>0,le=e=>(e[te]&Zn)>0,rn=(e,t)=>t?e[te]|=Xn|Kn:e[te]&=-3,sn=(e,t)=>t?e[te]|=Zn:e[te]&=-5,wi=class extends Mt{constructor(e,t){if(super(),this.animation=new vi,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,!h.und(e)||!h.und(t)){const n=h.obj(e)?{...e}:{...t,from:e};h.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(W(this)||this._state.asyncTo)||le(this)}get goal(){return C(this.animation.to)}get velocity(){const e=U(this);return e instanceof je?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ut(this)}get isAnimating(){return W(this)}get isPaused(){return le(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=nt(r.to);!o&&N(r.to)&&(i=L(C(r.to))),r.values.forEach((c,u)=>{if(c.done)return;const l=c.constructor==Ee?1:o?o[u].lastPosition:i[u];let f=r.immediate,g=l;if(!f){if(g=c.lastPosition,s.tension<=0){c.done=!0;return}let y=c.elapsedTime+=e;const m=r.fromValues[u],w=c.v0!=null?c.v0:c.v0=h.arr(s.velocity)?s.velocity[u]:s.velocity;let b;const S=s.precision||(m==l?.005:Math.min(1,Math.abs(l-m)*.001));if(h.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,E=Math.exp(-(1-x)*y);g=m+w/(1-x)*(1-E),f=Math.abs(c.lastPosition-g)<=S,b=w*E}else{b=c.lastVelocity==null?w:c.lastVelocity;const x=s.restVelocity||S/10,E=s.clamp?0:s.bounce,P=!h.und(E),A=m==l?c.v0>0:m<l;let R,ne=!1;const O=1,J=Math.ceil(e/O);for(let D=0;D<J&&(R=Math.abs(b)>x,!(!R&&(f=Math.abs(l-g)<=S,f)));++D){P&&(ne=g==l||g>l==A,ne&&(b=-b*E,g=l));const q=-s.tension*1e-6*(g-l),Q=-s.friction*.001*b,br=(q+Q)/s.mass;b=b+br*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)*(l-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=U(this),d=a.getValue();if(t){const c=C(r.to);(d!==c||n)&&!s.decay?(a.setValue(c),this._onChange(c)):n&&s.decay&&this._onChange(d),this._stop()}else n&&this._onChange(d)}set(e){return k.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(W(this)){const{to:e,config:t}=this.animation;k.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 h.und(e)?(n=this.queue||[],this.queue=[]):n=[h.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Vt(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ie(this._state,e&&this._lastCallId),k.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=h.obj(n)?n[t]:n,(n==null||vt(n))&&(n=void 0),r=h.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return ut(this)||(e.reverse&&([n,r]=[r,n]),r=C(r),h.und(r)?U(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Nt(e,(o,a)=>/^on/.test(a)?Gn(o,n):o)),an(this,e,"onProps"),fe(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 Qn(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{le(this)||(sn(this,!0),ge(s.pauseQueue),fe(this,"onPause",z(this,de(this,this.animation.to)),this))},resume:()=>{le(this)&&(sn(this,!1),W(this)&&this._resume(),ge(s.resumeQueue),fe(this,"onResume",z(this,de(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=Jn(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(oe(this));const r=!h.und(e.to),i=!h.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(oe(this));const{key:s,defaultProps:o,animation:a}=this,{to:d,from:c}=a;let{to:u=d,from:l=c}=e;i&&!r&&(!t.default||h.und(u))&&(u=l),t.reverse&&([u,l]=[l,u]);const f=!H(l,c);f&&(a.from=l),l=C(l);const g=!H(u,d);g&&this._focus(u);const y=vt(t.to),{config:m}=a,{decay:w,velocity:b}=m;(r||i)&&(m.velocity=0),t.config&&!y&&yi(m,ee(t.config,s),t.config!==o.config?ee(o.config,s):void 0);let S=U(this);if(!S||h.und(u))return n(z(this,!0));const x=h.und(t.reset)?i&&!t.default:!h.und(l)&&be(t.reset,s),E=x?l:this.get(),P=Te(u),A=h.num(P)||h.arr(P)||tt(P),R=!y&&(!A||be(o.immediate||t.immediate,s));if(g){const D=yt(u);if(D!==S.constructor)if(R)S=this._set(P);else throw Error(`Cannot animate between ${S.constructor.name} and ${D.name}, as the "to" prop suggests`)}const ne=S.constructor;let O=N(u),J=!1;if(!O){const D=x||!ut(this)&&f;(g||D)&&(J=H(Te(E),P),O=!J),(!H(a.immediate,R)&&!R||!H(m.decay,w)||!H(m.velocity,b))&&(O=!0)}if(J&&W(this)&&(a.changed&&!x?O=!0:O||this._stop(d)),!y&&((O||N(d))&&(a.values=S.getPayload(),a.toValues=N(u)?null:ne==Ee?[1]:L(P)),a.immediate!=R&&(a.immediate=R,!R&&!x&&this._set(d)),O)){const{onRest:D}=a;T(_i,Q=>an(this,t,Q));const q=z(this,de(this,d));ge(this._pendingCalls,q),this._pendingCalls.add(n),a.changed&&k.batchedUpdates(()=>{var Q;a.changed=!x,D==null||D(q,this),x?ee(o.onRest,q):(Q=a.onStart)==null||Q.call(a,q,this)})}x&&this._set(E),y?n(Yn(t.to,t,this._state,this)):O?this._start():W(this)&&!g?this._pendingCalls.add(n):n(Wn(E))}_focus(e){const t=this.animation;e!==t.to&&(Qt(this)&&this._detach(),t.to=e,Qt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;N(t)&&(ue(t,this),wt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;N(e)&&ke(e,this)}_set(e,t=!0){const n=C(e);if(!h.und(n)){const r=U(this);if(!r||!H(n,r.getValue())){const i=yt(n);!r||r.constructor!=i?Lt(this,i.create(n)):r.setValue(n),r&&k.batchedUpdates(()=>{this._onChange(n,t)})}}return U(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,fe(this,"onStart",z(this,de(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ee(this.animation.onChange,e,this)),ee(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;U(this).reset(C(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),W(this)||(rn(this,!0),le(this)||this._resume())}_resume(){B.skipAnimation?this.finish():Ze.start(this)}_stop(e,t){if(W(this)){rn(this,!1);const n=this.animation;T(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Se(this,{type:"idle",parent:this});const r=t?oe(this.get()):z(this.get(),de(this,e??n.to));ge(this._pendingCalls,r),n.changed&&(n.changed=!1,fe(this,"onRest",r,this))}}};function de(e,t){const n=Te(t),r=Te(e.get());return H(r,n)}function Jn(e,t=e.loop,n=e.to){const r=ee(t);if(r){const i=r!==!0&&qn(r),s=(i||e).reverse,o=!i||i.reset;return Ae({...e,loop:t,default:!1,pause:void 0,to:!s||vt(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ae(e){const{to:t,from:n}=e=qn(e),r=new Set;return h.obj(t)&&on(t,r),h.obj(n)&&on(n,r),e.keys=r.size?Array.from(r):null,e}function xi(e){const t=Ae(e);return h.und(t.default)&&(t.default=Nt(t)),t}function on(e,t){G(e,(n,r)=>n!=null&&t.add(r))}var _i=["onStart","onRest","onChange","onPause","onResume"];function an(e,t,n){e.animation[n]=t[n]!==Hn(t,n)?Gn(t[n],e.key):void 0}function fe(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 Si=["onStart","onChange","onRest"],ki=1,Pi=class{constructor(t,n){this.id=ki++,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];h.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(Ae(t)),this}start(t){let{queue:n}=this;return t?n=L(t).map(Ae):this.queue=[],this._flush?this._flush(this,n):(ir(this,n),xt(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;T(L(n),i=>r[i].stop(!!t))}else Ie(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(h.und(t))this.start({pause:!0});else{const n=this.springs;T(L(t),r=>n[r].pause())}return this}resume(t){if(h.und(t))this.start({pause:!1});else{const n=this.springs;T(L(t),r=>n[r].resume())}return this}each(t){G(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,ye(t,([d,c])=>{c.value=this.get(),d(c,this,this._item)}));const o=!i&&this._started,a=s||o&&r.size?this.get():null;s&&n.size&&ye(n,([d,c])=>{c.value=a,d(c,this,this._item)}),o&&(this._started=!1,ye(r,([d,c])=>{c.value=a,d(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;k.onFrame(this._onFrame)}};function xt(e,t){return Promise.all(t.map(n=>er(e,n))).then(n=>Vt(e,n))}async function er(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:a,onResolve:d}=t,c=h.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const u=h.arr(i)||h.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):T(Si,m=>{const w=t[m];if(h.fun(w)){const b=e._events[m];t[m]=({finished:S,cancelled:x})=>{const E=b.get(w);E?(S||(E.finished=!1),x&&(E.cancelled=!0)):b.set(w,{value:null,finished:S||!1,cancelled:x||!1})},c&&(c[m]=t[m])}});const l=e._state;t.pause===!l.paused?(l.paused=t.pause,ge(t.pause?l.pauseQueue:l.resumeQueue)):l.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||Hn(t,"cancel")===!0;(u||g&&l.asyncId)&&f.push(Qn(++e._lastAsyncId,{props:t,state:l,actions:{pause:mt,resume:mt,start(m,w){g?(Ie(l,e._lastAsyncId),w(oe(e))):(m.onRest=a,w(Yn(u,m,l,e)))}}})),l.paused&&await new Promise(m=>{l.resumeQueue.add(m)});const y=Vt(e,await Promise.all(f));if(o&&y.finished&&!(n&&y.noop)){const m=Jn(t,o,i);if(m)return ir(e,[m]),er(e,m,!0)}return d&&k.batchedUpdates(()=>d(y,e,e.item)),y}function cn(e,t){const n={...e.springs};return t&&T(L(t),r=>{h.und(r.keys)&&(r=Ae(r)),h.obj(r.to)||(r={...r,to:void 0}),rr(n,r,i=>nr(i))}),tr(e,n),n}function tr(e,t){G(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,ue(n,e))})}function nr(e,t){const n=new wi;return n.key=e,t&&ue(n,t),n}function rr(e,t,n){t.keys&&T(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ir(e,t){T(t,n=>{rr(e.springs,n,r=>nr(r,e))})}var it=({children:e,...t})=>{const n=v.useContext(qe),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=Jr(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=qe;return Pt.createElement(s,{value:t},e)},qe=Ei(it,{});it.Provider=qe.Provider;it.Consumer=qe.Consumer;function Ei(e,t){return Object.assign(e,Pt.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Ti=()=>{const e=[],t=function(r){Xr();const i=[];return T(e,(s,o)=>{if(h.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 T(e,r=>r.pause(...arguments)),this},t.resume=function(){return T(e,r=>r.resume(...arguments)),this},t.set=function(r){T(e,(i,s)=>{const o=h.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return T(e,(s,o)=>{if(h.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 T(e,r=>r.stop(...arguments)),this},t.update=function(r){return T(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return h.fun(r)?r(s,i):r};return t._getProps=n,t};function Ii(e,t,n){const r=h.fun(t)&&t;r&&!n&&(n=[]);const i=v.useMemo(()=>r||arguments.length==3?Ti():void 0,[]),s=v.useRef(0),o=zn(),a=v.useMemo(()=>({ctrls:[],queue:[],flush(b,S){const x=cn(b,S);return s.current>0&&!a.queue.length&&!Object.keys(x).some(P=>!b.springs[P])?xt(b,S):new Promise(P=>{tr(b,x),a.queue.push(()=>{P(xt(b,S))}),o()})}}),[]),d=v.useRef([...a.ctrls]),c=[],u=Yt(e)||0;v.useMemo(()=>{T(d.current.slice(e,u),b=>{hi(b,i),b.stop(!0)}),d.current.length=e,l(u,e)},[e]),v.useMemo(()=>{l(0,Math.min(u,e))},n);function l(b,S){for(let x=b;x<S;x++){const E=d.current[x]||(d.current[x]=new Pi(null,a.flush)),P=r?r(x,E):t[x];P&&(c[x]=xi(P))}}const f=d.current.map((b,S)=>cn(b,c[S])),g=v.useContext(it),y=Yt(g),m=g!==y&&fi(g);Dt(()=>{s.current++,a.ctrls=d.current;const{queue:b}=a;b.length&&(a.queue=[],T(b,S=>S())),T(d.current,(S,x)=>{i==null||i.add(S),m&&S.start({default:g});const E=c[x];E&&(pi(S,E.ref),S.ref?S.queue.push(E):S.start(E))})}),Fn(()=>()=>{T(a.ctrls,b=>b.stop(!0))});const w=f.map(b=>({...b}));return i?[w,i]:w}function Ce(e,t){const n=h.fun(e),[[r],i]=Ii(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var Ai=class extends Mt{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=xe(...t);const n=this._get(),r=yt(n);Lt(this,r.create(n))}advance(e){const t=this._get(),n=this.get();H(t,n)||(U(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&un(this._active)&&lt(this)}_get(){const e=h.arr(this.source)?this.source.map(C):L(C(this.source));return this.calc(...e)}_start(){this.idle&&!un(this._active)&&(this.idle=!1,T(nt(this),e=>{e.done=!1}),B.skipAnimation?(k.batchedUpdates(()=>this.advance()),lt(this)):Ze.start(this))}_attach(){let e=1;T(L(this.source),t=>{N(t)&&ue(t,this),wt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){T(L(this.source),e=>{N(e)&&ke(e,this)}),this._active.clear(),lt(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,(wt(n)?n.priority:0)+1),0))}};function Ri(e){return e.idle!==!1}function un(e){return!e.size||Array.from(e).every(Ri)}function lt(e){e.idle||(e.idle=!0,T(nt(e),t=>{t.done=!0}),Se(e,{type:"idle",parent:e}))}B.assign({createStringInterpolator:Vn,to:(e,t)=>new Ai(e,t)});var sr=/^--/;function Oi(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!sr.test(e)&&!(we.hasOwnProperty(e)&&we[e])?t+"px":(""+t).trim()}var ln={};function $i(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:d,...c}=t,u=Object.values(c),l=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:ln[f]||(ln[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=Oi(f,i[f]);sr.test(f)?e.style.setProperty(f,g):e.style[f]=g}l.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),d!==void 0&&e.setAttribute("viewBox",d)}var we={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},ji=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Ci=["Webkit","Ms","Moz","O"];we=Object.keys(we).reduce((e,t)=>(Ci.forEach(n=>e[ji(n,t)]=e[t]),e),we);var Di=/^(matrix|translate|scale|rotate|skew)/,Li=/^(translate)/,Ni=/^(rotate|skew)/,dt=(e,t)=>h.num(e)&&e!==0?e+t:e,Fe=(e,t)=>h.arr(e)?e.every(n=>Fe(n,t)):h.num(e)?e===t:parseFloat(e)===t,Vi=class extends rt{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=>dt(a,"px")).join(",")})`,Fe(o,0)])),G(r,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(d=>[d,d===""]);else if(Di.test(a)){if(delete r[a],h.und(o))return;const d=Li.test(a)?"px":Ni.test(a)?"deg":"";i.push(L(o)),s.push(a==="rotate3d"?([c,u,l,f])=>[`rotate3d(${c},${u},${l},${dt(f,d)})`,Fe(f,0)]:c=>[`${a}(${c.map(u=>dt(u,d)).join(",")})`,Fe(c,a.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Mi(i,s)),super(r)}},Mi=class extends Dn{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 T(this.inputs,(n,r)=>{const i=C(n[0]),[s,o]=this.transforms[r](h.arr(i)?i:n.map(C));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&T(this.inputs,t=>T(t,n=>N(n)&&ue(n,this)))}observerRemoved(e){e==0&&T(this.inputs,t=>T(t,n=>N(n)&&ke(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Se(this,e)}},zi=["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"];B.assign({batchedUpdates:wr.unstable_batchedUpdates,createStringInterpolator:Vn,colors:Ar});var Fi=ai(zi,{applyAnimatedValues:$i,createAnimatedStyle:e=>new Vi(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),ce=Fi.animated;function zt({animate:e=!0,content:t,textStyles:n,htmlElement:r,fadeIn:i,characterPreference:s="simplified",maxDelay:o=15e3}){const a=r??"div",[d,c]=v.useState(!1),[u,l]=Ce(()=>({opacity:i?0:1,transform:i?"scale(0)":"scale(1)",config:{duration:200}})),f=v.useRef(e);v.useEffect(()=>{if(!e){f.current=e;return}const J=!f.current&&e;f.current=e;const D=J?500:Math.floor(Math.random()*(o-3500+1))+3500,q=setTimeout(()=>{l.start({opacity:0,transform:"translateY(15px)",onRest:()=>{c(Q=>!Q),l.start({opacity:1,transform:"translateY(0px)"})}})},D);return()=>clearTimeout(q)},[d,e,l,o]);const g=s==="traditional"?t.traditional:t.simplified,y=e&&d?g:t.english,{fontSize:m,fontFamily:w,fontWeight:b,fontStyle:S,letterSpacing:x,lineHeight:E,...P}=n||{},A={fontSize:m,fontFamily:w,fontWeight:b,fontStyle:S,letterSpacing:x,lineHeight:E},R={...P,display:"inline-grid",alignContent:"center"},ne={...A,gridArea:"1 / 1"},O={...A,gridArea:"1 / 1",visibility:"hidden"};return p.jsx(ce.div,{style:{...u,display:"inline-block"},children:p.jsxs(a,{style:R,children:[p.jsx("span",{style:ne,children:y}),p.jsx("span",{style:O,children:t.english}),p.jsx("span",{style:O,children:t.simplified}),p.jsx("span",{style:O,children:t.traditional})]})})}const Bi=_.keyframes`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),w=require("react"),xr=require("react-dom"),G=require("styled-components"),Et=require("@reduxjs/toolkit"),_r=e=>e&&e.__esModule?e:{default:e};function Sr(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 N=Sr(w),S=_r(G);var Tt=Ce(),k=e=>je(e,Tt),It=Ce();k.write=e=>je(e,It);var Je=Ce();k.onStart=e=>je(e,Je);var At=Ce();k.onFrame=e=>je(e,At);var Rt=Ce();k.onFinish=e=>je(e,Rt);var ae=[];k.setTimeout=(e,t)=>{const n=k.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(Tn(n),0,i),Z+=1,In(),i};var Tn=e=>~(~ae.findIndex(t=>t.time>e)||~ae.length);k.cancel=e=>{Je.delete(e),At.delete(e),Rt.delete(e),Tt.delete(e),It.delete(e)};k.sync=e=>{gt=!0,k.batchedUpdates(e),gt=!1};k.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,k.onStart(n)}return r.handler=e,r.cancel=()=>{Je.delete(n),t=null},r};var Ot=typeof window<"u"?window.requestAnimationFrame:()=>{};k.use=e=>Ot=e;k.now=typeof performance<"u"?()=>performance.now():Date.now;k.batchedUpdates=e=>e();k.catch=console.error;k.frameLoop="always";k.advance=()=>{k.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Rn()};var X=-1,Z=0,gt=!1;function je(e,t){gt?(t.delete(e),e(0)):(t.add(e),In())}function In(){X<0&&(X=0,k.frameLoop!=="demand"&&Ot(An))}function kr(){X=-1}function An(){~X&&(Ot(An),k.batchedUpdates(Rn))}function Rn(){const e=X;X=k.now();const t=Tn(X);if(t&&(On(ae.splice(0,t),n=>n.handler()),Z-=t),!Z){kr();return}Je.flush(),Tt.flush(e?Math.min(64,X-e):16.667),At.flush(),It.flush(),Rt.flush()}function Ce(){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,On(t,r=>r(n)&&e.add(r)),Z+=e.size,t=e)}}}function On(e,t){e.forEach(n=>{try{t(n)}catch(r){k.catch(r)}})}var Pr=Object.defineProperty,Er=(e,t)=>{for(var n in t)Pr(e,n,{get:t[n],enumerable:!0})},U={};Er(U,{assign:()=>Ir,colors:()=>J,createStringInterpolator:()=>jt,skipAnimation:()=>jn,to:()=>$n,willAdvance:()=>Ct});function yt(){}var Tr=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),h={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(h.arr(e)){if(!h.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 T=(e,t)=>e.forEach(t);function q(e,t,n){if(h.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=>h.und(e)?[]:h.arr(e)?e:[e];function be(e,t){if(e.size){const n=Array.from(e);e.clear(),T(n,t)}}var ve=(e,...t)=>be(e,n=>n(...t)),$t=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),jt,$n,J=null,jn=!1,Ct=yt,Ir=e=>{e.to&&($n=e.to),e.now&&(k.now=e.now),e.colors!==void 0&&(J=e.colors),e.skipAnimation!=null&&(jn=e.skipAnimation),e.createStringInterpolator&&(jt=e.createStringInterpolator),e.requestAnimationFrame&&k.use(e.requestAnimationFrame),e.batchedUpdates&&(k.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ct=e.willAdvance),e.frameLoop&&(k.frameLoop=e.frameLoop)},we=new Set,z=[],ct=[],He=0,et={get idle(){return!we.size&&!z.length},start(e){He>e.priority?(we.add(e),k.onStart(Ar)):(Cn(e),k(vt))},advance:vt,sort(e){if(He)k.onFrame(()=>et.sort(e));else{const t=z.indexOf(e);~t&&(z.splice(t,1),Dn(e))}},clear(){z=[],we.clear()}};function Ar(){we.forEach(Cn),we.clear(),k(vt)}function Cn(e){z.includes(e)||Dn(e)}function Dn(e){z.splice(Rr(z,t=>t.priority>e.priority),0,e)}function vt(e){const t=ct;for(let n=0;n<z.length;n++){const r=z[n];He=r.priority,r.idle||(Ct(r),r.advance(e),r.idle||t.push(r))}return He=0,ct=z,ct.length=0,z=t,z.length>0}function Rr(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Or={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 tt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var $r=new RegExp("rgb"+tt(B,B,B)),jr=new RegExp("rgba"+tt(B,B,B,B)),Cr=new RegExp("hsl"+tt(B,qe,qe)),Dr=new RegExp("hsla"+tt(B,qe,qe,B)),Lr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Nr=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Vr=/^#([0-9a-fA-F]{6})$/,Mr=/^#([0-9a-fA-F]{8})$/;function zr(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Vr.exec(e))?parseInt(t[1]+"ff",16)>>>0:J&&J[e]!==void 0?J[e]:(t=$r.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|255)>>>0:(t=jr.exec(e))?(se(t[1])<<24|se(t[2])<<16|se(t[3])<<8|qt(t[4]))>>>0:(t=Lr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Mr.exec(e))?parseInt(t[1],16)>>>0:(t=Nr.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Cr.exec(e))?(Gt(Ht(t[1]),ze(t[2]),ze(t[3]))|255)>>>0:(t=Dr.exec(e))?(Gt(Ht(t[1]),ze(t[2]),ze(t[3]))|qt(t[4]))>>>0:null}function ut(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 Gt(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=ut(i,r,e+1/3),o=ut(i,r,e),a=ut(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 Ht(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 ze(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Qt(e){let t=zr(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(h.fun(e))return e;if(h.arr(e))return Se({range:e,output:t,extrapolate:n});if(h.str(e.output[0]))return jt(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",d=r.easing||(c=>c);return c=>{const u=Br(c,s);return Fr(c,s[u],s[u+1],i[u],i[u+1],d,o,a,r.map)}};function Fr(e,t,n,r,i,s,o,a,d){let c=d?d(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 Br(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Ur={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,Wt=e=>e[ue]||null;function Gr(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Pe(e,t){const n=e[ue];n&&n.forEach(r=>{Gr(r,t)})}var Ln=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Hr(this,e)}},Hr=(e,t)=>Nn(e,ke,t);function de(e,t){if(e[ke]){let n=e[ue];n||Nn(e,ue,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ee(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 Nn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Be=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,qr=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Yt=new RegExp(`(${Be.source})(%|[a-z]+)`,"i"),Qr=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,nt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Vn=e=>{const[t,n]=Wr(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&&nt.test(n))return Vn(n);if(n)return n}return e},Wr=e=>{const t=nt.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},lt,Yr=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Mn=e=>{lt||(lt=J?new RegExp(`(${Object.keys(J).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>C(s).replace(nt,Vn).replace(qr,Qt).replace(lt,Qt)),n=t.map(s=>s.match(Be).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 d;const o=!Yt.test(t[0])&&((d=t.find(c=>Yt.test(c)))==null?void 0:d.replace(Be,""));let a=0;return t[0].replace(Be,()=>`${i[a++](s)}${o||""}`).replace(Qr,Yr)}},Dt="react-spring: ",zn=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Dt}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},Kr=zn(console.warn);function Xr(){Kr(`${Dt}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Zr=zn(console.warn);function Jr(){Zr(`${Dt}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 rt(e){return h.str(e)&&(e[0]=="#"||/\d/.test(e)||!$t()&&nt.test(e)||e in(J||{}))}var Lt=$t()?w.useEffect:w.useLayoutEffect,ei=()=>{const e=w.useRef(!1);return Lt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Fn(){const e=w.useState()[1],t=ei();return()=>{t.current&&e(Math.random())}}function ti(e,t){const[n]=w.useState(()=>({inputs:t,result:e()})),r=w.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&ni(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 ni(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 Bn=e=>w.useEffect(e,ri),ri=[];function Kt(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}var Te=Symbol.for("Animated:node"),ii=e=>!!e&&e[Te]===e,H=e=>e&&e[Te],Nt=(e,t)=>Tr(e,Te,t),it=e=>e&&e[Te]&&e[Te].getPayload(),Un=class{constructor(){Nt(this,this)}getPayload(){return this.payload||[]}},De=class extends Un{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,h.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new De(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return h.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,h.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ie=class extends De{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(h.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()}},Qe={dependencies:null},st=class extends Un{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return q(this.source,(n,r)=>{ii(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&&T(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return q(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Qe.dependencies&&V(e)&&Qe.dependencies.add(e);const t=it(e);t&&T(t,n=>this.add(n))}},Gn=class extends st{constructor(e){super(e)}static create(e){return new Gn(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(si)),!0)}};function si(e){return(rt(e)?Ie:De).create(e)}function bt(e){const t=H(e);return t?t.constructor:h.arr(e)?Gn:rt(e)?Ie:De}var Xt=(e,t)=>{const n=!h.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((r,i)=>{const s=w.useRef(null),o=n&&w.useCallback(y=>{s.current=ci(i,y)},[i]),[a,d]=ai(r,t),c=Fn(),u=()=>{const y=s.current;if(n&&!y)return;(y?t.applyAnimatedValues(y,a.getValue(!0)):!1)===!1&&c()},l=new oi(u,d),f=w.useRef();Lt(()=>(f.current=l,T(d,y=>de(y,l)),()=>{f.current&&(T(f.current.deps,y=>Ee(y,f.current)),k.cancel(f.current.update))})),w.useEffect(u,[]),Bn(()=>()=>{const y=f.current;T(y.deps,m=>Ee(m,y))});const g=t.getComponentProps(a.getValue());return N.createElement(e,{...g,ref:o})})},oi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&k.write(this.update)}};function ai(e,t){const n=new Set;return Qe.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new st(e),Qe.dependencies=null,[e,n]}function ci(e,t){return e&&(h.fun(e)?e(t):e.current=t),t}var Zt=Symbol.for("AnimatedComponent"),ui=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new st(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const a=Jt(o)||"Anonymous";return h.str(o)?o=s[o]||(s[o]=Xt(o,i)):o=o[Zt]||(o[Zt]=Xt(o,i)),o.displayName=`Animated(${a})`,o};return q(e,(o,a)=>{h.arr(e)&&(a=Jt(o)),s[a]=s(o)}),{animated:s}},Jt=e=>h.str(e)?e:e&&h.str(e.displayName)?e.displayName:h.fun(e)&&e.name||null;function ne(e,...t){return h.fun(e)?e(...t):e}var xe=(e,t)=>e===!0||!!(t&&e&&(h.fun(e)?e(t):L(e).includes(t))),Hn=(e,t)=>h.obj(e)?t&&e[t]:e,qn=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,li=e=>e,Vt=(e,t=li)=>{let n=di;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);h.und(s)||(r[i]=s)}return r},di=["config","onProps","onStart","onChange","onPause","onResume","onRest"],fi={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 hi(e){const t={};let n=0;if(q(e,(r,i)=>{fi[i]||(t[i]=r,n++)}),n)return t}function Qn(e){const t=hi(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),h.arr(e)?e.map(Ae):rt(e)?U.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function pi(e){for(const t in e)return!0;return!1}function wt(e){return h.fun(e)||h.arr(e)&&h.obj(e[0])}function mi(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function gi(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var yi={default:{tension:170,friction:26}},xt={...yi.default,mass:1,damping:1,easing:Ur.linear,clamp:!1},vi=class{constructor(){this.velocity=0,Object.assign(this,xt)}};function bi(e,t,n){n&&(n={...n},en(n,t),t={...n,...t}),en(e,t),Object.assign(e,t);for(const o in xt)e[o]==null&&(e[o]=xt[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return h.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 en(e,t){if(!h.und(t.decay))e.duration=void 0;else{const n=!h.und(t.tension)||!h.und(t.friction);(n||!h.und(t.frequency)||!h.und(t.damping)||!h.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var tn=[],wi=class{constructor(){this.changed=!1,this.values=tn,this.toValues=null,this.fromValues=tn,this.config=new vi,this.immediate=!1}};function Wn(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,a)=>{let d,c,u=xe(n.cancel??(r==null?void 0:r.cancel),t);if(u)g();else{h.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)),d=ne(n.delay||0,t),y?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function l(){i.resumeQueue.add(f),i.timeouts.delete(c),c.cancel(),d=c.time-k.now()}function f(){d>0&&!U.skipAnimation?(i.delayed=!0,c=k.setTimeout(g,d),i.pauseQueue.add(l),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(l),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)?Yn(e.get()):F(e.get(),t.every(n=>n.finished)),Yn=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 Kn(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:d}=n;return!s&&e===a&&!t.reset?d:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=Vt(t,(b,v)=>v==="onRest"?void 0:b);let u,l;const f=new Promise((b,v)=>(u=b,l=v)),g=b=>{const v=i<=(n.cancelId||0)&&ce(r)||i!==n.asyncId&&F(r,!1);if(v)throw b.result=v,l(b),b},y=(b,v)=>{const _=new nn,x=new rn;return(async()=>{if(U.skipAnimation)throw Re(n),x.result=F(r,!1),l(x),x;g(_);const E=h.obj(b)?{...b}:{...v,to:b};E.parentId=i,q(c,(A,R)=>{h.und(E[R])&&(E[R]=A)});const P=await r.start(E);return g(_),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),P})()};let m;if(U.skipAnimation)return Re(n),F(r,!1);try{let b;h.arr(e)?b=(async v=>{for(const _ of v)await y(_)})(e):b=Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([b.then(u),f]),m=F(r.get(),!0,!1)}catch(b){if(b instanceof nn)m=b.result;else if(b instanceof rn)m=b.result;else throw b}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?d:void 0)}return h.fun(o)&&k.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 nn=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.")}},rn=class extends Error{constructor(){super("SkipAnimationSignal")}},_t=e=>e instanceof zt,xi=1,zt=class extends Ln{constructor(){super(...arguments),this.id=xi++,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 U.to(this,e)}interpolate(...e){return Xr(),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||et.sort(this),Pe(this,{type:"priority",parent:this,priority:e})}},re=Symbol.for("SpringPhase"),Xn=1,Zn=2,Jn=4,dt=e=>(e[re]&Xn)>0,K=e=>(e[re]&Zn)>0,fe=e=>(e[re]&Jn)>0,sn=(e,t)=>t?e[re]|=Zn|Xn:e[re]&=-3,on=(e,t)=>t?e[re]|=Jn:e[re]&=-5,_i=class extends zt{constructor(e,t){if(super(),this.animation=new wi,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,!h.und(e)||!h.und(t)){const n=h.obj(e)?{...e}:{...t,from:e};h.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 De?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return dt(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=it(r.to);!o&&V(r.to)&&(i=L(C(r.to))),r.values.forEach((c,u)=>{if(c.done)return;const l=c.constructor==Ie?1:o?o[u].lastPosition:i[u];let f=r.immediate,g=l;if(!f){if(g=c.lastPosition,s.tension<=0){c.done=!0;return}let y=c.elapsedTime+=e;const m=r.fromValues[u],b=c.v0!=null?c.v0:c.v0=h.arr(s.velocity)?s.velocity[u]:s.velocity;let v;const _=s.precision||(m==l?.005:Math.min(1,Math.abs(l-m)*.001));if(h.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,E=Math.exp(-(1-x)*y);g=m+b/(1-x)*(1-E),f=Math.abs(c.lastPosition-g)<=_,v=b*E}else{v=c.lastVelocity==null?b:c.lastVelocity;const x=s.restVelocity||_/10,E=s.clamp?0:s.bounce,P=!h.und(E),A=m==l?c.v0>0:m<l;let R,ie=!1;const O=1,te=Math.ceil(e/O);for(let D=0;D<te&&(R=Math.abs(v)>x,!(!R&&(f=Math.abs(l-g)<=_,f)));++D){P&&(ie=g==l||g>l==A,ie&&(v=-v*E,g=l));const W=-s.tension*1e-6*(g-l),Y=-s.friction*.001*v,wr=(W+Y)/s.mass;v=v+wr*O,g=g+v*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)*(l-m),v=(g-c.lastPosition)/e,f=x==1}c.lastVelocity=v,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),d=a.getValue();if(t){const c=C(r.to);(d!==c||n)&&!s.decay?(a.setValue(c),this._onChange(c)):n&&s.decay&&this._onChange(d),this._stop()}else n&&this._onChange(d)}set(e){return k.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;k.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 h.und(e)?(n=this.queue||[],this.queue=[]):n=[h.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),k.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=h.obj(n)?n[t]:n,(n==null||wt(n))&&(n=void 0),r=h.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return dt(this)||(e.reverse&&([n,r]=[r,n]),r=C(r),h.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,Vt(e,(o,a)=>/^on/.test(a)?Hn(o,n):o)),cn(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 Wn(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{fe(this)||(on(this,!0),ve(s.pauseQueue),pe(this,"onPause",F(this,he(this,this.animation.to)),this))},resume:()=>{fe(this)&&(on(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=er(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=!h.und(e.to),i=!h.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:d,from:c}=a;let{to:u=d,from:l=c}=e;i&&!r&&(!t.default||h.und(u))&&(u=l),t.reverse&&([u,l]=[l,u]);const f=!Q(l,c);f&&(a.from=l),l=C(l);const g=!Q(u,d);g&&this._focus(u);const y=wt(t.to),{config:m}=a,{decay:b,velocity:v}=m;(r||i)&&(m.velocity=0),t.config&&!y&&bi(m,ne(t.config,s),t.config!==o.config?ne(o.config,s):void 0);let _=H(this);if(!_||h.und(u))return n(F(this,!0));const x=h.und(t.reset)?i&&!t.default:!h.und(l)&&xe(t.reset,s),E=x?l:this.get(),P=Ae(u),A=h.num(P)||h.arr(P)||rt(P),R=!y&&(!A||xe(o.immediate||t.immediate,s));if(g){const D=bt(u);if(D!==_.constructor)if(R)_=this._set(P);else throw Error(`Cannot animate between ${_.constructor.name} and ${D.name}, as the "to" prop suggests`)}const ie=_.constructor;let O=V(u),te=!1;if(!O){const D=x||!dt(this)&&f;(g||D)&&(te=Q(Ae(E),P),O=!te),(!Q(a.immediate,R)&&!R||!Q(m.decay,b)||!Q(m.velocity,v))&&(O=!0)}if(te&&K(this)&&(a.changed&&!x?O=!0:O||this._stop(d)),!y&&((O||V(d))&&(a.values=_.getPayload(),a.toValues=V(u)?null:ie==Ie?[1]:L(P)),a.immediate!=R&&(a.immediate=R,!R&&!x&&this._set(d)),O)){const{onRest:D}=a;T(ki,Y=>cn(this,t,Y));const W=F(this,he(this,d));ve(this._pendingCalls,W),this._pendingCalls.add(n),a.changed&&k.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(E),y?n(Kn(t.to,t,this._state,this)):O?this._start():K(this)&&!g?this._pendingCalls.add(n):n(Yn(E))}_focus(e){const t=this.animation;e!==t.to&&(Wt(this)&&this._detach(),t.to=e,Wt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;V(t)&&(de(t,this),_t(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;V(e)&&Ee(e,this)}_set(e,t=!0){const n=C(e);if(!h.und(n)){const r=H(this);if(!r||!Q(n,r.getValue())){const i=bt(n);!r||r.constructor!=i?Nt(this,i.create(n)):r.setValue(n),r&&k.batchedUpdates(()=>{this._onChange(n,t)})}}return H(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;H(this).reset(C(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(sn(this,!0),fe(this)||this._resume())}_resume(){U.skipAnimation?this.finish():et.start(this)}_stop(e,t){if(K(this)){sn(this,!1);const n=this.animation;T(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 er(e,t=e.loop,n=e.to){const r=ne(t);if(r){const i=r!==!0&&Qn(r),s=(i||e).reverse,o=!i||i.reset;return Oe({...e,loop:t,default:!1,pause:void 0,to:!s||wt(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Oe(e){const{to:t,from:n}=e=Qn(e),r=new Set;return h.obj(t)&&an(t,r),h.obj(n)&&an(n,r),e.keys=r.size?Array.from(r):null,e}function Si(e){const t=Oe(e);return h.und(t.default)&&(t.default=Vt(t)),t}function an(e,t){q(e,(n,r)=>n!=null&&t.add(r))}var ki=["onStart","onRest","onChange","onPause","onResume"];function cn(e,t,n){e.animation[n]=t[n]!==qn(t,n)?Hn(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 Pi=["onStart","onChange","onRest"],Ei=1,Ti=class{constructor(t,n){this.id=Ei++,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];h.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):(sr(this,n),St(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;T(L(n),i=>r[i].stop(!!t))}else Re(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(h.und(t))this.start({pause:!0});else{const n=this.springs;T(L(t),r=>n[r].pause())}return this}resume(t){if(h.und(t))this.start({pause:!1});else{const n=this.springs;T(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,([d,c])=>{c.value=this.get(),d(c,this,this._item)}));const o=!i&&this._started,a=s||o&&r.size?this.get():null;s&&n.size&&be(n,([d,c])=>{c.value=a,d(c,this,this._item)}),o&&(this._started=!1,be(r,([d,c])=>{c.value=a,d(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;k.onFrame(this._onFrame)}};function St(e,t){return Promise.all(t.map(n=>tr(e,n))).then(n=>Mt(e,n))}async function tr(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:a,onResolve:d}=t,c=h.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const u=h.arr(i)||h.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):T(Pi,m=>{const b=t[m];if(h.fun(b)){const v=e._events[m];t[m]=({finished:_,cancelled:x})=>{const E=v.get(b);E?(_||(E.finished=!1),x&&(E.cancelled=!0)):v.set(b,{value:null,finished:_||!1,cancelled:x||!1})},c&&(c[m]=t[m])}});const l=e._state;t.pause===!l.paused?(l.paused=t.pause,ve(t.pause?l.pauseQueue:l.resumeQueue)):l.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||qn(t,"cancel")===!0;(u||g&&l.asyncId)&&f.push(Wn(++e._lastAsyncId,{props:t,state:l,actions:{pause:yt,resume:yt,start(m,b){g?(Re(l,e._lastAsyncId),b(ce(e))):(m.onRest=a,b(Kn(u,m,l,e)))}}})),l.paused&&await new Promise(m=>{l.resumeQueue.add(m)});const y=Mt(e,await Promise.all(f));if(o&&y.finished&&!(n&&y.noop)){const m=er(t,o,i);if(m)return sr(e,[m]),tr(e,m,!0)}return d&&k.batchedUpdates(()=>d(y,e,e.item)),y}function un(e,t){const n={...e.springs};return t&&T(L(t),r=>{h.und(r.keys)&&(r=Oe(r)),h.obj(r.to)||(r={...r,to:void 0}),ir(n,r,i=>rr(i))}),nr(e,n),n}function nr(e,t){q(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,de(n,e))})}function rr(e,t){const n=new _i;return n.key=e,t&&de(n,t),n}function ir(e,t,n){t.keys&&T(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function sr(e,t){T(t,n=>{ir(e.springs,n,r=>rr(r,e))})}var ot=({children:e,...t})=>{const n=w.useContext(We),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=ti(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=We;return N.createElement(s,{value:t},e)},We=Ii(ot,{});ot.Provider=We.Provider;ot.Consumer=We.Consumer;function Ii(e,t){return Object.assign(e,N.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Ai=()=>{const e=[],t=function(r){Jr();const i=[];return T(e,(s,o)=>{if(h.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 T(e,r=>r.pause(...arguments)),this},t.resume=function(){return T(e,r=>r.resume(...arguments)),this},t.set=function(r){T(e,(i,s)=>{const o=h.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return T(e,(s,o)=>{if(h.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 T(e,r=>r.stop(...arguments)),this},t.update=function(r){return T(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return h.fun(r)?r(s,i):r};return t._getProps=n,t};function Ri(e,t,n){const r=h.fun(t)&&t;r&&!n&&(n=[]);const i=w.useMemo(()=>r||arguments.length==3?Ai():void 0,[]),s=w.useRef(0),o=Fn(),a=w.useMemo(()=>({ctrls:[],queue:[],flush(v,_){const x=un(v,_);return s.current>0&&!a.queue.length&&!Object.keys(x).some(P=>!v.springs[P])?St(v,_):new Promise(P=>{nr(v,x),a.queue.push(()=>{P(St(v,_))}),o()})}}),[]),d=w.useRef([...a.ctrls]),c=[],u=Kt(e)||0;w.useMemo(()=>{T(d.current.slice(e,u),v=>{mi(v,i),v.stop(!0)}),d.current.length=e,l(u,e)},[e]),w.useMemo(()=>{l(0,Math.min(u,e))},n);function l(v,_){for(let x=v;x<_;x++){const E=d.current[x]||(d.current[x]=new Ti(null,a.flush)),P=r?r(x,E):t[x];P&&(c[x]=Si(P))}}const f=d.current.map((v,_)=>un(v,c[_])),g=w.useContext(ot),y=Kt(g),m=g!==y&&pi(g);Lt(()=>{s.current++,a.ctrls=d.current;const{queue:v}=a;v.length&&(a.queue=[],T(v,_=>_())),T(d.current,(_,x)=>{i==null||i.add(_),m&&_.start({default:g});const E=c[x];E&&(gi(_,E.ref),_.ref?_.queue.push(E):_.start(E))})}),Bn(()=>()=>{T(a.ctrls,v=>v.stop(!0))});const b=f.map(v=>({...v}));return i?[b,i]:b}function Le(e,t){const n=h.fun(e),[[r],i]=Ri(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var Oi=class extends zt{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Se(...t);const n=this._get(),r=bt(n);Nt(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&&ln(this._active)&&ft(this)}_get(){const e=h.arr(this.source)?this.source.map(C):L(C(this.source));return this.calc(...e)}_start(){this.idle&&!ln(this._active)&&(this.idle=!1,T(it(this),e=>{e.done=!1}),U.skipAnimation?(k.batchedUpdates(()=>this.advance()),ft(this)):et.start(this))}_attach(){let e=1;T(L(this.source),t=>{V(t)&&de(t,this),_t(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){T(L(this.source),e=>{V(e)&&Ee(e,this)}),this._active.clear(),ft(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,(_t(n)?n.priority:0)+1),0))}};function $i(e){return e.idle!==!1}function ln(e){return!e.size||Array.from(e).every($i)}function ft(e){e.idle||(e.idle=!0,T(it(e),t=>{t.done=!0}),Pe(e,{type:"idle",parent:e}))}U.assign({createStringInterpolator:Mn,to:(e,t)=>new Oi(e,t)});var or=/^--/;function ji(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!or.test(e)&&!(_e.hasOwnProperty(e)&&_e[e])?t+"px":(""+t).trim()}var dn={};function Ci(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:d,...c}=t,u=Object.values(c),l=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:dn[f]||(dn[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=ji(f,i[f]);or.test(f)?e.style.setProperty(f,g):e.style[f]=g}l.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),d!==void 0&&e.setAttribute("viewBox",d)}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},Di=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Li=["Webkit","Ms","Moz","O"];_e=Object.keys(_e).reduce((e,t)=>(Li.forEach(n=>e[Di(n,t)]=e[t]),e),_e);var Ni=/^(matrix|translate|scale|rotate|skew)/,Vi=/^(translate)/,Mi=/^(rotate|skew)/,ht=(e,t)=>h.num(e)&&e!==0?e+t:e,Ue=(e,t)=>h.arr(e)?e.every(n=>Ue(n,t)):h.num(e)?e===t:parseFloat(e)===t,zi=class extends st{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=>ht(a,"px")).join(",")})`,Ue(o,0)])),q(r,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(d=>[d,d===""]);else if(Ni.test(a)){if(delete r[a],h.und(o))return;const d=Vi.test(a)?"px":Mi.test(a)?"deg":"";i.push(L(o)),s.push(a==="rotate3d"?([c,u,l,f])=>[`rotate3d(${c},${u},${l},${ht(f,d)})`,Ue(f,0)]:c=>[`${a}(${c.map(u=>ht(u,d)).join(",")})`,Ue(c,a.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Fi(i,s)),super(r)}},Fi=class extends Ln{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 T(this.inputs,(n,r)=>{const i=C(n[0]),[s,o]=this.transforms[r](h.arr(i)?i:n.map(C));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&T(this.inputs,t=>T(t,n=>V(n)&&de(n,this)))}observerRemoved(e){e==0&&T(this.inputs,t=>T(t,n=>V(n)&&Ee(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Pe(this,e)}},Bi=["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:xr.unstable_batchedUpdates,createStringInterpolator:Mn,colors:Or});var Ui=ui(Bi,{applyAnimatedValues:Ci,createAnimatedStyle:e=>new zi(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),le=Ui.animated;function Ft({animate:e=!0,content:t,textStyles:n,htmlElement:r,fadeIn:i,characterPreference:s="simplified",maxDelay:o=15e3}){const a=r??"div",[d,c]=w.useState(!1),[u,l]=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(()=>{l.start({opacity:0,transform:"translateY(15px)",onRest:()=>{c(Y=>!Y),l.start({opacity:1,transform:"translateY(0px)"})}})},D);return()=>clearTimeout(W)},[d,e,l,o]);const g=s==="traditional"?t.traditional:t.simplified,y=e&&d?g:t.english,{fontSize:m,fontFamily:b,fontWeight:v,fontStyle:_,letterSpacing:x,lineHeight:E,...P}=n||{},A={fontSize:m,fontFamily:b,fontWeight:v,fontStyle:_,letterSpacing:x,lineHeight:E},R={...P,display:"inline-grid",alignContent:"center"},ie={...A,gridArea:"1 / 1"},O={...A,gridArea:"1 / 1",visibility:"hidden"};return p.jsx(le.div,{style:{...u,display:"inline-block"},children:p.jsxs(a,{style:R,children:[p.jsx("span",{style:ie,children:y}),p.jsx("span",{style:O,children:t.english}),p.jsx("span",{style:O,children:t.simplified}),p.jsx("span",{style:O,children:t.traditional})]})})}const Gi=G.keyframes`
2
2
  0% {
3
3
  transform: scale(1);
4
4
  }
@@ -8,7 +8,7 @@
8
8
  100% {
9
9
  transform: scale(1);
10
10
  }
11
- `,Ui=_.div`
11
+ `,Hi=S.default.div`
12
12
  display: inline-block;
13
13
  position: relative;
14
14
  overflow: hidden;
@@ -17,9 +17,9 @@
17
17
  box-shadow: 0px 4px 4px 0px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadow)||"rgba(0, 0, 0, 0.25)"}};
18
18
 
19
19
  &:active {
20
- animation: ${Bi} 0.2s;
20
+ animation: ${Gi} 0.2s;
21
21
  }
22
- `,Gi=_.button`
22
+ `,qi=S.default.button`
23
23
  display: flex;
24
24
  align-items: center;
25
25
  position: relative;
@@ -38,14 +38,14 @@
38
38
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.secondaryLight)||"#ffb652"}};
39
39
  color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSecondary)||"black"}};
40
40
  }
41
- `,Hi=_.div`
41
+ `,Qi=S.default.div`
42
42
  display: flex;
43
43
  margin-right: 1.25rem;
44
44
 
45
45
  @media (min-width: 640px) {
46
46
  margin-right: 0.25rem;
47
47
  }
48
- `;var or={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dn=v.createContext&&v.createContext(or),qi=["attr","size","title"];function Qi(e,t){if(e==null)return{};var n=Wi(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 Wi(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 Qe(){return Qe=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},Qe.apply(this,arguments)}function fn(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 We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fn(Object(n),!0).forEach(function(r){Yi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yi(e,t,n){return t=Ki(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ki(e){var t=Xi(e,"string");return typeof t=="symbol"?t:t+""}function Xi(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 ar(e){return e&&e.map((t,n)=>v.createElement(t.tag,We({key:n},t.attr),ar(t.child)))}function Z(e){return t=>v.createElement(Zi,Qe({attr:We({},e.attr)},t),ar(e.child))}function Zi(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=Qi(e,qi),a=i||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),v.createElement("svg",Qe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:d,style:We(We({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&v.createElement("title",null,s),e.children)};return dn!==void 0?v.createElement(dn.Consumer,null,n=>t(n)):t(or)}function Ji(e){return Z({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 es(e){return Z({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 ts=({iconComponent:e,buttonText:t,buttonType:n="primary",onClick:r,characterPreference:i,animate:s=!0})=>{let o;e==="plus"?o=p.jsx(Ji,{}):e==="send"&&(o=p.jsx(es,{}));const a=()=>{r&&r()};return p.jsx(Ui,{onClick:a,children:p.jsxs(Gi,{className:n,children:[p.jsx(Hi,{children:o}),p.jsx(zt,{textStyles:{lineHeight:"0.8rem",minWidth:"3rem"},content:t,animate:s,characterPreference:i})]})})},ns=_(ce.div)`
48
+ `;var ar={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},fn=N.default.createContext&&N.default.createContext(ar),Wi=["attr","size","title"];function Yi(e,t){if(e==null)return{};var n=Ki(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 Ki(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 Ye(){return Ye=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},Ye.apply(this,arguments)}function hn(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 Ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hn(Object(n),!0).forEach(function(r){Xi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xi(e,t,n){return t=Zi(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){var t=Ji(e,"string");return typeof t=="symbol"?t:t+""}function Ji(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 cr(e){return e&&e.map((t,n)=>N.default.createElement(t.tag,Ke({key:n},t.attr),cr(t.child)))}function ee(e){return t=>N.default.createElement(es,Ye({attr:Ke({},e.attr)},t),cr(e.child))}function es(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=Yi(e,Wi),a=i||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),N.default.createElement("svg",Ye({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:d,style:Ke(Ke({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&N.default.createElement("title",null,s),e.children)};return fn!==void 0?N.default.createElement(fn.Consumer,null,n=>t(n)):t(ar)}function ts(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 ns(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 rs=({iconComponent:e,buttonText:t,buttonType:n="primary",onClick:r,characterPreference:i,animate:s=!0})=>{let o;e==="plus"?o=p.jsx(ts,{}):e==="send"&&(o=p.jsx(ns,{}));const a=()=>{r&&r()};return p.jsx(Hi,{onClick:a,children:p.jsxs(qi,{className:n,children:[p.jsx(Qi,{children:o}),p.jsx(Ft,{textStyles:{lineHeight:"0.8rem",minWidth:"3rem"},content:t,animate:s,characterPreference:i})]})})},is=S.default(le.div)`
49
49
  width: 2.5rem;
50
50
  height: 2.5rem;
51
51
  border-radius: 50%;
@@ -54,11 +54,11 @@
54
54
  align-items: center;
55
55
  justify-content: center;
56
56
  cursor: pointer;
57
- `,rs=_.span`
57
+ `,ss=S.default.span`
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 is(e){return Z({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 ss(e){return Z({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 os=({iconComponent:e,onClick:t})=>{const n=Ce({from:{opacity:0,transform:"scale(0.5)"},to:{opacity:1,transform:"scale(1)"}}),r=()=>{t&&t()};let i;return e==="person"?i=p.jsx(is,{}):e==="qr"&&(i=p.jsx(ss,{})),p.jsx(ns,{style:n,onClick:r,children:p.jsx(rs,{children:i})})};function as(e){return Z({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 cs=({size:e,onClick:t})=>{const n=()=>{t&&t()};return p.jsx(as,{size:e??"1.5rem",onClick:n})},us=_.keyframes`
61
+ `;function os(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 as(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 cs=({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=p.jsx(os,{}):e==="qr"&&(i=p.jsx(as,{})),p.jsx(is,{style:n,onClick:r,children:p.jsx(ss,{children:i})})};function us(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 ls=({size:e,onClick:t})=>{const n=()=>{t&&t()};return p.jsx(us,{size:e??"1.5rem",onClick:n})},ds=G.keyframes`
62
62
  0% {
63
63
  transform: scale(0);
64
64
  opacity: 0.6;
@@ -67,7 +67,7 @@
67
67
  transform: scale(10);
68
68
  opacity: 0;
69
69
  }
70
- `,ls=_.span`
70
+ `,fs=S.default.span`
71
71
  position: absolute;
72
72
  left: ${({$x:e})=>e}px;
73
73
  top: ${({$y:e})=>e}px;
@@ -78,60 +78,60 @@
78
78
  border-radius: 50%;
79
79
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.ripple)||"rgba(0, 0, 0, 0.15)"}};
80
80
  pointer-events: none;
81
- animation: ${us} 0.4s ease-out forwards;
82
- `;_.div`
81
+ animation: ${ds} 0.4s ease-out forwards;
82
+ `;S.default.div`
83
83
  position: absolute;
84
84
  left: 0;
85
85
  right: 0;
86
86
  display: flex;
87
87
  flex-direction: column;
88
88
  z-index: 1;
89
- `;_.div`
89
+ `;S.default.div`
90
90
  display: flex;
91
91
  flex-direction: column;
92
92
  padding: 1.5rem var(--app-standard-padding);
93
93
  color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSurface)||"black"}};
94
94
  gap: 2rem;
95
95
  justify-self: center;
96
- `;_.div`
96
+ `;S.default.div`
97
97
  display: flex;
98
98
  flex-direction: column;
99
99
  gap: 1.5rem;
100
- `;const ds=_.ul`
100
+ `;const hs=S.default.ul`
101
101
  display: flex;
102
102
  flex-direction: column;
103
103
  justify-content: center;
104
104
  padding-inline-start: unset;
105
- `,fs=_.li`
105
+ `,ps=S.default.li`
106
106
  position: relative;
107
107
  list-style: none;
108
108
  cursor: pointer;
109
109
  overflow: hidden;
110
110
  -webkit-tap-highlight-color: transparent;
111
111
  border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrimLight)||"rgba(0, 0, 0, 0.3)"}};
112
- `,hs=_.div`
112
+ `,ms=S.default.div`
113
113
  display: flex;
114
114
  flex-direction: row;
115
115
  justify-content: space-between;
116
116
  align-items: center;
117
117
  padding: 0.5rem 0.75rem;
118
- `,ps=_.div`
118
+ `,gs=S.default.div`
119
119
  display: flex;
120
120
  flex-direction: row;
121
121
  gap: 2rem;
122
122
  align-items: center;
123
- `,hn=_.div`
123
+ `,pn=S.default.div`
124
124
  display: flex;
125
125
  flex-direction: column;
126
126
  justify-content: center;
127
- `,ms=_.span`
127
+ `,ys=S.default.span`
128
128
  font-size: 1rem;
129
- `;function gs(e){return Z({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(e)}function ys(e){return Z({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}function vs(e){return Z({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m6.76 4.84-1.8-1.79-1.41 1.41 1.79 1.79zM1 10.5h3v2H1zM11 .55h2V3.5h-2zm8.04 2.495 1.408 1.407-1.79 1.79-1.407-1.408zm-1.8 15.115 1.79 1.8 1.41-1.41-1.8-1.79zM20 10.5h3v2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm-1 4h2v2.95h-2zm-7.45-.96 1.41 1.41 1.79-1.8-1.41-1.41z"},child:[]}]})(e)}const bs=_.input`
129
+ `;function vs(e){return ee({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(e)}function bs(e){return ee({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}function ws(e){return ee({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m6.76 4.84-1.8-1.79-1.41 1.41 1.79 1.79zM1 10.5h3v2H1zM11 .55h2V3.5h-2zm8.04 2.495 1.408 1.407-1.79 1.79-1.407-1.408zm-1.8 15.115 1.79 1.8 1.41-1.41-1.8-1.79zM20 10.5h3v2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm-1 4h2v2.95h-2zm-7.45-.96 1.41 1.41 1.79-1.8-1.41-1.41z"},child:[]}]})(e)}const xs=S.default.input`
130
130
  opacity: 0;
131
131
  width: 0;
132
132
  height: 0;
133
133
  position: absolute;
134
- `,_t=_.span`
134
+ `,kt=S.default.span`
135
135
  position: absolute;
136
136
  top: 50%;
137
137
  left: ${({$checked:e})=>e?"14px":"0px"};
@@ -143,7 +143,7 @@
143
143
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
144
144
  left 150ms cubic-bezier(0.4, 0, 0.2, 1);
145
145
  pointer-events: none;
146
- `,ws=_.label`
146
+ `,_s=S.default.label`
147
147
  position: relative;
148
148
  display: inline-flex;
149
149
  align-items: center;
@@ -151,21 +151,21 @@
151
151
  -webkit-tap-highlight-color: transparent;
152
152
 
153
153
  @media (hover: hover) {
154
- &:hover ${_t} {
154
+ &:hover ${kt} {
155
155
  background-color: ${({$checked:e,theme:t})=>{var n,r;return e?((n=t.colors)==null?void 0:n.toggleHoverOn)||"rgba(72, 159, 181, 0.08)":((r=t.colors)==null?void 0:r.toggleHoverOff)||"rgba(0, 0, 0, 0.04)"}};
156
156
  }
157
157
  }
158
158
 
159
- &:focus-within ${_t} {
159
+ &:focus-within ${kt} {
160
160
  background-color: ${({$checked:e,theme:t})=>{var n,r;return e?((n=t.colors)==null?void 0:n.toggleFocusOn)||"rgba(72, 159, 181, 0.12)":((r=t.colors)==null?void 0:r.toggleFocusOff)||"rgba(0, 0, 0, 0.06)"}};
161
161
  }
162
- `,xs=_.span`
162
+ `,Ss=S.default.span`
163
163
  width: 34px;
164
164
  height: 14px;
165
165
  background-color: ${({$checked:e,theme:t})=>{var n,r;return e?((n=t.colors)==null?void 0:n.toggleTrackOn)||"rgba(72, 159, 181, 0.5)":((r=t.colors)==null?void 0:r.toggleTrackOff)||"rgba(0, 0, 0, 0.38)"}};
166
166
  border-radius: 7px;
167
167
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
168
- `,_s=_.span`
168
+ `,ks=S.default.span`
169
169
  position: absolute;
170
170
  top: 50%;
171
171
  left: ${({$checked:e})=>e?"14px":"0px"};
@@ -180,49 +180,49 @@
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
- `,cr=({checked:e,defaultChecked:t=!1,onChange:n,disabled:r=!1})=>{const[i,s]=v.useState(t),o=e!==void 0,a=o?e:i,d=c=>{if(r)return;c.target.blur();const u=!a;o||s(u),n==null||n(u)};return p.jsxs(ws,{$checked:a,onClick:c=>c.stopPropagation(),children:[p.jsx(bs,{type:"checkbox",checked:a,onChange:d,disabled:r}),p.jsx(xs,{$checked:a}),p.jsx(_t,{$checked:a}),p.jsx(_s,{$checked:a})]})},Ss={translate:gs,sunny:vs,character:({size:e})=>p.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},ks=({icon:e,text:t,textContent:n,characterPreference:r,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:d,switchChecked:c,onSwitchChange:u})=>{const l=Ss[e],[f,g]=v.useState(null),y=w=>{const b=w.currentTarget.getBoundingClientRect(),S=w.clientX-b.left,x=w.clientY-b.top;g({x:S,y:x,key:Date.now()}),o==="switch"&&u?u(!c):a&&a()},m=()=>o==="switch"?p.jsx(cr,{checked:c,onChange:u}):p.jsx(ys,{});return p.jsxs(fs,{onClick:y,style:d,children:[f&&p.jsx(ls,{$x:f.x,$y:f.y},f.key),p.jsxs(hs,{children:[p.jsxs(ps,{children:[p.jsx(hn,{children:p.jsx(l,{size:"1rem"})}),p.jsx(ms,{children:n?p.jsx(zt,{content:n,characterPreference:r,animate:i,maxDelay:s}):t})]}),p.jsx(hn,{children:m()})]})]})},Ye={tension:200,friction:25},Ps={tension:150,friction:25},Es={tension:Ye.tension+125,friction:Ye.friction+5},Re={tension:300,friction:30},Ts={tension:Re.tension*2.5,friction:Re.friction},Is={tension:Re.tension*3,friction:Re.friction},As={tension:185,friction:25},Rs={tension:50,friction:20},Os={tension:280,friction:22,mass:1},$s={tension:220,friction:26,mass:1},De="cubic-bezier(0.4, 0.0, 0.2, 1)",js=_.keyframes`
183
+ `,ur=({checked:e,defaultChecked:t=!1,onChange:n,disabled:r=!1})=>{const[i,s]=w.useState(t),o=e!==void 0,a=o?e:i,d=c=>{if(r)return;c.target.blur();const u=!a;o||s(u),n==null||n(u)};return p.jsxs(_s,{$checked:a,onClick:c=>c.stopPropagation(),children:[p.jsx(xs,{type:"checkbox",checked:a,onChange:d,disabled:r}),p.jsx(Ss,{$checked:a}),p.jsx(kt,{$checked:a}),p.jsx(ks,{$checked:a})]})},Ps={translate:vs,sunny:ws,character:({size:e})=>p.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},Es=({icon:e,text:t,textContent:n,characterPreference:r,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:d,switchChecked:c,onSwitchChange:u})=>{const l=Ps[e],[f,g]=w.useState(null),y=b=>{const v=b.currentTarget.getBoundingClientRect(),_=b.clientX-v.left,x=b.clientY-v.top;g({x:_,y:x,key:Date.now()}),o==="switch"&&u?u(!c):a&&a()},m=()=>o==="switch"?p.jsx(ur,{checked:c,onChange:u}):p.jsx(bs,{});return p.jsxs(ps,{onClick:y,style:d,children:[f&&p.jsx(fs,{$x:f.x,$y:f.y},f.key),p.jsxs(ms,{children:[p.jsxs(gs,{children:[p.jsx(pn,{children:p.jsx(l,{size:"1rem"})}),p.jsx(ys,{children:n?p.jsx(Ft,{content:n,characterPreference:r,animate:i,maxDelay:s}):t})]}),p.jsx(pn,{children:m()})]})]})},Xe={tension:200,friction:25},Ts={tension:150,friction:25},Is={tension:Xe.tension+125,friction:Xe.friction+5},$e={tension:300,friction:30},As={tension:$e.tension*2.5,friction:$e.friction},Rs={tension:$e.tension*3,friction:$e.friction},Os={tension:185,friction:25},$s={tension:50,friction:20},js={tension:280,friction:22,mass:1},Cs={tension:220,friction:26,mass:1},Ne="cubic-bezier(0.4, 0.0, 0.2, 1)",Ds=G.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
- `,Cs=_.keyframes`
190
+ `,Ls=G.keyframes`
191
191
  0%, 100% {
192
192
  transform: scale(1);
193
193
  }
194
194
  40% {
195
195
  transform: scale(0.5);
196
196
  }
197
- `,Ds=_.keyframes`
197
+ `,Ns=G.keyframes`
198
198
  0% {
199
199
  transform: rotate(0deg);
200
200
  }
201
201
  100% {
202
202
  transform: rotate(540deg);
203
203
  }
204
- `,Ls=_.keyframes`
204
+ `,Vs=G.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
- `,Ns=_.keyframes`
211
+ `,Ms=G.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
- `,ur=_.keyframes`
218
+ `,lr=G.keyframes`
219
219
  0% {
220
220
  opacity: 0;
221
221
  }
222
222
  100% {
223
223
  opacity: 1;
224
224
  }
225
- `,Vs=_(ce.div)`
225
+ `,zs=S.default(le.div)`
226
226
  position: fixed;
227
227
  inset: 0;
228
228
  z-index: 9999;
@@ -231,14 +231,14 @@
231
231
  justify-content: center;
232
232
  background: rgb(${({theme:e})=>e.colors.backgroundRgb});
233
233
  will-change: opacity, transform;
234
- `,Ms=_.div`
234
+ `,Fs=S.default.div`
235
235
  position: relative;
236
236
  width: 200px;
237
237
  height: 200px;
238
238
  opacity: 0;
239
- animation: ${ur} 0.25s ease-out forwards, ${Ds} 1.75s ${De} 0.25s infinite;
239
+ animation: ${lr} 0.25s ease-out forwards, ${Ns} 1.75s ${Ne} 0.25s infinite;
240
240
  will-change: transform, opacity;
241
- `,pn=_.span`
241
+ `,mn=S.default.span`
242
242
  position: absolute;
243
243
  left: 50%;
244
244
  font-size: 3rem;
@@ -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: ${Ls} 1.75s ${De} 0.25s infinite;
249
+ animation: ${Vs} 1.75s ${Ne} 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"}},
@@ -254,7 +254,7 @@
254
254
  4px 4px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
255
255
  5px 5px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
256
256
  6px 6px 4px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadow)||"rgba(0, 0, 0, 0.75)"}};
257
- `,zs=_.span`
257
+ `,Bs=S.default.span`
258
258
  position: absolute;
259
259
  top: 50%;
260
260
  left: 50%;
@@ -262,7 +262,7 @@
262
262
  font-weight: 700;
263
263
  color: ${({$color:e,theme:t})=>{var n;return e||((n=t.colors)==null?void 0:n.onBackground)||"white"}};
264
264
  transform: translate(-50%, -50%);
265
- animation: ${Ns} 1.75s ${De} 0.25s infinite;
265
+ animation: ${Ms} 1.75s ${Ne} 0.25s infinite;
266
266
  will-change: transform;
267
267
  text-shadow: 1px 1px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
268
268
  2px 2px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
@@ -270,7 +270,7 @@
270
270
  4px 4px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
271
271
  5px 5px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
272
272
  6px 6px 4px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadow)||"rgba(0, 0, 0, 0.75)"}};
273
- `,Fs=_.div`
273
+ `,Us=S.default.div`
274
274
  position: absolute;
275
275
  top: 50%;
276
276
  left: 50%;
@@ -279,27 +279,27 @@
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: ${ur} 0.15s ease-out forwards, ${js} 2s ${De} infinite forwards;
282
+ animation: ${lr} 0.15s ease-out forwards, ${Ds} 2s ${Ne} infinite forwards;
283
283
  will-change: transform, opacity;
284
284
  pointer-events: none;
285
285
  z-index: -1;
286
- `,Bs=_.div`
286
+ `,Gs=S.default.div`
287
287
  position: absolute;
288
288
  inset: 0;
289
289
  background-color: ${({theme:e})=>e.colors.primary};
290
290
  background-blend-mode: screen;
291
291
  transform-origin: center;
292
- animation: ${Cs} 1.75s ${De} 0.25s infinite forwards;
292
+ animation: ${Ls} 1.75s ${Ne} 0.25s infinite forwards;
293
293
  clip-path: url(#rounded-pentagon);
294
- `,Us=_.svg`
294
+ `,Hs=S.default.svg`
295
295
  position: absolute;
296
296
  width: 0;
297
297
  height: 0;
298
- `,Gs=({isLoading:e,onExitComplete:t,orbitingContent:n="有",centerContent:r="没",orbitingColor:i,centerColor:s})=>{const[o,a]=v.useState(!0),[d,c]=Ce(()=>({opacity:1,scale:1}));return v.useEffect(()=>{e||c.start({opacity:0,scale:1.1,config:Ye,onRest:()=>{a(!1),t==null||t()}})},[e,c,t]),o?p.jsxs(Vs,{style:{opacity:d.opacity,transform:d.scale.to(u=>`scale(${u})`)},children:[p.jsx(Us,{children:p.jsx("defs",{children:p.jsx("clipPath",{id:"rounded-pentagon",clipPathUnits:"objectBoundingBox",children:p.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"})})})}),p.jsx(Fs,{children:p.jsx(Bs,{})}),p.jsxs(Ms,{children:[p.jsx(pn,{$position:"top",$color:i,children:n}),p.jsx(zs,{$color:s,children:r}),p.jsx(pn,{$position:"bottom",$color:i,children:n})]})]}):null},Hs=_.keyframes`
298
+ `,qs=({isLoading:e,onExitComplete:t,orbitingContent:n="有",centerContent:r="没",orbitingColor:i,centerColor:s})=>{const[o,a]=w.useState(!0),[d,c]=Le(()=>({opacity:1,scale:1}));return w.useEffect(()=>{e||c.start({opacity:0,scale:1.1,config:Xe,onRest:()=>{a(!1),t==null||t()}})},[e,c,t]),o?p.jsxs(zs,{style:{opacity:d.opacity,transform:d.scale.to(u=>`scale(${u})`)},children:[p.jsx(Hs,{children:p.jsx("defs",{children:p.jsx("clipPath",{id:"rounded-pentagon",clipPathUnits:"objectBoundingBox",children:p.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"})})})}),p.jsx(Us,{children:p.jsx(Gs,{})}),p.jsxs(Fs,{children:[p.jsx(mn,{$position:"top",$color:i,children:n}),p.jsx(Bs,{$color:s,children:r}),p.jsx(mn,{$position:"bottom",$color:i,children:n})]})]}):null},Qs=G.keyframes`
299
299
  0%, 100% { transform: translateX(0); }
300
300
  20%, 60% { transform: translateX(-4px); }
301
301
  40%, 80% { transform: translateX(4px); }
302
- `,qs=_.div`
302
+ `,Ws=S.default.div`
303
303
  display: flex;
304
304
  flex-direction: column;
305
305
  gap: 0.5rem;
@@ -307,12 +307,12 @@
307
307
  width: 100%;
308
308
  max-width: 100%;
309
309
  box-sizing: border-box;
310
- animation: ${({$shaking:e})=>e?Hs:"none"} 0.2s ease-in-out;
311
- `,he=_.div`
310
+ animation: ${({$shaking:e})=>e?Qs:"none"} 0.2s ease-in-out;
311
+ `,me=S.default.div`
312
312
  display: flex;
313
313
  justify-content: ${({$justify:e})=>e||"center"};
314
314
  gap: 0.25rem;
315
- `,pe=_.button`
315
+ `,ge=S.default.button`
316
316
  display: flex;
317
317
  align-items: center;
318
318
  justify-content: center;
@@ -373,29 +373,29 @@
373
373
  opacity: 0.4;
374
374
  `}}}
375
375
  }
376
- `,me=_.span`
376
+ `,ye=S.default.span`
377
377
  line-height: 1;
378
- `;_.span`
378
+ `;S.default.span`
379
379
  font-size: 0.625rem;
380
380
  opacity: 0.6;
381
381
  margin-top: 0.125rem;
382
- `;_.div`
382
+ `;S.default.div`
383
383
  display: flex;
384
384
  flex-direction: column;
385
385
  align-items: center;
386
- `;const Qs=_.div`
386
+ `;const Ys=S.default.div`
387
387
  display: flex;
388
388
  justify-content: center;
389
389
  align-items: center;
390
390
  overflow: hidden;
391
- `,Ws=_.span`
391
+ `,Ks=S.default.span`
392
392
  font-size: 2rem;
393
393
  font-family: 'Noto Sans TC', sans-serif;
394
394
  color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onPrimary)||"#fff"}};
395
395
  letter-spacing: 0.1em;
396
396
  opacity: ${({$visible:e})=>e?1:0};
397
397
  transition: opacity 0.1s ease;
398
- `,Ys=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),ft=0,Ks=2.5,Xs=3.5,Zs=ce(Qs),Me={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},Js=400,lr=v.memo(({onKeyPress:e,onBackspace:t,onSubmit:n,disabled:r=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:d=!1})=>{const[c,u]=v.useState(""),l=v.useRef(null),f=P=>P?Ys.has(P)?Ks:Xs:ft,[g,y]=Ce(()=>({height:ft,config:{tension:300,friction:26}}));v.useEffect(()=>(i?(l.current&&(clearTimeout(l.current),l.current=null),u(i),y.start({height:f(i)})):c&&(l.current=setTimeout(()=>{y.start({height:ft}),setTimeout(()=>u(""),250)},Js)),()=>{l.current&&clearTimeout(l.current)}),[i,c,y]);const m=v.useCallback(P=>{!r&&!(s!=null&&s.has(P))&&e(P)},[e,r,s]),w=v.useCallback(()=>{!r&&t&&t()},[t,r]),b=v.useCallback(()=>{!r&&n&&n()},[n,r]),S=v.useCallback(P=>r?!0:(s==null?void 0:s.has(P))??!1,[r,s]),x=v.useCallback(P=>o!=null&&o.has(P)?"correct":a!=null&&a.has(P)?"incorrect":null,[o,a]),E=(P,A)=>p.jsx(pe,{onClick:()=>m(P),disabled:S(P),$status:x(P),children:p.jsx(me,{children:P})},`${P}-${A}`);return p.jsxs(qs,{$shaking:d,children:[p.jsx(Zs,{style:{height:g.height.to(P=>`${P}rem`)},children:p.jsx(Ws,{$visible:!!i,children:c})}),p.jsx(he,{children:Me.row1.map(E)}),p.jsx(he,{children:Me.row2.map(E)}),p.jsx(he,{children:Me.row3.map(E)}),p.jsx(he,{children:Me.row4.map(E)}),p.jsxs(he,{$justify:"flex-start",children:[p.jsx(pe,{$variant:"backspace",$width:"wide",$muted:!i,onClick:w,disabled:r,children:p.jsx(me,{children:"⌫"})}),p.jsx(pe,{$variant:"tone",$width:"space",onClick:()=>m("ˉ"),disabled:S("ˉ"),$status:x("ˉ"),children:p.jsx(me,{children:"ˉ"})}),p.jsx(pe,{onClick:()=>m("ㄦ"),disabled:S("ㄦ"),$status:x("ㄦ"),children:p.jsx(me,{children:"ㄦ"})}),n&&p.jsx(pe,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:b,disabled:r,children:p.jsx(me,{children:"⏎"})})]})]})});lr.displayName="ZhuyinKeyboard";const eo=_.keyframes`
398
+ `,Xs=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),pt=0,Zs=2.5,Js=3.5,eo=le(Ys),Fe={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},to=400,dr=w.memo(({onKeyPress:e,onBackspace:t,onSubmit:n,disabled:r=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:d=!1})=>{const[c,u]=w.useState(""),l=w.useRef(null),f=P=>P?Xs.has(P)?Zs:Js:pt,[g,y]=Le(()=>({height:pt,config:{tension:300,friction:26}}));w.useEffect(()=>(i?(l.current&&(clearTimeout(l.current),l.current=null),u(i),y.start({height:f(i)})):c&&(l.current=setTimeout(()=>{y.start({height:pt}),setTimeout(()=>u(""),250)},to)),()=>{l.current&&clearTimeout(l.current)}),[i,c,y]);const m=w.useCallback(P=>{!r&&!(s!=null&&s.has(P))&&e(P)},[e,r,s]),b=w.useCallback(()=>{!r&&t&&t()},[t,r]),v=w.useCallback(()=>{!r&&n&&n()},[n,r]),_=w.useCallback(P=>r?!0:(s==null?void 0:s.has(P))??!1,[r,s]),x=w.useCallback(P=>o!=null&&o.has(P)?"correct":a!=null&&a.has(P)?"incorrect":null,[o,a]),E=(P,A)=>p.jsx(ge,{onClick:()=>m(P),disabled:_(P),$status:x(P),children:p.jsx(ye,{children:P})},`${P}-${A}`);return p.jsxs(Ws,{$shaking:d,children:[p.jsx(eo,{style:{height:g.height.to(P=>`${P}rem`)},children:p.jsx(Ks,{$visible:!!i,children:c})}),p.jsx(me,{children:Fe.row1.map(E)}),p.jsx(me,{children:Fe.row2.map(E)}),p.jsx(me,{children:Fe.row3.map(E)}),p.jsx(me,{children:Fe.row4.map(E)}),p.jsxs(me,{$justify:"flex-start",children:[p.jsx(ge,{$variant:"backspace",$width:"wide",$muted:!i,onClick:b,disabled:r,children:p.jsx(ye,{children:"⌫"})}),p.jsx(ge,{$variant:"tone",$width:"space",onClick:()=>m("ˉ"),disabled:_("ˉ"),$status:x("ˉ"),children:p.jsx(ye,{children:"ˉ"})}),p.jsx(ge,{onClick:()=>m("ㄦ"),disabled:_("ㄦ"),$status:x("ㄦ"),children:p.jsx(ye,{children:"ㄦ"})}),n&&p.jsx(ge,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:v,disabled:r,children:p.jsx(ye,{children:"⏎"})})]})]})});dr.displayName="ZhuyinKeyboard";const no=G.keyframes`
399
399
  0% {
400
400
  transform: scale(0);
401
401
  opacity: 0.6;
@@ -404,12 +404,12 @@
404
404
  transform: scale(10);
405
405
  opacity: 0;
406
406
  }
407
- `,to=_.div`
407
+ `,ro=S.default.div`
408
408
  position: relative;
409
409
  display: flex;
410
410
  flex-direction: column;
411
411
  gap: 0.5rem;
412
- `,no=_.div`
412
+ `,io=S.default.div`
413
413
  position: absolute;
414
414
  top: ${({$index:e})=>`calc(${e} * (1rem * 2 + 1.125rem * 1.5 + 0.5rem))`};
415
415
  left: 0;
@@ -419,7 +419,7 @@
419
419
  border-radius: 12px;
420
420
  transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
421
421
  pointer-events: none;
422
- `,ro=_.button`
422
+ `,so=S.default.button`
423
423
  position: relative;
424
424
  z-index: 1;
425
425
  display: flex;
@@ -440,7 +440,7 @@
440
440
  transition:
441
441
  color 0.2s ease,
442
442
  font-weight 0.2s ease;
443
- `,io=_.span`
443
+ `,oo=S.default.span`
444
444
  position: absolute;
445
445
  left: ${({$x:e})=>e}px;
446
446
  top: ${({$y:e})=>e}px;
@@ -451,26 +451,26 @@
451
451
  border-radius: 50%;
452
452
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.ripple)||"rgba(0, 0, 0, 0.2)"}};
453
453
  pointer-events: none;
454
- animation: ${eo} 0.4s ease-out forwards;
455
- `,so=_.span``;function oo({options:e,value:t,onChange:n,onClose:r,closeOnSameValue:i=!0}){const s=v.useRef(null),[o,a]=v.useState(null),d=e.findIndex(u=>u.value===t),c=(u,l)=>{const f=u.currentTarget.getBoundingClientRect(),g=u.clientX-f.left,y=u.clientY-f.top;if(a({x:g,y,key:Date.now(),target:l.value}),l.value===t){i&&r&&r();return}if(n(l.value),r){const m=s.current;if(m){const w=()=>{m.removeEventListener("transitionend",w),r()};m.addEventListener("transitionend",w)}else r()}};return p.jsxs(to,{children:[p.jsx(no,{ref:s,$index:d}),e.map(u=>p.jsxs(ro,{$isSelected:t===u.value,onClick:l=>c(l,u),children:[o&&o.target===u.value&&p.jsx(io,{$x:o.x,$y:o.y},o.key),p.jsx(so,{children:u.label})]},u.value))]})}function ao(e,t,n){return Math.max(t,Math.min(e,n))}const $={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 mn(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function gn(e,t,n,r=.15){return r===0?ao(e,t,n):e<t?-mn(t-e,n-t,r)+t:e>n?+mn(e-n,n-t,r)+n:e}function co(e,[t,n],[r,i]){const[[s,o],[a,d]]=e;return[gn(t,s,o,r),gn(n,a,d,i)]}function uo(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 lo(e){var t=uo(e,"string");return typeof t=="symbol"?t:String(t)}function j(e,t,n){return t=lo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yn(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?yn(Object(n),!0).forEach(function(r){j(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const dr={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 vn(e){return e?e[0].toUpperCase()+e.slice(1):""}const fo=["enter","leave"];function ho(e=!1,t){return e&&!fo.includes(t)}function po(e,t="",n=!1){const r=dr[e],i=r&&r[t]||t;return"on"+vn(e)+vn(i)+(ho(n,i)?"Capture":"")}const mo=["gotpointercapture","lostpointercapture"];function go(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=mo.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(r);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function yo(e,t=""){const n=dr[e],r=n&&n[t]||t;return e+r}function st(e){return"touches"in e}function fr(e){return st(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function vo(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 bo(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function hr(e){return st(e)?bo(e)[0]:e}function wo(e){return vo(e).map(t=>t.identifier)}function ht(e){const t=hr(e);return st(e)?t.identifier:t.pointerId}function bn(e){const t=hr(e);return[t.clientX,t.clientY]}function xo(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 Ke(e,...t){return typeof e=="function"?e(...t):e}function _o(){}function So(...e){return e.length===0?_o:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function wn(e,t){return Object.assign({},t,e||{})}const ko=32;class Po{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?Ke(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,xo(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);$.addTo(n._distance,A)}this.axisIntent&&this.axisIntent(t);const[o,a]=n._movement,[d,c]=r.threshold,{_step:u,values:l}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(o)>=d&&l[0]),u[1]===!1&&(u[1]=Math.abs(a)>=c&&l[1])):(u[0]===!1&&(u[0]=Math.abs(o)>=d&&Math.sign(o)*d),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]=l;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=Ke(r.bounds,n)),this.setup&&this.setup()),n.movement=f,this.computeOffset()));const[m,w]=n.offset,[[b,S],[x,E]]=n._bounds;n.overflow=[m<b?-1:m>S?1:0,w<x?-1:w>E?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 P=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=co(n._bounds,n.offset,P),n.delta=$.sub(n.offset,g),this.computeMovement(),y&&(!n.last||s>ko)){n.delta=$.sub(n.offset,g);const A=n.delta.map(Math.abs);$.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 Eo([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 To extends Po{constructor(...t){super(...t),j(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=$.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=$.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[fr(t)]:r.axisThreshold;n.axis=Eo(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 xn=e=>e,_n=.15,Ft={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[_n,_n];case!1:return[0,0];default:return $.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return $.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;if(this.hasCustomTransform=!!r,process.env.NODE_ENV==="development"){const i=r||xn;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||xn},threshold(e){return $.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Ft,{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 Io=0,Le=I(I({},Ft),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Io){return e},bounds(e={}){if(typeof e=="function")return s=>Le.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]]}}),Sn={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 Ao extends To{constructor(...t){super(...t),j(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=Le.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=ht(t),r._pointerActive=!0,this.computeValues(bn(t)),this.computeInitial(),n.preventScrollAxis&&fr(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=ht(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const s=bn(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=$.sub(s,n._values),this.computeValues(s)),$.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=ht(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,d]=n._delta,[c,u]=n._movement,[l,f]=r.swipe.velocity,[g,y]=r.swipe.distance,m=r.swipe.duration;if(n.elapsedTime<m){const w=Math.abs(a/n.timeDelta),b=Math.abs(d/n.timeDelta);w>l&&Math.abs(c)>g&&(n.swipe[0]=Math.sign(a)),b>f&&Math.abs(u)>y&&(n.swipe[1]=Math.sign(d))}}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,Ro(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=Sn[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,$.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in Sn&&(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 Ro(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Ne=typeof window<"u"&&window.document&&window.document.createElement;function pr(){return Ne&&"ontouchstart"in window}function Oo(){return pr()||Ne&&window.navigator.maxTouchPoints>1}function $o(){return Ne&&"onpointerdown"in window}function jo(){return Ne&&"exitPointerLock"in window.document}function Co(){try{return"constructor"in GestureEvent}catch{return!1}}const V={isBrowser:Ne,gesture:Co(),touch:pr(),touchscreen:Oo(),pointer:$o(),pointerLock:jo()},Do=250,Lo=180,No=.5,Vo=50,Mo=250,zo=10,kn={mouse:0,touch:0,pen:8},mr=I(I({},Le),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&V.pointerLock,V.touch&&n?"touch":this.pointerLock?"mouse":V.pointer&&!i?"pointer":V.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?Do:void 0,!(!V.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=$.toVector(e,n?r:i?1:0);return this.filterTaps=n,this.tapsThreshold=r,s},swipe({velocity:e=No,distance:t=Vo,duration:n=Mo}={}){return{velocity:this.transform($.toVector(e)),distance:this.transform($.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return Lo;case!1:return 0;default:return e}},axisThreshold(e){return e?I(I({},kn),e):kn},keyboardDisplacement(e=zo){return e}});process.env.NODE_ENV==="development"&&Object.assign(mr,{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({},Ft),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!V.touch&&V.gesture)return"gesture";if(V.touch&&r)return"touch";if(V.touchscreen){if(V.pointer)return"pointer";if(V.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=o=>{const a=wn(Ke(n,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=wn(Ke(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",$.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});I(I({},Le),{},{mouseOnly:(e=!0)=>e});I(I({},Le),{},{mouseOnly:(e=!0)=>e});const gr=new Map,St=new Map;function Fo(e){gr.set(e.key,e.engine),St.set(e.key,e.resolver)}const Bo={key:"drag",engine:Ao,resolver:mr};function Uo(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 Go(e,t){if(e==null)return{};var n=Uo(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 Ho={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=V.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},qo=["target","eventOptions","window","enabled","transform"];function Be(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]=Be(e[r],i);break;case"boolean":i&&(n[r]=e[r]);break}return n}function Qo(e,t,n={}){const r=e,{target:i,eventOptions:s,window:o,enabled:a,transform:d}=r,c=Go(r,qo);if(n.shared=Be({target:i,eventOptions:s,window:o,enabled:a,transform:d},Ho),t){const u=St.get(t);n[t]=Be(I({shared:n.shared},c),u)}else for(const u in c){const l=St.get(u);if(l)n[u]=Be(I({shared:n.shared},c[u]),l);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 yr{constructor(t,n){j(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,i,s){const o=this._listeners,a=yo(n,r),d=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=I(I({},d),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 Wo{constructor(){j(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 Yo{constructor(t){j(this,"gestures",new Set),j(this,"_targetEventStore",new yr(this)),j(this,"gestureEventStores",{}),j(this,"gestureTimeoutStores",{}),j(this,"handlers",{}),j(this,"config",{}),j(this,"pointerIds",new Set),j(this,"touchIds",new Set),j(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Ko(this,t)}setEventIds(t){if(st(t))return this.touchIds=new Set(wo(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=Qo(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],d=Pn(r,a.eventOptions,!!i);if(a.enabled){const c=gr.get(o);new c(this,t,o).bind(d)}}const s=Pn(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]=So(...r[s]);if(!i)return r;for(const s in r){const{device:o,capture:a,passive:d}=go(s);this._targetEventStore.add(i,o,"",r[s],{capture:a,passive:d})}}}}function ie(e,t){e.gestures.add(t),e.gestureEventStores[t]=new yr(e,t),e.gestureTimeoutStores[t]=new Wo}function Ko(e,t){t.drag&&ie(e,"drag"),t.wheel&&ie(e,"wheel"),t.scroll&&ie(e,"scroll"),t.move&&ie(e,"move"),t.pinch&&ie(e,"pinch"),t.hover&&ie(e,"hover")}const Pn=(e,t,n)=>(r,i,s,o={},a=!1)=>{var d,c;const u=(d=o.capture)!==null&&d!==void 0?d:t.capture,l=(c=o.passive)!==null&&c!==void 0?c:t.passive;let f=a?r:po(r,i,u);n&&l&&(f+="Passive"),e[f]=e[f]||[],e[f].push(s)};function Xo(e,t={},n,r){const i=v.useMemo(()=>new Yo(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),v.useEffect(i.effect.bind(i)),v.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function Zo(e,t){return Fo(Bo),Xo({drag:e},t||{},"drag")}const Jo=_.div`
454
+ animation: ${no} 0.4s ease-out forwards;
455
+ `,ao=S.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),d=e.findIndex(u=>u.value===t),c=(u,l)=>{const f=u.currentTarget.getBoundingClientRect(),g=u.clientX-f.left,y=u.clientY-f.top;if(a({x:g,y,key:Date.now(),target:l.value}),l.value===t){i&&r&&r();return}if(n(l.value),r){const m=s.current;if(m){const b=()=>{m.removeEventListener("transitionend",b),r()};m.addEventListener("transitionend",b)}else r()}};return p.jsxs(ro,{children:[p.jsx(io,{ref:s,$index:d}),e.map(u=>p.jsxs(so,{$isSelected:t===u.value,onClick:l=>c(l,u),children:[o&&o.target===u.value&&p.jsx(oo,{$x:o.x,$y:o.y},o.key),p.jsx(ao,{children:u.label})]},u.value))]})}function uo(e,t,n){return Math.max(t,Math.min(e,n))}const $={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 gn(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function yn(e,t,n,r=.15){return r===0?uo(e,t,n):e<t?-gn(t-e,n-t,r)+t:e>n?+gn(e-n,n-t,r)+n:e}function lo(e,[t,n],[r,i]){const[[s,o],[a,d]]=e;return[yn(t,s,o,r),yn(n,a,d,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 j(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 vn(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?vn(Object(n),!0).forEach(function(r){j(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const fr={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 bn(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=fr[e],i=r&&r[t]||t;return"on"+bn(e)+bn(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=fr[e],r=n&&n[t]||t;return e+r}function at(e){return"touches"in e}function hr(e){return at(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 pr(e){return at(e)?xo(e)[0]:e}function _o(e){return wo(e).map(t=>t.identifier)}function mt(e){const t=pr(e);return at(e)?t.identifier:t.pointerId}function wn(e){const t=pr(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 Ze(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 xn(e,t){return Object.assign({},t,e||{})}const Eo=32;class To{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?Ze(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);$.addTo(n._distance,A)}this.axisIntent&&this.axisIntent(t);const[o,a]=n._movement,[d,c]=r.threshold,{_step:u,values:l}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(o)>=d&&l[0]),u[1]===!1&&(u[1]=Math.abs(a)>=c&&l[1])):(u[0]===!1&&(u[0]=Math.abs(o)>=d&&Math.sign(o)*d),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]=l;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=Ze(r.bounds,n)),this.setup&&this.setup()),n.movement=f,this.computeOffset()));const[m,b]=n.offset,[[v,_],[x,E]]=n._bounds;n.overflow=[m<v?-1:m>_?1:0,b<x?-1:b>E?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 P=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=lo(n._bounds,n.offset,P),n.delta=$.sub(n.offset,g),this.computeMovement(),y&&(!n.last||s>Eo)){n.delta=$.sub(n.offset,g);const A=n.delta.map(Math.abs);$.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 To{constructor(...t){super(...t),j(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=$.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=$.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[hr(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 _n=e=>e,Sn=.15,Bt={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[Sn,Sn];case!1:return[0,0];default:return $.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return $.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;if(this.hasCustomTransform=!!r,process.env.NODE_ENV==="development"){const i=r||_n;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||_n},threshold(e){return $.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Bt,{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,Ve=I(I({},Bt),{},{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=>Ve.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]]}}),kn={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),j(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=Ve.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=mt(t),r._pointerActive=!0,this.computeValues(wn(t)),this.computeInitial(),n.preventScrollAxis&&hr(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=mt(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const s=wn(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=$.sub(s,n._values),this.computeValues(s)),$.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=mt(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,d]=n._delta,[c,u]=n._movement,[l,f]=r.swipe.velocity,[g,y]=r.swipe.distance,m=r.swipe.duration;if(n.elapsedTime<m){const b=Math.abs(a/n.timeDelta),v=Math.abs(d/n.timeDelta);b>l&&Math.abs(c)>g&&(n.swipe[0]=Math.sign(a)),v>f&&Math.abs(u)>y&&(n.swipe[1]=Math.sign(d))}}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,$o(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=kn[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,$.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in kn&&(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 $o(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Me=typeof window<"u"&&window.document&&window.document.createElement;function mr(){return Me&&"ontouchstart"in window}function jo(){return mr()||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:mr(),touchscreen:jo(),pointer:Co(),pointerLock:Do()},No=250,Vo=180,Mo=.5,zo=50,Fo=250,Bo=10,Pn={mouse:0,touch:0,pen:8},gr=I(I({},Ve),{},{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=$.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($.toVector(e)),distance:this.transform($.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({},Pn),e):Pn},keyboardDisplacement(e=Bo){return e}});process.env.NODE_ENV==="development"&&Object.assign(gr,{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({},Bt),{},{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=xn(Ze(n,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=xn(Ze(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",$.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});I(I({},Ve),{},{mouseOnly:(e=!0)=>e});I(I({},Ve),{},{mouseOnly:(e=!0)=>e});const yr=new Map,Pt=new Map;function Uo(e){yr.set(e.key,e.engine),Pt.set(e.key,e.resolver)}const Go={key:"drag",engine:Oo,resolver:gr};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 Ge(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]=Ge(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:d}=r,c=qo(r,Wo);if(n.shared=Ge({target:i,eventOptions:s,window:o,enabled:a,transform:d},Qo),t){const u=Pt.get(t);n[t]=Ge(I({shared:n.shared},c),u)}else for(const u in c){const l=Pt.get(u);if(l)n[u]=Ge(I({shared:n.shared},c[u]),l);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 vr{constructor(t,n){j(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,i,s){const o=this._listeners,a=bo(n,r),d=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=I(I({},d),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(){j(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){j(this,"gestures",new Set),j(this,"_targetEventStore",new vr(this)),j(this,"gestureEventStores",{}),j(this,"gestureTimeoutStores",{}),j(this,"handlers",{}),j(this,"config",{}),j(this,"pointerIds",new Set),j(this,"touchIds",new Set),j(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Zo(this,t)}setEventIds(t){if(at(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],d=En(r,a.eventOptions,!!i);if(a.enabled){const c=yr.get(o);new c(this,t,o).bind(d)}}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:d}=vo(s);this._targetEventStore.add(i,o,"",r[s],{capture:a,passive:d})}}}}function oe(e,t){e.gestures.add(t),e.gestureEventStores[t]=new vr(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 d,c;const u=(d=o.capture)!==null&&d!==void 0?d:t.capture,l=(c=o.passive)!==null&&c!==void 0?c:t.passive;let f=a?r:go(r,i,u);n&&l&&(f+="Passive"),e[f]=e[f]||[],e[f].push(s)};function Jo(e,t={},n,r){const i=N.default.useMemo(()=>new Xo(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),N.default.useEffect(i.effect.bind(i)),N.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=S.default.div`
456
456
  position: absolute;
457
457
  inset: 0;
458
458
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrim)||"rgba(0, 0, 0, 0.4)"}};
459
- `,ea=_.div`
459
+ `,na=S.default.div`
460
460
  background-color: rgb(${({theme:e})=>e.colors.settingsBackgroundRgb||"255, 255, 255"});
461
461
  border-top-left-radius: ${({theme:e})=>{var t;return((t=e.styling)==null?void 0:t.borderRadiusPixel)||24}}px;
462
462
  border-top-right-radius: ${({theme:e})=>{var t;return((t=e.styling)==null?void 0:t.borderRadiusPixel)||24}}px;
463
463
  max-height: 85dvh;
464
464
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
465
- `,ta=_.div`
465
+ `,ra=S.default.div`
466
466
  width: 40px;
467
467
  height: 5px;
468
468
  background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrimLight)||"rgba(0, 0, 0, 0.3)"}};
469
469
  border-radius: 3px;
470
470
  margin: 12px auto 8px;
471
- `,na=_.div`
471
+ `,ia=S.default.div`
472
472
  padding: 0 ${({theme:e})=>{var t;return((t=e.spacing)==null?void 0:t.appStandardPadding)||"16px"}};
473
- `,ra=_.span`
473
+ `,sa=S.default.span`
474
474
  position: absolute;
475
475
  width: 1px;
476
476
  height: 1px;
@@ -480,4 +480,4 @@
480
480
  clip: rect(0, 0, 0, 0);
481
481
  white-space: nowrap;
482
482
  border: 0;
483
- `;function ia(e){return 8*(Math.log(e+1)-2)}function sa({isOpen:e,onClose:t,children:n,title:r="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25}){const a=v.useRef(null),[d,c]=v.useState(e),[u,l]=Ce(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));v.useEffect(()=>{e?(c(!0),l.start({y:0,opacity:1})):l.start({y:i,opacity:0,onRest:()=>{c(!1)}})},[e,l,i]);const f=v.useCallback(()=>{t()},[t]),g=Zo(({active:y,movement:[,m],velocity:[,w],direction:[,b],cancel:S})=>{if(m<-10){S();return}const x=Math.max(0,m);if(y){const E=m<0?ia(-m)*-.5:x;l.start({y:E,immediate:!0});const P=Math.min(x/i,1);l.start({opacity:1-P*.5,immediate:!0})}else w>s&&b>0||x>i*o?f():l.start({y:0,opacity:1})},{from:()=>[0,u.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0});return d?p.jsxs(p.Fragment,{children:[p.jsx(ce.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:u.opacity,pointerEvents:e?"auto":"none"},onClick:f,children:p.jsx(Jo,{})}),p.jsx(ce.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:u.y.to(y=>`translateY(${y}px)`)},children:p.jsxs(ea,{ref:a,children:[p.jsx(ra,{children:r}),p.jsx("div",{...g(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:p.jsx(ta,{})}),p.jsx(na,{children:n})]})})]}):p.jsx(p.Fragment,{})}const oa={cardPosition:"transit-to-home"},Bt=kt.createSlice({name:"navigation",initialState:oa,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:ha}=Bt.actions;Bt.reducer;const aa=kt.combineReducers({navigation:Bt.reducer}),ca=kt.configureStore({reducer:aa});function ua(){const[e,t]=v.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return v.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 la(e=100){const[t,n]=v.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return v.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 vr(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 da(e,t={}){const{enabled:n=!0,includeMargins:r=!0,throttleMs:i=16}=t,s=v.useRef(null),o=v.useRef(null),a=v.useRef(null),d=v.useRef(e);v.useEffect(()=>{d.current=e},[e]);const c=v.useCallback(()=>{if(!s.current||!n)return;const l=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:l.top-f,left:l.left,width:l.width,height:l.height+f+g,right:l.right,bottom:l.bottom+g,x:l.x,y:l.y-f};if(a.current){const m=Math.abs(y.top-a.current.top),w=Math.abs(y.height-a.current.height),b=Math.abs(y.width-a.current.width);if(m<.5&&w<.5&&b<.5)return}a.current=y,d.current(y)},[n,r]);return v.useEffect(()=>{if(!s.current||!n)return;const l=vr(c,i),f=requestAnimationFrame(c),g=new ResizeObserver(l);g.observe(s.current),o.current=g;const y=m=>{const w=m.target;w!==document&&w!==document.documentElement||l()};return window.addEventListener("scroll",y,{passive:!0,capture:!0}),window.addEventListener("resize",l),()=>{cancelAnimationFrame(f),g.disconnect(),l.cancel(),window.removeEventListener("scroll",y,{capture:!0}),window.removeEventListener("resize",l)}},[c,n,i]),l=>{s.current=l}}exports.AnimatedText=zt;exports.BackButton=cs;exports.BannerButton=ts;exports.BottomSheet=sa;exports.CircleIconButton=os;exports.ListItem=ks;exports.LoadingScreen=Gs;exports.OptionPicker=oo;exports.SPRING_COMFORTABLE=Ye;exports.SPRING_COMFORTABLE_SLOW=Ps;exports.SPRING_GENTLE=As;exports.SPRING_INSTANT=Is;exports.SPRING_LANDING=Os;exports.SPRING_RESPONSIVE=Re;exports.SPRING_RISING=$s;exports.SPRING_SNAPPY=Es;exports.SPRING_STAGGERED=Ts;exports.SPRING_VERY_SLOW=Rs;exports.ToggleSwitch=cr;exports.UnorderedListItemContainer=ds;exports.ZhuyinKeyboard=lr;exports.throttle=vr;exports.useReducedMotion=ua;exports.useReportPosition=da;exports.useViewportSize=la;exports.ymyStore=ca;
483
+ `;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}){const a=w.useRef(null),[d,c]=w.useState(e),[u,l]=Le(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));w.useEffect(()=>{e?(c(!0),l.start({y:0,opacity:1})):l.start({y:i,opacity:0,onRest:()=>{c(!1)}})},[e,l,i]);const f=w.useCallback(()=>{t()},[t]),g=ea(({active:y,movement:[,m],velocity:[,b],direction:[,v],cancel:_})=>{if(m<-10){_();return}const x=Math.max(0,m);if(y){const E=m<0?oa(-m)*-.5:x;l.start({y:E,immediate:!0});const P=Math.min(x/i,1);l.start({opacity:1-P*.5,immediate:!0})}else b>s&&v>0||x>i*o?f():l.start({y:0,opacity:1})},{from:()=>[0,u.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0});return d?p.jsxs(p.Fragment,{children:[p.jsx(le.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:u.opacity,pointerEvents:e?"auto":"none"},onClick:f,children:p.jsx(ta,{})}),p.jsx(le.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:u.y.to(y=>`translateY(${y}px)`)},children:p.jsxs(na,{ref:a,children:[p.jsx(sa,{children:r}),p.jsx("div",{...g(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:p.jsx(ra,{})}),p.jsx(ia,{children:n})]})})]}):p.jsx(p.Fragment,{})}const ca={cardPosition:"transit-to-home"},Ut=Et.createSlice({name:"navigation",initialState:ca,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:ma}=Ut.actions;Ut.reducer;const ua=Et.combineReducers({navigation:Ut.reducer}),la=Et.configureStore({reducer:ua});function da(){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 fa(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 br(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 ha(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),d=w.useRef(e);w.useEffect(()=>{d.current=e},[e]);const c=w.useCallback(()=>{if(!s.current||!n)return;const l=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:l.top-f,left:l.left,width:l.width,height:l.height+f+g,right:l.right,bottom:l.bottom+g,x:l.x,y:l.y-f};if(a.current){const m=Math.abs(y.top-a.current.top),b=Math.abs(y.height-a.current.height),v=Math.abs(y.width-a.current.width);if(m<.5&&b<.5&&v<.5)return}a.current=y,d.current(y)},[n,r]);return w.useEffect(()=>{if(!s.current||!n)return;const l=br(c,i),f=requestAnimationFrame(c),g=new ResizeObserver(l);g.observe(s.current),o.current=g;const y=m=>{const b=m.target;b!==document&&b!==document.documentElement||l()};return window.addEventListener("scroll",y,{passive:!0,capture:!0}),window.addEventListener("resize",l),()=>{cancelAnimationFrame(f),g.disconnect(),l.cancel(),window.removeEventListener("scroll",y,{capture:!0}),window.removeEventListener("resize",l)}},[c,n,i]),l=>{s.current=l}}exports.AnimatedText=Ft;exports.BackButton=ls;exports.BannerButton=rs;exports.BottomSheet=aa;exports.CircleIconButton=cs;exports.ListItem=Es;exports.LoadingScreen=qs;exports.OptionPicker=co;exports.SPRING_COMFORTABLE=Xe;exports.SPRING_COMFORTABLE_SLOW=Ts;exports.SPRING_GENTLE=Os;exports.SPRING_INSTANT=Rs;exports.SPRING_LANDING=js;exports.SPRING_RESPONSIVE=$e;exports.SPRING_RISING=Cs;exports.SPRING_SNAPPY=Is;exports.SPRING_STAGGERED=As;exports.SPRING_VERY_SLOW=$s;exports.ToggleSwitch=ur;exports.UnorderedListItemContainer=hs;exports.ZhuyinKeyboard=dr;exports.throttle=br;exports.useReducedMotion=da;exports.useReportPosition=ha;exports.useViewportSize=fa;exports.ymyStore=la;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ymy-components",
3
3
  "private": false,
4
- "version": "0.0.56",
4
+ "version": "0.0.57",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",