UNPKG

@devfamily/admiral

Version:

Admiral is a frontend framework for creating back office using React. It provides out-of-the-box components and tools that make developing an admin interface easy and fast.

5 lines 2.02 MB
(function(xe,w){typeof exports=="object"&&typeof module!="undefined"?w(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],w):(xe=typeof globalThis!="undefined"?globalThis:xe||self,w(xe.admiral={},xe.React,xe.ReactDOM))})(this,function(xe,w,ir){"use strict";var n_t=Object.defineProperty,a_t=Object.defineProperties;var i_t=Object.getOwnPropertyDescriptors;var ap=Object.getOwnPropertySymbols;var hA=Object.prototype.hasOwnProperty,pA=Object.prototype.propertyIsEnumerable;var vA=(xe,w,ir)=>w in xe?n_t(xe,w,{enumerable:!0,configurable:!0,writable:!0,value:ir}):xe[w]=ir,q=(xe,w)=>{for(var ir in w||(w={}))hA.call(w,ir)&&vA(xe,ir,w[ir]);if(ap)for(var ir of ap(w))pA.call(w,ir)&&vA(xe,ir,w[ir]);return xe},ye=(xe,w)=>a_t(xe,i_t(w));var ot=(xe,w)=>{var ir={};for(var qn in xe)hA.call(xe,qn)&&w.indexOf(qn)<0&&(ir[qn]=xe[qn]);if(xe!=null&&ap)for(var qn of ap(xe))w.indexOf(qn)<0&&pA.call(xe,qn)&&(ir[qn]=xe[qn]);return ir};function qn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function Lx(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var b=Lx(w),h=qn(w),xo=qn(ir),gA=Lx(ir);let ip=bl();const kt=e=>yl(e,ip);let op=bl();kt.write=e=>yl(e,op);let Kd=bl();kt.onStart=e=>yl(e,Kd);let sp=bl();kt.onFrame=e=>yl(e,sp);let up=bl();kt.onFinish=e=>yl(e,up);let hs=[];kt.setTimeout=(e,t)=>{let r=kt.now()+t,n=()=>{let i=hs.findIndex(o=>o.cancel==n);~i&&hs.splice(i,1),Ti-=~i?1:0},a={time:r,handler:e,cancel:n};return hs.splice(Ax(r),0,a),Ti+=1,Rx(),a};let Ax=e=>~(~hs.findIndex(t=>t.time>e)||~hs.length);kt.cancel=e=>{Kd.delete(e),sp.delete(e),ip.delete(e),op.delete(e),up.delete(e)},kt.sync=e=>{cp=!0,kt.batchedUpdates(e),cp=!1},kt.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...a){t=a,kt.onStart(r)}return n.handler=e,n.cancel=()=>{Kd.delete(r),t=null},n};let lp=typeof window!="undefined"?window.requestAnimationFrame:()=>{};kt.use=e=>lp=e,kt.now=typeof performance!="undefined"?()=>performance.now():Date.now,kt.batchedUpdates=e=>e(),kt.catch=console.error,kt.frameLoop="always",kt.advance=()=>{kt.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):jx()};let Di=-1,Ti=0,cp=!1;function yl(e,t){cp?(t.delete(e),e(0)):(t.add(e),Rx())}function Rx(){Di<0&&(Di=0,kt.frameLoop!=="demand"&&lp(Fx))}function yA(){Di=-1}function Fx(){~Di&&(lp(Fx),kt.batchedUpdates(jx))}function jx(){let e=Di;Di=kt.now();let t=Ax(Di);t&&(zx(hs.splice(0,t),r=>r.handler()),Ti-=t),Kd.flush(),ip.flush(e?Math.min(64,Di-e):16.667),sp.flush(),op.flush(),up.flush(),Ti||yA()}function bl(){let e=new Set,t=e;return{add(r){Ti+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Ti-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Ti-=t.size,zx(t,n=>n(r)&&e.add(n)),Ti+=e.size,t=e)}}}function zx(e,t){e.forEach(r=>{try{t(r)}catch(n){kt.catch(n)}})}function dp(){}const bA=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),De={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 fi(e,t){if(De.arr(e)){if(!De.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}const wt=(e,t)=>e.forEach(t);function Na(e,t,r){if(De.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)}const an=e=>De.und(e)?[]:De.arr(e)?e:[e];function wl(e,t){if(e.size){const r=Array.from(e);e.clear(),wt(r,t)}}const xl=(e,...t)=>wl(e,r=>r(...t)),Hx=()=>typeof window=="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let fp,Vx,Ni=null,Bx=!1,mp=dp;var Oa=Object.freeze({__proto__:null,get createStringInterpolator(){return fp},get to(){return Vx},get colors(){return Ni},get skipAnimation(){return Bx},get willAdvance(){return mp},assign:e=>{e.to&&(Vx=e.to),e.now&&(kt.now=e.now),e.colors!==void 0&&(Ni=e.colors),e.skipAnimation!=null&&(Bx=e.skipAnimation),e.createStringInterpolator&&(fp=e.createStringInterpolator),e.requestAnimationFrame&&kt.use(e.requestAnimationFrame),e.batchedUpdates&&(kt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(mp=e.willAdvance),e.frameLoop&&(kt.frameLoop=e.frameLoop)}});const kl=new Set;let Xn=[],vp=[],Qd=0;const Jd={get idle(){return!kl.size&&!Xn.length},start(e){Qd>e.priority?(kl.add(e),kt.onStart(wA)):(Ux(e),kt(hp))},advance:hp,sort(e){if(Qd)kt.onFrame(()=>Jd.sort(e));else{const t=Xn.indexOf(e);~t&&(Xn.splice(t,1),Yx(e))}},clear(){Xn=[],kl.clear()}};function wA(){kl.forEach(Ux),kl.clear(),kt(hp)}function Ux(e){Xn.includes(e)||Yx(e)}function Yx(e){Xn.splice(xA(Xn,t=>t.priority>e.priority),0,e)}function hp(e){const t=vp;for(let r=0;r<Xn.length;r++){const n=Xn[r];Qd=n.priority,n.idle||(mp(n),n.advance(e),n.idle||t.push(n))}return Qd=0,vp=Xn,vp.length=0,Xn=t,Xn.length>0}function xA(e,t){const r=e.findIndex(t);return r<0?e.length:r}const kA={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},va="[-+]?\\d*\\.?\\d+",Zd=va+"%";function ef(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const CA=new RegExp("rgb"+ef(va,va,va)),PA=new RegExp("rgba"+ef(va,va,va,va)),SA=new RegExp("hsl"+ef(va,Zd,Zd)),MA=new RegExp("hsla"+ef(va,Zd,Zd,va)),EA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,_A=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$A=/^#([0-9a-fA-F]{6})$/,DA=/^#([0-9a-fA-F]{8})$/;function TA(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=$A.exec(e))?parseInt(t[1]+"ff",16)>>>0:Ni&&Ni[e]!==void 0?Ni[e]:(t=CA.exec(e))?(ps(t[1])<<24|ps(t[2])<<16|ps(t[3])<<8|255)>>>0:(t=PA.exec(e))?(ps(t[1])<<24|ps(t[2])<<16|ps(t[3])<<8|Gx(t[4]))>>>0:(t=EA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=DA.exec(e))?parseInt(t[1],16)>>>0:(t=_A.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=SA.exec(e))?(qx(Xx(t[1]),tf(t[2]),tf(t[3]))|255)>>>0:(t=MA.exec(e))?(qx(Xx(t[1]),tf(t[2]),tf(t[3]))|Gx(t[4]))>>>0:null}function pp(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 qx(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n,i=pp(a,n,e+1/3),o=pp(a,n,e),s=pp(a,n,e-1/3);return Math.round(i*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function ps(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Xx(e){return(parseFloat(e)%360+360)%360/360}function Gx(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function tf(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Kx(e){let t=TA(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,n=(t&16711680)>>>16,a=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${n}, ${a}, ${i})`}const Cl=(e,t,r)=>{if(De.fun(e))return e;if(De.arr(e))return Cl({range:e,output:t,extrapolate:r});if(De.str(e.output[0]))return fp(e);const n=e,a=n.output,i=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",u=n.easing||(l=>l);return l=>{const c=OA(l,i);return NA(l,i[c],i[c+1],a[c],a[c+1],u,o,s,n.map)}};function NA(e,t,r,n,a,i,o,s,u){let l=u?u(e):e;if(l<t){if(o==="identity")return l;o==="clamp"&&(l=t)}if(l>r){if(s==="identity")return l;s==="clamp"&&(l=r)}return n===a?n:t===r?e<=t?n:a:(t===-1/0?l=-l:r===1/0?l=l-t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:a===1/0?l=l+n:l=l*(a-n)+n,l)}function OA(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function gp(){return gp=Object.assign||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},gp.apply(this,arguments)}const gs=Symbol.for("FluidValue.get"),ko=Symbol.for("FluidValue.observers"),Gn=e=>Boolean(e&&e[gs]),yn=e=>e&&e[gs]?e[gs]():e,Qx=e=>e[ko]||null;function WA(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Pl(e,t){let r=e[ko];r&&r.forEach(n=>{WA(n,t)})}class Jx{constructor(t){if(this[gs]=void 0,this[ko]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");IA(this,t)}}const IA=(e,t)=>Zx(e,gs,t);function ys(e,t){if(e[gs]){let r=e[ko];r||Zx(e,ko,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Sl(e,t){let r=e[ko];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ko]=null,e.observerRemoved&&e.observerRemoved(n,t)}}const Zx=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),rf=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,LA=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ek=new RegExp(`(${rf.source})(%|[a-z]+)`,"i"),AA=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,nf=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,tk=e=>{const[t,r]=RA(e);if(!t||Hx())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const a=window.getComputedStyle(document.documentElement).getPropertyValue(r);return a||e}else{if(r&&nf.test(r))return tk(r);if(r)return r}return e},RA=e=>{const t=nf.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]};let yp;const FA=(e,t,r,n,a)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${a})`,rk=e=>{yp||(yp=Ni?new RegExp(`(${Object.keys(Ni).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>yn(i).replace(nf,tk).replace(LA,Kx).replace(yp,Kx)),r=t.map(i=>i.match(rf).map(Number)),a=r[0].map((i,o)=>r.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(i=>Cl(gp({},e,{output:i})));return i=>{var o;const s=!ek.test(t[0])&&((o=t.find(l=>ek.test(l)))==null?void 0:o.replace(rf,""));let u=0;return t[0].replace(rf,()=>`${a[u++](i)}${s||""}`).replace(AA,FA)}},bp="react-spring: ",nk=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${bp}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},jA=nk(console.warn);function zA(){jA(`${bp}The "interpolate" function is deprecated in v9 (use "to" instead)`)}const HA=nk(console.warn);function VA(){HA(`${bp}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 af(e){return De.str(e)&&(e[0]=="#"||/\d/.test(e)||!Hx()&&nf.test(e)||e in(Ni||{}))}const of=e=>w.useEffect(e,BA),BA=[];function wp(){const e=w.useState()[1],t=w.useState(UA)[0];return of(t.unmount),()=>{t.current&&e({})}}function UA(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function YA(e,t){const[r]=w.useState(()=>({inputs:t,result:e()})),n=w.useRef(),a=n.current;let i=a;return i?Boolean(t&&i.inputs&&qA(t,i.inputs))||(i={inputs:t,result:e()}):i=r,w.useEffect(()=>{n.current=i,a==r&&(r.inputs=r.result=void 0)},[i]),i.result}function qA(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}function xp(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}const bs=typeof window!="undefined"&&window.document&&window.document.createElement?b.useLayoutEffect:b.useEffect,Ml=Symbol.for("Animated:node"),XA=e=>!!e&&e[Ml]===e,Wa=e=>e&&e[Ml],kp=(e,t)=>bA(e,Ml,t),sf=e=>e&&e[Ml]&&e[Ml].getPayload();class ak{constructor(){this.payload=void 0,kp(this,this)}getPayload(){return this.payload||[]}}class ws extends ak{constructor(t){super();this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,De.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new ws(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return De.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,De.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}}class xs extends ws{constructor(t){super(0);this._string=null,this._toString=void 0,this._toString=Cl({output:[t,t]})}static create(t){return new xs(t)}getValue(){let t=this._string;return t==null?this._string=this._toString(this._value):t}setValue(t){if(De.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=Cl({output:[this.getValue(),t]})),this._value=0,super.reset()}}const uf={dependencies:null};class lf extends ak{constructor(t){super();this.source=t,this.setValue(t)}getValue(t){const r={};return Na(this.source,(n,a)=>{XA(n)?r[a]=n.getValue(t):Gn(n)?r[a]=yn(n):t||(r[a]=n)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&wt(this.payload,t=>t.reset())}_makePayload(t){if(t){const r=new Set;return Na(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){uf.dependencies&&Gn(t)&&uf.dependencies.add(t);const r=sf(t);r&&wt(r,n=>this.add(n))}}class Cp extends lf{constructor(t){super(t)}static create(t){return new Cp(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const r=this.getPayload();return t.length==r.length?r.map((n,a)=>n.setValue(t[a])).some(Boolean):(super.setValue(t.map(GA)),!0)}}function GA(e){return(af(e)?xs:ws).create(e)}function Pp(e){const t=Wa(e);return t?t.constructor:De.arr(e)?Cp:af(e)?xs:ws}function cf(){return cf=Object.assign||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},cf.apply(this,arguments)}const ik=(e,t)=>{const r=!De.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((n,a)=>{const i=w.useRef(null),o=r&&w.useCallback(v=>{i.current=JA(a,v)},[a]),[s,u]=QA(n,t),l=wp(),c=()=>{const v=i.current;if(r&&!v)return;(v?t.applyAnimatedValues(v,s.getValue(!0)):!1)===!1&&l()},d=new KA(c,u),f=w.useRef();bs(()=>{const v=f.current;f.current=d,wt(u,p=>ys(p,d)),v&&(wt(v.deps,p=>Sl(p,v)),kt.cancel(v.update))}),w.useEffect(c,[]),of(()=>()=>{const v=f.current;wt(v.deps,p=>Sl(p,v))});const m=t.getComponentProps(s.getValue());return b.createElement(e,cf({},m,{ref:o}))})};class KA{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&kt.write(this.update)}}function QA(e,t){const r=new Set;return uf.dependencies=r,e.style&&(e=cf({},e,{style:t.createAnimatedStyle(e.style)})),e=new lf(e),uf.dependencies=null,[e,r]}function JA(e,t){return e&&(De.fun(e)?e(t):e.current=t),t}const ok=Symbol.for("AnimatedComponent"),ZA=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=a=>new lf(a),getComponentProps:n=a=>a}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=o=>{const s=sk(o)||"Anonymous";return De.str(o)?o=i[o]||(i[o]=ik(o,a)):o=o[ok]||(o[ok]=ik(o,a)),o.displayName=`Animated(${s})`,o};return Na(e,(o,s)=>{De.arr(e)&&(s=sk(o)),i[s]=i(o)}),{animated:i}},sk=e=>De.str(e)?e:e&&De.str(e.displayName)?e.displayName:De.fun(e)&&e.name||null;function gr(){return gr=Object.assign||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},gr.apply(this,arguments)}function bn(e,...t){return De.fun(e)?e(...t):e}const El=(e,t)=>e===!0||!!(t&&e&&(De.fun(e)?e(t):an(e).includes(t))),uk=(e,t)=>De.obj(e)?t&&e[t]:e,lk=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,e6=e=>e,df=(e,t=e6)=>{let r=t6;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const a of r){const i=t(e[a],a);De.und(i)||(n[a]=i)}return n},t6=["config","onProps","onStart","onChange","onPause","onResume","onRest"],r6={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 n6(e){const t={};let r=0;if(Na(e,(n,a)=>{r6[a]||(t[a]=n,r++)}),r)return t}function Sp(e){const t=n6(e);if(t){const r={to:t};return Na(e,(n,a)=>a in t||(r[a]=n)),r}return gr({},e)}function _l(e){return e=yn(e),De.arr(e)?e.map(_l):af(e)?Oa.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function ck(e){for(const t in e)return!0;return!1}function Mp(e){return De.fun(e)||De.arr(e)&&De.obj(e[0])}function Ep(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function dk(e,t){if(t&&e.ref!==t){var r;(r=e.ref)==null||r.delete(e),t.add(e),e.ref=t}}const _p={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},ff=1.70158,mf=ff*1.525,fk=ff+1,mk=2*Math.PI/3,vk=2*Math.PI/4.5,vf=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,a6={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>fk*e*e*e-ff*e*e,easeOutBack:e=>1+fk*Math.pow(e-1,3)+ff*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((mf+1)*2*e-mf)/2:(Math.pow(2*e-2,2)*((mf+1)*(e*2-2)+mf)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*mk),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*mk)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*vk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*vk)/2+1,easeInBounce:e=>1-vf(1-e),easeOutBounce:vf,easeInOutBounce:e=>e<.5?(1-vf(1-2*e))/2:(1+vf(2*e-1))/2},$p=gr({},_p.default,{mass:1,damping:1,easing:a6.linear,clamp:!1});class i6{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,$p)}}function o6(e,t,r){r&&(r=gr({},r),hk(r,t),t=gr({},r,t)),hk(e,t),Object.assign(e,t);for(const o in $p)e[o]==null&&(e[o]=$p[o]);let{mass:n,frequency:a,damping:i}=e;return De.und(a)||(a<.01&&(a=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/a,2)*n,e.friction=4*Math.PI*i*n/a),e}function hk(e,t){if(!De.und(t.decay))e.duration=void 0;else{const r=!De.und(t.tension)||!De.und(t.friction);(r||!De.und(t.frequency)||!De.und(t.damping)||!De.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}const pk=[];class s6{constructor(){this.changed=!1,this.values=pk,this.toValues=null,this.fromValues=pk,this.to=void 0,this.from=void 0,this.config=new i6,this.immediate=!1}}function gk(e,{key:t,props:r,defaultProps:n,state:a,actions:i}){return new Promise((o,s)=>{var u;let l,c,d=El((u=r.cancel)!=null?u:n==null?void 0:n.cancel,t);if(d)v();else{De.und(r.pause)||(a.paused=El(r.pause,t));let p=n==null?void 0:n.pause;p!==!0&&(p=a.paused||El(p,t)),l=bn(r.delay||0,t),p?(a.resumeQueue.add(m),i.pause()):(i.resume(),m())}function f(){a.resumeQueue.add(m),a.timeouts.delete(c),c.cancel(),l=c.time-kt.now()}function m(){l>0&&!Oa.skipAnimation?(a.delayed=!0,c=kt.setTimeout(v,l),a.pauseQueue.add(f),a.timeouts.add(c)):v()}function v(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(f),a.timeouts.delete(c),e<=(a.cancelId||0)&&(d=!0);try{i.start(gr({},r,{callId:e,cancel:d}),o)}catch(p){s(p)}}})}const Dp=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?ks(e.get()):t.every(r=>r.noop)?yk(e.get()):ha(e.get(),t.every(r=>r.finished)),yk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ha=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),ks=e=>({value:e,cancelled:!0,finished:!1});function bk(e,t,r,n){const{callId:a,parentId:i,onRest:o}=t,{asyncTo:s,promise:u}=r;return!i&&e===s&&!t.reset?u:r.promise=(async()=>{r.asyncId=a,r.asyncTo=e;const l=df(t,(g,y)=>y==="onRest"?void 0:g);let c,d;const f=new Promise((g,y)=>(c=g,d=y)),m=g=>{const y=a<=(r.cancelId||0)&&ks(n)||a!==r.asyncId&&ha(n,!1);if(y)throw g.result=y,d(g),g},v=(g,y)=>{const x=new wk,C=new xk;return(async()=>{if(Oa.skipAnimation)throw $l(r),C.result=ha(n,!1),d(C),C;m(x);const k=De.obj(g)?gr({},g):gr({},y,{to:g});k.parentId=a,Na(l,(P,T)=>{De.und(k[T])&&(k[T]=P)});const S=await n.start(k);return m(x),r.paused&&await new Promise(P=>{r.resumeQueue.add(P)}),S})()};let p;if(Oa.skipAnimation)return $l(r),ha(n,!1);try{let g;De.arr(e)?g=(async y=>{for(const x of y)await v(x)})(e):g=Promise.resolve(e(v,n.stop.bind(n))),await Promise.all([g.then(c),f]),p=ha(n.get(),!0,!1)}catch(g){if(g instanceof wk)p=g.result;else if(g instanceof xk)p=g.result;else throw g}finally{a==r.asyncId&&(r.asyncId=i,r.asyncTo=i?s:void 0,r.promise=i?u:void 0)}return De.fun(o)&&kt.batchedUpdates(()=>{o(p,n,n.item)}),p})()}function $l(e,t){wl(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class wk 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.");this.result=void 0}}class xk extends Error{constructor(){super("SkipAnimationSignal");this.result=void 0}}const Tp=e=>e instanceof Np;let u6=1;class Np extends Jx{constructor(...t){super(...t);this.id=u6++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Wa(this);return t&&t.getValue()}to(...t){return Oa.to(this,t)}interpolate(...t){return zA(),Oa.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){Pl(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||Jd.sort(this),Pl(this,{type:"priority",parent:this,priority:t})}}const Co=Symbol.for("SpringPhase"),kk=1,Op=2,Wp=4,Ip=e=>(e[Co]&kk)>0,Oi=e=>(e[Co]&Op)>0,Dl=e=>(e[Co]&Wp)>0,Ck=(e,t)=>t?e[Co]|=Op|kk:e[Co]&=~Op,Pk=(e,t)=>t?e[Co]|=Wp:e[Co]&=~Wp;class l6 extends Np{constructor(t,r){super();if(this.key=void 0,this.animation=new s6,this.queue=void 0,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,!De.und(t)||!De.und(r)){const n=De.obj(t)?gr({},t):gr({},r,{from:t});De.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Oi(this)||this._state.asyncTo)||Dl(this)}get goal(){return yn(this.animation.to)}get velocity(){const t=Wa(this);return t instanceof ws?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return Ip(this)}get isAnimating(){return Oi(this)}get isPaused(){return Dl(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,n=!1;const a=this.animation;let{config:i,toValues:o}=a;const s=sf(a.to);!s&&Gn(a.to)&&(o=an(yn(a.to))),a.values.forEach((c,d)=>{if(c.done)return;const f=c.constructor==xs?1:s?s[d].lastPosition:o[d];let m=a.immediate,v=f;if(!m){if(v=c.lastPosition,i.tension<=0){c.done=!0;return}let p=c.elapsedTime+=t;const g=a.fromValues[d],y=c.v0!=null?c.v0:c.v0=De.arr(i.velocity)?i.velocity[d]:i.velocity;let x;if(De.und(i.duration))if(i.decay){const C=i.decay===!0?.998:i.decay,k=Math.exp(-(1-C)*p);v=g+y/(1-C)*(1-k),m=Math.abs(c.lastPosition-v)<.1,x=y*k}else{x=c.lastVelocity==null?y:c.lastVelocity;const C=i.precision||(g==f?.005:Math.min(1,Math.abs(f-g)*.001)),k=i.restVelocity||C/10,S=i.clamp?0:i.bounce,P=!De.und(S),T=g==f?c.v0>0:g<f;let $,I=!1;const W=1,_=Math.ceil(t/W);for(let R=0;R<_&&($=Math.abs(x)>k,!(!$&&(m=Math.abs(f-v)<=C,m)));++R){P&&(I=v==f||v>f==T,I&&(x=-x*S,v=f));const E=-i.tension*1e-6*(v-f),M=-i.friction*.001*x,D=(E+M)/i.mass;x=x+D*W,v=v+x*W}}else{let C=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,c.durationProgress>0&&(c.elapsedTime=i.duration*c.durationProgress,p=c.elapsedTime+=t)),C=(i.progress||0)+p/this._memoizedDuration,C=C>1?1:C<0?0:C,c.durationProgress=C),v=g+i.easing(C)*(f-g),x=(v-c.lastPosition)/t,m=C==1}c.lastVelocity=x,Number.isNaN(v)&&(console.warn("Got NaN while animating:",this),m=!0)}s&&!s[d].done&&(m=!1),m?c.done=!0:r=!1,c.setValue(v,i.round)&&(n=!0)});const u=Wa(this),l=u.getValue();if(r){const c=yn(a.to);(l!==c||n)&&!i.decay?(u.setValue(c),this._onChange(c)):n&&i.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(t){return kt.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Oi(this)){const{to:t,config:r}=this.animation;kt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let n;return De.und(t)?(n=this.queue||[],this.queue=[]):n=[De.obj(t)?t:gr({},r,{to:t})],Promise.all(n.map(a=>this._update(a))).then(a=>Dp(this,a))}stop(t){const{to:r}=this.animation;return this._focus(this.get()),$l(this._state,t&&this._lastCallId),kt.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){const r=this.key||"";let{to:n,from:a}=t;n=De.obj(n)?n[r]:n,(n==null||Mp(n))&&(n=void 0),a=De.obj(a)?a[r]:a,a==null&&(a=void 0);const i={to:n,from:a};return Ip(this)||(t.reverse&&([n,a]=[a,n]),a=yn(a),De.und(a)?Wa(this)||this._set(n):this._set(a)),i}_update(t,r){let n=gr({},t);const{key:a,defaultProps:i}=this;n.default&&Object.assign(i,df(n,(u,l)=>/^on/.test(l)?uk(u,a):u)),Ek(this,n,"onProps"),Ol(this,"onProps",n,this);const o=this._prepareNode(n);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 gk(++this._lastCallId,{key:a,props:n,defaultProps:i,state:s,actions:{pause:()=>{Dl(this)||(Pk(this,!0),xl(s.pauseQueue),Ol(this,"onPause",ha(this,Tl(this,this.animation.to)),this))},resume:()=>{Dl(this)&&(Pk(this,!1),Oi(this)&&this._resume(),xl(s.resumeQueue),Ol(this,"onResume",ha(this,Tl(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(u=>{if(n.loop&&u.finished&&!(r&&u.noop)){const l=Sk(n);if(l)return this._update(l,!0)}return u})}_merge(t,r,n){if(r.cancel)return this.stop(!0),n(ks(this));const a=!De.und(t.to),i=!De.und(t.from);if(a||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return n(ks(this));const{key:o,defaultProps:s,animation:u}=this,{to:l,from:c}=u;let{to:d=l,from:f=c}=t;i&&!a&&(!r.default||De.und(d))&&(d=f),r.reverse&&([d,f]=[f,d]);const m=!fi(f,c);m&&(u.from=f),f=yn(f);const v=!fi(d,l);v&&this._focus(d);const p=Mp(r.to),{config:g}=u,{decay:y,velocity:x}=g;(a||i)&&(g.velocity=0),r.config&&!p&&o6(g,bn(r.config,o),r.config!==s.config?bn(s.config,o):void 0);let C=Wa(this);if(!C||De.und(d))return n(ha(this,!0));const k=De.und(r.reset)?i&&!r.default:!De.und(f)&&El(r.reset,o),S=k?f:this.get(),P=_l(d),T=De.num(P)||De.arr(P)||af(P),$=!p&&(!T||El(s.immediate||r.immediate,o));if(v){const R=Pp(d);if(R!==C.constructor)if($)C=this._set(P);else throw Error(`Cannot animate between ${C.constructor.name} and ${R.name}, as the "to" prop suggests`)}const I=C.constructor;let W=Gn(d),_=!1;if(!W){const R=k||!Ip(this)&&m;(v||R)&&(_=fi(_l(S),P),W=!_),(!fi(u.immediate,$)&&!$||!fi(g.decay,y)||!fi(g.velocity,x))&&(W=!0)}if(_&&Oi(this)&&(u.changed&&!k?W=!0:W||this._stop(l)),!p&&((W||Gn(l))&&(u.values=C.getPayload(),u.toValues=Gn(d)?null:I==xs?[1]:an(P)),u.immediate!=$&&(u.immediate=$,!$&&!k&&this._set(l)),W)){const{onRest:R}=u;wt(d6,M=>Ek(this,r,M));const E=ha(this,Tl(this,l));xl(this._pendingCalls,E),this._pendingCalls.add(n),u.changed&&kt.batchedUpdates(()=>{u.changed=!k,R==null||R(E,this),k?bn(s.onRest,E):u.onStart==null||u.onStart(E,this)})}k&&this._set(S),p?n(bk(r.to,r,this._state,this)):W?this._start():Oi(this)&&!v?this._pendingCalls.add(n):n(yk(S))}_focus(t){const r=this.animation;t!==r.to&&(Qx(this)&&this._detach(),r.to=t,Qx(this)&&this._attach())}_attach(){let t=0;const{to:r}=this.animation;Gn(r)&&(ys(r,this),Tp(r)&&(t=r.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Gn(t)&&Sl(t,this)}_set(t,r=!0){const n=yn(t);if(!De.und(n)){const a=Wa(this);if(!a||!fi(n,a.getValue())){const i=Pp(n);!a||a.constructor!=i?kp(this,i.create(n)):a.setValue(n),a&&kt.batchedUpdates(()=>{this._onChange(n,r)})}}return Wa(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,Ol(this,"onStart",ha(this,Tl(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),bn(this.animation.onChange,t,this)),bn(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){const t=this.animation;Wa(this).reset(yn(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Oi(this)||(Ck(this,!0),Dl(this)||this._resume())}_resume(){Oa.skipAnimation?this.finish():Jd.start(this)}_stop(t,r){if(Oi(this)){Ck(this,!1);const n=this.animation;wt(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Pl(this,{type:"idle",parent:this});const a=r?ks(this.get()):ha(this.get(),Tl(this,t!=null?t:n.to));xl(this._pendingCalls,a),n.changed&&(n.changed=!1,Ol(this,"onRest",a,this))}}}function Tl(e,t){const r=_l(t),n=_l(e.get());return fi(n,r)}function Sk(e,t=e.loop,r=e.to){let n=bn(t);if(n){const a=n!==!0&&Sp(n),i=(a||e).reverse,o=!a||a.reset;return Nl(gr({},e,{loop:t,default:!1,pause:void 0,to:!i||Mp(r)?r:void 0,from:o?e.from:void 0,reset:o},a))}}function Nl(e){const{to:t,from:r}=e=Sp(e),n=new Set;return De.obj(t)&&Mk(t,n),De.obj(r)&&Mk(r,n),e.keys=n.size?Array.from(n):null,e}function c6(e){const t=Nl(e);return De.und(t.default)&&(t.default=df(t)),t}function Mk(e,t){Na(e,(r,n)=>r!=null&&t.add(n))}const d6=["onStart","onRest","onChange","onPause","onResume"];function Ek(e,t,r){e.animation[r]=t[r]!==lk(t,r)?uk(t[r],e.key):void 0}function Ol(e,t,...r){var n,a,i,o;(n=(a=e.animation)[t])==null||n.call(a,...r),(i=(o=e.defaultProps)[t])==null||i.call(o,...r)}const f6=["onStart","onChange","onRest"];let m6=1;class _k{constructor(t,r){this.id=m6++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,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(gr({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];De.und(n)||this.springs[r].set(n)}}update(t){return t&&this.queue.push(Nl(t)),this}start(t){let{queue:r}=this;return t?r=an(t).map(Nl):this.queue=[],this._flush?this._flush(this,r):(Ok(this,r),Lp(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){const n=this.springs;wt(an(r),a=>n[a].stop(!!t))}else $l(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(De.und(t))this.start({pause:!0});else{const r=this.springs;wt(an(t),n=>r[n].pause())}return this}resume(t){if(De.und(t))this.start({pause:!1});else{const r=this.springs;wt(an(t),n=>r[n].resume())}return this}each(t){Na(this.springs,t)}_onFrame(){const{onStart:t,onChange:r,onRest:n}=this._events,a=this._active.size>0,i=this._changed.size>0;(a&&!this._started||i&&!this._started)&&(this._started=!0,wl(t,([u,l])=>{l.value=this.get(),u(l,this,this._item)}));const o=!a&&this._started,s=i||o&&n.size?this.get():null;i&&r.size&&wl(r,([u,l])=>{l.value=s,u(l,this,this._item)}),o&&(this._started=!1,wl(n,([u,l])=>{l.value=s,u(l,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;kt.onFrame(this._onFrame)}}function Lp(e,t){return Promise.all(t.map(r=>$k(e,r))).then(r=>Dp(e,r))}async function $k(e,t,r){const{keys:n,to:a,from:i,loop:o,onRest:s,onResolve:u}=t,l=De.obj(t.default)&&t.default;o&&(t.loop=!1),a===!1&&(t.to=null),i===!1&&(t.from=null);const c=De.arr(a)||De.fun(a)?a:void 0;c?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):wt(f6,p=>{const g=t[p];if(De.fun(g)){const y=e._events[p];t[p]=({finished:x,cancelled:C})=>{const k=y.get(g);k?(x||(k.finished=!1),C&&(k.cancelled=!0)):y.set(g,{value:null,finished:x||!1,cancelled:C||!1})},l&&(l[p]=t[p])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,xl(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(n||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),m=t.cancel===!0||lk(t,"cancel")===!0;(c||m&&d.asyncId)&&f.push(gk(++e._lastAsyncId,{props:t,state:d,actions:{pause:dp,resume:dp,start(p,g){m?($l(d,e._lastAsyncId),g(ks(e))):(p.onRest=s,g(bk(c,p,d,e)))}}})),d.paused&&await new Promise(p=>{d.resumeQueue.add(p)});const v=Dp(e,await Promise.all(f));if(o&&v.finished&&!(r&&v.noop)){const p=Sk(t,o,a);if(p)return Ok(e,[p]),$k(e,p,!0)}return u&&kt.batchedUpdates(()=>u(v,e,e.item)),v}function Ap(e,t){const r=gr({},e.springs);return t&&wt(an(t),n=>{De.und(n.keys)&&(n=Nl(n)),De.obj(n.to)||(n=gr({},n,{to:void 0})),Nk(r,n,a=>Tk(a))}),Dk(e,r),r}function Dk(e,t){Na(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,ys(r,e))})}function Tk(e,t){const r=new l6;return r.key=e,t&&ys(r,t),r}function Nk(e,t,r){t.keys&&wt(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function Ok(e,t){wt(t,r=>{Nk(e.springs,r,n=>Tk(n,e))})}function v6(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const h6=["children"],Wl=e=>{let{children:t}=e,r=v6(e,h6);const n=w.useContext(hf),a=r.pause||!!n.pause,i=r.immediate||!!n.immediate;r=YA(()=>({pause:a,immediate:i}),[a,i]);const{Provider:o}=hf;return b.createElement(o,{value:r},t)},hf=p6(Wl,{});Wl.Provider=hf.Provider,Wl.Consumer=hf.Consumer;function p6(e,t){return Object.assign(e,b.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}const Wk=()=>{const e=[],t=function(a){VA();const i=[];return wt(e,(o,s)=>{if(De.und(a))i.push(o.start());else{const u=r(a,o,s);u&&i.push(o.start(u))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const a=e.indexOf(n);~a&&e.splice(a,1)},t.pause=function(){return wt(e,n=>n.pause(...arguments)),this},t.resume=function(){return wt(e,n=>n.resume(...arguments)),this},t.set=function(n){wt(e,a=>a.set(n))},t.start=function(n){const a=[];return wt(e,(i,o)=>{if(De.und(n))a.push(i.start());else{const s=this._getProps(n,i,o);s&&a.push(i.start(s))}}),a},t.stop=function(){return wt(e,n=>n.stop(...arguments)),this},t.update=function(n){return wt(e,(a,i)=>a.update(this._getProps(n,a,i))),this};const r=function(a,i,o){return De.fun(a)?a(o,i):a};return t._getProps=r,t};function g6(e,t,r){const n=De.fun(t)&&t;n&&!r&&(r=[]);const a=w.useMemo(()=>n||arguments.length==3?Wk():void 0,[]),i=w.useRef(0),o=wp(),s=w.useMemo(()=>({ctrls:[],queue:[],flush(y,x){const C=Ap(y,x);return i.current>0&&!s.queue.length&&!Object.keys(C).some(S=>!y.springs[S])?Lp(y,x):new Promise(S=>{Dk(y,C),s.queue.push(()=>{S(Lp(y,x))}),o()})}}),[]),u=w.useRef([...s.ctrls]),l=[],c=xp(e)||0;w.useMemo(()=>{wt(u.current.slice(e,c),y=>{Ep(y,a),y.stop(!0)}),u.current.length=e,d(c,e)},[e]),w.useMemo(()=>{d(0,Math.min(c,e))},r);function d(y,x){for(let C=y;C<x;C++){const k=u.current[C]||(u.current[C]=new _k(null,s.flush)),S=n?n(C,k):t[C];S&&(l[C]=c6(S))}}const f=u.current.map((y,x)=>Ap(y,l[x])),m=w.useContext(Wl),v=xp(m),p=m!==v&&ck(m);bs(()=>{i.current++,s.ctrls=u.current;const{queue:y}=s;y.length&&(s.queue=[],wt(y,x=>x())),wt(u.current,(x,C)=>{a==null||a.add(x),p&&x.start({default:m});const k=l[C];k&&(dk(x,k.ref),x.ref?x.queue.push(k):x.start(k))})}),of(()=>()=>{wt(s.ctrls,y=>y.stop(!0))});const g=f.map(y=>gr({},y));return a?[g,a]:g}function y6(e,t){const r=De.fun(e),[[n],a]=g6(1,r?e:[e],r?t||[]:t);return r||arguments.length==2?[n,a]:n}let on;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(on||(on={}));function Rp(e,t,r){const n=De.fun(t)&&t,{reset:a,sort:i,trail:o=0,expires:s=!0,exitBeforeEnter:u=!1,onDestroyed:l,ref:c,config:d}=n?n():t,f=w.useMemo(()=>n||arguments.length==3?Wk():void 0,[]),m=an(e),v=[],p=w.useRef(null),g=a?null:p.current;bs(()=>{p.current=v}),of(()=>()=>{wt(p.current,M=>{M.expired&&clearTimeout(M.expirationId),Ep(M.ctrl,f),M.ctrl.stop(!0)})});const y=w6(m,n?n():t,g),x=a&&p.current||[];bs(()=>wt(x,({ctrl:M,item:D,key:A})=>{Ep(M,f),bn(l,D,A)}));const C=[];if(g&&wt(g,(M,D)=>{M.expired?(clearTimeout(M.expirationId),x.push(M)):(D=C[D]=y.indexOf(M.key),~D&&(v[D]=M))}),wt(m,(M,D)=>{v[D]||(v[D]={key:y[D],item:M,phase:on.MOUNT,ctrl:new _k},v[D].ctrl.item=M)}),C.length){let M=-1;const{leave:D}=n?n():t;wt(C,(A,j)=>{const H=g[j];~A?(M=v.indexOf(H),v[M]=gr({},H,{item:m[A]})):D&&v.splice(++M,0,H)})}De.fun(i)&&v.sort((M,D)=>i(M.item,D.item));let k=-o;const S=wp(),P=df(t),T=new Map,$=w.useRef(new Map),I=w.useRef(!1);wt(v,(M,D)=>{const A=M.key,j=M.phase,H=n?n():t;let z,U,Q=bn(H.delay||0,A);if(j==on.MOUNT)z=H.enter,U=on.ENTER;else{const ae=y.indexOf(A)<0;if(j!=on.LEAVE)if(ae)z=H.leave,U=on.LEAVE;else if(z=H.update)U=on.UPDATE;else return;else if(!ae)z=H.enter,U=on.ENTER;else return}if(z=bn(z,M.item,D),z=De.obj(z)?Sp(z):{to:z},!z.config){const ae=d||P.config;z.config=bn(ae,M.item,D,U)}k+=o;const X=gr({},P,{delay:Q+k,ref:c,immediate:H.immediate,reset:!1},z);if(U==on.ENTER&&De.und(X.from)){const ae=n?n():t,ce=De.und(ae.initial)||g?ae.from:ae.initial;X.from=bn(ce,M.item,D)}const{onResolve:G}=X;X.onResolve=ae=>{bn(G,ae);const ce=p.current,ve=ce.find(le=>le.key===A);if(!!ve&&!(ae.cancelled&&ve.phase!=on.UPDATE)&&ve.ctrl.idle){const le=ce.every(oe=>oe.ctrl.idle);if(ve.phase==on.LEAVE){const oe=bn(s,ve.item);if(oe!==!1){const pe=oe===!0?0:oe;if(ve.expired=!0,!le&&pe>0){pe<=2147483647&&(ve.expirationId=setTimeout(S,pe));return}}}le&&ce.some(oe=>oe.expired)&&($.current.delete(ve),u&&(I.current=!0),S())}};const Z=Ap(M.ctrl,X);U===on.LEAVE&&u?$.current.set(M,{phase:U,springs:Z,payload:X}):T.set(M,{phase:U,springs:Z,payload:X})});const W=w.useContext(Wl),_=xp(W),R=W!==_&&ck(W);bs(()=>{R&&wt(v,M=>{M.ctrl.start({default:W})})},[W]),wt(T,(M,D)=>{if($.current.size){const A=v.findIndex(j=>j.key===D.key);v.splice(A,1)}}),bs(()=>{wt($.current.size?$.current:T,({phase:M,payload:D},A)=>{const{ctrl:j}=A;A.phase=M,f==null||f.add(j),R&&M==on.ENTER&&j.start({default:W}),D&&(dk(j,D.ref),j.ref&&!I.current?j.update(D):(j.start(D),I.current&&(I.current=!1)))})},a?void 0:r);const E=M=>b.createElement(b.Fragment,null,v.map((D,A)=>{const{springs:j}=T.get(D)||D.ctrl,H=M(gr({},j),D.item,D,A);return H&&H.type?b.createElement(H.type,gr({},H.props,{key:De.str(D.key)||De.num(D.key)?D.key:D.ctrl.id,ref:H.ref})):H}));return f?[E,f]:E}let b6=1;function w6(e,{key:t,keys:r=t},n){if(r===null){const a=new Set;return e.map(i=>{const o=n&&n.find(s=>s.item===i&&s.phase!==on.LEAVE&&!a.has(s));return o?(a.add(o),o.key):b6++})}return De.und(r)?e:De.fun(r)?e.map(r):an(r)}class x6 extends Np{constructor(t,r){super();this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Cl(...r);const n=this._get(),a=Pp(n);kp(this,a.create(n))}advance(t){const r=this._get(),n=this.get();fi(r,n)||(Wa(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&Ik(this._active)&&Fp(this)}_get(){const t=De.arr(this.source)?this.source.map(yn):an(yn(this.source));return this.calc(...t)}_start(){this.idle&&!Ik(this._active)&&(this.idle=!1,wt(sf(this),t=>{t.done=!1}),Oa.skipAnimation?(kt.batchedUpdates(()=>this.advance()),Fp(this)):Jd.start(this))}_attach(){let t=1;wt(an(this.source),r=>{Gn(r)&&ys(r,this),Tp(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){wt(an(this.source),t=>{Gn(t)&&Sl(t,this)}),this._active.clear(),Fp(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=an(this.source).reduce((r,n)=>Math.max(r,(Tp(n)?n.priority:0)+1),0))}}function k6(e){return e.idle!==!1}function Ik(e){return!e.size||Array.from(e).every(k6)}function Fp(e){e.idle||(e.idle=!0,wt(sf(e),t=>{t.done=!0}),Pl(e,{type:"idle",parent:e}))}Oa.assign({createStringInterpolator:rk,to:(e,t)=>new x6(e,t)});function jp(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const C6=["style","children","scrollTop","scrollLeft"],Lk=/^--/;function P6(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Lk.test(e)&&!(Il.hasOwnProperty(e)&&Il[e])?t+"px":(""+t).trim()}const Ak={};function S6(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",n=t,{style:a,children:i,scrollTop:o,scrollLeft:s}=n,u=jp(n,C6),l=Object.values(u),c=Object.keys(u).map(d=>r||e.hasAttribute(d)?d:Ak[d]||(Ak[d]=d.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));i!==void 0&&(e.textContent=i);for(let d in a)if(a.hasOwnProperty(d)){const f=P6(d,a[d]);Lk.test(d)?e.style.setProperty(d,f):e.style[d]=f}c.forEach((d,f)=>{e.setAttribute(d,l[f])}),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s)}let Il={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};const M6=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),E6=["Webkit","Ms","Moz","O"];Il=Object.keys(Il).reduce((e,t)=>(E6.forEach(r=>e[M6(r,t)]=e[t]),e),Il);const _6=["x","y","z"],$6=/^(matrix|translate|scale|rotate|skew)/,D6=/^(translate)/,T6=/^(rotate|skew)/,zp=(e,t)=>De.num(e)&&e!==0?e+t:e,pf=(e,t)=>De.arr(e)?e.every(r=>pf(r,t)):De.num(e)?e===t:parseFloat(e)===t;class N6 extends lf{constructor(t){let{x:r,y:n,z:a}=t,i=jp(t,_6);const o=[],s=[];(r||n||a)&&(o.push([r||0,n||0,a||0]),s.push(u=>[`translate3d(${u.map(l=>zp(l,"px")).join(",")})`,pf(u,0)])),Na(i,(u,l)=>{if(l==="transform")o.push([u||""]),s.push(c=>[c,c===""]);else if($6.test(l)){if(delete i[l],De.und(u))return;const c=D6.test(l)?"px":T6.test(l)?"deg":"";o.push(an(u)),s.push(l==="rotate3d"?([d,f,m,v])=>[`rotate3d(${d},${f},${m},${zp(v,c)})`,pf(v,0)]:d=>[`${l}(${d.map(f=>zp(f,c)).join(",")})`,pf(d,l.startsWith("scale")?1:0)])}}),o.length&&(i.transform=new O6(o,s));super(i)}}class O6 extends Jx{constructor(t,r){super();this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return wt(this.inputs,(n,a)=>{const i=yn(n[0]),[o,s]=this.transforms[a](De.arr(i)?i:n.map(yn));t+=" "+o,r=r&&s}),r?"none":t}observerAdded(t){t==1&&wt(this.inputs,r=>wt(r,n=>Gn(n)&&ys(n,this)))}observerRemoved(t){t==0&&wt(this.inputs,r=>wt(r,n=>Gn(n)&&Sl(n,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Pl(this,t)}}const W6=["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"],I6=["scrollTop","scrollLeft"];Oa.assign({batchedUpdates:ir.unstable_batchedUpdates,createStringInterpolator:rk,colors:kA});const gf=ZA(W6,{applyAnimatedValues:S6,createAnimatedStyle:e=>new N6(e),getComponentProps:e=>jp(e,I6)}).animated;var $n=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Hp(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var Rk={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var o=typeof i;if(o==="string"||o==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(o==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Rk);v