ymy-components 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +67 -67
- package/dist/index.es.js +4 -4
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),lo=require("react-dom"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),lo=require("react-dom"),P=require("styled-components");function fo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Fr=fo(S);var kt={exports:{}},Le={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Nn;function po(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,_="@@iterator";function g(c){if(c===null||typeof c!="object")return null;var y=m&&c[m]||c[_];return typeof y=="function"?y:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(c){{for(var y=arguments.length,k=new Array(y>1?y-1:0),R=1;R<y;R++)k[R-1]=arguments[R];b("error",c,k)}}function b(c,y,k){{var R=v.ReactDebugCurrentFrame,j=R.getStackAddendum();j!==""&&(y+="%s",k=k.concat([j]));var V=k.map(function(A){return String(A)});V.unshift("Warning: "+y),Function.prototype.apply.call(console[c],console,V)}}var O=!1,
|
|
17
|
+
*/var Nn;function po(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,_="@@iterator";function g(c){if(c===null||typeof c!="object")return null;var y=m&&c[m]||c[_];return typeof y=="function"?y:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(c){{for(var y=arguments.length,k=new Array(y>1?y-1:0),R=1;R<y;R++)k[R-1]=arguments[R];b("error",c,k)}}function b(c,y,k){{var R=v.ReactDebugCurrentFrame,j=R.getStackAddendum();j!==""&&(y+="%s",k=k.concat([j]));var V=k.map(function(A){return String(A)});V.unshift("Warning: "+y),Function.prototype.apply.call(console[c],console,V)}}var O=!1,T=!1,I=!1,$=!1,z=!1,L;L=Symbol.for("react.module.reference");function oe(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===s||z||c===i||c===u||c===l||$||c===p||O||T||I||typeof c=="object"&&c!==null&&(c.$$typeof===h||c.$$typeof===d||c.$$typeof===o||c.$$typeof===a||c.$$typeof===f||c.$$typeof===L||c.getModuleId!==void 0))}function W(c,y,k){var R=c.displayName;if(R)return R;var j=y.displayName||y.name||"";return j!==""?k+"("+j+")":k}function ae(c){return c.displayName||"Context"}function G(c){if(c==null)return null;if(typeof c.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case l:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case a:var y=c;return ae(y)+".Consumer";case o:var k=c;return ae(k._context)+".Provider";case f:return W(c,c.render,"ForwardRef");case d:var R=c.displayName||null;return R!==null?R:G(c.type)||"Memo";case h:{var j=c,V=j._payload,A=j._init;try{return G(A(V))}catch{return null}}}return null}var he=Object.assign,ze=0,on,an,cn,un,ln,fn,dn;function hn(){}hn.__reactDisabledLog=!0;function Vs(){{if(ze===0){on=console.log,an=console.info,cn=console.warn,un=console.error,ln=console.group,fn=console.groupCollapsed,dn=console.groupEnd;var c={configurable:!0,enumerable:!0,value:hn,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}ze++}}function Ms(){{if(ze--,ze===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:he({},c,{value:on}),info:he({},c,{value:an}),warn:he({},c,{value:cn}),error:he({},c,{value:un}),group:he({},c,{value:ln}),groupCollapsed:he({},c,{value:fn}),groupEnd:he({},c,{value:dn})})}ze<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ir=v.ReactCurrentDispatcher,sr;function _t(c,y,k){{if(sr===void 0)try{throw Error()}catch(j){var R=j.stack.trim().match(/\n( *(at )?)/);sr=R&&R[1]||""}return`
|
|
18
18
|
`+sr+c}}var or=!1,Et;{var zs=typeof WeakMap=="function"?WeakMap:Map;Et=new zs}function pn(c,y){if(!c||or)return"";{var k=Et.get(c);if(k!==void 0)return k}var R;or=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var V;V=ir.current,ir.current=null,Vs();try{if(y){var A=function(){throw Error()};if(Object.defineProperty(A.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(A,[])}catch(K){R=K}Reflect.construct(c,[],A)}else{try{A.call()}catch(K){R=K}c.call(A.prototype)}}else{try{throw Error()}catch(K){R=K}c()}}catch(K){if(K&&R&&typeof K.stack=="string"){for(var D=K.stack.split(`
|
|
19
19
|
`),H=R.stack.split(`
|
|
20
20
|
`),B=D.length-1,U=H.length-1;B>=1&&U>=0&&D[B]!==H[U];)U--;for(;B>=1&&U>=0;B--,U--)if(D[B]!==H[U]){if(B!==1||U!==1)do if(B--,U--,U<0||D[B]!==H[U]){var re=`
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+c+"`."}return""}}function eo(c){return""}var Sn={};function to(c){{var y=xn();if(!y){var k=typeof c=="string"?c:c.displayName||c.name;k&&(y=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+k+">.")}return y}}function kn(c,y){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var k=to(y);if(Sn[k])return;Sn[k]=!0;var R="";c&&c._owner&&c._owner!==cr.current&&(R=" It was passed a child from "+G(c._owner.type)+"."),Re(c),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,R),Re(null)}}function On(c,y){{if(typeof c!="object")return;if(ar(c))for(var k=0;k<c.length;k++){var R=c[k];lr(R)&&kn(R,y)}else if(lr(c))c._store&&(c._store.validated=!0);else if(c){var j=g(c);if(typeof j=="function"&&j!==c.entries)for(var V=j.call(c),A;!(A=V.next()).done;)lr(A.value)&&kn(A.value,y)}}}function ro(c){{var y=c.type;if(y==null||typeof y=="string")return;var k;if(typeof y=="function")k=y.propTypes;else if(typeof y=="object"&&(y.$$typeof===f||y.$$typeof===d))k=y.propTypes;else return;if(k){var R=G(y);Bs(k,c.props,"prop",R,c)}else if(y.PropTypes!==void 0&&!ur){ur=!0;var j=G(y);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",j||"Unknown")}typeof y.getDefaultProps=="function"&&!y.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function no(c){{for(var y=Object.keys(c.props),k=0;k<y.length;k++){var R=y[k];if(R!=="children"&&R!=="key"){Re(c),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),Re(null);break}}c.ref!==null&&(Re(c),x("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var
|
|
25
|
+
Check the top-level render call using <`+k+">.")}return y}}function kn(c,y){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var k=to(y);if(Sn[k])return;Sn[k]=!0;var R="";c&&c._owner&&c._owner!==cr.current&&(R=" It was passed a child from "+G(c._owner.type)+"."),Re(c),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,R),Re(null)}}function On(c,y){{if(typeof c!="object")return;if(ar(c))for(var k=0;k<c.length;k++){var R=c[k];lr(R)&&kn(R,y)}else if(lr(c))c._store&&(c._store.validated=!0);else if(c){var j=g(c);if(typeof j=="function"&&j!==c.entries)for(var V=j.call(c),A;!(A=V.next()).done;)lr(A.value)&&kn(A.value,y)}}}function ro(c){{var y=c.type;if(y==null||typeof y=="string")return;var k;if(typeof y=="function")k=y.propTypes;else if(typeof y=="object"&&(y.$$typeof===f||y.$$typeof===d))k=y.propTypes;else return;if(k){var R=G(y);Bs(k,c.props,"prop",R,c)}else if(y.PropTypes!==void 0&&!ur){ur=!0;var j=G(y);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",j||"Unknown")}typeof y.getDefaultProps=="function"&&!y.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function no(c){{for(var y=Object.keys(c.props),k=0;k<y.length;k++){var R=y[k];if(R!=="children"&&R!=="key"){Re(c),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),Re(null);break}}c.ref!==null&&(Re(c),x("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var Tn={};function Pn(c,y,k,R,j,V){{var A=oe(c);if(!A){var D="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var H=eo();H?D+=H:D+=xn();var B;c===null?B="null":ar(c)?B="array":c!==void 0&&c.$$typeof===t?(B="<"+(G(c.type)||"Unknown")+" />",D=" Did you accidentally export a JSX literal instead of a component?"):B=typeof c,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",B,D)}var U=Zs(c,y,k,j,V);if(U==null)return U;if(A){var re=y.children;if(re!==void 0)if(R)if(ar(re)){for(var Ne=0;Ne<re.length;Ne++)On(re[Ne],c);Object.freeze&&Object.freeze(re)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else On(re,c)}if(Fe.call(y,"key")){var Ee=G(c),K=Object.keys(y).filter(function(uo){return uo!=="key"}),fr=K.length>0?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}";if(!Tn[Ee+fr]){var co=K.length>0?"{"+K.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,fr,Ee,co,Ee),Pn[Ee+fr]=!0}}return c===n?no(U):ro(U),U}}function io(c,y,k){return Tn(c,y,k,!0)}function so(c,y,k){return Tn(c,y,k,!1)}var oo=so,ao=io;Be.Fragment=n,Be.jsx=oo,Be.jsxs=ao}()),Be}var Dn;function mo(){return Dn||(Dn=1,process.env.NODE_ENV==="production"?kt.exports=ho():kt.exports=po()),kt.exports}var E=mo(),Lr=pt(),N=e=>ht(e,Lr),Br=pt();N.write=e=>ht(e,Br);var Gt=pt();N.onStart=e=>ht(e,Gt);var Ur=pt();N.onFrame=e=>ht(e,Ur);var Wr=pt();N.onFinish=e=>ht(e,Wr);var Ae=[];N.setTimeout=(e,t)=>{const r=N.now()+t,n=()=>{const s=Ae.findIndex(o=>o.cancel==n);~s&&Ae.splice(s,1),be-=~s?1:0},i={time:r,handler:e,cancel:n};return Ae.splice(ki(r),0,i),be+=1,Oi(),i};var ki=e=>~(~Ae.findIndex(t=>t.time>e)||~Ae.length);N.cancel=e=>{Gt.delete(e),Ur.delete(e),Wr.delete(e),Lr.delete(e),Br.delete(e)};N.sync=e=>{xr=!0,N.batchedUpdates(e),xr=!1};N.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...i){t=i,N.onStart(r)}return n.handler=e,n.cancel=()=>{Gt.delete(r),t=null},n};var Gr=typeof window<"u"?window.requestAnimationFrame:()=>{};N.use=e=>Gr=e;N.now=typeof performance<"u"?()=>performance.now():Date.now;N.batchedUpdates=e=>e();N.catch=console.error;N.frameLoop="always";N.advance=()=>{N.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ti()};var ve=-1,be=0,xr=!1;function ht(e,t){xr?(t.delete(e),e(0)):(t.add(e),Oi())}function Oi(){ve<0&&(ve=0,N.frameLoop!=="demand"&&Gr(Pi))}function go(){ve=-1}function Pi(){~ve&&(Gr(Pi),N.batchedUpdates(Ti))}function Ti(){const e=ve;ve=N.now();const t=ki(ve);if(t&&(Ri(Ae.splice(0,t),r=>r.handler()),be-=t),!be){go();return}Gt.flush(),Lr.flush(e?Math.min(64,ve-e):16.667),Ur.flush(),Br.flush(),Wr.flush()}function pt(){let e=new Set,t=e;return{add(r){be+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return be-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,be-=t.size,Ri(t,n=>n(r)&&e.add(n)),be+=e.size,t=e)}}}function Ri(e,t){e.forEach(r=>{try{t(r)}catch(n){N.catch(n)}})}var yo=Object.defineProperty,vo=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},le={};vo(le,{assign:()=>wo,colors:()=>we,createStringInterpolator:()=>Yr,skipAnimation:()=>Di,to:()=>Ni,willAdvance:()=>Hr});function Sr(){}var bo=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),w={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 pe(e,t){if(w.arr(e)){if(!w.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var C=(e,t)=>e.forEach(t);function de(e,t,r){if(w.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var Z=e=>w.und(e)?[]:w.arr(e)?e:[e];function Xe(e,t){if(e.size){const r=Array.from(e);e.clear(),C(r,t)}}var Ke=(e,...t)=>Xe(e,r=>r(...t)),qr=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Yr,Ni,we=null,Di=!1,Hr=Sr,wo=e=>{e.to&&(Ni=e.to),e.now&&(N.now=e.now),e.colors!==void 0&&(we=e.colors),e.skipAnimation!=null&&(Di=e.skipAnimation),e.createStringInterpolator&&(Yr=e.createStringInterpolator),e.requestAnimationFrame&&N.use(e.requestAnimationFrame),e.batchedUpdates&&(N.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Hr=e.willAdvance),e.frameLoop&&(N.frameLoop=e.frameLoop)},Je=new Set,se=[],dr=[],At=0,qt={get idle(){return!Je.size&&!se.length},start(e){At>e.priority?(Je.add(e),N.onStart(_o)):(Ci(e),N(kr))},advance:kr,sort(e){if(At)N.onFrame(()=>qt.sort(e));else{const t=se.indexOf(e);~t&&(se.splice(t,1),Ai(e))}},clear(){se=[],Je.clear()}};function _o(){Je.forEach(Ci),Je.clear(),N(kr)}function Ci(e){se.includes(e)||Ai(e)}function Ai(e){se.splice(Eo(se,t=>t.priority>e.priority),0,e)}function kr(e){const t=dr;for(let r=0;r<se.length;r++){const n=se[r];At=n.priority,n.idle||(Hr(n),n.advance(e),n.idle||t.push(n))}return At=0,dr=se,dr.length=0,se=t,se.length>0}function Eo(e,t){const r=e.findIndex(t);return r<0?e.length:r}var xo={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},ue="[-+]?\\d*\\.?\\d+",It=ue+"%";function Yt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var So=new RegExp("rgb"+Yt(ue,ue,ue)),ko=new RegExp("rgba"+Yt(ue,ue,ue,ue)),Oo=new RegExp("hsl"+Yt(ue,It,It)),Po=new RegExp("hsla"+Yt(ue,It,It,ue)),To=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ro=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,No=/^#([0-9a-fA-F]{6})$/,Do=/^#([0-9a-fA-F]{8})$/;function Co(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=No.exec(e))?parseInt(t[1]+"ff",16)>>>0:we&&we[e]!==void 0?we[e]:(t=So.exec(e))?(De(t[1])<<24|De(t[2])<<16|De(t[3])<<8|255)>>>0:(t=ko.exec(e))?(De(t[1])<<24|De(t[2])<<16|De(t[3])<<8|In(t[4]))>>>0:(t=To.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Do.exec(e))?parseInt(t[1],16)>>>0:(t=Ro.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Oo.exec(e))?(Cn(An(t[1]),Ot(t[2]),Ot(t[3]))|255)>>>0:(t=Po.exec(e))?(Cn(An(t[1]),Ot(t[2]),Ot(t[3]))|In(t[4]))>>>0:null}function hr(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Cn(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,s=hr(i,n,e+1/3),o=hr(i,n,e),a=hr(i,n,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function De(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function An(e){return(parseFloat(e)%360+360)%360/360}function In(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Ot(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function jn(e){let t=Co(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${s})`}var tt=(e,t,r)=>{if(w.fun(e))return e;if(w.arr(e))return tt({range:e,output:t,extrapolate:r});if(w.str(e.output[0]))return Yr(e);const n=e,i=n.output,s=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",f=n.easing||(u=>u);return u=>{const l=Io(u,s);return Ao(u,s[l],s[l+1],i[l],i[l+1],f,o,a,n.map)}};function Ao(e,t,r,n,i,s,o,a,f){let u=f?f(e):e;if(u<t){if(o==="identity")return u;o==="clamp"&&(u=t)}if(u>r){if(a==="identity")return u;a==="clamp"&&(u=r)}return n===i?n:t===r?e<=t?n:i:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=s(u),n===-1/0?u=-u:i===1/0?u=u+n:u=u*(i-n)+n,u)}function Io(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var jo={linear:e=>e},rt=Symbol.for("FluidValue.get"),je=Symbol.for("FluidValue.observers"),ne=e=>!!(e&&e[rt]),X=e=>e&&e[rt]?e[rt]():e,$n=e=>e[je]||null;function $o(e,t){e.eventObserved?e.eventObserved(t):e(t)}function nt(e,t){const r=e[je];r&&r.forEach(n=>{$o(n,t)})}var Ii=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Vo(this,e)}},Vo=(e,t)=>ji(e,rt,t);function Me(e,t){if(e[rt]){let r=e[je];r||ji(e,je,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function it(e,t){const r=e[je];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[je]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var ji=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Nt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Mo=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Vn=new RegExp(`(${Nt.source})(%|[a-z]+)`,"i"),zo=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ht=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,$i=e=>{const[t,r]=Fo(e);if(!t||qr())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);return i||e}else{if(r&&Ht.test(r))return $i(r);if(r)return r}return e},Fo=e=>{const t=Ht.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},pr,Lo=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`,Vi=e=>{pr||(pr=we?new RegExp(`(${Object.keys(we).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>X(s).replace(Ht,$i).replace(Mo,jn).replace(pr,jn)),r=t.map(s=>s.match(Nt).map(Number)),i=r[0].map((s,o)=>r.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>tt({...e,output:s}));return s=>{var f;const o=!Vn.test(t[0])&&((f=t.find(u=>Vn.test(u)))==null?void 0:f.replace(Nt,""));let a=0;return t[0].replace(Nt,()=>`${i[a++](s)}${o||""}`).replace(zo,Lo)}},Kr="react-spring: ",Mi=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Kr}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Bo=Mi(console.warn);function Uo(){Bo(`${Kr}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Wo=Mi(console.warn);function Go(){Wo(`${Kr}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 Kt(e){return w.str(e)&&(e[0]=="#"||/\d/.test(e)||!qr()&&Ht.test(e)||e in(we||{}))}var Qr=qr()?S.useEffect:S.useLayoutEffect,qo=()=>{const e=S.useRef(!1);return Qr(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function zi(){const e=S.useState()[1],t=qo();return()=>{t.current&&e(Math.random())}}function Yo(e,t){const[r]=S.useState(()=>({inputs:t,result:e()})),n=S.useRef(),i=n.current;let s=i;return s?t&&s.inputs&&Ho(t,s.inputs)||(s={inputs:t,result:e()}):s=r,S.useEffect(()=>{n.current=s,i==r&&(r.inputs=r.result=void 0)},[s]),s.result}function Ho(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Fi=e=>S.useEffect(e,Ko),Ko=[];function Mn(e){const t=S.useRef();return S.useEffect(()=>{t.current=e}),t.current}var st=Symbol.for("Animated:node"),Qo=e=>!!e&&e[st]===e,fe=e=>e&&e[st],Xr=(e,t)=>bo(e,st,t),Qt=e=>e&&e[st]&&e[st].getPayload(),Li=class{constructor(){Xr(this,this)}getPayload(){return this.payload||[]}},mt=class extends Li{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,w.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new mt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return w.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,w.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ot=class extends mt{constructor(e){super(0),this._string=null,this._toString=tt({output:[e,e]})}static create(e){return new ot(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(w.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=tt({output:[this.getValue(),e]})),this._value=0,super.reset()}},jt={dependencies:null},Xt=class extends Li{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return de(this.source,(r,n)=>{Qo(r)?t[n]=r.getValue(e):ne(r)?t[n]=X(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&C(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return de(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){jt.dependencies&&ne(e)&&jt.dependencies.add(e);const t=Qt(e);t&&C(t,r=>this.add(r))}},Bi=class extends Xt{constructor(e){super(e)}static create(e){return new Bi(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,n)=>r.setValue(e[n])).some(Boolean):(super.setValue(e.map(Xo)),!0)}};function Xo(e){return(Kt(e)?ot:mt).create(e)}function Or(e){const t=fe(e);return t?t.constructor:w.arr(e)?Bi:Kt(e)?ot:mt}var zn=(e,t)=>{const r=!w.fun(e)||e.prototype&&e.prototype.isReactComponent;return S.forwardRef((n,i)=>{const s=S.useRef(null),o=r&&S.useCallback(m=>{s.current=ea(i,m)},[i]),[a,f]=Zo(n,t),u=zi(),l=()=>{const m=s.current;if(r&&!m)return;(m?t.applyAnimatedValues(m,a.getValue(!0)):!1)===!1&&u()},d=new Jo(l,f),h=S.useRef();Qr(()=>(h.current=d,C(f,m=>Me(m,d)),()=>{h.current&&(C(h.current.deps,m=>it(m,h.current)),N.cancel(h.current.update))})),S.useEffect(l,[]),Fi(()=>()=>{const m=h.current;C(m.deps,_=>it(_,m))});const p=t.getComponentProps(a.getValue());return Fr.createElement(e,{...p,ref:o})})},Jo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&N.write(this.update)}};function Zo(e,t){const r=new Set;return jt.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Xt(e),jt.dependencies=null,[e,r]}function ea(e,t){return e&&(w.fun(e)?e(t):e.current=t),t}var Fn=Symbol.for("AnimatedComponent"),ta=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=i=>new Xt(i),getComponentProps:n=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},s=o=>{const a=Ln(o)||"Anonymous";return w.str(o)?o=s[o]||(s[o]=zn(o,i)):o=o[Fn]||(o[Fn]=zn(o,i)),o.displayName=`Animated(${a})`,o};return de(e,(o,a)=>{w.arr(e)&&(a=Ln(o)),s[a]=s(o)}),{animated:s}},Ln=e=>w.str(e)?e:e&&w.str(e.displayName)?e.displayName:w.fun(e)&&e.name||null;function Se(e,...t){return w.fun(e)?e(...t):e}var Ze=(e,t)=>e===!0||!!(t&&e&&(w.fun(e)?e(t):Z(e).includes(t))),Ui=(e,t)=>w.obj(e)?t&&e[t]:e,Wi=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ra=e=>e,Jr=(e,t=ra)=>{let r=na;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const i of r){const s=t(e[i],i);w.und(s)||(n[i]=s)}return n},na=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ia={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 sa(e){const t={};let r=0;if(de(e,(n,i)=>{ia[i]||(t[i]=n,r++)}),r)return t}function Gi(e){const t=sa(e);if(t){const r={to:t};return de(e,(n,i)=>i in t||(r[i]=n)),r}return{...e}}function at(e){return e=X(e),w.arr(e)?e.map(at):Kt(e)?le.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function oa(e){for(const t in e)return!0;return!1}function Pr(e){return w.fun(e)||w.arr(e)&&w.obj(e[0])}function aa(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function ca(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var ua={default:{tension:170,friction:26}},Tr={...ua.default,mass:1,damping:1,easing:jo.linear,clamp:!1},la=class{constructor(){this.velocity=0,Object.assign(this,Tr)}};function fa(e,t,r){r&&(r={...r},Bn(r,t),t={...r,...t}),Bn(e,t),Object.assign(e,t);for(const o in Tr)e[o]==null&&(e[o]=Tr[o]);let{frequency:n,damping:i}=e;const{mass:s}=e;return w.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*s,e.friction=4*Math.PI*i*s/n),e}function Bn(e,t){if(!w.und(t.decay))e.duration=void 0;else{const r=!w.und(t.tension)||!w.und(t.friction);(r||!w.und(t.frequency)||!w.und(t.damping)||!w.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var Un=[],da=class{constructor(){this.changed=!1,this.values=Un,this.toValues=null,this.fromValues=Un,this.config=new la,this.immediate=!1}};function qi(e,{key:t,props:r,defaultProps:n,state:i,actions:s}){return new Promise((o,a)=>{let f,u,l=Ze(r.cancel??(n==null?void 0:n.cancel),t);if(l)p();else{w.und(r.pause)||(i.paused=Ze(r.pause,t));let m=n==null?void 0:n.pause;m!==!0&&(m=i.paused||Ze(m,t)),f=Se(r.delay||0,t),m?(i.resumeQueue.add(h),s.pause()):(s.resume(),h())}function d(){i.resumeQueue.add(h),i.timeouts.delete(u),u.cancel(),f=u.time-N.now()}function h(){f>0&&!le.skipAnimation?(i.delayed=!0,u=N.setTimeout(p,f),i.pauseQueue.add(d),i.timeouts.add(u)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(l=!0);try{s.start({...r,callId:e,cancel:l},o)}catch(m){a(m)}}})}var Zr=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?Ie(e.get()):t.every(r=>r.noop)?Yi(e.get()):ce(e.get(),t.every(r=>r.finished)),Yi=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ce=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),Ie=e=>({value:e,cancelled:!0,finished:!1});function Hi(e,t,r,n){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:f}=r;return!s&&e===a&&!t.reset?f:r.promise=(async()=>{r.asyncId=i,r.asyncTo=e;const u=Jr(t,(g,v)=>v==="onRest"?void 0:g);let l,d;const h=new Promise((g,v)=>(l=g,d=v)),p=g=>{const v=i<=(r.cancelId||0)&&Ie(n)||i!==r.asyncId&&ce(n,!1);if(v)throw g.result=v,d(g),g},m=(g,v)=>{const x=new Wn,b=new Gn;return(async()=>{if(le.skipAnimation)throw ct(r),b.result=ce(n,!1),d(b),b;p(x);const O=w.obj(g)?{...g}:{...v,to:g};O.parentId=i,de(u,(I,$)=>{w.und(O[$])&&(O[$]=I)});const P=await n.start(O);return p(x),r.paused&&await new Promise(I=>{r.resumeQueue.add(I)}),P})()};let _;if(le.skipAnimation)return ct(r),ce(n,!1);try{let g;w.arr(e)?g=(async v=>{for(const x of v)await m(x)})(e):g=Promise.resolve(e(m,n.stop.bind(n))),await Promise.all([g.then(l),h]),_=ce(n.get(),!0,!1)}catch(g){if(g instanceof Wn)_=g.result;else if(g instanceof Gn)_=g.result;else throw g}finally{i==r.asyncId&&(r.asyncId=s,r.asyncTo=s?a:void 0,r.promise=s?f:void 0)}return w.fun(o)&&N.batchedUpdates(()=>{o(_,n,n.item)}),_})()}function ct(e,t){Xe(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wn=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.")}},Gn=class extends Error{constructor(){super("SkipAnimationSignal")}},Rr=e=>e instanceof en,ha=1,en=class extends Ii{constructor(){super(...arguments),this.id=ha++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=fe(this);return e&&e.getValue()}to(...e){return le.to(this,e)}interpolate(...e){return Uo(),le.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){nt(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||qt.sort(this),nt(this,{type:"priority",parent:this,priority:e})}},Oe=Symbol.for("SpringPhase"),Ki=1,Qi=2,Xi=4,mr=e=>(e[Oe]&Ki)>0,ge=e=>(e[Oe]&Qi)>0,Ue=e=>(e[Oe]&Xi)>0,qn=(e,t)=>t?e[Oe]|=Qi|Ki:e[Oe]&=-3,Yn=(e,t)=>t?e[Oe]|=Xi:e[Oe]&=-5,pa=class extends en{constructor(e,t){if(super(),this.animation=new da,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,!w.und(e)||!w.und(t)){const r=w.obj(e)?{...e}:{...t,from:e};w.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(ge(this)||this._state.asyncTo)||Ue(this)}get goal(){return X(this.animation.to)}get velocity(){const e=fe(this);return e instanceof mt?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return mr(this)}get isAnimating(){return ge(this)}get isPaused(){return Ue(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:i}=n;const{config:s}=n,o=Qt(n.to);!o&&ne(n.to)&&(i=Z(X(n.to))),n.values.forEach((u,l)=>{if(u.done)return;const d=u.constructor==ot?1:o?o[l].lastPosition:i[l];let h=n.immediate,p=d;if(!h){if(p=u.lastPosition,s.tension<=0){u.done=!0;return}let m=u.elapsedTime+=e;const _=n.fromValues[l],g=u.v0!=null?u.v0:u.v0=w.arr(s.velocity)?s.velocity[l]:s.velocity;let v;const x=s.precision||(_==d?.005:Math.min(1,Math.abs(d-_)*.001));if(w.und(s.duration))if(s.decay){const b=s.decay===!0?.998:s.decay,O=Math.exp(-(1-b)*m);p=_+g/(1-b)*(1-O),h=Math.abs(u.lastPosition-p)<=x,v=g*O}else{v=u.lastVelocity==null?g:u.lastVelocity;const b=s.restVelocity||x/10,O=s.clamp?0:s.bounce,P=!w.und(O),I=_==d?u.v0>0:_<d;let $,z=!1;const L=1,oe=Math.ceil(e/L);for(let W=0;W<oe&&($=Math.abs(v)>b,!(!$&&(h=Math.abs(d-p)<=x,h)));++W){P&&(z=p==d||p>d==I,z&&(v=-v*O,p=d));const ae=-s.tension*1e-6*(p-d),G=-s.friction*.001*v,he=(ae+G)/s.mass;v=v+he*L,p=p+v*L}}else{let b=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,u.durationProgress>0&&(u.elapsedTime=s.duration*u.durationProgress,m=u.elapsedTime+=e)),b=(s.progress||0)+m/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),p=_+s.easing(b)*(d-_),v=(p-u.lastPosition)/e,h=b==1}u.lastVelocity=v,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}o&&!o[l].done&&(h=!1),h?u.done=!0:t=!1,u.setValue(p,s.round)&&(r=!0)});const a=fe(this),f=a.getValue();if(t){const u=X(n.to);(f!==u||r)&&!s.decay?(a.setValue(u),this._onChange(u)):r&&s.decay&&this._onChange(f),this._stop()}else r&&this._onChange(f)}set(e){return N.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ge(this)){const{to:e,config:t}=this.animation;N.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 r;return w.und(e)?(r=this.queue||[],this.queue=[]):r=[w.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Zr(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),ct(this._state,e&&this._lastCallId),N.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:r,from:n}=e;r=w.obj(r)?r[t]:r,(r==null||Pr(r))&&(r=void 0),n=w.obj(n)?n[t]:n,n==null&&(n=void 0);const i={to:r,from:n};return mr(this)||(e.reverse&&([r,n]=[n,r]),n=X(n),w.und(n)?fe(this)||this._set(r):this._set(n)),i}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,Jr(e,(o,a)=>/^on/.test(a)?Ui(o,r):o)),Kn(this,e,"onProps"),Ge(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 qi(++this._lastCallId,{key:r,props:e,defaultProps:n,state:s,actions:{pause:()=>{Ue(this)||(Yn(this,!0),Ke(s.pauseQueue),Ge(this,"onPause",ce(this,We(this,this.animation.to)),this))},resume:()=>{Ue(this)&&(Yn(this,!1),ge(this)&&this._resume(),Ke(s.resumeQueue),Ge(this,"onResume",ce(this,We(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=Ji(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(Ie(this));const n=!w.und(e.to),i=!w.und(e.from);if(n||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(Ie(this));const{key:s,defaultProps:o,animation:a}=this,{to:f,from:u}=a;let{to:l=f,from:d=u}=e;i&&!n&&(!t.default||w.und(l))&&(l=d),t.reverse&&([l,d]=[d,l]);const h=!pe(d,u);h&&(a.from=d),d=X(d);const p=!pe(l,f);p&&this._focus(l);const m=Pr(t.to),{config:_}=a,{decay:g,velocity:v}=_;(n||i)&&(_.velocity=0),t.config&&!m&&fa(_,Se(t.config,s),t.config!==o.config?Se(o.config,s):void 0);let x=fe(this);if(!x||w.und(l))return r(ce(this,!0));const b=w.und(t.reset)?i&&!t.default:!w.und(d)&&Ze(t.reset,s),O=b?d:this.get(),P=at(l),I=w.num(P)||w.arr(P)||Kt(P),$=!m&&(!I||Ze(o.immediate||t.immediate,s));if(p){const W=Or(l);if(W!==x.constructor)if($)x=this._set(P);else throw Error(`Cannot animate between ${x.constructor.name} and ${W.name}, as the "to" prop suggests`)}const z=x.constructor;let L=ne(l),oe=!1;if(!L){const W=b||!mr(this)&&h;(p||W)&&(oe=pe(at(O),P),L=!oe),(!pe(a.immediate,$)&&!$||!pe(_.decay,g)||!pe(_.velocity,v))&&(L=!0)}if(oe&&ge(this)&&(a.changed&&!b?L=!0:L||this._stop(f)),!m&&((L||ne(f))&&(a.values=x.getPayload(),a.toValues=ne(l)?null:z==ot?[1]:Z(P)),a.immediate!=$&&(a.immediate=$,!$&&!b&&this._set(f)),L)){const{onRest:W}=a;C(ga,G=>Kn(this,t,G));const ae=ce(this,We(this,f));Ke(this._pendingCalls,ae),this._pendingCalls.add(r),a.changed&&N.batchedUpdates(()=>{var G;a.changed=!b,W==null||W(ae,this),b?Se(o.onRest,ae):(G=a.onStart)==null||G.call(a,ae,this)})}b&&this._set(O),m?r(Hi(t.to,t,this._state,this)):L?this._start():ge(this)&&!p?this._pendingCalls.add(r):r(Yi(O))}_focus(e){const t=this.animation;e!==t.to&&($n(this)&&this._detach(),t.to=e,$n(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;ne(t)&&(Me(t,this),Rr(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;ne(e)&&it(e,this)}_set(e,t=!0){const r=X(e);if(!w.und(r)){const n=fe(this);if(!n||!pe(r,n.getValue())){const i=Or(r);!n||n.constructor!=i?Xr(this,i.create(r)):n.setValue(r),n&&N.batchedUpdates(()=>{this._onChange(r,t)})}}return fe(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ge(this,"onStart",ce(this,We(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Se(this.animation.onChange,e,this)),Se(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;fe(this).reset(X(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ge(this)||(qn(this,!0),Ue(this)||this._resume())}_resume(){le.skipAnimation?this.finish():qt.start(this)}_stop(e,t){if(ge(this)){qn(this,!1);const r=this.animation;C(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),nt(this,{type:"idle",parent:this});const n=t?Ie(this.get()):ce(this.get(),We(this,e??r.to));Ke(this._pendingCalls,n),r.changed&&(r.changed=!1,Ge(this,"onRest",n,this))}}};function We(e,t){const r=at(t),n=at(e.get());return pe(n,r)}function Ji(e,t=e.loop,r=e.to){const n=Se(t);if(n){const i=n!==!0&&Gi(n),s=(i||e).reverse,o=!i||i.reset;return ut({...e,loop:t,default:!1,pause:void 0,to:!s||Pr(r)?r:void 0,from:o?e.from:void 0,reset:o,...i})}}function ut(e){const{to:t,from:r}=e=Gi(e),n=new Set;return w.obj(t)&&Hn(t,n),w.obj(r)&&Hn(r,n),e.keys=n.size?Array.from(n):null,e}function ma(e){const t=ut(e);return w.und(t.default)&&(t.default=Jr(t)),t}function Hn(e,t){de(e,(r,n)=>r!=null&&t.add(n))}var ga=["onStart","onRest","onChange","onPause","onResume"];function Kn(e,t,r){e.animation[r]=t[r]!==Wi(t,r)?Ui(t[r],e.key):void 0}function Ge(e,t,...r){var n,i,s,o;(i=(n=e.animation)[t])==null||i.call(n,...r),(o=(s=e.defaultProps)[t])==null||o.call(s,...r)}var ya=["onStart","onChange","onRest"],va=1,ba=class{constructor(t,r){this.id=va++,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),r&&(this._flush=r),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((r,n)=>t[n]=r.get()),t}set(t){for(const r in t){const n=t[r];w.und(n)||this.springs[r].set(n)}}update(t){return t&&this.queue.push(ut(t)),this}start(t){let{queue:r}=this;return t?r=Z(t).map(ut):this.queue=[],this._flush?this._flush(this,r):(ns(this,r),Nr(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){const n=this.springs;C(Z(r),i=>n[i].stop(!!t))}else ct(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(w.und(t))this.start({pause:!0});else{const r=this.springs;C(Z(t),n=>r[n].pause())}return this}resume(t){if(w.und(t))this.start({pause:!1});else{const r=this.springs;C(Z(t),n=>r[n].resume())}return this}each(t){de(this.springs,t)}_onFrame(){const{onStart:t,onChange:r,onRest:n}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,Xe(t,([f,u])=>{u.value=this.get(),f(u,this,this._item)}));const o=!i&&this._started,a=s||o&&n.size?this.get():null;s&&r.size&&Xe(r,([f,u])=>{u.value=a,f(u,this,this._item)}),o&&(this._started=!1,Xe(n,([f,u])=>{u.value=a,f(u,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;N.onFrame(this._onFrame)}};function Nr(e,t){return Promise.all(t.map(r=>Zi(e,r))).then(r=>Zr(e,r))}async function Zi(e,t,r){const{keys:n,to:i,from:s,loop:o,onRest:a,onResolve:f}=t,u=w.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const l=w.arr(i)||w.fun(i)?i:void 0;l?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):C(ya,_=>{const g=t[_];if(w.fun(g)){const v=e._events[_];t[_]=({finished:x,cancelled:b})=>{const O=v.get(g);O?(x||(O.finished=!1),b&&(O.cancelled=!0)):v.set(g,{value:null,finished:x||!1,cancelled:b||!1})},u&&(u[_]=t[_])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ke(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const h=(n||Object.keys(e.springs)).map(_=>e.springs[_].start(t)),p=t.cancel===!0||Wi(t,"cancel")===!0;(l||p&&d.asyncId)&&h.push(qi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Sr,resume:Sr,start(_,g){p?(ct(d,e._lastAsyncId),g(Ie(e))):(_.onRest=a,g(Hi(l,_,d,e)))}}})),d.paused&&await new Promise(_=>{d.resumeQueue.add(_)});const m=Zr(e,await Promise.all(h));if(o&&m.finished&&!(r&&m.noop)){const _=Ji(t,o,i);if(_)return ns(e,[_]),Zi(e,_,!0)}return f&&N.batchedUpdates(()=>f(m,e,e.item)),m}function Qn(e,t){const r={...e.springs};return t&&C(Z(t),n=>{w.und(n.keys)&&(n=ut(n)),w.obj(n.to)||(n={...n,to:void 0}),rs(r,n,i=>ts(i))}),es(e,r),r}function es(e,t){de(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,Me(r,e))})}function ts(e,t){const r=new pa;return r.key=e,t&&Me(r,t),r}function rs(e,t,r){t.keys&&C(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function ns(e,t){C(t,r=>{rs(e.springs,r,n=>ts(n,e))})}var Jt=({children:e,...t})=>{const r=S.useContext($t),n=t.pause||!!r.pause,i=t.immediate||!!r.immediate;t=Yo(()=>({pause:n,immediate:i}),[n,i]);const{Provider:s}=$t;return Fr.createElement(s,{value:t},e)},$t=wa(Jt,{});Jt.Provider=$t.Provider;Jt.Consumer=$t.Consumer;function wa(e,t){return Object.assign(e,Fr.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var _a=()=>{const e=[],t=function(n){Go();const i=[];return C(e,(s,o)=>{if(w.und(n))i.push(s.start());else{const a=r(n,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const i=e.indexOf(n);~i&&e.splice(i,1)},t.pause=function(){return C(e,n=>n.pause(...arguments)),this},t.resume=function(){return C(e,n=>n.resume(...arguments)),this},t.set=function(n){C(e,(i,s)=>{const o=w.fun(n)?n(s,i):n;o&&i.set(o)})},t.start=function(n){const i=[];return C(e,(s,o)=>{if(w.und(n))i.push(s.start());else{const a=this._getProps(n,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return C(e,n=>n.stop(...arguments)),this},t.update=function(n){return C(e,(i,s)=>i.update(this._getProps(n,i,s))),this};const r=function(n,i,s){return w.fun(n)?n(s,i):n};return t._getProps=r,t};function Ea(e,t,r){const n=w.fun(t)&&t;n&&!r&&(r=[]);const i=S.useMemo(()=>n||arguments.length==3?_a():void 0,[]),s=S.useRef(0),o=zi(),a=S.useMemo(()=>({ctrls:[],queue:[],flush(v,x){const b=Qn(v,x);return s.current>0&&!a.queue.length&&!Object.keys(b).some(P=>!v.springs[P])?Nr(v,x):new Promise(P=>{es(v,b),a.queue.push(()=>{P(Nr(v,x))}),o()})}}),[]),f=S.useRef([...a.ctrls]),u=[],l=Mn(e)||0;S.useMemo(()=>{C(f.current.slice(e,l),v=>{aa(v,i),v.stop(!0)}),f.current.length=e,d(l,e)},[e]),S.useMemo(()=>{d(0,Math.min(l,e))},r);function d(v,x){for(let b=v;b<x;b++){const O=f.current[b]||(f.current[b]=new ba(null,a.flush)),P=n?n(b,O):t[b];P&&(u[b]=ma(P))}}const h=f.current.map((v,x)=>Qn(v,u[x])),p=S.useContext(Jt),m=Mn(p),_=p!==m&&oa(p);Qr(()=>{s.current++,a.ctrls=f.current;const{queue:v}=a;v.length&&(a.queue=[],C(v,x=>x())),C(f.current,(x,b)=>{i==null||i.add(x),_&&x.start({default:p});const O=u[b];O&&(ca(x,O.ref),x.ref?x.queue.push(O):x.start(O))})}),Fi(()=>()=>{C(a.ctrls,v=>v.stop(!0))});const g=h.map(v=>({...v}));return i?[g,i]:g}function gt(e,t){const r=w.fun(e),[[n],i]=Ea(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,i]:n}var xa=class extends en{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=tt(...t);const r=this._get(),n=Or(r);Xr(this,n.create(r))}advance(e){const t=this._get(),r=this.get();pe(t,r)||(fe(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Xn(this._active)&&gr(this)}_get(){const e=w.arr(this.source)?this.source.map(X):Z(X(this.source));return this.calc(...e)}_start(){this.idle&&!Xn(this._active)&&(this.idle=!1,C(Qt(this),e=>{e.done=!1}),le.skipAnimation?(N.batchedUpdates(()=>this.advance()),gr(this)):qt.start(this))}_attach(){let e=1;C(Z(this.source),t=>{ne(t)&&Me(t,this),Rr(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){C(Z(this.source),e=>{ne(e)&&it(e,this)}),this._active.clear(),gr(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=Z(this.source).reduce((t,r)=>Math.max(t,(Rr(r)?r.priority:0)+1),0))}};function Sa(e){return e.idle!==!1}function Xn(e){return!e.size||Array.from(e).every(Sa)}function gr(e){e.idle||(e.idle=!0,C(Qt(e),t=>{t.done=!0}),nt(e,{type:"idle",parent:e}))}le.assign({createStringInterpolator:Vi,to:(e,t)=>new xa(e,t)});var is=/^--/;function ka(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!is.test(e)&&!(et.hasOwnProperty(e)&&et[e])?t+"px":(""+t).trim()}var Jn={};function Oa(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:f,...u}=t,l=Object.values(u),d=Object.keys(u).map(h=>r||e.hasAttribute(h)?h:Jn[h]||(Jn[h]=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase())));s!==void 0&&(e.textContent=s);for(const h in i)if(i.hasOwnProperty(h)){const p=ka(h,i[h]);is.test(h)?e.style.setProperty(h,p):e.style[h]=p}d.forEach((h,p)=>{e.setAttribute(h,l[p])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),f!==void 0&&e.setAttribute("viewBox",f)}var et={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},Pa=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Ta=["Webkit","Ms","Moz","O"];et=Object.keys(et).reduce((e,t)=>(Ta.forEach(r=>e[Pa(r,t)]=e[t]),e),et);var Ra=/^(matrix|translate|scale|rotate|skew)/,Na=/^(translate)/,Da=/^(rotate|skew)/,yr=(e,t)=>w.num(e)&&e!==0?e+t:e,Dt=(e,t)=>w.arr(e)?e.every(r=>Dt(r,t)):w.num(e)?e===t:parseFloat(e)===t,Ca=class extends Xt{constructor({x:e,y:t,z:r,...n}){const i=[],s=[];(e||t||r)&&(i.push([e||0,t||0,r||0]),s.push(o=>[`translate3d(${o.map(a=>yr(a,"px")).join(",")})`,Dt(o,0)])),de(n,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(f=>[f,f===""]);else if(Ra.test(a)){if(delete n[a],w.und(o))return;const f=Na.test(a)?"px":Da.test(a)?"deg":"";i.push(Z(o)),s.push(a==="rotate3d"?([u,l,d,h])=>[`rotate3d(${u},${l},${d},${yr(h,f)})`,Dt(h,0)]:u=>[`${a}(${u.map(l=>yr(l,f)).join(",")})`,Dt(u,a.startsWith("scale")?1:0)])}}),i.length&&(n.transform=new Aa(i,s)),super(n)}},Aa=class extends Ii{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 C(this.inputs,(r,n)=>{const i=X(r[0]),[s,o]=this.transforms[n](w.arr(i)?i:r.map(X));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&C(this.inputs,t=>C(t,r=>ne(r)&&Me(r,this)))}observerRemoved(e){e==0&&C(this.inputs,t=>C(t,r=>ne(r)&&it(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),nt(this,e)}},Ia=["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"];le.assign({batchedUpdates:lo.unstable_batchedUpdates,createStringInterpolator:Vi,colors:xo});var ja=ta(Ia,{applyAnimatedValues:Oa,createAnimatedStyle:e=>new Ca(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),$e=ja.animated;function tn({animate:e=!0,content:t,textStyles:r,htmlElement:n,fadeIn:i,characterPreference:s="simplified",maxDelay:o=15e3}){const a=n??"div",[f,u]=S.useState(!1),[l,d]=gt(()=>({opacity:i?0:1,transform:i?"scale(0)":"scale(1)",config:{duration:200}})),h=S.useRef(e);S.useEffect(()=>{if(!e){h.current=e;return}const oe=!h.current&&e;h.current=e;const W=oe?500:Math.floor(Math.random()*(o-3500+1))+3500,ae=setTimeout(()=>{d.start({opacity:0,transform:"translateY(15px)",onRest:()=>{u(G=>!G),d.start({opacity:1,transform:"translateY(0px)"})}})},W);return()=>clearTimeout(ae)},[f,e,d,o]);const p=s==="traditional"?t.traditional:t.simplified,m=e&&f?p:t.english,{fontSize:_,fontFamily:g,fontWeight:v,fontStyle:x,letterSpacing:b,lineHeight:O,...P}=r||{},I={fontSize:_,fontFamily:g,fontWeight:v,fontStyle:x,letterSpacing:b,lineHeight:O},$={...P,display:"inline-grid",alignContent:"center"},z={...I,gridArea:"1 / 1"},L={...I,gridArea:"1 / 1",visibility:"hidden"};return E.jsx($e.div,{style:{...l,display:"inline-block"},children:E.jsxs(a,{style:$,children:[E.jsx("span",{style:z,children:m}),E.jsx("span",{style:L,children:t.english}),E.jsx("span",{style:L,children:t.simplified}),E.jsx("span",{style:L,children:t.traditional})]})})}const $a=T.keyframes`
|
|
30
|
+
<%s key={someKey} {...props} />`,fr,Ee,co,Ee),Tn[Ee+fr]=!0}}return c===n?no(U):ro(U),U}}function io(c,y,k){return Pn(c,y,k,!0)}function so(c,y,k){return Pn(c,y,k,!1)}var oo=so,ao=io;Be.Fragment=n,Be.jsx=oo,Be.jsxs=ao}()),Be}var Dn;function mo(){return Dn||(Dn=1,process.env.NODE_ENV==="production"?kt.exports=ho():kt.exports=po()),kt.exports}var E=mo(),Lr=pt(),N=e=>ht(e,Lr),Br=pt();N.write=e=>ht(e,Br);var Gt=pt();N.onStart=e=>ht(e,Gt);var Ur=pt();N.onFrame=e=>ht(e,Ur);var Wr=pt();N.onFinish=e=>ht(e,Wr);var Ae=[];N.setTimeout=(e,t)=>{const r=N.now()+t,n=()=>{const s=Ae.findIndex(o=>o.cancel==n);~s&&Ae.splice(s,1),be-=~s?1:0},i={time:r,handler:e,cancel:n};return Ae.splice(ki(r),0,i),be+=1,Oi(),i};var ki=e=>~(~Ae.findIndex(t=>t.time>e)||~Ae.length);N.cancel=e=>{Gt.delete(e),Ur.delete(e),Wr.delete(e),Lr.delete(e),Br.delete(e)};N.sync=e=>{xr=!0,N.batchedUpdates(e),xr=!1};N.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...i){t=i,N.onStart(r)}return n.handler=e,n.cancel=()=>{Gt.delete(r),t=null},n};var Gr=typeof window<"u"?window.requestAnimationFrame:()=>{};N.use=e=>Gr=e;N.now=typeof performance<"u"?()=>performance.now():Date.now;N.batchedUpdates=e=>e();N.catch=console.error;N.frameLoop="always";N.advance=()=>{N.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Pi()};var ve=-1,be=0,xr=!1;function ht(e,t){xr?(t.delete(e),e(0)):(t.add(e),Oi())}function Oi(){ve<0&&(ve=0,N.frameLoop!=="demand"&&Gr(Ti))}function go(){ve=-1}function Ti(){~ve&&(Gr(Ti),N.batchedUpdates(Pi))}function Pi(){const e=ve;ve=N.now();const t=ki(ve);if(t&&(Ri(Ae.splice(0,t),r=>r.handler()),be-=t),!be){go();return}Gt.flush(),Lr.flush(e?Math.min(64,ve-e):16.667),Ur.flush(),Br.flush(),Wr.flush()}function pt(){let e=new Set,t=e;return{add(r){be+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return be-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,be-=t.size,Ri(t,n=>n(r)&&e.add(n)),be+=e.size,t=e)}}}function Ri(e,t){e.forEach(r=>{try{t(r)}catch(n){N.catch(n)}})}var yo=Object.defineProperty,vo=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},le={};vo(le,{assign:()=>wo,colors:()=>we,createStringInterpolator:()=>Yr,skipAnimation:()=>Di,to:()=>Ni,willAdvance:()=>Hr});function Sr(){}var bo=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),w={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 pe(e,t){if(w.arr(e)){if(!w.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var C=(e,t)=>e.forEach(t);function de(e,t,r){if(w.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var Z=e=>w.und(e)?[]:w.arr(e)?e:[e];function Xe(e,t){if(e.size){const r=Array.from(e);e.clear(),C(r,t)}}var Ke=(e,...t)=>Xe(e,r=>r(...t)),qr=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Yr,Ni,we=null,Di=!1,Hr=Sr,wo=e=>{e.to&&(Ni=e.to),e.now&&(N.now=e.now),e.colors!==void 0&&(we=e.colors),e.skipAnimation!=null&&(Di=e.skipAnimation),e.createStringInterpolator&&(Yr=e.createStringInterpolator),e.requestAnimationFrame&&N.use(e.requestAnimationFrame),e.batchedUpdates&&(N.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Hr=e.willAdvance),e.frameLoop&&(N.frameLoop=e.frameLoop)},Je=new Set,se=[],dr=[],At=0,qt={get idle(){return!Je.size&&!se.length},start(e){At>e.priority?(Je.add(e),N.onStart(_o)):(Ci(e),N(kr))},advance:kr,sort(e){if(At)N.onFrame(()=>qt.sort(e));else{const t=se.indexOf(e);~t&&(se.splice(t,1),Ai(e))}},clear(){se=[],Je.clear()}};function _o(){Je.forEach(Ci),Je.clear(),N(kr)}function Ci(e){se.includes(e)||Ai(e)}function Ai(e){se.splice(Eo(se,t=>t.priority>e.priority),0,e)}function kr(e){const t=dr;for(let r=0;r<se.length;r++){const n=se[r];At=n.priority,n.idle||(Hr(n),n.advance(e),n.idle||t.push(n))}return At=0,dr=se,dr.length=0,se=t,se.length>0}function Eo(e,t){const r=e.findIndex(t);return r<0?e.length:r}var xo={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},ue="[-+]?\\d*\\.?\\d+",It=ue+"%";function Yt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var So=new RegExp("rgb"+Yt(ue,ue,ue)),ko=new RegExp("rgba"+Yt(ue,ue,ue,ue)),Oo=new RegExp("hsl"+Yt(ue,It,It)),To=new RegExp("hsla"+Yt(ue,It,It,ue)),Po=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ro=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,No=/^#([0-9a-fA-F]{6})$/,Do=/^#([0-9a-fA-F]{8})$/;function Co(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=No.exec(e))?parseInt(t[1]+"ff",16)>>>0:we&&we[e]!==void 0?we[e]:(t=So.exec(e))?(De(t[1])<<24|De(t[2])<<16|De(t[3])<<8|255)>>>0:(t=ko.exec(e))?(De(t[1])<<24|De(t[2])<<16|De(t[3])<<8|In(t[4]))>>>0:(t=Po.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Do.exec(e))?parseInt(t[1],16)>>>0:(t=Ro.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Oo.exec(e))?(Cn(An(t[1]),Ot(t[2]),Ot(t[3]))|255)>>>0:(t=To.exec(e))?(Cn(An(t[1]),Ot(t[2]),Ot(t[3]))|In(t[4]))>>>0:null}function hr(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Cn(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,s=hr(i,n,e+1/3),o=hr(i,n,e),a=hr(i,n,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function De(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function An(e){return(parseFloat(e)%360+360)%360/360}function In(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Ot(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function jn(e){let t=Co(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${s})`}var tt=(e,t,r)=>{if(w.fun(e))return e;if(w.arr(e))return tt({range:e,output:t,extrapolate:r});if(w.str(e.output[0]))return Yr(e);const n=e,i=n.output,s=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",f=n.easing||(u=>u);return u=>{const l=Io(u,s);return Ao(u,s[l],s[l+1],i[l],i[l+1],f,o,a,n.map)}};function Ao(e,t,r,n,i,s,o,a,f){let u=f?f(e):e;if(u<t){if(o==="identity")return u;o==="clamp"&&(u=t)}if(u>r){if(a==="identity")return u;a==="clamp"&&(u=r)}return n===i?n:t===r?e<=t?n:i:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=s(u),n===-1/0?u=-u:i===1/0?u=u+n:u=u*(i-n)+n,u)}function Io(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var jo={linear:e=>e},rt=Symbol.for("FluidValue.get"),je=Symbol.for("FluidValue.observers"),ne=e=>!!(e&&e[rt]),X=e=>e&&e[rt]?e[rt]():e,$n=e=>e[je]||null;function $o(e,t){e.eventObserved?e.eventObserved(t):e(t)}function nt(e,t){const r=e[je];r&&r.forEach(n=>{$o(n,t)})}var Ii=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Vo(this,e)}},Vo=(e,t)=>ji(e,rt,t);function Me(e,t){if(e[rt]){let r=e[je];r||ji(e,je,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function it(e,t){const r=e[je];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[je]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var ji=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Nt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Mo=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Vn=new RegExp(`(${Nt.source})(%|[a-z]+)`,"i"),zo=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ht=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,$i=e=>{const[t,r]=Fo(e);if(!t||qr())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);return i||e}else{if(r&&Ht.test(r))return $i(r);if(r)return r}return e},Fo=e=>{const t=Ht.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},pr,Lo=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`,Vi=e=>{pr||(pr=we?new RegExp(`(${Object.keys(we).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>X(s).replace(Ht,$i).replace(Mo,jn).replace(pr,jn)),r=t.map(s=>s.match(Nt).map(Number)),i=r[0].map((s,o)=>r.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>tt({...e,output:s}));return s=>{var f;const o=!Vn.test(t[0])&&((f=t.find(u=>Vn.test(u)))==null?void 0:f.replace(Nt,""));let a=0;return t[0].replace(Nt,()=>`${i[a++](s)}${o||""}`).replace(zo,Lo)}},Kr="react-spring: ",Mi=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Kr}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Bo=Mi(console.warn);function Uo(){Bo(`${Kr}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Wo=Mi(console.warn);function Go(){Wo(`${Kr}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 Kt(e){return w.str(e)&&(e[0]=="#"||/\d/.test(e)||!qr()&&Ht.test(e)||e in(we||{}))}var Qr=qr()?S.useEffect:S.useLayoutEffect,qo=()=>{const e=S.useRef(!1);return Qr(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function zi(){const e=S.useState()[1],t=qo();return()=>{t.current&&e(Math.random())}}function Yo(e,t){const[r]=S.useState(()=>({inputs:t,result:e()})),n=S.useRef(),i=n.current;let s=i;return s?t&&s.inputs&&Ho(t,s.inputs)||(s={inputs:t,result:e()}):s=r,S.useEffect(()=>{n.current=s,i==r&&(r.inputs=r.result=void 0)},[s]),s.result}function Ho(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Fi=e=>S.useEffect(e,Ko),Ko=[];function Mn(e){const t=S.useRef();return S.useEffect(()=>{t.current=e}),t.current}var st=Symbol.for("Animated:node"),Qo=e=>!!e&&e[st]===e,fe=e=>e&&e[st],Xr=(e,t)=>bo(e,st,t),Qt=e=>e&&e[st]&&e[st].getPayload(),Li=class{constructor(){Xr(this,this)}getPayload(){return this.payload||[]}},mt=class extends Li{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,w.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new mt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return w.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,w.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ot=class extends mt{constructor(e){super(0),this._string=null,this._toString=tt({output:[e,e]})}static create(e){return new ot(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(w.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=tt({output:[this.getValue(),e]})),this._value=0,super.reset()}},jt={dependencies:null},Xt=class extends Li{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return de(this.source,(r,n)=>{Qo(r)?t[n]=r.getValue(e):ne(r)?t[n]=X(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&C(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return de(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){jt.dependencies&&ne(e)&&jt.dependencies.add(e);const t=Qt(e);t&&C(t,r=>this.add(r))}},Bi=class extends Xt{constructor(e){super(e)}static create(e){return new Bi(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,n)=>r.setValue(e[n])).some(Boolean):(super.setValue(e.map(Xo)),!0)}};function Xo(e){return(Kt(e)?ot:mt).create(e)}function Or(e){const t=fe(e);return t?t.constructor:w.arr(e)?Bi:Kt(e)?ot:mt}var zn=(e,t)=>{const r=!w.fun(e)||e.prototype&&e.prototype.isReactComponent;return S.forwardRef((n,i)=>{const s=S.useRef(null),o=r&&S.useCallback(m=>{s.current=ea(i,m)},[i]),[a,f]=Zo(n,t),u=zi(),l=()=>{const m=s.current;if(r&&!m)return;(m?t.applyAnimatedValues(m,a.getValue(!0)):!1)===!1&&u()},d=new Jo(l,f),h=S.useRef();Qr(()=>(h.current=d,C(f,m=>Me(m,d)),()=>{h.current&&(C(h.current.deps,m=>it(m,h.current)),N.cancel(h.current.update))})),S.useEffect(l,[]),Fi(()=>()=>{const m=h.current;C(m.deps,_=>it(_,m))});const p=t.getComponentProps(a.getValue());return Fr.createElement(e,{...p,ref:o})})},Jo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&N.write(this.update)}};function Zo(e,t){const r=new Set;return jt.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Xt(e),jt.dependencies=null,[e,r]}function ea(e,t){return e&&(w.fun(e)?e(t):e.current=t),t}var Fn=Symbol.for("AnimatedComponent"),ta=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=i=>new Xt(i),getComponentProps:n=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},s=o=>{const a=Ln(o)||"Anonymous";return w.str(o)?o=s[o]||(s[o]=zn(o,i)):o=o[Fn]||(o[Fn]=zn(o,i)),o.displayName=`Animated(${a})`,o};return de(e,(o,a)=>{w.arr(e)&&(a=Ln(o)),s[a]=s(o)}),{animated:s}},Ln=e=>w.str(e)?e:e&&w.str(e.displayName)?e.displayName:w.fun(e)&&e.name||null;function Se(e,...t){return w.fun(e)?e(...t):e}var Ze=(e,t)=>e===!0||!!(t&&e&&(w.fun(e)?e(t):Z(e).includes(t))),Ui=(e,t)=>w.obj(e)?t&&e[t]:e,Wi=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ra=e=>e,Jr=(e,t=ra)=>{let r=na;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const i of r){const s=t(e[i],i);w.und(s)||(n[i]=s)}return n},na=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ia={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 sa(e){const t={};let r=0;if(de(e,(n,i)=>{ia[i]||(t[i]=n,r++)}),r)return t}function Gi(e){const t=sa(e);if(t){const r={to:t};return de(e,(n,i)=>i in t||(r[i]=n)),r}return{...e}}function at(e){return e=X(e),w.arr(e)?e.map(at):Kt(e)?le.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function oa(e){for(const t in e)return!0;return!1}function Tr(e){return w.fun(e)||w.arr(e)&&w.obj(e[0])}function aa(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function ca(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var ua={default:{tension:170,friction:26}},Pr={...ua.default,mass:1,damping:1,easing:jo.linear,clamp:!1},la=class{constructor(){this.velocity=0,Object.assign(this,Pr)}};function fa(e,t,r){r&&(r={...r},Bn(r,t),t={...r,...t}),Bn(e,t),Object.assign(e,t);for(const o in Pr)e[o]==null&&(e[o]=Pr[o]);let{frequency:n,damping:i}=e;const{mass:s}=e;return w.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*s,e.friction=4*Math.PI*i*s/n),e}function Bn(e,t){if(!w.und(t.decay))e.duration=void 0;else{const r=!w.und(t.tension)||!w.und(t.friction);(r||!w.und(t.frequency)||!w.und(t.damping)||!w.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var Un=[],da=class{constructor(){this.changed=!1,this.values=Un,this.toValues=null,this.fromValues=Un,this.config=new la,this.immediate=!1}};function qi(e,{key:t,props:r,defaultProps:n,state:i,actions:s}){return new Promise((o,a)=>{let f,u,l=Ze(r.cancel??(n==null?void 0:n.cancel),t);if(l)p();else{w.und(r.pause)||(i.paused=Ze(r.pause,t));let m=n==null?void 0:n.pause;m!==!0&&(m=i.paused||Ze(m,t)),f=Se(r.delay||0,t),m?(i.resumeQueue.add(h),s.pause()):(s.resume(),h())}function d(){i.resumeQueue.add(h),i.timeouts.delete(u),u.cancel(),f=u.time-N.now()}function h(){f>0&&!le.skipAnimation?(i.delayed=!0,u=N.setTimeout(p,f),i.pauseQueue.add(d),i.timeouts.add(u)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(l=!0);try{s.start({...r,callId:e,cancel:l},o)}catch(m){a(m)}}})}var Zr=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?Ie(e.get()):t.every(r=>r.noop)?Yi(e.get()):ce(e.get(),t.every(r=>r.finished)),Yi=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ce=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),Ie=e=>({value:e,cancelled:!0,finished:!1});function Hi(e,t,r,n){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:a,promise:f}=r;return!s&&e===a&&!t.reset?f:r.promise=(async()=>{r.asyncId=i,r.asyncTo=e;const u=Jr(t,(g,v)=>v==="onRest"?void 0:g);let l,d;const h=new Promise((g,v)=>(l=g,d=v)),p=g=>{const v=i<=(r.cancelId||0)&&Ie(n)||i!==r.asyncId&&ce(n,!1);if(v)throw g.result=v,d(g),g},m=(g,v)=>{const x=new Wn,b=new Gn;return(async()=>{if(le.skipAnimation)throw ct(r),b.result=ce(n,!1),d(b),b;p(x);const O=w.obj(g)?{...g}:{...v,to:g};O.parentId=i,de(u,(I,$)=>{w.und(O[$])&&(O[$]=I)});const T=await n.start(O);return p(x),r.paused&&await new Promise(I=>{r.resumeQueue.add(I)}),T})()};let _;if(le.skipAnimation)return ct(r),ce(n,!1);try{let g;w.arr(e)?g=(async v=>{for(const x of v)await m(x)})(e):g=Promise.resolve(e(m,n.stop.bind(n))),await Promise.all([g.then(l),h]),_=ce(n.get(),!0,!1)}catch(g){if(g instanceof Wn)_=g.result;else if(g instanceof Gn)_=g.result;else throw g}finally{i==r.asyncId&&(r.asyncId=s,r.asyncTo=s?a:void 0,r.promise=s?f:void 0)}return w.fun(o)&&N.batchedUpdates(()=>{o(_,n,n.item)}),_})()}function ct(e,t){Xe(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wn=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.")}},Gn=class extends Error{constructor(){super("SkipAnimationSignal")}},Rr=e=>e instanceof en,ha=1,en=class extends Ii{constructor(){super(...arguments),this.id=ha++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=fe(this);return e&&e.getValue()}to(...e){return le.to(this,e)}interpolate(...e){return Uo(),le.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){nt(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||qt.sort(this),nt(this,{type:"priority",parent:this,priority:e})}},Oe=Symbol.for("SpringPhase"),Ki=1,Qi=2,Xi=4,mr=e=>(e[Oe]&Ki)>0,ge=e=>(e[Oe]&Qi)>0,Ue=e=>(e[Oe]&Xi)>0,qn=(e,t)=>t?e[Oe]|=Qi|Ki:e[Oe]&=-3,Yn=(e,t)=>t?e[Oe]|=Xi:e[Oe]&=-5,pa=class extends en{constructor(e,t){if(super(),this.animation=new da,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,!w.und(e)||!w.und(t)){const r=w.obj(e)?{...e}:{...t,from:e};w.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(ge(this)||this._state.asyncTo)||Ue(this)}get goal(){return X(this.animation.to)}get velocity(){const e=fe(this);return e instanceof mt?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return mr(this)}get isAnimating(){return ge(this)}get isPaused(){return Ue(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:i}=n;const{config:s}=n,o=Qt(n.to);!o&&ne(n.to)&&(i=Z(X(n.to))),n.values.forEach((u,l)=>{if(u.done)return;const d=u.constructor==ot?1:o?o[l].lastPosition:i[l];let h=n.immediate,p=d;if(!h){if(p=u.lastPosition,s.tension<=0){u.done=!0;return}let m=u.elapsedTime+=e;const _=n.fromValues[l],g=u.v0!=null?u.v0:u.v0=w.arr(s.velocity)?s.velocity[l]:s.velocity;let v;const x=s.precision||(_==d?.005:Math.min(1,Math.abs(d-_)*.001));if(w.und(s.duration))if(s.decay){const b=s.decay===!0?.998:s.decay,O=Math.exp(-(1-b)*m);p=_+g/(1-b)*(1-O),h=Math.abs(u.lastPosition-p)<=x,v=g*O}else{v=u.lastVelocity==null?g:u.lastVelocity;const b=s.restVelocity||x/10,O=s.clamp?0:s.bounce,T=!w.und(O),I=_==d?u.v0>0:_<d;let $,z=!1;const L=1,oe=Math.ceil(e/L);for(let W=0;W<oe&&($=Math.abs(v)>b,!(!$&&(h=Math.abs(d-p)<=x,h)));++W){T&&(z=p==d||p>d==I,z&&(v=-v*O,p=d));const ae=-s.tension*1e-6*(p-d),G=-s.friction*.001*v,he=(ae+G)/s.mass;v=v+he*L,p=p+v*L}}else{let b=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,u.durationProgress>0&&(u.elapsedTime=s.duration*u.durationProgress,m=u.elapsedTime+=e)),b=(s.progress||0)+m/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),p=_+s.easing(b)*(d-_),v=(p-u.lastPosition)/e,h=b==1}u.lastVelocity=v,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}o&&!o[l].done&&(h=!1),h?u.done=!0:t=!1,u.setValue(p,s.round)&&(r=!0)});const a=fe(this),f=a.getValue();if(t){const u=X(n.to);(f!==u||r)&&!s.decay?(a.setValue(u),this._onChange(u)):r&&s.decay&&this._onChange(f),this._stop()}else r&&this._onChange(f)}set(e){return N.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ge(this)){const{to:e,config:t}=this.animation;N.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 r;return w.und(e)?(r=this.queue||[],this.queue=[]):r=[w.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Zr(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),ct(this._state,e&&this._lastCallId),N.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:r,from:n}=e;r=w.obj(r)?r[t]:r,(r==null||Tr(r))&&(r=void 0),n=w.obj(n)?n[t]:n,n==null&&(n=void 0);const i={to:r,from:n};return mr(this)||(e.reverse&&([r,n]=[n,r]),n=X(n),w.und(n)?fe(this)||this._set(r):this._set(n)),i}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,Jr(e,(o,a)=>/^on/.test(a)?Ui(o,r):o)),Kn(this,e,"onProps"),Ge(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 qi(++this._lastCallId,{key:r,props:e,defaultProps:n,state:s,actions:{pause:()=>{Ue(this)||(Yn(this,!0),Ke(s.pauseQueue),Ge(this,"onPause",ce(this,We(this,this.animation.to)),this))},resume:()=>{Ue(this)&&(Yn(this,!1),ge(this)&&this._resume(),Ke(s.resumeQueue),Ge(this,"onResume",ce(this,We(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=Ji(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(Ie(this));const n=!w.und(e.to),i=!w.und(e.from);if(n||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(Ie(this));const{key:s,defaultProps:o,animation:a}=this,{to:f,from:u}=a;let{to:l=f,from:d=u}=e;i&&!n&&(!t.default||w.und(l))&&(l=d),t.reverse&&([l,d]=[d,l]);const h=!pe(d,u);h&&(a.from=d),d=X(d);const p=!pe(l,f);p&&this._focus(l);const m=Tr(t.to),{config:_}=a,{decay:g,velocity:v}=_;(n||i)&&(_.velocity=0),t.config&&!m&&fa(_,Se(t.config,s),t.config!==o.config?Se(o.config,s):void 0);let x=fe(this);if(!x||w.und(l))return r(ce(this,!0));const b=w.und(t.reset)?i&&!t.default:!w.und(d)&&Ze(t.reset,s),O=b?d:this.get(),T=at(l),I=w.num(T)||w.arr(T)||Kt(T),$=!m&&(!I||Ze(o.immediate||t.immediate,s));if(p){const W=Or(l);if(W!==x.constructor)if($)x=this._set(T);else throw Error(`Cannot animate between ${x.constructor.name} and ${W.name}, as the "to" prop suggests`)}const z=x.constructor;let L=ne(l),oe=!1;if(!L){const W=b||!mr(this)&&h;(p||W)&&(oe=pe(at(O),T),L=!oe),(!pe(a.immediate,$)&&!$||!pe(_.decay,g)||!pe(_.velocity,v))&&(L=!0)}if(oe&&ge(this)&&(a.changed&&!b?L=!0:L||this._stop(f)),!m&&((L||ne(f))&&(a.values=x.getPayload(),a.toValues=ne(l)?null:z==ot?[1]:Z(T)),a.immediate!=$&&(a.immediate=$,!$&&!b&&this._set(f)),L)){const{onRest:W}=a;C(ga,G=>Kn(this,t,G));const ae=ce(this,We(this,f));Ke(this._pendingCalls,ae),this._pendingCalls.add(r),a.changed&&N.batchedUpdates(()=>{var G;a.changed=!b,W==null||W(ae,this),b?Se(o.onRest,ae):(G=a.onStart)==null||G.call(a,ae,this)})}b&&this._set(O),m?r(Hi(t.to,t,this._state,this)):L?this._start():ge(this)&&!p?this._pendingCalls.add(r):r(Yi(O))}_focus(e){const t=this.animation;e!==t.to&&($n(this)&&this._detach(),t.to=e,$n(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;ne(t)&&(Me(t,this),Rr(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;ne(e)&&it(e,this)}_set(e,t=!0){const r=X(e);if(!w.und(r)){const n=fe(this);if(!n||!pe(r,n.getValue())){const i=Or(r);!n||n.constructor!=i?Xr(this,i.create(r)):n.setValue(r),n&&N.batchedUpdates(()=>{this._onChange(r,t)})}}return fe(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ge(this,"onStart",ce(this,We(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Se(this.animation.onChange,e,this)),Se(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;fe(this).reset(X(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ge(this)||(qn(this,!0),Ue(this)||this._resume())}_resume(){le.skipAnimation?this.finish():qt.start(this)}_stop(e,t){if(ge(this)){qn(this,!1);const r=this.animation;C(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),nt(this,{type:"idle",parent:this});const n=t?Ie(this.get()):ce(this.get(),We(this,e??r.to));Ke(this._pendingCalls,n),r.changed&&(r.changed=!1,Ge(this,"onRest",n,this))}}};function We(e,t){const r=at(t),n=at(e.get());return pe(n,r)}function Ji(e,t=e.loop,r=e.to){const n=Se(t);if(n){const i=n!==!0&&Gi(n),s=(i||e).reverse,o=!i||i.reset;return ut({...e,loop:t,default:!1,pause:void 0,to:!s||Tr(r)?r:void 0,from:o?e.from:void 0,reset:o,...i})}}function ut(e){const{to:t,from:r}=e=Gi(e),n=new Set;return w.obj(t)&&Hn(t,n),w.obj(r)&&Hn(r,n),e.keys=n.size?Array.from(n):null,e}function ma(e){const t=ut(e);return w.und(t.default)&&(t.default=Jr(t)),t}function Hn(e,t){de(e,(r,n)=>r!=null&&t.add(n))}var ga=["onStart","onRest","onChange","onPause","onResume"];function Kn(e,t,r){e.animation[r]=t[r]!==Wi(t,r)?Ui(t[r],e.key):void 0}function Ge(e,t,...r){var n,i,s,o;(i=(n=e.animation)[t])==null||i.call(n,...r),(o=(s=e.defaultProps)[t])==null||o.call(s,...r)}var ya=["onStart","onChange","onRest"],va=1,ba=class{constructor(t,r){this.id=va++,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),r&&(this._flush=r),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((r,n)=>t[n]=r.get()),t}set(t){for(const r in t){const n=t[r];w.und(n)||this.springs[r].set(n)}}update(t){return t&&this.queue.push(ut(t)),this}start(t){let{queue:r}=this;return t?r=Z(t).map(ut):this.queue=[],this._flush?this._flush(this,r):(ns(this,r),Nr(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){const n=this.springs;C(Z(r),i=>n[i].stop(!!t))}else ct(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(w.und(t))this.start({pause:!0});else{const r=this.springs;C(Z(t),n=>r[n].pause())}return this}resume(t){if(w.und(t))this.start({pause:!1});else{const r=this.springs;C(Z(t),n=>r[n].resume())}return this}each(t){de(this.springs,t)}_onFrame(){const{onStart:t,onChange:r,onRest:n}=this._events,i=this._active.size>0,s=this._changed.size>0;(i&&!this._started||s&&!this._started)&&(this._started=!0,Xe(t,([f,u])=>{u.value=this.get(),f(u,this,this._item)}));const o=!i&&this._started,a=s||o&&n.size?this.get():null;s&&r.size&&Xe(r,([f,u])=>{u.value=a,f(u,this,this._item)}),o&&(this._started=!1,Xe(n,([f,u])=>{u.value=a,f(u,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;N.onFrame(this._onFrame)}};function Nr(e,t){return Promise.all(t.map(r=>Zi(e,r))).then(r=>Zr(e,r))}async function Zi(e,t,r){const{keys:n,to:i,from:s,loop:o,onRest:a,onResolve:f}=t,u=w.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const l=w.arr(i)||w.fun(i)?i:void 0;l?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):C(ya,_=>{const g=t[_];if(w.fun(g)){const v=e._events[_];t[_]=({finished:x,cancelled:b})=>{const O=v.get(g);O?(x||(O.finished=!1),b&&(O.cancelled=!0)):v.set(g,{value:null,finished:x||!1,cancelled:b||!1})},u&&(u[_]=t[_])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ke(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const h=(n||Object.keys(e.springs)).map(_=>e.springs[_].start(t)),p=t.cancel===!0||Wi(t,"cancel")===!0;(l||p&&d.asyncId)&&h.push(qi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Sr,resume:Sr,start(_,g){p?(ct(d,e._lastAsyncId),g(Ie(e))):(_.onRest=a,g(Hi(l,_,d,e)))}}})),d.paused&&await new Promise(_=>{d.resumeQueue.add(_)});const m=Zr(e,await Promise.all(h));if(o&&m.finished&&!(r&&m.noop)){const _=Ji(t,o,i);if(_)return ns(e,[_]),Zi(e,_,!0)}return f&&N.batchedUpdates(()=>f(m,e,e.item)),m}function Qn(e,t){const r={...e.springs};return t&&C(Z(t),n=>{w.und(n.keys)&&(n=ut(n)),w.obj(n.to)||(n={...n,to:void 0}),rs(r,n,i=>ts(i))}),es(e,r),r}function es(e,t){de(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,Me(r,e))})}function ts(e,t){const r=new pa;return r.key=e,t&&Me(r,t),r}function rs(e,t,r){t.keys&&C(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function ns(e,t){C(t,r=>{rs(e.springs,r,n=>ts(n,e))})}var Jt=({children:e,...t})=>{const r=S.useContext($t),n=t.pause||!!r.pause,i=t.immediate||!!r.immediate;t=Yo(()=>({pause:n,immediate:i}),[n,i]);const{Provider:s}=$t;return Fr.createElement(s,{value:t},e)},$t=wa(Jt,{});Jt.Provider=$t.Provider;Jt.Consumer=$t.Consumer;function wa(e,t){return Object.assign(e,Fr.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var _a=()=>{const e=[],t=function(n){Go();const i=[];return C(e,(s,o)=>{if(w.und(n))i.push(s.start());else{const a=r(n,s,o);a&&i.push(s.start(a))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const i=e.indexOf(n);~i&&e.splice(i,1)},t.pause=function(){return C(e,n=>n.pause(...arguments)),this},t.resume=function(){return C(e,n=>n.resume(...arguments)),this},t.set=function(n){C(e,(i,s)=>{const o=w.fun(n)?n(s,i):n;o&&i.set(o)})},t.start=function(n){const i=[];return C(e,(s,o)=>{if(w.und(n))i.push(s.start());else{const a=this._getProps(n,s,o);a&&i.push(s.start(a))}}),i},t.stop=function(){return C(e,n=>n.stop(...arguments)),this},t.update=function(n){return C(e,(i,s)=>i.update(this._getProps(n,i,s))),this};const r=function(n,i,s){return w.fun(n)?n(s,i):n};return t._getProps=r,t};function Ea(e,t,r){const n=w.fun(t)&&t;n&&!r&&(r=[]);const i=S.useMemo(()=>n||arguments.length==3?_a():void 0,[]),s=S.useRef(0),o=zi(),a=S.useMemo(()=>({ctrls:[],queue:[],flush(v,x){const b=Qn(v,x);return s.current>0&&!a.queue.length&&!Object.keys(b).some(T=>!v.springs[T])?Nr(v,x):new Promise(T=>{es(v,b),a.queue.push(()=>{T(Nr(v,x))}),o()})}}),[]),f=S.useRef([...a.ctrls]),u=[],l=Mn(e)||0;S.useMemo(()=>{C(f.current.slice(e,l),v=>{aa(v,i),v.stop(!0)}),f.current.length=e,d(l,e)},[e]),S.useMemo(()=>{d(0,Math.min(l,e))},r);function d(v,x){for(let b=v;b<x;b++){const O=f.current[b]||(f.current[b]=new ba(null,a.flush)),T=n?n(b,O):t[b];T&&(u[b]=ma(T))}}const h=f.current.map((v,x)=>Qn(v,u[x])),p=S.useContext(Jt),m=Mn(p),_=p!==m&&oa(p);Qr(()=>{s.current++,a.ctrls=f.current;const{queue:v}=a;v.length&&(a.queue=[],C(v,x=>x())),C(f.current,(x,b)=>{i==null||i.add(x),_&&x.start({default:p});const O=u[b];O&&(ca(x,O.ref),x.ref?x.queue.push(O):x.start(O))})}),Fi(()=>()=>{C(a.ctrls,v=>v.stop(!0))});const g=h.map(v=>({...v}));return i?[g,i]:g}function gt(e,t){const r=w.fun(e),[[n],i]=Ea(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,i]:n}var xa=class extends en{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=tt(...t);const r=this._get(),n=Or(r);Xr(this,n.create(r))}advance(e){const t=this._get(),r=this.get();pe(t,r)||(fe(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Xn(this._active)&&gr(this)}_get(){const e=w.arr(this.source)?this.source.map(X):Z(X(this.source));return this.calc(...e)}_start(){this.idle&&!Xn(this._active)&&(this.idle=!1,C(Qt(this),e=>{e.done=!1}),le.skipAnimation?(N.batchedUpdates(()=>this.advance()),gr(this)):qt.start(this))}_attach(){let e=1;C(Z(this.source),t=>{ne(t)&&Me(t,this),Rr(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){C(Z(this.source),e=>{ne(e)&&it(e,this)}),this._active.clear(),gr(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=Z(this.source).reduce((t,r)=>Math.max(t,(Rr(r)?r.priority:0)+1),0))}};function Sa(e){return e.idle!==!1}function Xn(e){return!e.size||Array.from(e).every(Sa)}function gr(e){e.idle||(e.idle=!0,C(Qt(e),t=>{t.done=!0}),nt(e,{type:"idle",parent:e}))}le.assign({createStringInterpolator:Vi,to:(e,t)=>new xa(e,t)});var is=/^--/;function ka(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!is.test(e)&&!(et.hasOwnProperty(e)&&et[e])?t+"px":(""+t).trim()}var Jn={};function Oa(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:i,children:s,scrollTop:o,scrollLeft:a,viewBox:f,...u}=t,l=Object.values(u),d=Object.keys(u).map(h=>r||e.hasAttribute(h)?h:Jn[h]||(Jn[h]=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase())));s!==void 0&&(e.textContent=s);for(const h in i)if(i.hasOwnProperty(h)){const p=ka(h,i[h]);is.test(h)?e.style.setProperty(h,p):e.style[h]=p}d.forEach((h,p)=>{e.setAttribute(h,l[p])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),a!==void 0&&(e.scrollLeft=a),f!==void 0&&e.setAttribute("viewBox",f)}var et={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},Ta=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Pa=["Webkit","Ms","Moz","O"];et=Object.keys(et).reduce((e,t)=>(Pa.forEach(r=>e[Ta(r,t)]=e[t]),e),et);var Ra=/^(matrix|translate|scale|rotate|skew)/,Na=/^(translate)/,Da=/^(rotate|skew)/,yr=(e,t)=>w.num(e)&&e!==0?e+t:e,Dt=(e,t)=>w.arr(e)?e.every(r=>Dt(r,t)):w.num(e)?e===t:parseFloat(e)===t,Ca=class extends Xt{constructor({x:e,y:t,z:r,...n}){const i=[],s=[];(e||t||r)&&(i.push([e||0,t||0,r||0]),s.push(o=>[`translate3d(${o.map(a=>yr(a,"px")).join(",")})`,Dt(o,0)])),de(n,(o,a)=>{if(a==="transform")i.push([o||""]),s.push(f=>[f,f===""]);else if(Ra.test(a)){if(delete n[a],w.und(o))return;const f=Na.test(a)?"px":Da.test(a)?"deg":"";i.push(Z(o)),s.push(a==="rotate3d"?([u,l,d,h])=>[`rotate3d(${u},${l},${d},${yr(h,f)})`,Dt(h,0)]:u=>[`${a}(${u.map(l=>yr(l,f)).join(",")})`,Dt(u,a.startsWith("scale")?1:0)])}}),i.length&&(n.transform=new Aa(i,s)),super(n)}},Aa=class extends Ii{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 C(this.inputs,(r,n)=>{const i=X(r[0]),[s,o]=this.transforms[n](w.arr(i)?i:r.map(X));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&C(this.inputs,t=>C(t,r=>ne(r)&&Me(r,this)))}observerRemoved(e){e==0&&C(this.inputs,t=>C(t,r=>ne(r)&&it(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),nt(this,e)}},Ia=["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"];le.assign({batchedUpdates:lo.unstable_batchedUpdates,createStringInterpolator:Vi,colors:xo});var ja=ta(Ia,{applyAnimatedValues:Oa,createAnimatedStyle:e=>new Ca(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),$e=ja.animated;function tn({animate:e=!0,content:t,textStyles:r,htmlElement:n,fadeIn:i,characterPreference:s="simplified",maxDelay:o=15e3}){const a=n??"div",[f,u]=S.useState(!1),[l,d]=gt(()=>({opacity:i?0:1,transform:i?"scale(0)":"scale(1)",config:{duration:200}})),h=S.useRef(e);S.useEffect(()=>{if(!e){h.current=e;return}const oe=!h.current&&e;h.current=e;const W=oe?500:Math.floor(Math.random()*(o-3500+1))+3500,ae=setTimeout(()=>{d.start({opacity:0,transform:"translateY(15px)",onRest:()=>{u(G=>!G),d.start({opacity:1,transform:"translateY(0px)"})}})},W);return()=>clearTimeout(ae)},[f,e,d,o]);const p=s==="traditional"?t.traditional:t.simplified,m=e&&f?p:t.english,{fontSize:_,fontFamily:g,fontWeight:v,fontStyle:x,letterSpacing:b,lineHeight:O,...T}=r||{},I={fontSize:_,fontFamily:g,fontWeight:v,fontStyle:x,letterSpacing:b,lineHeight:O},$={...T,display:"inline-grid",alignContent:"center"},z={...I,gridArea:"1 / 1"},L={...I,gridArea:"1 / 1",visibility:"hidden"};return E.jsx($e.div,{style:{...l,display:"inline-block"},children:E.jsxs(a,{style:$,children:[E.jsx("span",{style:z,children:m}),E.jsx("span",{style:L,children:t.english}),E.jsx("span",{style:L,children:t.simplified}),E.jsx("span",{style:L,children:t.traditional})]})})}const $a=P.keyframes`
|
|
31
31
|
0% {
|
|
32
32
|
transform: scale(1);
|
|
33
33
|
}
|
|
@@ -37,7 +37,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
37
37
|
100% {
|
|
38
38
|
transform: scale(1);
|
|
39
39
|
}
|
|
40
|
-
`,Va=
|
|
40
|
+
`,Va=P.div`
|
|
41
41
|
display: inline-block;
|
|
42
42
|
position: relative;
|
|
43
43
|
overflow: hidden;
|
|
@@ -48,7 +48,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
48
48
|
&:active {
|
|
49
49
|
animation: ${$a} 0.2s;
|
|
50
50
|
}
|
|
51
|
-
`,Ma=
|
|
51
|
+
`,Ma=P.button`
|
|
52
52
|
display: flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
position: relative;
|
|
@@ -67,14 +67,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
67
67
|
background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.secondaryLight)||"#ffb652"}};
|
|
68
68
|
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSecondary)||"black"}};
|
|
69
69
|
}
|
|
70
|
-
`,za=
|
|
70
|
+
`,za=P.div`
|
|
71
71
|
display: flex;
|
|
72
72
|
margin-right: 1.25rem;
|
|
73
73
|
|
|
74
74
|
@media (min-width: 640px) {
|
|
75
75
|
margin-right: 0.25rem;
|
|
76
76
|
}
|
|
77
|
-
`;var ss={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Zn=S.createContext&&S.createContext(ss),Fa=["attr","size","title"];function La(e,t){if(e==null)return{};var r=Ba(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ba(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vt.apply(this,arguments)}function ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ei(Object(r),!0).forEach(function(n){Ua(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ua(e,t,r){return t=Wa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wa(e){var t=Ga(e,"string");return typeof t=="symbol"?t:t+""}function Ga(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function os(e){return e&&e.map((t,r)=>S.createElement(t.tag,Mt({key:r},t.attr),os(t.child)))}function _e(e){return t=>S.createElement(qa,Vt({attr:Mt({},e.attr)},t),os(e.child))}function qa(e){var t=r=>{var{attr:n,size:i,title:s}=e,o=La(e,Fa),a=i||r.size||"1em",f;return r.className&&(f=r.className),e.className&&(f=(f?f+" ":"")+e.className),S.createElement("svg",Vt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:f,style:Mt(Mt({color:e.color||r.color},r.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&S.createElement("title",null,s),e.children)};return Zn!==void 0?S.createElement(Zn.Consumer,null,r=>t(r)):t(ss)}function Ya(e){return _e({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 Ha(e){return _e({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 Ka=({iconComponent:e,buttonText:t,buttonType:r="primary",onClick:n,characterPreference:i,animate:s=!0})=>{let o;e==="plus"?o=E.jsx(Ya,{}):e==="send"&&(o=E.jsx(Ha,{}));const a=()=>{n&&n()};return E.jsx(Va,{onClick:a,children:E.jsxs(Ma,{className:r,children:[E.jsx(za,{children:o}),E.jsx(tn,{textStyles:{lineHeight:"0.8rem",minWidth:"3rem"},content:t,animate:s,characterPreference:i})]})})},Qa=
|
|
77
|
+
`;var ss={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Zn=S.createContext&&S.createContext(ss),Fa=["attr","size","title"];function La(e,t){if(e==null)return{};var r=Ba(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ba(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vt.apply(this,arguments)}function ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ei(Object(r),!0).forEach(function(n){Ua(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ua(e,t,r){return t=Wa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wa(e){var t=Ga(e,"string");return typeof t=="symbol"?t:t+""}function Ga(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function os(e){return e&&e.map((t,r)=>S.createElement(t.tag,Mt({key:r},t.attr),os(t.child)))}function _e(e){return t=>S.createElement(qa,Vt({attr:Mt({},e.attr)},t),os(e.child))}function qa(e){var t=r=>{var{attr:n,size:i,title:s}=e,o=La(e,Fa),a=i||r.size||"1em",f;return r.className&&(f=r.className),e.className&&(f=(f?f+" ":"")+e.className),S.createElement("svg",Vt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:f,style:Mt(Mt({color:e.color||r.color},r.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&S.createElement("title",null,s),e.children)};return Zn!==void 0?S.createElement(Zn.Consumer,null,r=>t(r)):t(ss)}function Ya(e){return _e({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 Ha(e){return _e({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 Ka=({iconComponent:e,buttonText:t,buttonType:r="primary",onClick:n,characterPreference:i,animate:s=!0})=>{let o;e==="plus"?o=E.jsx(Ya,{}):e==="send"&&(o=E.jsx(Ha,{}));const a=()=>{n&&n()};return E.jsx(Va,{onClick:a,children:E.jsxs(Ma,{className:r,children:[E.jsx(za,{children:o}),E.jsx(tn,{textStyles:{lineHeight:"0.8rem",minWidth:"3rem"},content:t,animate:s,characterPreference:i})]})})},Qa=P($e.div)`
|
|
78
78
|
width: 2.5rem;
|
|
79
79
|
height: 2.5rem;
|
|
80
80
|
border-radius: 50%;
|
|
@@ -83,11 +83,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
83
83
|
align-items: center;
|
|
84
84
|
justify-content: center;
|
|
85
85
|
cursor: pointer;
|
|
86
|
-
`,Xa=
|
|
86
|
+
`,Xa=P.span`
|
|
87
87
|
display: flex;
|
|
88
88
|
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSurface)||"black"}};
|
|
89
89
|
font-size: 1.125rem;
|
|
90
|
-
`;function Ja(e){return _e({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 Za(e){return _e({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 ec=({iconComponent:e,onClick:t})=>{const r=gt({from:{opacity:0,transform:"scale(0.5)"},to:{opacity:1,transform:"scale(1)"}}),n=()=>{t&&t()};let i;return e==="person"?i=E.jsx(Ja,{}):e==="qr"&&(i=E.jsx(Za,{})),E.jsx(Qa,{style:r,onClick:n,children:E.jsx(Xa,{children:i})})};function tc(e){return _e({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 rc=({size:e,onClick:t})=>{const r=()=>{t&&t()};return E.jsx(tc,{size:e??"1.5rem",onClick:r})},nc=
|
|
90
|
+
`;function Ja(e){return _e({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 Za(e){return _e({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 ec=({iconComponent:e,onClick:t})=>{const r=gt({from:{opacity:0,transform:"scale(0.5)"},to:{opacity:1,transform:"scale(1)"}}),n=()=>{t&&t()};let i;return e==="person"?i=E.jsx(Ja,{}):e==="qr"&&(i=E.jsx(Za,{})),E.jsx(Qa,{style:r,onClick:n,children:E.jsx(Xa,{children:i})})};function tc(e){return _e({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 rc=({size:e,onClick:t})=>{const r=()=>{t&&t()};return E.jsx(tc,{size:e??"1.5rem",onClick:r})},nc=P.keyframes`
|
|
91
91
|
0% {
|
|
92
92
|
transform: scale(0);
|
|
93
93
|
opacity: 0.6;
|
|
@@ -96,7 +96,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
96
96
|
transform: scale(10);
|
|
97
97
|
opacity: 0;
|
|
98
98
|
}
|
|
99
|
-
`,ic=
|
|
99
|
+
`,ic=P.span`
|
|
100
100
|
position: absolute;
|
|
101
101
|
left: ${({$x:e})=>e}px;
|
|
102
102
|
top: ${({$y:e})=>e}px;
|
|
@@ -108,59 +108,59 @@ React keys must be passed directly to JSX without using spread:
|
|
|
108
108
|
background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.ripple)||"rgba(0, 0, 0, 0.15)"}};
|
|
109
109
|
pointer-events: none;
|
|
110
110
|
animation: ${nc} 0.4s ease-out forwards;
|
|
111
|
-
`;
|
|
111
|
+
`;P.div`
|
|
112
112
|
position: absolute;
|
|
113
113
|
left: 0;
|
|
114
114
|
right: 0;
|
|
115
115
|
display: flex;
|
|
116
116
|
flex-direction: column;
|
|
117
117
|
z-index: 1;
|
|
118
|
-
`;
|
|
118
|
+
`;P.div`
|
|
119
119
|
display: flex;
|
|
120
120
|
flex-direction: column;
|
|
121
121
|
padding: 1.5rem var(--app-standard-padding);
|
|
122
122
|
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onSurface)||"black"}};
|
|
123
123
|
gap: 2rem;
|
|
124
124
|
justify-self: center;
|
|
125
|
-
`;
|
|
125
|
+
`;P.div`
|
|
126
126
|
display: flex;
|
|
127
127
|
flex-direction: column;
|
|
128
128
|
gap: 1.5rem;
|
|
129
|
-
`;const sc=
|
|
129
|
+
`;const sc=P.ul`
|
|
130
130
|
display: flex;
|
|
131
131
|
flex-direction: column;
|
|
132
132
|
justify-content: center;
|
|
133
133
|
padding-inline-start: unset;
|
|
134
|
-
`,oc=
|
|
134
|
+
`,oc=P.li`
|
|
135
135
|
position: relative;
|
|
136
136
|
list-style: none;
|
|
137
137
|
cursor: pointer;
|
|
138
138
|
overflow: hidden;
|
|
139
139
|
-webkit-tap-highlight-color: transparent;
|
|
140
140
|
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrimLight)||"rgba(0, 0, 0, 0.3)"}};
|
|
141
|
-
`,ac=
|
|
141
|
+
`,ac=P.div`
|
|
142
142
|
display: flex;
|
|
143
143
|
flex-direction: row;
|
|
144
144
|
justify-content: space-between;
|
|
145
145
|
align-items: center;
|
|
146
146
|
padding: 0.5rem 0.75rem;
|
|
147
|
-
`,cc=
|
|
147
|
+
`,cc=P.div`
|
|
148
148
|
display: flex;
|
|
149
149
|
flex-direction: row;
|
|
150
150
|
gap: 2rem;
|
|
151
151
|
align-items: center;
|
|
152
|
-
`,ti=
|
|
152
|
+
`,ti=P.div`
|
|
153
153
|
display: flex;
|
|
154
154
|
flex-direction: column;
|
|
155
155
|
justify-content: center;
|
|
156
|
-
`,uc=
|
|
156
|
+
`,uc=P.span`
|
|
157
157
|
font-size: 1rem;
|
|
158
|
-
`;function lc(e){return _e({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 fc(e){return _e({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 dc(e){return _e({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 hc=
|
|
158
|
+
`;function lc(e){return _e({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 fc(e){return _e({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 dc(e){return _e({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 hc=P.input`
|
|
159
159
|
opacity: 0;
|
|
160
160
|
width: 0;
|
|
161
161
|
height: 0;
|
|
162
162
|
position: absolute;
|
|
163
|
-
`,Dr=
|
|
163
|
+
`,Dr=P.span`
|
|
164
164
|
position: absolute;
|
|
165
165
|
top: 50%;
|
|
166
166
|
left: ${({$checked:e})=>e?"14px":"0px"};
|
|
@@ -172,7 +172,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
172
172
|
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
173
173
|
left 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
174
174
|
pointer-events: none;
|
|
175
|
-
`,pc=
|
|
175
|
+
`,pc=P.label`
|
|
176
176
|
position: relative;
|
|
177
177
|
display: inline-flex;
|
|
178
178
|
align-items: center;
|
|
@@ -181,27 +181,27 @@ React keys must be passed directly to JSX without using spread:
|
|
|
181
181
|
|
|
182
182
|
@media (hover: hover) {
|
|
183
183
|
&:hover ${Dr} {
|
|
184
|
-
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.
|
|
184
|
+
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.toggleHoverOn)||"rgba(72, 159, 181, 0.08)":((n=t.colors)==null?void 0:n.toggleHoverOff)||"rgba(0, 0, 0, 0.04)"}};
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
&:focus-within ${Dr} {
|
|
189
|
-
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.
|
|
189
|
+
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.toggleFocusOn)||"rgba(72, 159, 181, 0.12)":((n=t.colors)==null?void 0:n.toggleFocusOff)||"rgba(0, 0, 0, 0.06)"}};
|
|
190
190
|
}
|
|
191
|
-
`,mc=
|
|
191
|
+
`,mc=P.span`
|
|
192
192
|
width: 34px;
|
|
193
193
|
height: 14px;
|
|
194
|
-
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.
|
|
194
|
+
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.toggleTrackOn)||"rgba(72, 159, 181, 0.5)":((n=t.colors)==null?void 0:n.toggleTrackOff)||"rgba(0, 0, 0, 0.38)"}};
|
|
195
195
|
border-radius: 7px;
|
|
196
196
|
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
197
|
-
`,gc=
|
|
197
|
+
`,gc=P.span`
|
|
198
198
|
position: absolute;
|
|
199
199
|
top: 50%;
|
|
200
200
|
left: ${({$checked:e})=>e?"14px":"0px"};
|
|
201
201
|
transform: translateY(-50%);
|
|
202
202
|
width: 20px;
|
|
203
203
|
height: 20px;
|
|
204
|
-
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.
|
|
204
|
+
background-color: ${({$checked:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.toggleThumbOn)||"#489fb5":((n=t.colors)==null?void 0:n.toggleThumbOff)||"#fafafa"}};
|
|
205
205
|
border-radius: 50%;
|
|
206
206
|
box-shadow: 0px 2px 1px -1px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadowLight)||"rgba(0, 0, 0, 0.2)"}},
|
|
207
207
|
0px 1px 1px 0px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadowLighter)||"rgba(0, 0, 0, 0.14)"}},
|
|
@@ -209,49 +209,49 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
210
210
|
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
211
211
|
pointer-events: none;
|
|
212
|
-
`,as=({checked:e,defaultChecked:t=!1,onChange:r,disabled:n=!1})=>{const[i,s]=S.useState(t),o=e!==void 0,a=o?e:i,f=u=>{if(n)return;u.target.blur();const l=!a;o||s(l),r==null||r(l)};return E.jsxs(pc,{$checked:a,onClick:u=>u.stopPropagation(),children:[E.jsx(hc,{type:"checkbox",checked:a,onChange:f,disabled:n}),E.jsx(mc,{$checked:a}),E.jsx(Dr,{$checked:a}),E.jsx(gc,{$checked:a})]})},yc={translate:lc,sunny:dc,character:({size:e})=>E.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},vc=({icon:e,text:t,textContent:r,characterPreference:n,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:f,switchChecked:u,onSwitchChange:l})=>{const d=yc[e],[h,p]=S.useState(null),m=g=>{const v=g.currentTarget.getBoundingClientRect(),x=g.clientX-v.left,b=g.clientY-v.top;p({x,y:b,key:Date.now()}),o==="switch"&&l?l(!u):a&&a()},_=()=>o==="switch"?E.jsx(as,{checked:u,onChange:l}):E.jsx(fc,{});return E.jsxs(oc,{onClick:m,style:f,children:[h&&E.jsx(ic,{$x:h.x,$y:h.y},h.key),E.jsxs(ac,{children:[E.jsxs(cc,{children:[E.jsx(ti,{children:E.jsx(d,{size:"1rem"})}),E.jsx(uc,{children:r?E.jsx(tn,{content:r,characterPreference:n,animate:i,maxDelay:s}):t})]}),E.jsx(ti,{children:_()})]})]})},zt={tension:200,friction:25},bc={tension:150,friction:25},wc={tension:zt.tension+125,friction:zt.friction+5},lt={tension:300,friction:30},_c={tension:lt.tension*2.5,friction:lt.friction},Ec={tension:lt.tension*3,friction:lt.friction},xc={tension:185,friction:25},Sc={tension:50,friction:20},kc={tension:280,friction:22,mass:1},Oc={tension:220,friction:26,mass:1},yt="cubic-bezier(0.4, 0.0, 0.2, 1)",
|
|
212
|
+
`,as=({checked:e,defaultChecked:t=!1,onChange:r,disabled:n=!1})=>{const[i,s]=S.useState(t),o=e!==void 0,a=o?e:i,f=u=>{if(n)return;u.target.blur();const l=!a;o||s(l),r==null||r(l)};return E.jsxs(pc,{$checked:a,onClick:u=>u.stopPropagation(),children:[E.jsx(hc,{type:"checkbox",checked:a,onChange:f,disabled:n}),E.jsx(mc,{$checked:a}),E.jsx(Dr,{$checked:a}),E.jsx(gc,{$checked:a})]})},yc={translate:lc,sunny:dc,character:({size:e})=>E.jsx("span",{style:{fontSize:e||"1rem",height:e||"1rem",lineHeight:e||"1rem",display:"inline-flex",alignItems:"center"},children:"字"})},vc=({icon:e,text:t,textContent:r,characterPreference:n,animate:i=!0,maxDelay:s,actionIcon:o="chevron",onClick:a,styles:f,switchChecked:u,onSwitchChange:l})=>{const d=yc[e],[h,p]=S.useState(null),m=g=>{const v=g.currentTarget.getBoundingClientRect(),x=g.clientX-v.left,b=g.clientY-v.top;p({x,y:b,key:Date.now()}),o==="switch"&&l?l(!u):a&&a()},_=()=>o==="switch"?E.jsx(as,{checked:u,onChange:l}):E.jsx(fc,{});return E.jsxs(oc,{onClick:m,style:f,children:[h&&E.jsx(ic,{$x:h.x,$y:h.y},h.key),E.jsxs(ac,{children:[E.jsxs(cc,{children:[E.jsx(ti,{children:E.jsx(d,{size:"1rem"})}),E.jsx(uc,{children:r?E.jsx(tn,{content:r,characterPreference:n,animate:i,maxDelay:s}):t})]}),E.jsx(ti,{children:_()})]})]})},zt={tension:200,friction:25},bc={tension:150,friction:25},wc={tension:zt.tension+125,friction:zt.friction+5},lt={tension:300,friction:30},_c={tension:lt.tension*2.5,friction:lt.friction},Ec={tension:lt.tension*3,friction:lt.friction},xc={tension:185,friction:25},Sc={tension:50,friction:20},kc={tension:280,friction:22,mass:1},Oc={tension:220,friction:26,mass:1},yt="cubic-bezier(0.4, 0.0, 0.2, 1)",Tc=P.keyframes`
|
|
213
213
|
0% {
|
|
214
214
|
transform: translate(-50%, -50%) rotate(0deg);
|
|
215
215
|
}
|
|
216
216
|
100% {
|
|
217
217
|
transform: translate(-50%, -50%) rotate(-360deg);
|
|
218
218
|
}
|
|
219
|
-
`,
|
|
219
|
+
`,Pc=P.keyframes`
|
|
220
220
|
0%, 100% {
|
|
221
221
|
transform: scale(1);
|
|
222
222
|
}
|
|
223
223
|
40% {
|
|
224
224
|
transform: scale(0.5);
|
|
225
225
|
}
|
|
226
|
-
`,Rc=
|
|
226
|
+
`,Rc=P.keyframes`
|
|
227
227
|
0% {
|
|
228
228
|
transform: rotate(0deg);
|
|
229
229
|
}
|
|
230
230
|
100% {
|
|
231
231
|
transform: rotate(540deg);
|
|
232
232
|
}
|
|
233
|
-
`,Nc=
|
|
233
|
+
`,Nc=P.keyframes`
|
|
234
234
|
0% {
|
|
235
235
|
transform: translateX(-50%) rotate(0deg);
|
|
236
236
|
}
|
|
237
237
|
100% {
|
|
238
238
|
transform: translateX(-50%) rotate(-900deg);
|
|
239
239
|
}
|
|
240
|
-
`,Dc=
|
|
240
|
+
`,Dc=P.keyframes`
|
|
241
241
|
0% {
|
|
242
242
|
transform: translate(-50%, -50%) rotate(0deg);
|
|
243
243
|
}
|
|
244
244
|
100% {
|
|
245
245
|
transform: translate(-50%, -50%) rotate(-1620deg);
|
|
246
246
|
}
|
|
247
|
-
`,cs=
|
|
247
|
+
`,cs=P.keyframes`
|
|
248
248
|
0% {
|
|
249
249
|
opacity: 0;
|
|
250
250
|
}
|
|
251
251
|
100% {
|
|
252
252
|
opacity: 1;
|
|
253
253
|
}
|
|
254
|
-
`,Cc=
|
|
254
|
+
`,Cc=P($e.div)`
|
|
255
255
|
position: fixed;
|
|
256
256
|
inset: 0;
|
|
257
257
|
z-index: 9999;
|
|
@@ -260,14 +260,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
260
260
|
justify-content: center;
|
|
261
261
|
background: rgb(${({theme:e})=>e.colors.backgroundRgb});
|
|
262
262
|
will-change: opacity, transform;
|
|
263
|
-
`,Ac=
|
|
263
|
+
`,Ac=P.div`
|
|
264
264
|
position: relative;
|
|
265
265
|
width: 200px;
|
|
266
266
|
height: 200px;
|
|
267
267
|
opacity: 0;
|
|
268
268
|
animation: ${cs} 0.25s ease-out forwards, ${Rc} 1.75s ${yt} 0.25s infinite;
|
|
269
269
|
will-change: transform, opacity;
|
|
270
|
-
`,ri=
|
|
270
|
+
`,ri=P.span`
|
|
271
271
|
position: absolute;
|
|
272
272
|
left: 50%;
|
|
273
273
|
font-size: 3rem;
|
|
@@ -283,7 +283,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
283
283
|
4px 4px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
|
|
284
284
|
5px 5px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
|
|
285
285
|
6px 6px 4px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadow)||"rgba(0, 0, 0, 0.75)"}};
|
|
286
|
-
`,Ic=
|
|
286
|
+
`,Ic=P.span`
|
|
287
287
|
position: absolute;
|
|
288
288
|
top: 50%;
|
|
289
289
|
left: 50%;
|
|
@@ -299,7 +299,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
299
299
|
4px 4px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
|
|
300
300
|
5px 5px 0 ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.textShadowDark)||"#555"}},
|
|
301
301
|
6px 6px 4px ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.shadow)||"rgba(0, 0, 0, 0.75)"}};
|
|
302
|
-
`,jc=
|
|
302
|
+
`,jc=P.div`
|
|
303
303
|
position: absolute;
|
|
304
304
|
top: 50%;
|
|
305
305
|
left: 50%;
|
|
@@ -308,27 +308,27 @@ React keys must be passed directly to JSX without using spread:
|
|
|
308
308
|
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)"}});
|
|
309
309
|
transform-origin: center;
|
|
310
310
|
opacity: 0;
|
|
311
|
-
animation: ${cs} 0.15s ease-out forwards, ${
|
|
311
|
+
animation: ${cs} 0.15s ease-out forwards, ${Tc} 2s ${yt} infinite forwards;
|
|
312
312
|
will-change: transform, opacity;
|
|
313
313
|
pointer-events: none;
|
|
314
314
|
z-index: -1;
|
|
315
|
-
`,$c=
|
|
315
|
+
`,$c=P.div`
|
|
316
316
|
position: absolute;
|
|
317
317
|
inset: 0;
|
|
318
318
|
background-color: ${({theme:e})=>e.colors.primary};
|
|
319
319
|
background-blend-mode: screen;
|
|
320
320
|
transform-origin: center;
|
|
321
|
-
animation: ${
|
|
321
|
+
animation: ${Pc} 1.75s ${yt} 0.25s infinite forwards;
|
|
322
322
|
clip-path: url(#rounded-pentagon);
|
|
323
|
-
`,Vc=
|
|
323
|
+
`,Vc=P.svg`
|
|
324
324
|
position: absolute;
|
|
325
325
|
width: 0;
|
|
326
326
|
height: 0;
|
|
327
|
-
`,Mc=({isLoading:e,onExitComplete:t,orbitingContent:r="有",centerContent:n="没",orbitingColor:i,centerColor:s})=>{const[o,a]=S.useState(!0),[f,u]=gt(()=>({opacity:1,scale:1}));return S.useEffect(()=>{e||u.start({opacity:0,scale:1.1,config:zt,onRest:()=>{a(!1),t==null||t()}})},[e,u,t]),o?E.jsxs(Cc,{style:{opacity:f.opacity,transform:f.scale.to(l=>`scale(${l})`)},children:[E.jsx(Vc,{children:E.jsx("defs",{children:E.jsx("clipPath",{id:"rounded-pentagon",clipPathUnits:"objectBoundingBox",children:E.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"})})})}),E.jsx(jc,{children:E.jsx($c,{})}),E.jsxs(Ac,{children:[E.jsx(ri,{$position:"top",$color:i,children:r}),E.jsx(Ic,{$color:s,children:n}),E.jsx(ri,{$position:"bottom",$color:i,children:r})]})]}):null},zc=
|
|
327
|
+
`,Mc=({isLoading:e,onExitComplete:t,orbitingContent:r="有",centerContent:n="没",orbitingColor:i,centerColor:s})=>{const[o,a]=S.useState(!0),[f,u]=gt(()=>({opacity:1,scale:1}));return S.useEffect(()=>{e||u.start({opacity:0,scale:1.1,config:zt,onRest:()=>{a(!1),t==null||t()}})},[e,u,t]),o?E.jsxs(Cc,{style:{opacity:f.opacity,transform:f.scale.to(l=>`scale(${l})`)},children:[E.jsx(Vc,{children:E.jsx("defs",{children:E.jsx("clipPath",{id:"rounded-pentagon",clipPathUnits:"objectBoundingBox",children:E.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"})})})}),E.jsx(jc,{children:E.jsx($c,{})}),E.jsxs(Ac,{children:[E.jsx(ri,{$position:"top",$color:i,children:r}),E.jsx(Ic,{$color:s,children:n}),E.jsx(ri,{$position:"bottom",$color:i,children:r})]})]}):null},zc=P.keyframes`
|
|
328
328
|
0%, 100% { transform: translateX(0); }
|
|
329
329
|
20%, 60% { transform: translateX(-4px); }
|
|
330
330
|
40%, 80% { transform: translateX(4px); }
|
|
331
|
-
`,Fc=
|
|
331
|
+
`,Fc=P.div`
|
|
332
332
|
display: flex;
|
|
333
333
|
flex-direction: column;
|
|
334
334
|
gap: 0.5rem;
|
|
@@ -337,11 +337,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
337
337
|
max-width: 100%;
|
|
338
338
|
box-sizing: border-box;
|
|
339
339
|
animation: ${({$shaking:e})=>e?zc:"none"} 0.2s ease-in-out;
|
|
340
|
-
`,qe=
|
|
340
|
+
`,qe=P.div`
|
|
341
341
|
display: flex;
|
|
342
342
|
justify-content: ${({$justify:e})=>e||"center"};
|
|
343
343
|
gap: 0.25rem;
|
|
344
|
-
`,Ye=
|
|
344
|
+
`,Ye=P.button`
|
|
345
345
|
display: flex;
|
|
346
346
|
align-items: center;
|
|
347
347
|
justify-content: center;
|
|
@@ -402,29 +402,29 @@ React keys must be passed directly to JSX without using spread:
|
|
|
402
402
|
opacity: 0.4;
|
|
403
403
|
`}}}
|
|
404
404
|
}
|
|
405
|
-
`,He=
|
|
405
|
+
`,He=P.span`
|
|
406
406
|
line-height: 1;
|
|
407
|
-
`;
|
|
407
|
+
`;P.span`
|
|
408
408
|
font-size: 0.625rem;
|
|
409
409
|
opacity: 0.6;
|
|
410
410
|
margin-top: 0.125rem;
|
|
411
|
-
`;
|
|
411
|
+
`;P.div`
|
|
412
412
|
display: flex;
|
|
413
413
|
flex-direction: column;
|
|
414
414
|
align-items: center;
|
|
415
|
-
`;const Lc=
|
|
415
|
+
`;const Lc=P.div`
|
|
416
416
|
display: flex;
|
|
417
417
|
justify-content: center;
|
|
418
418
|
align-items: center;
|
|
419
419
|
overflow: hidden;
|
|
420
|
-
`,Bc=
|
|
420
|
+
`,Bc=P.span`
|
|
421
421
|
font-size: 2rem;
|
|
422
422
|
font-family: 'Noto Sans TC', sans-serif;
|
|
423
423
|
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.onPrimary)||"#fff"}};
|
|
424
424
|
letter-spacing: 0.1em;
|
|
425
425
|
opacity: ${({$visible:e})=>e?1:0};
|
|
426
426
|
transition: opacity 0.1s ease;
|
|
427
|
-
`,Uc=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),vr=0,Wc=2.5,Gc=3.5,qc=$e(Lc),
|
|
427
|
+
`,Uc=new Set(["ˇ","ˋ","ˊ","˙","ˉ"," "]),vr=0,Wc=2.5,Gc=3.5,qc=$e(Lc),Tt={row1:["ㄅ","ㄉ","ˇ","ˋ","ㄓ","ˊ","˙","ㄚ","ㄞ","ㄢ"],row2:["ㄆ","ㄊ","ㄍ","ㄐ","ㄔ","ㄗ","ㄧ","ㄛ","ㄟ","ㄣ"],row3:["ㄇ","ㄋ","ㄎ","ㄑ","ㄕ","ㄘ","ㄨ","ㄜ","ㄠ","ㄤ"],row4:["ㄈ","ㄌ","ㄏ","ㄒ","ㄖ","ㄙ","ㄩ","ㄝ","ㄡ","ㄥ"]},Yc=400,us=S.memo(({onKeyPress:e,onBackspace:t,onSubmit:r,disabled:n=!1,currentInput:i="",disabledKeys:s,correctKeys:o,incorrectKeys:a,shaking:f=!1})=>{const[u,l]=S.useState(""),d=S.useRef(null),h=T=>T?Uc.has(T)?Wc:Gc:vr,[p,m]=gt(()=>({height:vr,config:{tension:300,friction:26}}));S.useEffect(()=>(i?(d.current&&(clearTimeout(d.current),d.current=null),l(i),m.start({height:h(i)})):u&&(d.current=setTimeout(()=>{m.start({height:vr}),setTimeout(()=>l(""),250)},Yc)),()=>{d.current&&clearTimeout(d.current)}),[i,u,m]);const _=S.useCallback(T=>{!n&&!(s!=null&&s.has(T))&&e(T)},[e,n,s]),g=S.useCallback(()=>{!n&&t&&t()},[t,n]),v=S.useCallback(()=>{!n&&r&&r()},[r,n]),x=S.useCallback(T=>n?!0:(s==null?void 0:s.has(T))??!1,[n,s]),b=S.useCallback(T=>o!=null&&o.has(T)?"correct":a!=null&&a.has(T)?"incorrect":null,[o,a]),O=(T,I)=>E.jsx(Ye,{onClick:()=>_(T),disabled:x(T),$status:b(T),children:E.jsx(He,{children:T})},`${T}-${I}`);return E.jsxs(Fc,{$shaking:f,children:[E.jsx(qc,{style:{height:p.height.to(T=>`${T}rem`)},children:E.jsx(Bc,{$visible:!!i,children:u})}),E.jsx(qe,{children:Tt.row1.map(O)}),E.jsx(qe,{children:Tt.row2.map(O)}),E.jsx(qe,{children:Tt.row3.map(O)}),E.jsx(qe,{children:Tt.row4.map(O)}),E.jsxs(qe,{$justify:"flex-start",children:[E.jsx(Ye,{$variant:"backspace",$width:"wide",$muted:!i,onClick:g,disabled:n,children:E.jsx(He,{children:"⌫"})}),E.jsx(Ye,{$variant:"tone",$width:"space",onClick:()=>_("ˉ"),disabled:x("ˉ"),$status:b("ˉ"),children:E.jsx(He,{children:"ˉ"})}),E.jsx(Ye,{onClick:()=>_("ㄦ"),disabled:x("ㄦ"),$status:b("ㄦ"),children:E.jsx(He,{children:"ㄦ"})}),r&&E.jsx(Ye,{$variant:"enter",$width:"extra-wide",$muted:!i,onClick:v,disabled:n,children:E.jsx(He,{children:"⏎"})})]})]})});us.displayName="ZhuyinKeyboard";const Hc=P.keyframes`
|
|
428
428
|
0% {
|
|
429
429
|
transform: scale(0);
|
|
430
430
|
opacity: 0.6;
|
|
@@ -433,12 +433,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
433
433
|
transform: scale(10);
|
|
434
434
|
opacity: 0;
|
|
435
435
|
}
|
|
436
|
-
`,Kc=
|
|
436
|
+
`,Kc=P.div`
|
|
437
437
|
position: relative;
|
|
438
438
|
display: flex;
|
|
439
439
|
flex-direction: column;
|
|
440
440
|
gap: 0.5rem;
|
|
441
|
-
`,Qc=
|
|
441
|
+
`,Qc=P.div`
|
|
442
442
|
position: absolute;
|
|
443
443
|
top: ${({$index:e})=>`calc(${e} * (1rem * 2 + 1.125rem * 1.5 + 0.5rem))`};
|
|
444
444
|
left: 0;
|
|
@@ -448,7 +448,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
448
448
|
border-radius: 12px;
|
|
449
449
|
transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
450
450
|
pointer-events: none;
|
|
451
|
-
`,Xc=
|
|
451
|
+
`,Xc=P.button`
|
|
452
452
|
position: relative;
|
|
453
453
|
z-index: 1;
|
|
454
454
|
display: flex;
|
|
@@ -469,7 +469,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
469
469
|
transition:
|
|
470
470
|
color 0.2s ease,
|
|
471
471
|
font-weight 0.2s ease;
|
|
472
|
-
`,Jc=
|
|
472
|
+
`,Jc=P.span`
|
|
473
473
|
position: absolute;
|
|
474
474
|
left: ${({$x:e})=>e}px;
|
|
475
475
|
top: ${({$y:e})=>e}px;
|
|
@@ -481,25 +481,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
481
481
|
background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.ripple)||"rgba(0, 0, 0, 0.2)"}};
|
|
482
482
|
pointer-events: none;
|
|
483
483
|
animation: ${Hc} 0.4s ease-out forwards;
|
|
484
|
-
`,Zc=T.span``;function eu({options:e,value:t,onChange:r,onClose:n,closeOnSameValue:i=!0}){const s=S.useRef(null),[o,a]=S.useState(null),f=e.findIndex(l=>l.value===t),u=(l,d)=>{const h=l.currentTarget.getBoundingClientRect(),p=l.clientX-h.left,m=l.clientY-h.top;if(a({x:p,y:m,key:Date.now(),target:d.value}),d.value===t){i&&n&&n();return}if(r(d.value),n){const _=s.current;if(_){const g=()=>{_.removeEventListener("transitionend",g),n()};_.addEventListener("transitionend",g)}else n()}};return E.jsxs(Kc,{children:[E.jsx(Qc,{ref:s,$index:f}),e.map(l=>E.jsxs(Xc,{$isSelected:t===l.value,onClick:d=>u(d,l),children:[o&&o.target===l.value&&E.jsx(Jc,{$x:o.x,$y:o.y},o.key),E.jsx(Zc,{children:l.label})]},l.value))]})}function tu(e,t,r){return Math.max(t,Math.min(e,r))}const Y={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 ni(e,t,r){return t===0||Math.abs(t)===1/0?Math.pow(e,r*5):e*t*r/(t+r*e)}function ii(e,t,r,n=.15){return n===0?tu(e,t,r):e<t?-ni(t-e,r-t,n)+t:e>r?+ni(e-r,r-t,n)+r:e}function ru(e,[t,r],[n,i]){const[[s,o],[a,f]]=e;return[ii(t,s,o,n),ii(r,a,f,i)]}function nu(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iu(e){var t=nu(e,"string");return typeof t=="symbol"?t:String(t)}function Q(e,t,r){return t=iu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?si(Object(r),!0).forEach(function(n){Q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ls={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 oi(e){return e?e[0].toUpperCase()+e.slice(1):""}const su=["enter","leave"];function ou(e=!1,t){return e&&!su.includes(t)}function au(e,t="",r=!1){const n=ls[e],i=n&&n[t]||t;return"on"+oi(e)+oi(i)+(ou(r,i)?"Capture":"")}const cu=["gotpointercapture","lostpointercapture"];function uu(e){let t=e.substring(2).toLowerCase();const r=!!~t.indexOf("passive");r&&(t=t.replace("passive",""));const n=cu.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(n);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:r}}function lu(e,t=""){const r=ls[e],n=r&&r[t]||t;return e+n}function Zt(e){return"touches"in e}function fs(e){return Zt(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function fu(e){return Array.from(e.touches).filter(t=>{var r,n;return t.target===e.currentTarget||((r=e.currentTarget)===null||r===void 0||(n=r.contains)===null||n===void 0?void 0:n.call(r,t.target))})}function du(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function ds(e){return Zt(e)?du(e)[0]:e}function hu(e){return fu(e).map(t=>t.identifier)}function br(e){const t=ds(e);return Zt(e)?t.identifier:t.pointerId}function ai(e){const t=ds(e);return[t.clientX,t.clientY]}function pu(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s})}return t}function Ft(e,...t){return typeof e=="function"?e(...t):e}function mu(){}function gu(...e){return e.length===0?mu:e.length===1?e[0]:function(){let t;for(const r of e)t=r.apply(this,arguments)||t;return t}}function ci(e,t){return Object.assign({},t,e||{})}const yu=32;class vu{constructor(t,r,n){this.ctrl=t,this.args=r,this.key=n,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:r,ingKey:n,args:i}=this;r[n]=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 r=this.state,n=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=t.target,r.currentTarget=t.currentTarget,r.lastOffset=n.from?Ft(n.from,r):r.offset,r.offset=r.lastOffset,r.startTime=r.timeStamp=t.timeStamp)}computeValues(t){const r=this.state;r._values=t,r.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:r,config:n,shared:i}=this;r.args=this.args;let s=0;if(t&&(r.event=t,n.preventDefault&&t.cancelable&&r.event.preventDefault(),r.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,pu(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=t.timeStamp-r.timeStamp,r.timeStamp=t.timeStamp,r.elapsedTime=r.timeStamp-r.startTime),r._active){const I=r._delta.map(Math.abs);Y.addTo(r._distance,I)}this.axisIntent&&this.axisIntent(t);const[o,a]=r._movement,[f,u]=n.threshold,{_step:l,values:d}=r;if(n.hasCustomTransform?(l[0]===!1&&(l[0]=Math.abs(o)>=f&&d[0]),l[1]===!1&&(l[1]=Math.abs(a)>=u&&d[1])):(l[0]===!1&&(l[0]=Math.abs(o)>=f&&Math.sign(o)*f),l[1]===!1&&(l[1]=Math.abs(a)>=u&&Math.sign(a)*u)),r.intentional=l[0]!==!1||l[1]!==!1,!r.intentional)return;const h=[0,0];if(n.hasCustomTransform){const[I,$]=d;h[0]=l[0]!==!1?I-l[0]:0,h[1]=l[1]!==!1?$-l[1]:0}else h[0]=l[0]!==!1?o-l[0]:0,h[1]=l[1]!==!1?a-l[1]:0;this.restrictToAxis&&!r._blocked&&this.restrictToAxis(h);const p=r.offset,m=r._active&&!r._blocked||r.active;m&&(r.first=r._active&&!r.active,r.last=!r._active&&r.active,r.active=i[this.ingKey]=r._active,t&&(r.first&&("bounds"in n&&(r._bounds=Ft(n.bounds,r)),this.setup&&this.setup()),r.movement=h,this.computeOffset()));const[_,g]=r.offset,[[v,x],[b,O]]=r._bounds;r.overflow=[_<v?-1:_>x?1:0,g<b?-1:g>O?1:0],r._movementBound[0]=r.overflow[0]?r._movementBound[0]===!1?r._movement[0]:r._movementBound[0]:!1,r._movementBound[1]=r.overflow[1]?r._movementBound[1]===!1?r._movement[1]:r._movementBound[1]:!1;const P=r._active?n.rubberband||[0,0]:[0,0];if(r.offset=ru(r._bounds,r.offset,P),r.delta=Y.sub(r.offset,p),this.computeMovement(),m&&(!r.last||s>yu)){r.delta=Y.sub(r.offset,p);const I=r.delta.map(Math.abs);Y.addTo(r.distance,I),r.direction=r.delta.map(Math.sign),r._direction=r._delta.map(Math.sign),!r.first&&s>0&&(r.velocity=[I[0]/s,I[1]/s],r.timeDelta=s)}}emit(){const t=this.state,r=this.shared,n=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!n.triggerAllEvents)return;const i=this.handler(F(F(F({},r),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function bu([e,t],r){const n=Math.abs(e),i=Math.abs(t);if(n>i&&n>r)return"x";if(i>n&&i>r)return"y"}class wu extends vu{constructor(...t){super(...t),Q(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=Y.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Y.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const r=this.state,n=this.config;if(!r.axis&&t){const i=typeof n.axisThreshold=="object"?n.axisThreshold[fs(t)]:n.axisThreshold;r.axis=bu(r._movement,i)}r._blocked=(n.lockDirection||!!n.axis)&&!r.axis||!!n.axis&&n.axis!==r.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 ui=e=>e,li=.15,rn={enabled(e=!0){return e},eventOptions(e,t,r){return F(F({},r.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[li,li];case!1:return[0,0];default:return Y.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Y.toVector(e)},transform(e,t,r){const n=e||r.shared.transform;if(this.hasCustomTransform=!!n,process.env.NODE_ENV==="development"){const i=n||ui;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 n||ui},threshold(e){return Y.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(rn,{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 _u=0,vt=F(F({},rn),{},{axis(e,t,{axis:r}){if(this.lockDirection=r==="lock",!this.lockDirection)return r},axisThreshold(e=_u){return e},bounds(e={}){if(typeof e=="function")return s=>vt.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:r=1/0,top:n=-1/0,bottom:i=1/0}=e;return[[t,r],[n,i]]}}),fi={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 Eu extends wu{constructor(...t){super(...t),Q(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 r=t._bounds.getBoundingClientRect(),n=t.currentTarget.getBoundingClientRect(),i={left:r.left-n.left+t.offset[0],right:r.right-n.right+t.offset[0],top:r.top-n.top+t.offset[1],bottom:r.bottom-n.bottom+t.offset[1]};t._bounds=vt.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 r=this.config,n=this.state;if(t.buttons!=null&&(Array.isArray(r.pointerButtons)?!r.pointerButtons.includes(t.buttons):r.pointerButtons!==-1&&r.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);r.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(t),this.setupPointer(t),n._pointerId=br(t),n._pointerActive=!0,this.computeValues(ai(t)),this.computeInitial(),r.preventScrollAxis&&fs(t)!=="mouse"?(n._active=!1,this.setupScrollPrevention(t)):r.delay>0?(this.setupDelayTrigger(t),r.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const r=this.state;r._active=!0,r._preventScroll=!0,r._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const r=this.state,n=this.config;if(!r._pointerActive)return;const i=br(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;const s=ai(t);if(document.pointerLockElement===t.target?r._delta=[t.movementX,t.movementY]:(r._delta=Y.sub(s,r._values),this.computeValues(s)),Y.addTo(r._movement,r._delta),this.compute(t),r._delayed&&r.intentional){this.timeoutStore.remove("dragDelay"),r.active=!1,this.startPointerDrag(t);return}if(n.preventScrollAxis&&!r._preventScroll)if(r.axis)if(r.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){r._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 r=this.state,n=this.config;if(!r._active||!r._pointerActive)return;const i=br(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=r._distance;if(r.tap=s<=n.tapsThreshold&&o<=n.tapsThreshold,r.tap&&n.filterTaps)r._force=!0;else{const[a,f]=r._delta,[u,l]=r._movement,[d,h]=n.swipe.velocity,[p,m]=n.swipe.distance,_=n.swipe.duration;if(r.elapsedTime<_){const g=Math.abs(a/r.timeDelta),v=Math.abs(f/r.timeDelta);g>d&&Math.abs(u)>p&&(r.swipe[0]=Math.sign(a)),v>h&&Math.abs(l)>m&&(r.swipe[1]=Math.sign(f))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const r=this.config,n=r.device;if(process.env.NODE_ENV==="development")try{if(n==="pointer"&&r.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{}r.pointerLock&&t.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"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,xu(t);const r=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",r),this.eventStore.add(this.sharedConfig.window,"touch","cancel",r),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 r=fi[t.key];if(r){const n=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),n._delta=r(this.config.keyboardDisplacement,i),n._keyboardActive=!0,Y.addTo(n._movement,n._delta),this.compute(t),this.emit()}}keyUp(t){t.key in fi&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const r=this.config.device;t(r,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(r,"change",this.pointerMove.bind(this)),t(r,"end",this.pointerUp.bind(this)),t(r,"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 xu(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const bt=typeof window<"u"&&window.document&&window.document.createElement;function hs(){return bt&&"ontouchstart"in window}function Su(){return hs()||bt&&window.navigator.maxTouchPoints>1}function ku(){return bt&&"onpointerdown"in window}function Ou(){return bt&&"exitPointerLock"in window.document}function Pu(){try{return"constructor"in GestureEvent}catch{return!1}}const ie={isBrowser:bt,gesture:Pu(),touch:hs(),touchscreen:Su(),pointer:ku(),pointerLock:Ou()},Tu=250,Ru=180,Nu=.5,Du=50,Cu=250,Au=10,di={mouse:0,touch:0,pen:8},ps=F(F({},vt),{},{device(e,t,{pointer:{touch:r=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&ie.pointerLock,ie.touch&&r?"touch":this.pointerLock?"mouse":ie.pointer&&!i?"pointer":ie.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:r}){if(this.preventScrollDelay=typeof r=="number"?r:r||r===void 0&&e?Tu:void 0,!(!ie.touchscreen||r===!1))return e||(r!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:r=!0,buttons:n=1,keys:i=!0}={}}){return this.pointerButtons=n,this.keys=i,!this.pointerLock&&this.device==="pointer"&&r},threshold(e,t,{filterTaps:r=!1,tapsThreshold:n=3,axis:i=void 0}){const s=Y.toVector(e,r?n:i?1:0);return this.filterTaps=r,this.tapsThreshold=n,s},swipe({velocity:e=Nu,distance:t=Du,duration:r=Cu}={}){return{velocity:this.transform(Y.toVector(e)),distance:this.transform(Y.toVector(t)),duration:r}},delay(e=0){switch(e){case!0:return Ru;case!1:return 0;default:return e}},axisThreshold(e){return e?F(F({},di),e):di},keyboardDisplacement(e=Au){return e}});process.env.NODE_ENV==="development"&&Object.assign(ps,{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}});F(F({},rn),{},{device(e,t,{shared:r,pointer:{touch:n=!1}={}}){if(r.target&&!ie.touch&&ie.gesture)return"gesture";if(ie.touch&&n)return"touch";if(ie.touchscreen){if(ie.pointer)return"pointer";if(ie.touch)return"touch"}},bounds(e,t,{scaleBounds:r={},angleBounds:n={}}){const i=o=>{const a=ci(Ft(r,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=ci(Ft(n,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof r!="function"&&typeof n!="function"?[i(),s()]:o=>[i(o),s(o)]},threshold(e,t,r){return this.lockDirection=r.axis==="lock",Y.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});F(F({},vt),{},{mouseOnly:(e=!0)=>e});F(F({},vt),{},{mouseOnly:(e=!0)=>e});const ms=new Map,Cr=new Map;function Iu(e){ms.set(e.key,e.engine),Cr.set(e.key,e.resolver)}const ju={key:"drag",engine:Eu,resolver:ps};function $u(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Vu(e,t){if(e==null)return{};var r=$u(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const Mu={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=ie.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},zu=["target","eventOptions","window","enabled","transform"];function Ct(e={},t){const r={};for(const[n,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const s=i.call(r,e[n],n,e);Number.isNaN(s)||(r[n]=s)}else r[n]=i.call(r,e[n],n,e);break;case"object":r[n]=Ct(e[n],i);break;case"boolean":i&&(r[n]=e[n]);break}return r}function Fu(e,t,r={}){const n=e,{target:i,eventOptions:s,window:o,enabled:a,transform:f}=n,u=Vu(n,zu);if(r.shared=Ct({target:i,eventOptions:s,window:o,enabled:a,transform:f},Mu),t){const l=Cr.get(t);r[t]=Ct(F({shared:r.shared},u),l)}else for(const l in u){const d=Cr.get(l);if(d)r[l]=Ct(F({shared:r.shared},u[l]),d);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(l)){if(l==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${l}\` was used. Please read the documentation for further information.`)}}return r}class gs{constructor(t,r){Q(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=r}add(t,r,n,i,s){const o=this._listeners,a=lu(r,n),f=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=F(F({},f),s);t.addEventListener(a,i,u);const l=()=>{t.removeEventListener(a,i,u),o.delete(l)};return o.add(l),l}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class Lu{constructor(){Q(this,"_timeouts",new Map)}add(t,r,n=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(r,n,...i))}remove(t){const r=this._timeouts.get(t);r&&window.clearTimeout(r)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class Bu{constructor(t){Q(this,"gestures",new Set),Q(this,"_targetEventStore",new gs(this)),Q(this,"gestureEventStores",{}),Q(this,"gestureTimeoutStores",{}),Q(this,"handlers",{}),Q(this,"config",{}),Q(this,"pointerIds",new Set),Q(this,"touchIds",new Set),Q(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Uu(this,t)}setEventIds(t){if(Zt(t))return this.touchIds=new Set(hu(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,r){this.handlers=t,this.nativeHandlers=r}applyConfig(t,r){this.config=Fu(t,r,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 r=this.config.shared,n={};let i;if(!(r.target&&(i=r.target(),!i))){if(r.enabled){for(const o of this.gestures){const a=this.config[o],f=hi(n,a.eventOptions,!!i);if(a.enabled){const u=ms.get(o);new u(this,t,o).bind(f)}}const s=hi(n,r.eventOptions,!!i);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](F(F({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in n)n[s]=gu(...n[s]);if(!i)return n;for(const s in n){const{device:o,capture:a,passive:f}=uu(s);this._targetEventStore.add(i,o,"",n[s],{capture:a,passive:f})}}}}function Ce(e,t){e.gestures.add(t),e.gestureEventStores[t]=new gs(e,t),e.gestureTimeoutStores[t]=new Lu}function Uu(e,t){t.drag&&Ce(e,"drag"),t.wheel&&Ce(e,"wheel"),t.scroll&&Ce(e,"scroll"),t.move&&Ce(e,"move"),t.pinch&&Ce(e,"pinch"),t.hover&&Ce(e,"hover")}const hi=(e,t,r)=>(n,i,s,o={},a=!1)=>{var f,u;const l=(f=o.capture)!==null&&f!==void 0?f:t.capture,d=(u=o.passive)!==null&&u!==void 0?u:t.passive;let h=a?n:au(n,i,l);r&&d&&(h+="Passive"),e[h]=e[h]||[],e[h].push(s)};function Wu(e,t={},r,n){const i=S.useMemo(()=>new Bu(e),[]);if(i.applyHandlers(e,n),i.applyConfig(t,r),S.useEffect(i.effect.bind(i)),S.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function Gu(e,t){return Iu(ju),Wu({drag:e},t||{},"drag")}const qu=T.div`
|
|
484
|
+
`,Zc=P.span``;function eu({options:e,value:t,onChange:r,onClose:n,closeOnSameValue:i=!0}){const s=S.useRef(null),[o,a]=S.useState(null),f=e.findIndex(l=>l.value===t),u=(l,d)=>{const h=l.currentTarget.getBoundingClientRect(),p=l.clientX-h.left,m=l.clientY-h.top;if(a({x:p,y:m,key:Date.now(),target:d.value}),d.value===t){i&&n&&n();return}if(r(d.value),n){const _=s.current;if(_){const g=()=>{_.removeEventListener("transitionend",g),n()};_.addEventListener("transitionend",g)}else n()}};return E.jsxs(Kc,{children:[E.jsx(Qc,{ref:s,$index:f}),e.map(l=>E.jsxs(Xc,{$isSelected:t===l.value,onClick:d=>u(d,l),children:[o&&o.target===l.value&&E.jsx(Jc,{$x:o.x,$y:o.y},o.key),E.jsx(Zc,{children:l.label})]},l.value))]})}function tu(e,t,r){return Math.max(t,Math.min(e,r))}const Y={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 ni(e,t,r){return t===0||Math.abs(t)===1/0?Math.pow(e,r*5):e*t*r/(t+r*e)}function ii(e,t,r,n=.15){return n===0?tu(e,t,r):e<t?-ni(t-e,r-t,n)+t:e>r?+ni(e-r,r-t,n)+r:e}function ru(e,[t,r],[n,i]){const[[s,o],[a,f]]=e;return[ii(t,s,o,n),ii(r,a,f,i)]}function nu(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iu(e){var t=nu(e,"string");return typeof t=="symbol"?t:String(t)}function Q(e,t,r){return t=iu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?si(Object(r),!0).forEach(function(n){Q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ls={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 oi(e){return e?e[0].toUpperCase()+e.slice(1):""}const su=["enter","leave"];function ou(e=!1,t){return e&&!su.includes(t)}function au(e,t="",r=!1){const n=ls[e],i=n&&n[t]||t;return"on"+oi(e)+oi(i)+(ou(r,i)?"Capture":"")}const cu=["gotpointercapture","lostpointercapture"];function uu(e){let t=e.substring(2).toLowerCase();const r=!!~t.indexOf("passive");r&&(t=t.replace("passive",""));const n=cu.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(n);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:r}}function lu(e,t=""){const r=ls[e],n=r&&r[t]||t;return e+n}function Zt(e){return"touches"in e}function fs(e){return Zt(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function fu(e){return Array.from(e.touches).filter(t=>{var r,n;return t.target===e.currentTarget||((r=e.currentTarget)===null||r===void 0||(n=r.contains)===null||n===void 0?void 0:n.call(r,t.target))})}function du(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function ds(e){return Zt(e)?du(e)[0]:e}function hu(e){return fu(e).map(t=>t.identifier)}function br(e){const t=ds(e);return Zt(e)?t.identifier:t.pointerId}function ai(e){const t=ds(e);return[t.clientX,t.clientY]}function pu(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:r,altKey:n,metaKey:i,ctrlKey:s})}return t}function Ft(e,...t){return typeof e=="function"?e(...t):e}function mu(){}function gu(...e){return e.length===0?mu:e.length===1?e[0]:function(){let t;for(const r of e)t=r.apply(this,arguments)||t;return t}}function ci(e,t){return Object.assign({},t,e||{})}const yu=32;class vu{constructor(t,r,n){this.ctrl=t,this.args=r,this.key=n,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:r,ingKey:n,args:i}=this;r[n]=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 r=this.state,n=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=t.target,r.currentTarget=t.currentTarget,r.lastOffset=n.from?Ft(n.from,r):r.offset,r.offset=r.lastOffset,r.startTime=r.timeStamp=t.timeStamp)}computeValues(t){const r=this.state;r._values=t,r.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:r,config:n,shared:i}=this;r.args=this.args;let s=0;if(t&&(r.event=t,n.preventDefault&&t.cancelable&&r.event.preventDefault(),r.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,pu(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=t.timeStamp-r.timeStamp,r.timeStamp=t.timeStamp,r.elapsedTime=r.timeStamp-r.startTime),r._active){const I=r._delta.map(Math.abs);Y.addTo(r._distance,I)}this.axisIntent&&this.axisIntent(t);const[o,a]=r._movement,[f,u]=n.threshold,{_step:l,values:d}=r;if(n.hasCustomTransform?(l[0]===!1&&(l[0]=Math.abs(o)>=f&&d[0]),l[1]===!1&&(l[1]=Math.abs(a)>=u&&d[1])):(l[0]===!1&&(l[0]=Math.abs(o)>=f&&Math.sign(o)*f),l[1]===!1&&(l[1]=Math.abs(a)>=u&&Math.sign(a)*u)),r.intentional=l[0]!==!1||l[1]!==!1,!r.intentional)return;const h=[0,0];if(n.hasCustomTransform){const[I,$]=d;h[0]=l[0]!==!1?I-l[0]:0,h[1]=l[1]!==!1?$-l[1]:0}else h[0]=l[0]!==!1?o-l[0]:0,h[1]=l[1]!==!1?a-l[1]:0;this.restrictToAxis&&!r._blocked&&this.restrictToAxis(h);const p=r.offset,m=r._active&&!r._blocked||r.active;m&&(r.first=r._active&&!r.active,r.last=!r._active&&r.active,r.active=i[this.ingKey]=r._active,t&&(r.first&&("bounds"in n&&(r._bounds=Ft(n.bounds,r)),this.setup&&this.setup()),r.movement=h,this.computeOffset()));const[_,g]=r.offset,[[v,x],[b,O]]=r._bounds;r.overflow=[_<v?-1:_>x?1:0,g<b?-1:g>O?1:0],r._movementBound[0]=r.overflow[0]?r._movementBound[0]===!1?r._movement[0]:r._movementBound[0]:!1,r._movementBound[1]=r.overflow[1]?r._movementBound[1]===!1?r._movement[1]:r._movementBound[1]:!1;const T=r._active?n.rubberband||[0,0]:[0,0];if(r.offset=ru(r._bounds,r.offset,T),r.delta=Y.sub(r.offset,p),this.computeMovement(),m&&(!r.last||s>yu)){r.delta=Y.sub(r.offset,p);const I=r.delta.map(Math.abs);Y.addTo(r.distance,I),r.direction=r.delta.map(Math.sign),r._direction=r._delta.map(Math.sign),!r.first&&s>0&&(r.velocity=[I[0]/s,I[1]/s],r.timeDelta=s)}}emit(){const t=this.state,r=this.shared,n=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!n.triggerAllEvents)return;const i=this.handler(F(F(F({},r),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function bu([e,t],r){const n=Math.abs(e),i=Math.abs(t);if(n>i&&n>r)return"x";if(i>n&&i>r)return"y"}class wu extends vu{constructor(...t){super(...t),Q(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=Y.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Y.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const r=this.state,n=this.config;if(!r.axis&&t){const i=typeof n.axisThreshold=="object"?n.axisThreshold[fs(t)]:n.axisThreshold;r.axis=bu(r._movement,i)}r._blocked=(n.lockDirection||!!n.axis)&&!r.axis||!!n.axis&&n.axis!==r.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 ui=e=>e,li=.15,rn={enabled(e=!0){return e},eventOptions(e,t,r){return F(F({},r.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[li,li];case!1:return[0,0];default:return Y.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Y.toVector(e)},transform(e,t,r){const n=e||r.shared.transform;if(this.hasCustomTransform=!!n,process.env.NODE_ENV==="development"){const i=n||ui;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 n||ui},threshold(e){return Y.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(rn,{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 _u=0,vt=F(F({},rn),{},{axis(e,t,{axis:r}){if(this.lockDirection=r==="lock",!this.lockDirection)return r},axisThreshold(e=_u){return e},bounds(e={}){if(typeof e=="function")return s=>vt.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:r=1/0,top:n=-1/0,bottom:i=1/0}=e;return[[t,r],[n,i]]}}),fi={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 Eu extends wu{constructor(...t){super(...t),Q(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 r=t._bounds.getBoundingClientRect(),n=t.currentTarget.getBoundingClientRect(),i={left:r.left-n.left+t.offset[0],right:r.right-n.right+t.offset[0],top:r.top-n.top+t.offset[1],bottom:r.bottom-n.bottom+t.offset[1]};t._bounds=vt.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 r=this.config,n=this.state;if(t.buttons!=null&&(Array.isArray(r.pointerButtons)?!r.pointerButtons.includes(t.buttons):r.pointerButtons!==-1&&r.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);r.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(t),this.setupPointer(t),n._pointerId=br(t),n._pointerActive=!0,this.computeValues(ai(t)),this.computeInitial(),r.preventScrollAxis&&fs(t)!=="mouse"?(n._active=!1,this.setupScrollPrevention(t)):r.delay>0?(this.setupDelayTrigger(t),r.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const r=this.state;r._active=!0,r._preventScroll=!0,r._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const r=this.state,n=this.config;if(!r._pointerActive)return;const i=br(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;const s=ai(t);if(document.pointerLockElement===t.target?r._delta=[t.movementX,t.movementY]:(r._delta=Y.sub(s,r._values),this.computeValues(s)),Y.addTo(r._movement,r._delta),this.compute(t),r._delayed&&r.intentional){this.timeoutStore.remove("dragDelay"),r.active=!1,this.startPointerDrag(t);return}if(n.preventScrollAxis&&!r._preventScroll)if(r.axis)if(r.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){r._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 r=this.state,n=this.config;if(!r._active||!r._pointerActive)return;const i=br(t);if(r._pointerId!==void 0&&i!==r._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=r._distance;if(r.tap=s<=n.tapsThreshold&&o<=n.tapsThreshold,r.tap&&n.filterTaps)r._force=!0;else{const[a,f]=r._delta,[u,l]=r._movement,[d,h]=n.swipe.velocity,[p,m]=n.swipe.distance,_=n.swipe.duration;if(r.elapsedTime<_){const g=Math.abs(a/r.timeDelta),v=Math.abs(f/r.timeDelta);g>d&&Math.abs(u)>p&&(r.swipe[0]=Math.sign(a)),v>h&&Math.abs(l)>m&&(r.swipe[1]=Math.sign(f))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const r=this.config,n=r.device;if(process.env.NODE_ENV==="development")try{if(n==="pointer"&&r.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{}r.pointerLock&&t.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"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,xu(t);const r=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",r),this.eventStore.add(this.sharedConfig.window,"touch","cancel",r),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 r=fi[t.key];if(r){const n=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),n._delta=r(this.config.keyboardDisplacement,i),n._keyboardActive=!0,Y.addTo(n._movement,n._delta),this.compute(t),this.emit()}}keyUp(t){t.key in fi&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const r=this.config.device;t(r,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(r,"change",this.pointerMove.bind(this)),t(r,"end",this.pointerUp.bind(this)),t(r,"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 xu(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const bt=typeof window<"u"&&window.document&&window.document.createElement;function hs(){return bt&&"ontouchstart"in window}function Su(){return hs()||bt&&window.navigator.maxTouchPoints>1}function ku(){return bt&&"onpointerdown"in window}function Ou(){return bt&&"exitPointerLock"in window.document}function Tu(){try{return"constructor"in GestureEvent}catch{return!1}}const ie={isBrowser:bt,gesture:Tu(),touch:hs(),touchscreen:Su(),pointer:ku(),pointerLock:Ou()},Pu=250,Ru=180,Nu=.5,Du=50,Cu=250,Au=10,di={mouse:0,touch:0,pen:8},ps=F(F({},vt),{},{device(e,t,{pointer:{touch:r=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&ie.pointerLock,ie.touch&&r?"touch":this.pointerLock?"mouse":ie.pointer&&!i?"pointer":ie.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:r}){if(this.preventScrollDelay=typeof r=="number"?r:r||r===void 0&&e?Pu:void 0,!(!ie.touchscreen||r===!1))return e||(r!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:r=!0,buttons:n=1,keys:i=!0}={}}){return this.pointerButtons=n,this.keys=i,!this.pointerLock&&this.device==="pointer"&&r},threshold(e,t,{filterTaps:r=!1,tapsThreshold:n=3,axis:i=void 0}){const s=Y.toVector(e,r?n:i?1:0);return this.filterTaps=r,this.tapsThreshold=n,s},swipe({velocity:e=Nu,distance:t=Du,duration:r=Cu}={}){return{velocity:this.transform(Y.toVector(e)),distance:this.transform(Y.toVector(t)),duration:r}},delay(e=0){switch(e){case!0:return Ru;case!1:return 0;default:return e}},axisThreshold(e){return e?F(F({},di),e):di},keyboardDisplacement(e=Au){return e}});process.env.NODE_ENV==="development"&&Object.assign(ps,{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}});F(F({},rn),{},{device(e,t,{shared:r,pointer:{touch:n=!1}={}}){if(r.target&&!ie.touch&&ie.gesture)return"gesture";if(ie.touch&&n)return"touch";if(ie.touchscreen){if(ie.pointer)return"pointer";if(ie.touch)return"touch"}},bounds(e,t,{scaleBounds:r={},angleBounds:n={}}){const i=o=>{const a=ci(Ft(r,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=ci(Ft(n,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof r!="function"&&typeof n!="function"?[i(),s()]:o=>[i(o),s(o)]},threshold(e,t,r){return this.lockDirection=r.axis==="lock",Y.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});F(F({},vt),{},{mouseOnly:(e=!0)=>e});F(F({},vt),{},{mouseOnly:(e=!0)=>e});const ms=new Map,Cr=new Map;function Iu(e){ms.set(e.key,e.engine),Cr.set(e.key,e.resolver)}const ju={key:"drag",engine:Eu,resolver:ps};function $u(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Vu(e,t){if(e==null)return{};var r=$u(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const Mu={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=ie.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},zu=["target","eventOptions","window","enabled","transform"];function Ct(e={},t){const r={};for(const[n,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const s=i.call(r,e[n],n,e);Number.isNaN(s)||(r[n]=s)}else r[n]=i.call(r,e[n],n,e);break;case"object":r[n]=Ct(e[n],i);break;case"boolean":i&&(r[n]=e[n]);break}return r}function Fu(e,t,r={}){const n=e,{target:i,eventOptions:s,window:o,enabled:a,transform:f}=n,u=Vu(n,zu);if(r.shared=Ct({target:i,eventOptions:s,window:o,enabled:a,transform:f},Mu),t){const l=Cr.get(t);r[t]=Ct(F({shared:r.shared},u),l)}else for(const l in u){const d=Cr.get(l);if(d)r[l]=Ct(F({shared:r.shared},u[l]),d);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(l)){if(l==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${l}\` was used. Please read the documentation for further information.`)}}return r}class gs{constructor(t,r){Q(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=r}add(t,r,n,i,s){const o=this._listeners,a=lu(r,n),f=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=F(F({},f),s);t.addEventListener(a,i,u);const l=()=>{t.removeEventListener(a,i,u),o.delete(l)};return o.add(l),l}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class Lu{constructor(){Q(this,"_timeouts",new Map)}add(t,r,n=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(r,n,...i))}remove(t){const r=this._timeouts.get(t);r&&window.clearTimeout(r)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class Bu{constructor(t){Q(this,"gestures",new Set),Q(this,"_targetEventStore",new gs(this)),Q(this,"gestureEventStores",{}),Q(this,"gestureTimeoutStores",{}),Q(this,"handlers",{}),Q(this,"config",{}),Q(this,"pointerIds",new Set),Q(this,"touchIds",new Set),Q(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Uu(this,t)}setEventIds(t){if(Zt(t))return this.touchIds=new Set(hu(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,r){this.handlers=t,this.nativeHandlers=r}applyConfig(t,r){this.config=Fu(t,r,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 r=this.config.shared,n={};let i;if(!(r.target&&(i=r.target(),!i))){if(r.enabled){for(const o of this.gestures){const a=this.config[o],f=hi(n,a.eventOptions,!!i);if(a.enabled){const u=ms.get(o);new u(this,t,o).bind(f)}}const s=hi(n,r.eventOptions,!!i);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](F(F({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in n)n[s]=gu(...n[s]);if(!i)return n;for(const s in n){const{device:o,capture:a,passive:f}=uu(s);this._targetEventStore.add(i,o,"",n[s],{capture:a,passive:f})}}}}function Ce(e,t){e.gestures.add(t),e.gestureEventStores[t]=new gs(e,t),e.gestureTimeoutStores[t]=new Lu}function Uu(e,t){t.drag&&Ce(e,"drag"),t.wheel&&Ce(e,"wheel"),t.scroll&&Ce(e,"scroll"),t.move&&Ce(e,"move"),t.pinch&&Ce(e,"pinch"),t.hover&&Ce(e,"hover")}const hi=(e,t,r)=>(n,i,s,o={},a=!1)=>{var f,u;const l=(f=o.capture)!==null&&f!==void 0?f:t.capture,d=(u=o.passive)!==null&&u!==void 0?u:t.passive;let h=a?n:au(n,i,l);r&&d&&(h+="Passive"),e[h]=e[h]||[],e[h].push(s)};function Wu(e,t={},r,n){const i=S.useMemo(()=>new Bu(e),[]);if(i.applyHandlers(e,n),i.applyConfig(t,r),S.useEffect(i.effect.bind(i)),S.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function Gu(e,t){return Iu(ju),Wu({drag:e},t||{},"drag")}const qu=P.div`
|
|
485
485
|
position: absolute;
|
|
486
486
|
inset: 0;
|
|
487
487
|
background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrim)||"rgba(0, 0, 0, 0.4)"}};
|
|
488
|
-
`,Yu=
|
|
488
|
+
`,Yu=P.div`
|
|
489
489
|
background-color: rgb(${({theme:e})=>e.colors.settingsBackgroundRgb||"255, 255, 255"});
|
|
490
490
|
border-top-left-radius: ${({theme:e})=>{var t;return((t=e.styling)==null?void 0:t.borderRadiusPixel)||24}}px;
|
|
491
491
|
border-top-right-radius: ${({theme:e})=>{var t;return((t=e.styling)==null?void 0:t.borderRadiusPixel)||24}}px;
|
|
492
492
|
max-height: 85dvh;
|
|
493
493
|
padding-bottom: max(env(safe-area-inset-bottom), 16px);
|
|
494
|
-
`,Hu=
|
|
494
|
+
`,Hu=P.div`
|
|
495
495
|
width: 40px;
|
|
496
496
|
height: 5px;
|
|
497
497
|
background-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.scrimLight)||"rgba(0, 0, 0, 0.3)"}};
|
|
498
498
|
border-radius: 3px;
|
|
499
499
|
margin: 12px auto 8px;
|
|
500
|
-
`,Ku=
|
|
500
|
+
`,Ku=P.div`
|
|
501
501
|
padding: 0 ${({theme:e})=>{var t;return((t=e.spacing)==null?void 0:t.appStandardPadding)||"16px"}};
|
|
502
|
-
`,Qu=
|
|
502
|
+
`,Qu=P.span`
|
|
503
503
|
position: absolute;
|
|
504
504
|
width: 1px;
|
|
505
505
|
height: 1px;
|
|
@@ -509,12 +509,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
509
509
|
clip: rect(0, 0, 0, 0);
|
|
510
510
|
white-space: nowrap;
|
|
511
511
|
border: 0;
|
|
512
|
-
`;function Xu(e){return 8*(Math.log(e+1)-2)}function Ju({isOpen:e,onClose:t,children:r,title:n="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25}){const a=S.useRef(null),[f,u]=S.useState(e),[l,d]=gt(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));S.useEffect(()=>{e?(u(!0),d.start({y:0,opacity:1})):d.start({y:i,opacity:0,onRest:()=>{u(!1)}})},[e,d,i]);const h=S.useCallback(()=>{t()},[t]),p=Gu(({active:m,movement:[,_],velocity:[,g],direction:[,v],cancel:x})=>{if(_<-10){x();return}const b=Math.max(0,_);if(m){const O=_<0?Xu(-_)*-.5:b;d.start({y:O,immediate:!0});const P=Math.min(b/i,1);d.start({opacity:1-P*.5,immediate:!0})}else g>s&&v>0||b>i*o?h():d.start({y:0,opacity:1})},{from:()=>[0,l.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0});return f?E.jsxs(E.Fragment,{children:[E.jsx($e.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:l.opacity,pointerEvents:e?"auto":"none"},onClick:h,children:E.jsx(qu,{})}),E.jsx($e.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:l.y.to(m=>`translateY(${m}px)`)},children:E.jsxs(Yu,{ref:a,children:[E.jsx(Qu,{children:n}),E.jsx("div",{...p(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:E.jsx(Hu,{})}),E.jsx(Ku,{children:r})]})})]}):E.jsx(E.Fragment,{})}function q(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Zu=typeof Symbol=="function"&&Symbol.observable||"@@observable",pi=Zu,wr=()=>Math.random().toString(36).substring(7).split("").join("."),el={INIT:`@@redux/INIT${wr()}`,REPLACE:`@@redux/REPLACE${wr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${wr()}`},ke=el;function wt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function tl(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(il(e))return"date";if(nl(e))return"error";const r=rl(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function rl(e){return typeof e.constructor=="function"?e.constructor.name:null}function nl(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function il(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function ye(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=tl(e)),t}function ys(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?q(2):`Expected the root reducer to be a function. Instead, received: '${ye(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?q(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?q(1):`Expected the enhancer to be a function. Instead, received: '${ye(r)}'`);return r(ys)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,f=!1;function u(){o===s&&(o=new Map,s.forEach((g,v)=>{o.set(v,g)}))}function l(){if(f)throw new Error(process.env.NODE_ENV==="production"?q(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?q(4):`Expected the listener to be a function. Instead, received: '${ye(g)}'`);if(f)throw new Error(process.env.NODE_ENV==="production"?q(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let v=!0;u();const x=a++;return o.set(x,g),function(){if(v){if(f)throw new Error(process.env.NODE_ENV==="production"?q(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,u(),o.delete(x),s=null}}}function h(g){if(!wt(g))throw new Error(process.env.NODE_ENV==="production"?q(7):`Actions must be plain objects. Instead, the actual type was: '${ye(g)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?q(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof g.type!="string")throw new Error(process.env.NODE_ENV==="production"?q(17):`Action "type" property must be a string. Instead, the actual type was: '${ye(g.type)}'. Value was: '${g.type}' (stringified)`);if(f)throw new Error(process.env.NODE_ENV==="production"?q(9):"Reducers may not dispatch actions.");try{f=!0,i=n(i,g)}finally{f=!1}return(s=o).forEach(x=>{x()}),g}function p(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?q(10):`Expected the nextReducer to be a function. Instead, received: '${ye(g)}`);n=g,h({type:ke.REPLACE})}function m(){const g=d;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?q(11):`Expected the observer to be an object. Instead, received: '${ye(v)}'`);function x(){const O=v;O.next&&O.next(l())}return x(),{unsubscribe:g(x)}},[pi](){return this}}}return h({type:ke.INIT}),{dispatch:h,subscribe:d,getState:l,replaceReducer:p,[pi]:m}}function mi(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function sl(e,t,r,n){const i=Object.keys(t),s=r&&r.type===ke.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!wt(e))return`The ${s} has unexpected type of "${ye(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const o=Object.keys(e).filter(a=>!t.hasOwnProperty(a)&&!n[a]);if(o.forEach(a=>{n[a]=!0}),!(r&&r.type===ke.REPLACE)&&o.length>0)return`Unexpected ${o.length>1?"keys":"key"} "${o.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function ol(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ke.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?q(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:ke.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?q(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${ke.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function vs(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const a=t[o];process.env.NODE_ENV!=="production"&&typeof e[a]>"u"&&mi(`No reducer provided for key "${a}"`),typeof e[a]=="function"&&(r[a]=e[a])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let s;try{ol(r)}catch(o){s=o}return function(a={},f){if(s)throw s;if(process.env.NODE_ENV!=="production"){const d=sl(a,r,f,i);d&&mi(d)}let u=!1;const l={};for(let d=0;d<n.length;d++){const h=n[d],p=r[h],m=a[h],_=p(m,f);if(typeof _>"u"){const g=f&&f.type;throw new Error(process.env.NODE_ENV==="production"?q(14):`When called with an action of type ${g?`"${String(g)}"`:"(unknown type)"}, the slice reducer for key "${h}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}l[h]=_,u=u||_!==m}return u=u||n.length!==Object.keys(a).length,u?l:a}}function Lt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function al(...e){return t=>(r,n)=>{const i=t(r,n);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?q(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:i.getState,dispatch:(f,...u)=>s(f,...u)},a=e.map(f=>f(o));return s=Lt(...a)(i.dispatch),{...i,dispatch:s}}}function bs(e){return wt(e)&&"type"in e&&typeof e.type=="string"}var ws=Symbol.for("immer-nothing"),gi=Symbol.for("immer-draftable"),ee=Symbol.for("immer-state"),cl=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function J(e,...t){if(process.env.NODE_ENV!=="production"){const r=cl[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ve=Object.getPrototypeOf;function Pe(e){return!!e&&!!e[ee]}function me(e){var t;return e?_s(e)||Array.isArray(e)||!!e[gi]||!!((t=e.constructor)!=null&&t[gi])||tr(e)||rr(e):!1}var ul=Object.prototype.constructor.toString();function _s(e){if(!e||typeof e!="object")return!1;const t=Ve(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===ul}function Bt(e,t){er(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function er(e){const t=e[ee];return t?t.type_:Array.isArray(e)?1:tr(e)?2:rr(e)?3:0}function Ar(e,t){return er(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Es(e,t,r){const n=er(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ll(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function tr(e){return e instanceof Map}function rr(e){return e instanceof Set}function xe(e){return e.copy_||e.base_}function Ir(e,t){if(tr(e))return new Map(e);if(rr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=_s(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ee];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){const o=i[s],a=n[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Ve(e),n)}else{const n=Ve(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function nn(e,t=!1){return nr(e)||Pe(e)||!me(e)||(er(e)>1&&(e.set=e.add=e.clear=e.delete=fl),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>nn(n,!0))),e}function fl(){J(2)}function nr(e){return Object.isFrozen(e)}var dl={};function Te(e){const t=dl[e];return t||J(0,e),t}var ft;function xs(){return ft}function hl(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yi(e,t){t&&(Te("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jr(e){$r(e),e.drafts_.forEach(pl),e.drafts_=null}function $r(e){e===ft&&(ft=e.parent_)}function vi(e){return ft=hl(ft,e)}function pl(e){const t=e[ee];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bi(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ee].modified_&&(jr(t),J(4)),me(e)&&(e=Ut(t,e),t.parent_||Wt(t,e)),t.patches_&&Te("Patches").generateReplacementPatches_(r[ee].base_,e,t.patches_,t.inversePatches_)):e=Ut(t,r,[]),jr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ws?e:void 0}function Ut(e,t,r){if(nr(t))return t;const n=t[ee];if(!n)return Bt(t,(i,s)=>wi(e,n,t,i,s,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Wt(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let s=i,o=!1;n.type_===3&&(s=new Set(i),i.clear(),o=!0),Bt(s,(a,f)=>wi(e,n,i,a,f,r,o)),Wt(e,i,!1),r&&e.patches_&&Te("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function wi(e,t,r,n,i,s,o){if(process.env.NODE_ENV!=="production"&&i===r&&J(5),Pe(i)){const a=s&&t&&t.type_!==3&&!Ar(t.assigned_,n)?s.concat(n):void 0,f=Ut(e,i,a);if(Es(r,n,f),Pe(f))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(me(i)&&!nr(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ut(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Wt(e,i)}}function Wt(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nn(t,r)}function ml(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:xs(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,s=sn;r&&(i=[n],s=dt);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,a}var sn={get(e,t){if(t===ee)return e;const r=xe(e);if(!Ar(r,t))return gl(e,r,t);const n=r[t];return e.finalized_||!me(n)?n:n===_r(e.base_,t)?(Er(e),e.copy_[t]=Mr(n,e)):n},has(e,t){return t in xe(e)},ownKeys(e){return Reflect.ownKeys(xe(e))},set(e,t,r){const n=Ss(xe(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=_r(xe(e),t),s=i==null?void 0:i[ee];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ll(r,i)&&(r!==void 0||Ar(e.base_,t)))return!0;Er(e),Vr(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _r(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Er(e),Vr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){J(11)},getPrototypeOf(e){return Ve(e.base_)},setPrototypeOf(){J(12)}},dt={};Bt(sn,(e,t)=>{dt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});dt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&J(13),dt.set.call(this,e,t,void 0)};dt.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&J(14),sn.set.call(this,e[0],t,r,e[0])};function _r(e,t){const r=e[ee];return(r?xe(r):e)[t]}function gl(e,t,r){var i;const n=Ss(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function Ss(e,t){if(!(t in e))return;let r=Ve(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ve(r)}}function Vr(e){e.modified_||(e.modified_=!0,e.parent_&&Vr(e.parent_))}function Er(e){e.copy_||(e.copy_=Ir(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const s=r;r=t;const o=this;return function(f=s,...u){return o.produce(f,l=>r.call(this,l,...u))}}typeof r!="function"&&J(6),n!==void 0&&typeof n!="function"&&J(7);let i;if(me(t)){const s=vi(this),o=Mr(t,void 0);let a=!0;try{i=r(o),a=!1}finally{a?jr(s):$r(s)}return yi(s,n),bi(i,s)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===ws&&(i=void 0),this.autoFreeze_&&nn(i,!0),n){const s=[],o=[];Te("Patches").generateReplacementPatches_(t,i,s,o),n(s,o)}return i}else J(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,f=>t(f,...a));let n,i;return[this.produce(t,r,(o,a)=>{n=o,i=a}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){me(e)||J(8),Pe(e)&&(e=vl(e));const t=vi(this),r=Mr(e,void 0);return r[ee].isManual_=!0,$r(t),r}finishDraft(e,t){const r=e&&e[ee];(!r||!r.isManual_)&&J(9);const{scope_:n}=r;return yi(n,t),bi(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Te("Patches").applyPatches_;return Pe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Mr(e,t){const r=tr(e)?Te("MapSet").proxyMap_(e,t):rr(e)?Te("MapSet").proxySet_(e,t):ml(e,t);return(t?t.scope_:xs()).drafts_.push(r),r}function vl(e){return Pe(e)||J(10,e),ks(e)}function ks(e){if(!me(e)||nr(e))return e;const t=e[ee];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ir(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ir(e,!0);return Bt(r,(n,i)=>{Es(r,n,ks(i))}),t&&(t.finalized_=!1),r}var te=new yl,Os=te.produce;te.produceWithPatches.bind(te);te.setAutoFreeze.bind(te);te.setUseStrictShallowCopy.bind(te);te.applyPatches.bind(te);te.createDraft.bind(te);te.finishDraft.bind(te);function Ps(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var bl=Ps(),wl=Ps,_l=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lt:Lt.apply(null,arguments)},El=e=>e&&typeof e.match=="function";function _i(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?M(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>bs(n)&&n.type===e,r}function xl(e){return typeof e=="function"&&"type"in e&&El(e)}function Sl(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
513
|
-
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function kl(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=xl}=e;return()=>r=>n=>(t(n)&&console.warn(Sl(n.type)),r(n))}function
|
|
512
|
+
`;function Xu(e){return 8*(Math.log(e+1)-2)}function Ju({isOpen:e,onClose:t,children:r,title:n="Bottom Sheet",maxHeight:i=300,velocityThreshold:s=.4,closeThreshold:o=.25}){const a=S.useRef(null),[f,u]=S.useState(e),[l,d]=gt(()=>({y:i,opacity:0,config:{tension:300,friction:30}}));S.useEffect(()=>{e?(u(!0),d.start({y:0,opacity:1})):d.start({y:i,opacity:0,onRest:()=>{u(!1)}})},[e,d,i]);const h=S.useCallback(()=>{t()},[t]),p=Gu(({active:m,movement:[,_],velocity:[,g],direction:[,v],cancel:x})=>{if(_<-10){x();return}const b=Math.max(0,_);if(m){const O=_<0?Xu(-_)*-.5:b;d.start({y:O,immediate:!0});const T=Math.min(b/i,1);d.start({opacity:1-T*.5,immediate:!0})}else g>s&&v>0||b>i*o?h():d.start({y:0,opacity:1})},{from:()=>[0,l.y.get()],filterTaps:!0,axis:"y",pointer:{touch:!0},preventDefault:!0});return f?E.jsxs(E.Fragment,{children:[E.jsx($e.div,{style:{position:"fixed",inset:0,zIndex:49,opacity:l.opacity,pointerEvents:e?"auto":"none"},onClick:h,children:E.jsx(qu,{})}),E.jsx($e.div,{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:50,transform:l.y.to(m=>`translateY(${m}px)`)},children:E.jsxs(Yu,{ref:a,children:[E.jsx(Qu,{children:n}),E.jsx("div",{...p(),style:{touchAction:"none",cursor:"grab",padding:"8px 0"},children:E.jsx(Hu,{})}),E.jsx(Ku,{children:r})]})})]}):E.jsx(E.Fragment,{})}function q(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Zu=typeof Symbol=="function"&&Symbol.observable||"@@observable",pi=Zu,wr=()=>Math.random().toString(36).substring(7).split("").join("."),el={INIT:`@@redux/INIT${wr()}`,REPLACE:`@@redux/REPLACE${wr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${wr()}`},ke=el;function wt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function tl(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(il(e))return"date";if(nl(e))return"error";const r=rl(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function rl(e){return typeof e.constructor=="function"?e.constructor.name:null}function nl(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function il(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function ye(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=tl(e)),t}function ys(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?q(2):`Expected the root reducer to be a function. Instead, received: '${ye(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?q(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?q(1):`Expected the enhancer to be a function. Instead, received: '${ye(r)}'`);return r(ys)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,f=!1;function u(){o===s&&(o=new Map,s.forEach((g,v)=>{o.set(v,g)}))}function l(){if(f)throw new Error(process.env.NODE_ENV==="production"?q(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?q(4):`Expected the listener to be a function. Instead, received: '${ye(g)}'`);if(f)throw new Error(process.env.NODE_ENV==="production"?q(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let v=!0;u();const x=a++;return o.set(x,g),function(){if(v){if(f)throw new Error(process.env.NODE_ENV==="production"?q(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,u(),o.delete(x),s=null}}}function h(g){if(!wt(g))throw new Error(process.env.NODE_ENV==="production"?q(7):`Actions must be plain objects. Instead, the actual type was: '${ye(g)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?q(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof g.type!="string")throw new Error(process.env.NODE_ENV==="production"?q(17):`Action "type" property must be a string. Instead, the actual type was: '${ye(g.type)}'. Value was: '${g.type}' (stringified)`);if(f)throw new Error(process.env.NODE_ENV==="production"?q(9):"Reducers may not dispatch actions.");try{f=!0,i=n(i,g)}finally{f=!1}return(s=o).forEach(x=>{x()}),g}function p(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?q(10):`Expected the nextReducer to be a function. Instead, received: '${ye(g)}`);n=g,h({type:ke.REPLACE})}function m(){const g=d;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?q(11):`Expected the observer to be an object. Instead, received: '${ye(v)}'`);function x(){const O=v;O.next&&O.next(l())}return x(),{unsubscribe:g(x)}},[pi](){return this}}}return h({type:ke.INIT}),{dispatch:h,subscribe:d,getState:l,replaceReducer:p,[pi]:m}}function mi(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function sl(e,t,r,n){const i=Object.keys(t),s=r&&r.type===ke.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!wt(e))return`The ${s} has unexpected type of "${ye(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const o=Object.keys(e).filter(a=>!t.hasOwnProperty(a)&&!n[a]);if(o.forEach(a=>{n[a]=!0}),!(r&&r.type===ke.REPLACE)&&o.length>0)return`Unexpected ${o.length>1?"keys":"key"} "${o.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function ol(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ke.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?q(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:ke.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?q(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${ke.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function vs(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const a=t[o];process.env.NODE_ENV!=="production"&&typeof e[a]>"u"&&mi(`No reducer provided for key "${a}"`),typeof e[a]=="function"&&(r[a]=e[a])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let s;try{ol(r)}catch(o){s=o}return function(a={},f){if(s)throw s;if(process.env.NODE_ENV!=="production"){const d=sl(a,r,f,i);d&&mi(d)}let u=!1;const l={};for(let d=0;d<n.length;d++){const h=n[d],p=r[h],m=a[h],_=p(m,f);if(typeof _>"u"){const g=f&&f.type;throw new Error(process.env.NODE_ENV==="production"?q(14):`When called with an action of type ${g?`"${String(g)}"`:"(unknown type)"}, the slice reducer for key "${h}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}l[h]=_,u=u||_!==m}return u=u||n.length!==Object.keys(a).length,u?l:a}}function Lt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function al(...e){return t=>(r,n)=>{const i=t(r,n);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?q(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:i.getState,dispatch:(f,...u)=>s(f,...u)},a=e.map(f=>f(o));return s=Lt(...a)(i.dispatch),{...i,dispatch:s}}}function bs(e){return wt(e)&&"type"in e&&typeof e.type=="string"}var ws=Symbol.for("immer-nothing"),gi=Symbol.for("immer-draftable"),ee=Symbol.for("immer-state"),cl=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function J(e,...t){if(process.env.NODE_ENV!=="production"){const r=cl[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ve=Object.getPrototypeOf;function Te(e){return!!e&&!!e[ee]}function me(e){var t;return e?_s(e)||Array.isArray(e)||!!e[gi]||!!((t=e.constructor)!=null&&t[gi])||tr(e)||rr(e):!1}var ul=Object.prototype.constructor.toString();function _s(e){if(!e||typeof e!="object")return!1;const t=Ve(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===ul}function Bt(e,t){er(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function er(e){const t=e[ee];return t?t.type_:Array.isArray(e)?1:tr(e)?2:rr(e)?3:0}function Ar(e,t){return er(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Es(e,t,r){const n=er(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ll(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function tr(e){return e instanceof Map}function rr(e){return e instanceof Set}function xe(e){return e.copy_||e.base_}function Ir(e,t){if(tr(e))return new Map(e);if(rr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=_s(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ee];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){const o=i[s],a=n[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Ve(e),n)}else{const n=Ve(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function nn(e,t=!1){return nr(e)||Te(e)||!me(e)||(er(e)>1&&(e.set=e.add=e.clear=e.delete=fl),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>nn(n,!0))),e}function fl(){J(2)}function nr(e){return Object.isFrozen(e)}var dl={};function Pe(e){const t=dl[e];return t||J(0,e),t}var ft;function xs(){return ft}function hl(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yi(e,t){t&&(Pe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jr(e){$r(e),e.drafts_.forEach(pl),e.drafts_=null}function $r(e){e===ft&&(ft=e.parent_)}function vi(e){return ft=hl(ft,e)}function pl(e){const t=e[ee];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bi(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ee].modified_&&(jr(t),J(4)),me(e)&&(e=Ut(t,e),t.parent_||Wt(t,e)),t.patches_&&Pe("Patches").generateReplacementPatches_(r[ee].base_,e,t.patches_,t.inversePatches_)):e=Ut(t,r,[]),jr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ws?e:void 0}function Ut(e,t,r){if(nr(t))return t;const n=t[ee];if(!n)return Bt(t,(i,s)=>wi(e,n,t,i,s,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Wt(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let s=i,o=!1;n.type_===3&&(s=new Set(i),i.clear(),o=!0),Bt(s,(a,f)=>wi(e,n,i,a,f,r,o)),Wt(e,i,!1),r&&e.patches_&&Pe("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function wi(e,t,r,n,i,s,o){if(process.env.NODE_ENV!=="production"&&i===r&&J(5),Te(i)){const a=s&&t&&t.type_!==3&&!Ar(t.assigned_,n)?s.concat(n):void 0,f=Ut(e,i,a);if(Es(r,n,f),Te(f))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(me(i)&&!nr(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ut(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Wt(e,i)}}function Wt(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nn(t,r)}function ml(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:xs(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,s=sn;r&&(i=[n],s=dt);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,a}var sn={get(e,t){if(t===ee)return e;const r=xe(e);if(!Ar(r,t))return gl(e,r,t);const n=r[t];return e.finalized_||!me(n)?n:n===_r(e.base_,t)?(Er(e),e.copy_[t]=Mr(n,e)):n},has(e,t){return t in xe(e)},ownKeys(e){return Reflect.ownKeys(xe(e))},set(e,t,r){const n=Ss(xe(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=_r(xe(e),t),s=i==null?void 0:i[ee];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ll(r,i)&&(r!==void 0||Ar(e.base_,t)))return!0;Er(e),Vr(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _r(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Er(e),Vr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){J(11)},getPrototypeOf(e){return Ve(e.base_)},setPrototypeOf(){J(12)}},dt={};Bt(sn,(e,t)=>{dt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});dt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&J(13),dt.set.call(this,e,t,void 0)};dt.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&J(14),sn.set.call(this,e[0],t,r,e[0])};function _r(e,t){const r=e[ee];return(r?xe(r):e)[t]}function gl(e,t,r){var i;const n=Ss(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function Ss(e,t){if(!(t in e))return;let r=Ve(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ve(r)}}function Vr(e){e.modified_||(e.modified_=!0,e.parent_&&Vr(e.parent_))}function Er(e){e.copy_||(e.copy_=Ir(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const s=r;r=t;const o=this;return function(f=s,...u){return o.produce(f,l=>r.call(this,l,...u))}}typeof r!="function"&&J(6),n!==void 0&&typeof n!="function"&&J(7);let i;if(me(t)){const s=vi(this),o=Mr(t,void 0);let a=!0;try{i=r(o),a=!1}finally{a?jr(s):$r(s)}return yi(s,n),bi(i,s)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===ws&&(i=void 0),this.autoFreeze_&&nn(i,!0),n){const s=[],o=[];Pe("Patches").generateReplacementPatches_(t,i,s,o),n(s,o)}return i}else J(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,f=>t(f,...a));let n,i;return[this.produce(t,r,(o,a)=>{n=o,i=a}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){me(e)||J(8),Te(e)&&(e=vl(e));const t=vi(this),r=Mr(e,void 0);return r[ee].isManual_=!0,$r(t),r}finishDraft(e,t){const r=e&&e[ee];(!r||!r.isManual_)&&J(9);const{scope_:n}=r;return yi(n,t),bi(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Pe("Patches").applyPatches_;return Te(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Mr(e,t){const r=tr(e)?Pe("MapSet").proxyMap_(e,t):rr(e)?Pe("MapSet").proxySet_(e,t):ml(e,t);return(t?t.scope_:xs()).drafts_.push(r),r}function vl(e){return Te(e)||J(10,e),ks(e)}function ks(e){if(!me(e)||nr(e))return e;const t=e[ee];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ir(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Ir(e,!0);return Bt(r,(n,i)=>{Es(r,n,ks(i))}),t&&(t.finalized_=!1),r}var te=new yl,Os=te.produce;te.produceWithPatches.bind(te);te.setAutoFreeze.bind(te);te.setUseStrictShallowCopy.bind(te);te.applyPatches.bind(te);te.createDraft.bind(te);te.finishDraft.bind(te);function Ts(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var bl=Ts(),wl=Ts,_l=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lt:Lt.apply(null,arguments)},El=e=>e&&typeof e.match=="function";function _i(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?M(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>bs(n)&&n.type===e,r}function xl(e){return typeof e=="function"&&"type"in e&&El(e)}function Sl(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
513
|
+
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function kl(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=xl}=e;return()=>r=>n=>(t(n)&&console.warn(Sl(n.type)),r(n))}function Ps(e,t){let r=0;return{measureTime(n){const i=Date.now();try{return n()}finally{const s=Date.now();r+=s-i}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
|
|
514
514
|
If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
|
|
515
|
-
It is disabled in production builds, so you don't need to worry about that.`)}}}var Rs=class Qe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Qe.prototype)}static get[Symbol.species](){return Qe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Qe(...t[0].concat(this)):new Qe(...t.concat(this))}};function Ei(e){return me(e)?Os(e,()=>{}):e}function xi(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ol(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function
|
|
515
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var Rs=class Qe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Qe.prototype)}static get[Symbol.species](){return Qe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Qe(...t[0].concat(this)):new Qe(...t.concat(this))}};function Ei(e){return me(e)?Os(e,()=>{}):e}function xi(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ol(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Tl(e,t,r){const n=Ns(e,t,r);return{detectMutations(){return Ds(e,t,n,r)}}}function Ns(e,t=[],r,n="",i=new Set){const s={value:r};if(!e(r)&&!i.has(r)){i.add(r),s.children={};for(const o in r){const a=n?n+"."+o:o;t.length&&t.indexOf(a)!==-1||(s.children[o]=Ns(e,t,r[o],a))}}return s}function Ds(e,t=[],r,n,i=!1,s=""){const o=r?r.value:void 0,a=o===n;if(i&&!a&&!Number.isNaN(n))return{wasMutated:!0,path:s};if(e(o)||e(n))return{wasMutated:!1};const f={};for(let l in r.children)f[l]=!0;for(let l in n)f[l]=!0;const u=t.length>0;for(let l in f){const d=s?s+"."+l:l;if(u&&t.some(m=>m instanceof RegExp?m.test(d):d===m))continue;const h=Ds(e,t,r.children[l],n[l],a,d);if(h.wasMutated)return h}return{wasMutated:!1}}function Pl(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(a,f,u,l){return JSON.stringify(a,r(f,l),u)},r=function(a,f){let u=[],l=[];return f||(f=function(d,h){return u[0]===h?"[Circular ~]":"[Circular ~."+l.slice(0,u.indexOf(h)).join(".")+"]"}),function(d,h){if(u.length>0){var p=u.indexOf(this);~p?u.splice(p+1):u.push(this),~p?l.splice(p,1/0,d):l.push(d),~u.indexOf(h)&&(h=f.call(this,d,h))}else u.push(h);return a==null?h:a.call(this,d,h)}},{isImmutable:n=Ol,ignoredPaths:i,warnAfter:s=32}=e;const o=Tl.bind(null,n,i);return({getState:a})=>{let f=a(),u=o(f),l;return d=>h=>{const p=Ps(s,"ImmutableStateInvariantMiddleware");p.measureTime(()=>{if(f=a(),l=u.detectMutations(),u=o(f),l.wasMutated)throw new Error(process.env.NODE_ENV==="production"?M(19):`A state mutation was detected between dispatches, in the path '${l.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=d(h);return p.measureTime(()=>{if(f=a(),l=u.detectMutations(),u=o(f),l.wasMutated)throw new Error(process.env.NODE_ENV==="production"?M(20):`A state mutation was detected inside a dispatch, in the path: ${l.path||""}. Take a look at the reducer(s) handling the action ${t(h)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),p.warnIfExceeded(),m}}}}function Cs(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||wt(e)}function zr(e,t="",r=Cs,n,i=[],s){let o;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const a=n!=null?n(e):Object.entries(e),f=i.length>0;for(const[u,l]of a){const d=t?t+"."+u:u;if(!(f&&i.some(p=>p instanceof RegExp?p.test(d):d===p))){if(!r(l))return{keyPath:d,value:l};if(typeof l=="object"&&(o=zr(l,d,r,n,i,s),o))return o}}return s&&As(e)&&s.add(e),!1}function As(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!As(t))return!1;return!0}function Rl(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=Cs,getEntries:r,ignoredActions:n=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:o=32,ignoreState:a=!1,ignoreActions:f=!1,disableCache:u=!1}=e,l=!u&&WeakSet?new WeakSet:void 0;return d=>h=>p=>{if(!bs(p))return h(p);const m=h(p),_=Ps(o,"SerializableStateInvariantMiddleware");return!f&&!(n.length&&n.indexOf(p.type)!==-1)&&_.measureTime(()=>{const g=zr(p,"",t,r,i,l);if(g){const{keyPath:v,value:x}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${v}\`. Value:`,x,`
|
|
516
516
|
Take a look at the logic that dispatched this action: `,p,`
|
|
517
517
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
518
518
|
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),a||(_.measureTime(()=>{const g=d.getState(),v=zr(g,"",t,r,s,l);if(v){const{keyPath:x,value:b}=v;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,b,`
|
|
519
519
|
Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
520
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),_.warnIfExceeded()),m}}}function Tt(e){return typeof e=="boolean"}var Nl=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{};let o=new Rs;if(r&&(Tt(r)?o.push(bl):o.push(wl(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let a={};Tt(n)||(a=n),o.unshift(Tl(a))}if(i){let a={};Tt(i)||(a=i),o.push(Rl(a))}if(s){let a={};Tt(s)||(a=s),o.unshift(kl(a))}}return o},Dl="RTK_autoBatch",Si=e=>t=>{setTimeout(t,e)},Cl=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,s=!1,o=!1;const a=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Si(10):e.type==="callback"?e.queueNotification:Si(e.timeout),u=()=>{o=!1,s&&(s=!1,a.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){const d=()=>i&&l(),h=n.subscribe(d);return a.add(l),()=>{h(),a.delete(l)}},dispatch(l){var d;try{return i=!((d=l==null?void 0:l.meta)!=null&&d[Dl]),s=!i,s&&(o||(o=!0,f(u))),n.dispatch(l)}finally{i=!0}}})},Al=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Rs(e);return n&&i.push(Cl(typeof n=="object"?n:void 0)),i};function Il(e){const t=Nl(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(wt(r))a=vs(r);else throw new Error(process.env.NODE_ENV==="production"?M(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?M(2):"`middleware` field must be a callback");let f;if(typeof n=="function"){if(f=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(f))throw new Error(process.env.NODE_ENV==="production"?M(3):"when using a middleware builder function, an array of middleware must be returned")}else f=t();if(process.env.NODE_ENV!=="production"&&f.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?M(4):"each middleware provided to configureStore must be a function");let u=Lt;i&&(u=_l({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const l=al(...f),d=Al(l);if(process.env.NODE_ENV!=="production"&&o&&typeof o!="function")throw new Error(process.env.NODE_ENV==="production"?M(5):"`enhancers` field must be a callback");let h=typeof o=="function"?o(d):d();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?M(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?M(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&f.length&&!h.includes(l)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const p=u(...h);return ys(a,s,p)}function Is(e){const t={},r=[];let n;const i={addCase(s,o){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?M(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?M(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a=typeof s=="string"?s:s.type;if(!a)throw new Error(process.env.NODE_ENV==="production"?M(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error(process.env.NODE_ENV==="production"?M(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=o,i},addMatcher(s,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?M(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:s,reducer:o}),i},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?M(31):"`builder.addDefaultCase` can only be called once");return n=s,i}};return e(i),[t,r,n]}function jl(e){return typeof e=="function"}function $l(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?M(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,i]=Is(t),s;if(jl(e))s=()=>Ei(e());else{const a=Ei(e);s=()=>a}function o(a=s(),f){let u=[r[f.type],...n.filter(({matcher:l})=>l(f)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[i]),u.reduce((l,d)=>{if(d)if(Pe(l)){const p=d(l,f);return p===void 0?l:p}else{if(me(l))return Os(l,h=>d(h,f));{const h=d(l,f);if(h===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return l},a)}return o.getInitialState=s,o}var Vl=Symbol.for("rtk-slice-createasyncthunk");function Ml(e,t){return`${e}/${t}`}function zl({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Vl];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(process.env.NODE_ENV==="production"?M(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&i.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof i.reducers=="function"?i.reducers(Bl()):i.reducers)||{},f=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(b,O){const P=typeof b=="string"?b:b.type;if(!P)throw new Error(process.env.NODE_ENV==="production"?M(12):"`context.addCase` cannot be called with an empty action type");if(P in u.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?M(13):"`context.addCase` cannot be called with two reducers for the same action type: "+P);return u.sliceCaseReducersByType[P]=O,l},addMatcher(b,O){return u.sliceMatchers.push({matcher:b,reducer:O}),l},exposeAction(b,O){return u.actionCreators[b]=O,l},exposeCaseReducer(b,O){return u.sliceCaseReducersByName[b]=O,l}};f.forEach(b=>{const O=a[b],P={reducerName:b,type:Ml(s,b),createNotation:typeof i.reducers=="function"};Wl(O)?ql(P,O,l,t):Ul(P,O,l)});function d(){if(process.env.NODE_ENV!=="production"&&typeof i.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?M(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[b={},O=[],P=void 0]=typeof i.extraReducers=="function"?Is(i.extraReducers):[i.extraReducers],I={...b,...u.sliceCaseReducersByType};return $l(i.initialState,$=>{for(let z in I)$.addCase(z,I[z]);for(let z of u.sliceMatchers)$.addMatcher(z.matcher,z.reducer);for(let z of O)$.addMatcher(z.matcher,z.reducer);P&&$.addDefaultCase(P)})}const h=b=>b,p=new Map;let m;function _(b,O){return m||(m=d()),m(b,O)}function g(){return m||(m=d()),m.getInitialState()}function v(b,O=!1){function P($){let z=$[b];if(typeof z>"u"){if(O)z=g();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?M(15):"selectSlice returned undefined for an uninjected slice reducer")}return z}function I($=h){const z=xi(p,O,()=>new WeakMap);return xi(z,$,()=>{const L={};for(const[oe,W]of Object.entries(i.selectors??{}))L[oe]=Fl(W,$,g,O);return L})}return{reducerPath:b,getSelectors:I,get selectors(){return I(P)},selectSlice:P}}const x={name:s,reducer:_,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...v(o),injectInto(b,{reducerPath:O,...P}={}){const I=O??o;return b.inject({reducerPath:I,reducer:_},P),{...x,...v(I,!0)}}};return x}}function Fl(e,t,r,n){function i(s,...o){let a=t(s);if(typeof a>"u"){if(n)a=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?M(16):"selectState returned undefined for an uninjected slice reducer")}return e(a,...o)}return i.unwrapped=e,i}var Ll=zl();function Bl(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Ul({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!Gl(n))throw new Error(process.env.NODE_ENV==="production"?M(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?_i(e,o):_i(e))}function Wl(e){return e._reducerDefinitionType==="asyncThunk"}function Gl(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ql({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?M(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:o,pending:a,rejected:f,settled:u,options:l}=r,d=i(e,s,l);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),f&&n.addCase(d.rejected,f),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:o||Rt,pending:a||Rt,rejected:f||Rt,settled:u||Rt})}function Rt(){}function M(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Yl={cardPosition:"transit-to-home"},js=Ll({name:"navigation",initialState:Yl,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:ef}=js.actions,Hl=vs({navigation:js.reducer}),Kl=Il({reducer:Hl});function Ql(){const[e,t]=S.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return S.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>t(i.matches);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),e}function Xl(e=100){const[t,r]=S.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return S.useEffect(()=>{let n;const i=()=>{clearTimeout(n),n=setTimeout(()=>{r({width:window.innerWidth,height:window.innerHeight})},e)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{clearTimeout(n),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i)}},[e]),t}function $s(e,t){let r=0,n=null;const i=(...s)=>{const o=Date.now(),a=o-r;a>=t?(r=o,e(...s)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e(...s)},t-a))};return i.cancel=()=>{n&&(clearTimeout(n),n=null)},i}function Jl(e,t={}){const{enabled:r=!0,includeMargins:n=!0,throttleMs:i=16}=t,s=S.useRef(null),o=S.useRef(null),a=S.useRef(null),f=S.useRef(e);S.useEffect(()=>{f.current=e},[e]);const u=S.useCallback(()=>{if(!s.current||!r)return;const d=s.current.getBoundingClientRect();let h=0,p=0;if(n){const _=getComputedStyle(s.current);h=parseFloat(_.marginTop)||0,p=parseFloat(_.marginBottom)||0}const m={top:d.top-h,left:d.left,width:d.width,height:d.height+h+p,right:d.right,bottom:d.bottom+p,x:d.x,y:d.y-h};if(a.current){const _=Math.abs(m.top-a.current.top),g=Math.abs(m.height-a.current.height),v=Math.abs(m.width-a.current.width);if(_<.5&&g<.5&&v<.5)return}a.current=m,f.current(m)},[r,n]);return S.useEffect(()=>{if(!s.current||!r)return;const d=$s(u,i),h=requestAnimationFrame(u),p=new ResizeObserver(d);p.observe(s.current),o.current=p;const m=_=>{const g=_.target;g!==document&&g!==document.documentElement||d()};return window.addEventListener("scroll",m,{passive:!0,capture:!0}),window.addEventListener("resize",d),()=>{cancelAnimationFrame(h),p.disconnect(),d.cancel(),window.removeEventListener("scroll",m,{capture:!0}),window.removeEventListener("resize",d)}},[u,r,i]),d=>{s.current=d}}exports.AnimatedText=tn;exports.BackButton=rc;exports.BannerButton=Ka;exports.BottomSheet=Ju;exports.CircleIconButton=ec;exports.ListItem=vc;exports.LoadingScreen=Mc;exports.OptionPicker=eu;exports.SPRING_COMFORTABLE=zt;exports.SPRING_COMFORTABLE_SLOW=bc;exports.SPRING_GENTLE=xc;exports.SPRING_INSTANT=Ec;exports.SPRING_LANDING=kc;exports.SPRING_RESPONSIVE=lt;exports.SPRING_RISING=Oc;exports.SPRING_SNAPPY=wc;exports.SPRING_STAGGERED=_c;exports.SPRING_VERY_SLOW=Sc;exports.ToggleSwitch=as;exports.UnorderedListItemContainer=sc;exports.ZhuyinKeyboard=us;exports.throttle=$s;exports.useReducedMotion=Ql;exports.useReportPosition=Jl;exports.useViewportSize=Xl;exports.ymyStore=Kl;
|
|
520
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),_.warnIfExceeded()),m}}}function Pt(e){return typeof e=="boolean"}var Nl=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{};let o=new Rs;if(r&&(Pt(r)?o.push(bl):o.push(wl(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let a={};Pt(n)||(a=n),o.unshift(Pl(a))}if(i){let a={};Pt(i)||(a=i),o.push(Rl(a))}if(s){let a={};Pt(s)||(a=s),o.unshift(kl(a))}}return o},Dl="RTK_autoBatch",Si=e=>t=>{setTimeout(t,e)},Cl=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,s=!1,o=!1;const a=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Si(10):e.type==="callback"?e.queueNotification:Si(e.timeout),u=()=>{o=!1,s&&(s=!1,a.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){const d=()=>i&&l(),h=n.subscribe(d);return a.add(l),()=>{h(),a.delete(l)}},dispatch(l){var d;try{return i=!((d=l==null?void 0:l.meta)!=null&&d[Dl]),s=!i,s&&(o||(o=!0,f(u))),n.dispatch(l)}finally{i=!0}}})},Al=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Rs(e);return n&&i.push(Cl(typeof n=="object"?n:void 0)),i};function Il(e){const t=Nl(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(wt(r))a=vs(r);else throw new Error(process.env.NODE_ENV==="production"?M(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?M(2):"`middleware` field must be a callback");let f;if(typeof n=="function"){if(f=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(f))throw new Error(process.env.NODE_ENV==="production"?M(3):"when using a middleware builder function, an array of middleware must be returned")}else f=t();if(process.env.NODE_ENV!=="production"&&f.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?M(4):"each middleware provided to configureStore must be a function");let u=Lt;i&&(u=_l({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const l=al(...f),d=Al(l);if(process.env.NODE_ENV!=="production"&&o&&typeof o!="function")throw new Error(process.env.NODE_ENV==="production"?M(5):"`enhancers` field must be a callback");let h=typeof o=="function"?o(d):d();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?M(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?M(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&f.length&&!h.includes(l)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const p=u(...h);return ys(a,s,p)}function Is(e){const t={},r=[];let n;const i={addCase(s,o){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?M(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?M(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a=typeof s=="string"?s:s.type;if(!a)throw new Error(process.env.NODE_ENV==="production"?M(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error(process.env.NODE_ENV==="production"?M(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=o,i},addMatcher(s,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?M(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:s,reducer:o}),i},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?M(31):"`builder.addDefaultCase` can only be called once");return n=s,i}};return e(i),[t,r,n]}function jl(e){return typeof e=="function"}function $l(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?M(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,i]=Is(t),s;if(jl(e))s=()=>Ei(e());else{const a=Ei(e);s=()=>a}function o(a=s(),f){let u=[r[f.type],...n.filter(({matcher:l})=>l(f)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[i]),u.reduce((l,d)=>{if(d)if(Te(l)){const p=d(l,f);return p===void 0?l:p}else{if(me(l))return Os(l,h=>d(h,f));{const h=d(l,f);if(h===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return l},a)}return o.getInitialState=s,o}var Vl=Symbol.for("rtk-slice-createasyncthunk");function Ml(e,t){return`${e}/${t}`}function zl({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Vl];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(process.env.NODE_ENV==="production"?M(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&i.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof i.reducers=="function"?i.reducers(Bl()):i.reducers)||{},f=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(b,O){const T=typeof b=="string"?b:b.type;if(!T)throw new Error(process.env.NODE_ENV==="production"?M(12):"`context.addCase` cannot be called with an empty action type");if(T in u.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?M(13):"`context.addCase` cannot be called with two reducers for the same action type: "+T);return u.sliceCaseReducersByType[T]=O,l},addMatcher(b,O){return u.sliceMatchers.push({matcher:b,reducer:O}),l},exposeAction(b,O){return u.actionCreators[b]=O,l},exposeCaseReducer(b,O){return u.sliceCaseReducersByName[b]=O,l}};f.forEach(b=>{const O=a[b],T={reducerName:b,type:Ml(s,b),createNotation:typeof i.reducers=="function"};Wl(O)?ql(T,O,l,t):Ul(T,O,l)});function d(){if(process.env.NODE_ENV!=="production"&&typeof i.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?M(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[b={},O=[],T=void 0]=typeof i.extraReducers=="function"?Is(i.extraReducers):[i.extraReducers],I={...b,...u.sliceCaseReducersByType};return $l(i.initialState,$=>{for(let z in I)$.addCase(z,I[z]);for(let z of u.sliceMatchers)$.addMatcher(z.matcher,z.reducer);for(let z of O)$.addMatcher(z.matcher,z.reducer);T&&$.addDefaultCase(T)})}const h=b=>b,p=new Map;let m;function _(b,O){return m||(m=d()),m(b,O)}function g(){return m||(m=d()),m.getInitialState()}function v(b,O=!1){function T($){let z=$[b];if(typeof z>"u"){if(O)z=g();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?M(15):"selectSlice returned undefined for an uninjected slice reducer")}return z}function I($=h){const z=xi(p,O,()=>new WeakMap);return xi(z,$,()=>{const L={};for(const[oe,W]of Object.entries(i.selectors??{}))L[oe]=Fl(W,$,g,O);return L})}return{reducerPath:b,getSelectors:I,get selectors(){return I(T)},selectSlice:T}}const x={name:s,reducer:_,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...v(o),injectInto(b,{reducerPath:O,...T}={}){const I=O??o;return b.inject({reducerPath:I,reducer:_},T),{...x,...v(I,!0)}}};return x}}function Fl(e,t,r,n){function i(s,...o){let a=t(s);if(typeof a>"u"){if(n)a=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?M(16):"selectState returned undefined for an uninjected slice reducer")}return e(a,...o)}return i.unwrapped=e,i}var Ll=zl();function Bl(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Ul({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!Gl(n))throw new Error(process.env.NODE_ENV==="production"?M(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?_i(e,o):_i(e))}function Wl(e){return e._reducerDefinitionType==="asyncThunk"}function Gl(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ql({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?M(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:o,pending:a,rejected:f,settled:u,options:l}=r,d=i(e,s,l);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),f&&n.addCase(d.rejected,f),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:o||Rt,pending:a||Rt,rejected:f||Rt,settled:u||Rt})}function Rt(){}function M(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Yl={cardPosition:"transit-to-home"},js=Ll({name:"navigation",initialState:Yl,reducers:{setCardState:(e,t)=>(e.cardPosition=t.payload.state,e)}}),{setCardState:ef}=js.actions,Hl=vs({navigation:js.reducer}),Kl=Il({reducer:Hl});function Ql(){const[e,t]=S.useState(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return S.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>t(i.matches);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),e}function Xl(e=100){const[t,r]=S.useState({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0});return S.useEffect(()=>{let n;const i=()=>{clearTimeout(n),n=setTimeout(()=>{r({width:window.innerWidth,height:window.innerHeight})},e)};return window.addEventListener("resize",i),window.addEventListener("orientationchange",i),()=>{clearTimeout(n),window.removeEventListener("resize",i),window.removeEventListener("orientationchange",i)}},[e]),t}function $s(e,t){let r=0,n=null;const i=(...s)=>{const o=Date.now(),a=o-r;a>=t?(r=o,e(...s)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e(...s)},t-a))};return i.cancel=()=>{n&&(clearTimeout(n),n=null)},i}function Jl(e,t={}){const{enabled:r=!0,includeMargins:n=!0,throttleMs:i=16}=t,s=S.useRef(null),o=S.useRef(null),a=S.useRef(null),f=S.useRef(e);S.useEffect(()=>{f.current=e},[e]);const u=S.useCallback(()=>{if(!s.current||!r)return;const d=s.current.getBoundingClientRect();let h=0,p=0;if(n){const _=getComputedStyle(s.current);h=parseFloat(_.marginTop)||0,p=parseFloat(_.marginBottom)||0}const m={top:d.top-h,left:d.left,width:d.width,height:d.height+h+p,right:d.right,bottom:d.bottom+p,x:d.x,y:d.y-h};if(a.current){const _=Math.abs(m.top-a.current.top),g=Math.abs(m.height-a.current.height),v=Math.abs(m.width-a.current.width);if(_<.5&&g<.5&&v<.5)return}a.current=m,f.current(m)},[r,n]);return S.useEffect(()=>{if(!s.current||!r)return;const d=$s(u,i),h=requestAnimationFrame(u),p=new ResizeObserver(d);p.observe(s.current),o.current=p;const m=_=>{const g=_.target;g!==document&&g!==document.documentElement||d()};return window.addEventListener("scroll",m,{passive:!0,capture:!0}),window.addEventListener("resize",d),()=>{cancelAnimationFrame(h),p.disconnect(),d.cancel(),window.removeEventListener("scroll",m,{capture:!0}),window.removeEventListener("resize",d)}},[u,r,i]),d=>{s.current=d}}exports.AnimatedText=tn;exports.BackButton=rc;exports.BannerButton=Ka;exports.BottomSheet=Ju;exports.CircleIconButton=ec;exports.ListItem=vc;exports.LoadingScreen=Mc;exports.OptionPicker=eu;exports.SPRING_COMFORTABLE=zt;exports.SPRING_COMFORTABLE_SLOW=bc;exports.SPRING_GENTLE=xc;exports.SPRING_INSTANT=Ec;exports.SPRING_LANDING=kc;exports.SPRING_RESPONSIVE=lt;exports.SPRING_RISING=Oc;exports.SPRING_SNAPPY=wc;exports.SPRING_STAGGERED=_c;exports.SPRING_VERY_SLOW=Sc;exports.ToggleSwitch=as;exports.UnorderedListItemContainer=sc;exports.ZhuyinKeyboard=us;exports.throttle=$s;exports.useReducedMotion=Ql;exports.useReportPosition=Jl;exports.useViewportSize=Xl;exports.ymyStore=Kl;
|
package/dist/index.es.js
CHANGED
|
@@ -3250,7 +3250,7 @@ const mc = P.input`
|
|
|
3250
3250
|
&:hover ${$r} {
|
|
3251
3251
|
background-color: ${({ $checked: e, theme: t }) => {
|
|
3252
3252
|
var r, n;
|
|
3253
|
-
return e ? ((r = t.colors) == null ? void 0 : r.
|
|
3253
|
+
return e ? ((r = t.colors) == null ? void 0 : r.toggleHoverOn) || "rgba(72, 159, 181, 0.08)" : ((n = t.colors) == null ? void 0 : n.toggleHoverOff) || "rgba(0, 0, 0, 0.04)";
|
|
3254
3254
|
}};
|
|
3255
3255
|
}
|
|
3256
3256
|
}
|
|
@@ -3258,7 +3258,7 @@ const mc = P.input`
|
|
|
3258
3258
|
&:focus-within ${$r} {
|
|
3259
3259
|
background-color: ${({ $checked: e, theme: t }) => {
|
|
3260
3260
|
var r, n;
|
|
3261
|
-
return e ? ((r = t.colors) == null ? void 0 : r.
|
|
3261
|
+
return e ? ((r = t.colors) == null ? void 0 : r.toggleFocusOn) || "rgba(72, 159, 181, 0.12)" : ((n = t.colors) == null ? void 0 : n.toggleFocusOff) || "rgba(0, 0, 0, 0.06)";
|
|
3262
3262
|
}};
|
|
3263
3263
|
}
|
|
3264
3264
|
`, yc = P.span`
|
|
@@ -3266,7 +3266,7 @@ const mc = P.input`
|
|
|
3266
3266
|
height: 14px;
|
|
3267
3267
|
background-color: ${({ $checked: e, theme: t }) => {
|
|
3268
3268
|
var r, n;
|
|
3269
|
-
return e ? ((r = t.colors) == null ? void 0 : r.
|
|
3269
|
+
return e ? ((r = t.colors) == null ? void 0 : r.toggleTrackOn) || "rgba(72, 159, 181, 0.5)" : ((n = t.colors) == null ? void 0 : n.toggleTrackOff) || "rgba(0, 0, 0, 0.38)";
|
|
3270
3270
|
}};
|
|
3271
3271
|
border-radius: 7px;
|
|
3272
3272
|
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -3279,7 +3279,7 @@ const mc = P.input`
|
|
|
3279
3279
|
height: 20px;
|
|
3280
3280
|
background-color: ${({ $checked: e, theme: t }) => {
|
|
3281
3281
|
var r, n;
|
|
3282
|
-
return e ? ((r = t.colors) == null ? void 0 : r.
|
|
3282
|
+
return e ? ((r = t.colors) == null ? void 0 : r.toggleThumbOn) || "#489fb5" : ((n = t.colors) == null ? void 0 : n.toggleThumbOff) || "#fafafa";
|
|
3283
3283
|
}};
|
|
3284
3284
|
border-radius: 50%;
|
|
3285
3285
|
box-shadow: 0px 2px 1px -1px ${({ theme: e }) => {
|