@g4rcez/components 2.2.4 → 2.2.6
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/components/floating/modal.d.ts +4 -55
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.jsx +5 -7
- package/dist/hooks/use-form.d.ts +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12561 -11767
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +24 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +17 -18
package/dist/index.umd.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
(function(ie,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ie=typeof globalThis<"u"?globalThis:ie||self,S(ie.components={},ie.React,ie["react/jsx-runtime"],ie.ReactDOM))})(this,(function(ie,S,m,Li){"use strict";function Wh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Wh(S),jn=Wh(Li);function qh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Uh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qh(e))&&(r&&(r+=" "),r+=t);return r}const Gh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yh=Uh,Ao=(e,t)=>n=>{var r;if(t?.variants==null)return Yh(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=Gh(u)||Gh(d);return o[c][f]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[g,h]=v;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,f]:c},[]);return Yh(e,a,l,n?.class,n?.className)};var Kh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tC(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var yc,Xh;function Po(){return Xh||(Xh=1,yc=TypeError),yc}const nC=tC(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var bc,Qh;function Xa(){if(Qh)return bc;Qh=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(U){return U.__proto__}:null);function k(U,Z){if(U===1/0||U===-1/0||U!==U||U&&U>-1e3&&U<1e3||I.call(/e/,Z))return Z;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof U=="number"){var Ge=U<0?-_(-U):_(U);if(Ge!==U){var Ze=String(Ge),Ne=b.call(Z,Ze.length+1);return x.call(Ze,Oe,"$&_")+"."+x.call(x.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(Z,Oe,"$&_")}var L=nC,$=L.custom,B=ae($)?$:null,q={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};bc=function U(Z,Oe,Ge,Ze){var Ne=Oe||{};if(te(Ne,"quoteStyle")&&!te(q,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var it=te(Ne,"customInspect")?Ne.customInspect:!0;if(typeof it!="boolean"&&it!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mt=Ne.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return ce(Z,Ne);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var at=String(Z);return mt?k(Z,at):at}if(typeof Z=="bigint"){var vn=String(Z)+"n";return mt?k(Z,vn):vn}var Yr=typeof Ne.depth>"u"?5:Ne.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=Yr&&Yr>0&&typeof Z=="object")return ee(Z)?"[Array]":"[Object]";var Kr=ht(Ne,Ge);if(typeof Ze>"u")Ze=[];else if(ve(Ze,Z)>=0)return"[Circular]";function Cn(Fi,vc,TH){if(vc&&(Ze=P.call(Ze),Ze.push(vc)),TH){var eC={depth:Ne.depth};return te(Ne,"quoteStyle")&&(eC.quoteStyle=Ne.quoteStyle),U(Fi,eC,Ge+1,Ze)}return U(Fi,Ne,Ge+1,Ze)}if(typeof Z=="function"&&!K(Z)){var Di=pe(Z),Ni=$e(Z,Cn);return"[Function"+(Di?": "+Di:" (anonymous)")+"]"+(Ni.length>0?" { "+C.call(Ni,", ")+" }":"")}if(ae(Z)){var KE=O?x.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(Z);return typeof Z=="object"&&!O?ke(KE):KE}if(ne(Z)){for(var Za="<"+E.call(String(Z.nodeName)),Vh=Z.attributes||[],gc=0;gc<Vh.length;gc++)Za+=" "+Vh[gc].name+"="+W(J(Vh[gc].value),"double",Ne);return Za+=">",Z.childNodes&&Z.childNodes.length&&(Za+="..."),Za+="</"+E.call(String(Z.nodeName))+">",Za}if(ee(Z)){if(Z.length===0)return"[]";var $h=$e(Z,Cn);return Kr&&!pt($h)?"["+$t($h,Kr)+"]":"[ "+C.call($h,", ")+" ]"}if(X(Z)){var zh=$e(Z,Cn);return!("cause"in Error.prototype)&&"cause"in Z&&!z.call(Z,"cause")?"{ ["+String(Z)+"] "+C.call(w.call("[cause]: "+Cn(Z.cause),zh),", ")+" }":zh.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+C.call(zh,", ")+" }"}if(typeof Z=="object"&&it){if(B&&typeof Z[B]=="function"&&L)return L(Z,{depth:Yr-Ge});if(it!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(Ae(Z)){var ZE=[];return r&&r.call(Z,function(Fi,vc){ZE.push(Cn(vc,Z,!0)+" => "+Cn(Fi,Z))}),qe("Map",n.call(Z),ZE,Kr)}if(j(Z)){var XE=[];return s&&s.call(Z,function(Fi){XE.push(Cn(Fi,Z))}),qe("Set",a.call(Z),XE,Kr)}if(me(Z))return _e("WeakMap");if(R(Z))return _e("WeakSet");if(oe(Z))return _e("WeakRef");if(H(Z))return ke(Cn(Number(Z)));if(Q(Z))return ke(Cn(F.call(Z)));if(se(Z))return ke(v.call(Z));if(de(Z))return ke(Cn(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Kh<"u"&&Z===Kh)return"{ [object globalThis] }";if(!Y(Z)&&!K(Z)){var jh=$e(Z,Cn),QE=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,Rh=Z instanceof Object?"":"null prototype",JE=!QE&&D&&Object(Z)===Z&&D in Z?b.call(fe(Z),8,-1):Rh?"Object":"",SH=QE||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",Bh=SH+(JE||Rh?"["+C.call(w.call([],JE||[],Rh||[]),": ")+"] ":"");return jh.length===0?Bh+"{}":Kr?Bh+"{"+$t(jh,Kr)+"}":Bh+"{ "+C.call(jh,", ")+" }"}return String(Z)};function W(U,Z,Oe){var Ge=Oe.quoteStyle||Z,Ze=q[Ge];return Ze+U+Ze}function J(U){return x.call(String(U),/"/g,""")}function re(U){return!D||!(typeof U=="object"&&(D in U||typeof U[D]<"u"))}function ee(U){return fe(U)==="[object Array]"&&re(U)}function Y(U){return fe(U)==="[object Date]"&&re(U)}function K(U){return fe(U)==="[object RegExp]"&&re(U)}function X(U){return fe(U)==="[object Error]"&&re(U)}function de(U){return fe(U)==="[object String]"&&re(U)}function H(U){return fe(U)==="[object Number]"&&re(U)}function se(U){return fe(U)==="[object Boolean]"&&re(U)}function ae(U){if(O)return U&&typeof U=="object"&&U instanceof Symbol;if(typeof U=="symbol")return!0;if(!U||typeof U!="object"||!N)return!1;try{return N.call(U),!0}catch{}return!1}function Q(U){if(!U||typeof U!="object"||!F)return!1;try{return F.call(U),!0}catch{}return!1}var le=Object.prototype.hasOwnProperty||function(U){return U in this};function te(U,Z){return le.call(U,Z)}function fe(U){return g.call(U)}function pe(U){if(U.name)return U.name;var Z=y.call(h.call(U),/^function\s*([\w$]+)/);return Z?Z[1]:null}function ve(U,Z){if(U.indexOf)return U.indexOf(Z);for(var Oe=0,Ge=U.length;Oe<Ge;Oe++)if(U[Oe]===Z)return Oe;return-1}function Ae(U){if(!n||!U||typeof U!="object")return!1;try{n.call(U);try{a.call(U)}catch{return!0}return U instanceof Map}catch{}return!1}function me(U){if(!c||!U||typeof U!="object")return!1;try{c.call(U,c);try{d.call(U,d)}catch{return!0}return U instanceof WeakMap}catch{}return!1}function oe(U){if(!p||!U||typeof U!="object")return!1;try{return p.call(U),!0}catch{}return!1}function j(U){if(!a||!U||typeof U!="object")return!1;try{a.call(U);try{n.call(U)}catch{return!0}return U instanceof Set}catch{}return!1}function R(U){if(!d||!U||typeof U!="object")return!1;try{d.call(U,d);try{c.call(U,c)}catch{return!0}return U instanceof WeakSet}catch{}return!1}function ne(U){return!U||typeof U!="object"?!1:typeof HTMLElement<"u"&&U instanceof HTMLElement?!0:typeof U.nodeName=="string"&&typeof U.getAttribute=="function"}function ce(U,Z){if(U.length>Z.maxStringLength){var Oe=U.length-Z.maxStringLength,Ge="... "+Oe+" more character"+(Oe>1?"s":"");return ce(b.call(U,0,Z.maxStringLength),Z)+Ge}var Ze=G[Z.quoteStyle||"single"];Ze.lastIndex=0;var Ne=x.call(x.call(U,Ze,"\\$1"),/[\x00-\x1f]/g,xe);return W(Ne,"single",Z)}function xe(U){var Z=U.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Oe?"\\"+Oe:"\\x"+(Z<16?"0":"")+T.call(Z.toString(16))}function ke(U){return"Object("+U+")"}function _e(U){return U+" { ? }"}function qe(U,Z,Oe,Ge){var Ze=Ge?$t(Oe,Ge):C.call(Oe,", ");return U+" ("+Z+") {"+Ze+"}"}function pt(U){for(var Z=0;Z<U.length;Z++)if(ve(U[Z],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
3
|
-
`+
|
|
4
|
-
`+Z.prev}function $e(U,Z){var Oe=ee(U),Ge=[];if(Oe){Ge.length=U.length;for(var Ze=0;Ze<U.length;Ze++)Ge[Ze]=te(U,Ze)?Z(U[Ze],U):""}var Ne=typeof V=="function"?V(U):[],it;if(O){it={};for(var mt=0;mt<Ne.length;mt++)it["$"+Ne[mt]]=Ne[mt]}for(var at in U)te(U,at)&&(Oe&&String(Number(at))===at&&at<U.length||O&&it["$"+at]instanceof Symbol||(I.call(/[^\w$]/,at)?Ge.push(Z(at,U)+": "+Z(U[at],U)):Ge.push(at+": "+Z(U[at],U))));if(typeof V=="function")for(var vn=0;vn<Ne.length;vn++)z.call(U,Ne[vn])&&Ge.push("["+Z(Ne[vn])+"]: "+Z(U[Ne[vn]],U));return Ge}return bc}var xc,Jh;function rC(){if(Jh)return xc;Jh=1;var e=Xa(),t=Po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return xc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=a(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},xc}var wc,em;function tm(){return em||(em=1,wc=Object),wc}var Sc,nm;function oC(){return nm||(nm=1,Sc=Error),Sc}var Tc,rm;function iC(){return rm||(rm=1,Tc=EvalError),Tc}var Ec,om;function aC(){return om||(om=1,Ec=RangeError),Ec}var Cc,im;function sC(){return im||(im=1,Cc=ReferenceError),Cc}var kc,am;function lC(){return am||(am=1,kc=SyntaxError),kc}var Ic,sm;function cC(){return sm||(sm=1,Ic=URIError),Ic}var Ac,lm;function uC(){return lm||(lm=1,Ac=Math.abs),Ac}var Pc,cm;function dC(){return cm||(cm=1,Pc=Math.floor),Pc}var Oc,um;function fC(){return um||(um=1,Oc=Math.max),Oc}var _c,dm;function pC(){return dm||(dm=1,_c=Math.min),_c}var Mc,fm;function hC(){return fm||(fm=1,Mc=Math.pow),Mc}var Dc,pm;function mC(){return pm||(pm=1,Dc=Math.round),Dc}var Nc,hm;function gC(){return hm||(hm=1,Nc=Number.isNaN||function(t){return t!==t}),Nc}var Fc,mm;function vC(){if(mm)return Fc;mm=1;var e=gC();return Fc=function(n){return e(n)||n===0?n:n<0?-1:1},Fc}var Lc,gm;function yC(){return gm||(gm=1,Lc=Object.getOwnPropertyDescriptor),Lc}var Vc,vm;function ym(){if(vm)return Vc;vm=1;var e=yC();if(e)try{e([],"length")}catch{e=null}return Vc=e,Vc}var $c,bm;function bC(){if(bm)return $c;bm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return $c=e,$c}var zc,xm;function xC(){return xm||(xm=1,zc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),zc}var jc,wm;function wC(){if(wm)return jc;wm=1;var e=typeof Symbol<"u"&&Symbol,t=xC();return jc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},jc}var Rc,Sm;function Tm(){return Sm||(Sm=1,Rc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Rc}var Bc,Em;function Cm(){if(Em)return Bc;Em=1;var e=tm();return Bc=e.getPrototypeOf||null,Bc}var Hc,km;function SC(){if(km)return Hc;km=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Hc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),v=[],g=0;g<p;g++)v[g]="$"+g;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},Hc}var Wc,Im;function Qa(){if(Im)return Wc;Im=1;var e=SC();return Wc=Function.prototype.bind||e,Wc}var qc,Am;function Uc(){return Am||(Am=1,qc=Function.prototype.call),qc}var Gc,Pm;function Om(){return Pm||(Pm=1,Gc=Function.prototype.apply),Gc}var Yc,_m;function TC(){return _m||(_m=1,Yc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Yc}var Kc,Mm;function EC(){if(Mm)return Kc;Mm=1;var e=Qa(),t=Om(),n=Uc(),r=TC();return Kc=r||e.call(n,t),Kc}var Zc,Dm;function Nm(){if(Dm)return Zc;Dm=1;var e=Qa(),t=Po(),n=Uc(),r=EC();return Zc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Zc}var Xc,Fm;function CC(){if(Fm)return Xc;Fm=1;var e=Nm(),t=ym(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Xc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Xc}var Qc,Lm;function kC(){if(Lm)return Qc;Lm=1;var e=Tm(),t=Cm(),n=CC();return Qc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,Qc}var Jc,Vm;function IC(){if(Vm)return Jc;Vm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Qa();return Jc=n.call(e,t),Jc}var eu,$m;function tu(){if($m)return eu;$m=1;var e,t=tm(),n=oC(),r=iC(),o=aC(),i=sC(),a=lC(),s=Po(),l=cC(),c=uC(),u=dC(),d=fC(),f=pC(),p=hC(),v=mC(),g=vC(),h=Function,y=function(K){try{return h('"use strict"; return ('+K+").constructor;")()}catch{}},b=ym(),x=bC(),T=function(){throw new s},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=wC()(),w=kC(),C=Cm(),P=Tm(),_=Om(),F=Uc(),V={},N=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":V,"%AsyncGenerator%":V,"%AsyncGeneratorFunction%":V,"%AsyncIteratorPrototype%":V,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":V,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":E,"%TypedArray%":N,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":g,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(K){var D=w(w(K));O["%Error.prototype%"]=D}var z=function K(X){var de;if(X==="%AsyncFunction%")de=y("async function () {}");else if(X==="%GeneratorFunction%")de=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")de=y("async function* () {}");else if(X==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(de=H.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=K("%AsyncGenerator%");se&&w&&(de=w(se.prototype))}return O[X]=de,de},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=Qa(),L=IC(),$=k.call(F,Array.prototype.concat),B=k.call(_,Array.prototype.splice),q=k.call(F,String.prototype.replace),G=k.call(F,String.prototype.slice),W=k.call(F,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,ee=function(X){var de=G(X,0,1),H=G(X,-1);if(de==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&de!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return q(X,J,function(ae,Q,le,te){se[se.length]=le?q(te,re,"$1"):Q||ae}),se},Y=function(X,de){var H=X,se;if(L(M,H)&&(se=M[H],H="%"+se[0]+"%"),L(O,H)){var ae=O[H];if(ae===V&&(ae=z(H)),typeof ae>"u"&&!de)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:H,value:ae}}throw new a("intrinsic "+X+" does not exist!")};return eu=function(X,de){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new s('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=ee(X),se=H.length>0?H[0]:"",ae=Y("%"+se+"%",de),Q=ae.name,le=ae.value,te=!1,fe=ae.alias;fe&&(se=fe[0],B(H,$([0,1],fe)));for(var pe=1,ve=!0;pe<H.length;pe+=1){var Ae=H[pe],me=G(Ae,0,1),oe=G(Ae,-1);if((me==='"'||me==="'"||me==="`"||oe==='"'||oe==="'"||oe==="`")&&me!==oe)throw new a("property names with quotes must have matching quotes");if((Ae==="constructor"||!ve)&&(te=!0),se+="."+Ae,Q="%"+se+"%",L(O,Q))le=O[Q];else if(le!=null){if(!(Ae in le)){if(!de)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(b&&pe+1>=H.length){var j=b(le,Ae);ve=!!j,ve&&"get"in j&&!("originalValue"in j.get)?le=j.get:le=le[Ae]}else ve=L(le,Ae),le=le[Ae];ve&&!te&&(O[Q]=le)}}return le},eu}var nu,zm;function jm(){if(zm)return nu;zm=1;var e=tu(),t=Nm(),n=t([e("%String.prototype.indexOf%")]);return nu=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},nu}var ru,Rm;function Bm(){if(Rm)return ru;Rm=1;var e=tu(),t=jm(),n=Xa(),r=Po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return ru=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var v=l(d,p);return c(d)===0&&(d=void 0),v}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,v){d||(d=new o),a(d,p,v)}};return f},ru}var ou,Hm;function AC(){if(Hm)return ou;Hm=1;var e=tu(),t=jm(),n=Xa(),r=Bm(),o=Po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return ou=i?function(){var d,f,p={assert:function(v){if(!p.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&f)return f.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):f&&f.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!f&&f.has(v)},set:function(v,g){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,g)):r&&(f||(f=r()),f.set(v,g))}};return p}:r,ou}var iu,Wm;function qm(){if(Wm)return iu;Wm=1;var e=Po(),t=Xa(),n=rC(),r=Bm(),o=AC(),i=o||r||n;return iu=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},iu}var Um=e=>Array.isArray(e),au=e=>e===void 0,su=e=>e===null,PC=Function.bind.call(Function.call,Object.prototype.toString),OC=e=>!!e&&PC(e)==="[object Error]"||e instanceof Error,Gm=(e,t)=>e instanceof t,_C=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},MC=e=>Object.prototype.toString.call(e)==="[object Date]"&&Gm(e,Date),Re={array:Um,date:MC,empty:e=>su(e)||au(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Gm,isError:OC,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>su(e)||au(e),null:su,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Um(e)&&typeof e=="object",primitive:_C,string:e=>typeof e=="string",undefined:au},DC=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},NC=e=>e.replace(/[^0-9]/g,"");const FC=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},LC=(e,t)=>({classGroupId:e,validator:t}),Ym=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ja="-",Km=[],VC="arbitrary..",$C=e=>{const t=jC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return zC(a);const s=a.split(Ja),l=s[0]===""&&s.length>1?1:0;return Zm(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?FC(c,l):l:c||Km}return n[a]||Km}}},Zm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Zm(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Ja):e.slice(t).join(Ja),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},zC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?VC+r:void 0})(),jC=e=>{const{theme:t,classGroups:n}=e;return RC(n,t)},RC=(e,t)=>{const n=Ym();for(const r in e){const o=e[r];lu(o,n,r,t)}return n},lu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];BC(a,t,n,r)}},BC=(e,t,n,r)=>{if(typeof e=="string"){HC(e,t,n);return}if(typeof e=="function"){WC(e,t,n,r);return}qC(e,t,n,r)},HC=(e,t,n)=>{const r=e===""?t:Xm(t,e);r.classGroupId=n},WC=(e,t,n,r)=>{if(UC(e)){lu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(LC(n,e))},qC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];lu(l,Xm(t,s),n,r)}},Xm=(e,t)=>{let n=e;const r=t.split(Ja),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=Ym(),n.nextPart.set(a,s)),n=s}return n},UC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,GC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},cu="!",Qm=":",YC=[],Jm=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),KC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const h=o[g];if(a===0&&s===0){if(h===Qm){i.push(o.slice(l,g)),l=g+1;continue}if(h==="/"){c=g;continue}}h==="["?a++:h==="]"?a--:h==="("?s++:h===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(cu)?(f=d.slice(0,-1),p=!0):d.startsWith(cu)&&(f=d.slice(1),p=!0);const v=c&&c>l?c-l:void 0;return Jm(i,p,f,v)};if(t){const o=t+Qm,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):Jm(YC,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ZC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},XC=e=>({cache:GC(e.cacheSize),parseClassName:KC(e),sortModifiers:ZC(e),...$C(e)}),QC=/\s+/,JC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(QC);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?v.substring(0,g):v);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+cu:b,T=x+y;if(a.indexOf(T)>-1)continue;a.push(T);const E=o(y,h);for(let I=0;I<E.length;++I){const w=E[I];a.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},ek=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=eg(n))&&(o&&(o+=" "),o+=r);return o},eg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=eg(e[r]))&&(n&&(n+=" "),n+=t);return n},tk=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=XC(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=JC(l,n);return o(l,u),u};return i=a,(...l)=>i(ek(...l))},nk=[],zt=e=>{const t=n=>n[e]||nk;return t.isThemeGetter=!0,t},tg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ng=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rk=/^\d+\/\d+$/,ok=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ik=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ak=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oo=e=>rk.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),yr=e=>!!e&&Number.isInteger(Number(e)),uu=e=>e.endsWith("%")&&We(e.slice(0,-1)),ar=e=>ok.test(e),ck=()=>!0,uk=e=>ik.test(e)&&!ak.test(e),rg=()=>!1,dk=e=>sk.test(e),fk=e=>lk.test(e),pk=e=>!we(e)&&!Se(e),hk=e=>_o(e,lg,rg),we=e=>tg.test(e),Zr=e=>_o(e,cg,uk),du=e=>_o(e,bk,We),og=e=>_o(e,ag,rg),mk=e=>_o(e,sg,fk),es=e=>_o(e,ug,dk),Se=e=>ng.test(e),Vi=e=>Mo(e,cg),gk=e=>Mo(e,xk),ig=e=>Mo(e,ag),vk=e=>Mo(e,lg),yk=e=>Mo(e,sg),ts=e=>Mo(e,ug,!0),_o=(e,t,n)=>{const r=tg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mo=(e,t,n=!1)=>{const r=ng.exec(e);return r?r[1]?t(r[1]):n:!1},ag=e=>e==="position"||e==="percentage",sg=e=>e==="image"||e==="url",lg=e=>e==="length"||e==="size"||e==="bg-size",cg=e=>e==="length",bk=e=>e==="number",xk=e=>e==="family-name",ug=e=>e==="shadow",wk=tk(()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),o=zt("tracking"),i=zt("leading"),a=zt("breakpoint"),s=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),d=zt("inset-shadow"),f=zt("text-shadow"),p=zt("drop-shadow"),v=zt("blur"),g=zt("perspective"),h=zt("aspect"),y=zt("ease"),b=zt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Se,we],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[Se,we,l],P=()=>[Oo,"full","auto",...C()],_=()=>[yr,"none","subgrid",Se,we],F=()=>["auto",{span:["full",yr,Se,we]},yr,Se,we],V=()=>[yr,"auto",Se,we],N=()=>["auto","min","max","fr",Se,we],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],M=()=>[Oo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,Se,we],L=()=>[...T(),ig,og,{position:[Se,we]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",vk,hk,{size:[Se,we]}],q=()=>[uu,Vi,Zr],G=()=>["","none","full",c,Se,we],W=()=>["",We,Vi,Zr],J=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[We,uu,ig,og],Y=()=>["","none",v,Se,we],K=()=>["none",We,Se,we],X=()=>["none",We,Se,we],de=()=>[We,Se,we],H=()=>[Oo,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[ck],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[pk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",We],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oo,we,Se,h]}],container:["container"],columns:[{columns:[We,we,Se,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[yr,"auto",Se,we]}],basis:[{basis:[Oo,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Oo,"auto","initial","none",we]}],grow:[{grow:["",We,Se,we]}],shrink:[{shrink:["",We,Se,we]}],order:[{order:[yr,"first","last","none",Se,we]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Vi,Zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Se,du]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uu,we]}],"font-family":[{font:[gk,we,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Se,we]}],"line-clamp":[{"line-clamp":[We,"none",Se,du]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Se,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Se,Zr]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[We,"auto",Se,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yr,Se,we],radial:["",Se,we],conic:[yr,Se,we]},yk,mk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Se,we]}],"outline-w":[{outline:["",We,Vi,Zr]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ts,es]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ts,es]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[We,Zr]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ts,es]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[We,Se,we]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Se,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,we]}],filter:[{filter:["","none",Se,we]}],blur:[{blur:Y()}],brightness:[{brightness:[We,Se,we]}],contrast:[{contrast:[We,Se,we]}],"drop-shadow":[{"drop-shadow":["","none",p,ts,es]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",We,Se,we]}],"hue-rotate":[{"hue-rotate":[We,Se,we]}],invert:[{invert:["",We,Se,we]}],saturate:[{saturate:[We,Se,we]}],sepia:[{sepia:["",We,Se,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,we]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[We,Se,we]}],"backdrop-contrast":[{"backdrop-contrast":[We,Se,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Se,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Se,we]}],"backdrop-invert":[{"backdrop-invert":["",We,Se,we]}],"backdrop-opacity":[{"backdrop-opacity":[We,Se,we]}],"backdrop-saturate":[{"backdrop-saturate":[We,Se,we]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Se,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Se,we]}],ease:[{ease:["linear","initial",y,Se,we]}],delay:[{delay:[We,Se,we]}],animate:[{animate:["none",b,Se,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Se,we]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[Se,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,we]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[We,Vi,Zr,du]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),sr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},Sk=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),fu=e=>Re.function(e),Pe=(...e)=>wk(Uh(e)),dg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},$i=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},fg=e=>e.scrollHeight>e.clientHeight,zi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},Tk=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},pg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,a=o.bottom<=r.bottom,s=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&a&&s&&l},ln=S.forwardRef(function(t,n){const r=t.as||"span";return m.jsx(r,{ref:n,...t,as:void 0})}),Ek={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},Ck=Ao("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),kk=Ao("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:Ek,defaultVariants:{theme:"primary",size:"default"}}),ns=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Pe(kk({size:a,theme:o?"loading":i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:Ck({theme:n})}):null,r,s.children]})}),Ik=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})};var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Mt.apply(this,arguments)};function pu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function hu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var ji=function(e){return e.replace(new RegExp(" ","g")," ")},hg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},Ak=function(e){return e.replace(/^0+([0-9]+)/,"$1")},mg=function(e,t,n){var r=e.length-2,o=Ak(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},gg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},rs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},Pk=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},mu=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},Ok=function(e){return e==="money"||e==="currency"},_k=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Mt(Mt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},os=function(e,t){var n=hg(gg(e),t.fraction.length),r="".concat(t.currency).concat(mg(n,t.group,t.decimal));return ji(r)},Mk=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=pu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var v=_k(r,i,s);return v.currency=ji("".concat(v.currency.trim()," ")),v.literal=ji(v.literal.trim()),v},[r,i]),f=function(v){var g=os(v.target.value,d),h=rs(g);v.target.value=g,v.target.setAttribute("data-number",h.toString()),l?.(v),h!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var g=os(v,d),h=rs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});l?.(Mt(Mt({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var p=c.defaultValue?os(c.defaultValue,d):void 0;return S.createElement("input",Mt({},c,{value:typeof c.value=="string"?os(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),Dk=1,Nk=function(e){return e==="percentage"||e==="percent"||e==="percentual"},Fk=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Mt(Mt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},is=function(e,t){var n=hg(gg(e),t.fraction.length),r="".concat(mg(n,t.group,t.decimal)," ").concat(t.percentSign);return ji(r)},Lk=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=pu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=hu(S.useState(function(){var y,b;return(b=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var y,b=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(is(b,d))},[a.value]);var d=S.useMemo(function(){var y=Fk(r);return y.percentSign=ji("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-Dk,p=function(y){var b,x=s.current;x&&(x.setSelectionRange(f,f),y&&((b=a.onFocus)===null||b===void 0||b.call(a,y)))},v=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&p()}i?.(y)},g=function(y){var b=is(y.target.value,d),x=rs(b);u(b),y.target.value=b,y.target.setAttribute("data-number",x.toString()),o?.(y)};S.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var b=is(y,d),x=rs(b);u(b),s.current.value=b,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Mt(Mt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return p()},[c]);var h=a.defaultValue?is(a.defaultValue,d):void 0;return S.createElement("input",Mt({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:p,onKeyUp:v,ref:s,type:"text"}))}),Ri={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},Vk=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=as[i];a===void 0?r.push(i.replace(Ri.dots,"\\.").replace(Ri.openParenthesis,"\\(").replace(Ri.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ri.leadingBars,"\\")},Bi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return gu(o,n);var i=Vk(o);return n?"^".concat(i,"$"):i},$k=function(e){return e.replace(Ri.escape,"\\$&")},gu=function(e,t){var n=e.map(function(r){return typeof r=="string"?$k(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},as={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},zk=/\d/,vg="(dd) 9dddd-dddd",yg="(dd) dddd-dddd",bg="ddd.ddd.ddd-dd",xg="dd.ddd.ddd/dddd-dd",ss=function(e){return e.replace(/\D/g,"")},jk=["2",/[0-3]/,":",/[0-5]/,/\d/],Rk=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:bg,isoDate:"dddd-dd-dd",cnpj:xg,telephone:yg,cellphone:vg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ss(e).length<=11?bg:xg},int:function(e){return e===void 0&&(e=""),zk.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ss(e);return t.length<11?yg:vg},time:function(e){var t=ss(e),n=t[0];return n==="2"?jk:Rk}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Mt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Bi(e,"",!0),infinity:n.infinity},n)},Zt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:ss}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function wg(e,t,n,r){var o,i;r===void 0&&(r=as);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=a[c];if(d===void 0){s+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(s+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return s}var Sg=function(e){return e},Bk=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Bi(e,n,t));return r.test(n)};function Hk(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var Wk=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=pu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=S.useRef(null);S.useImperativeHandle(t,function(){return v.current});var g=mu(s),h=mu(d),y=mu(u),b=S.useRef(Bk(u,i,p.value||p.defaultValue)),x=f??"input",T=hu(S.useState(""),2),E=T[0],I=T[1],w=Hk(E),C=S.useCallback(function(D,z){var M,k,L=(M=D??z)!==null&&M!==void 0?M:"";if(u===void 0)return L;var $=(k=L?.toString())!==null&&k!==void 0?k:"";return wg($,typeof u=="function"?u($):u,a??Sg,c??as)},[a,u,c]),P=hu(S.useState(function(){return C(p.value,p.defaultValue)}),2),_=P[0],F=P[1],V=C(p.defaultValue,p.defaultValue),N=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(_);return Array.isArray(D)?gu(D,i):Bi(u,_,i)}return typeof u=="string"?Bi(u,_,i):gu(u,i)},[l,_,i,u]);S.useEffect(function(){if(p.value!==void 0){var D=C(p.value,p.defaultValue);F(D),v.current!==null&&(v.current.value=D)}},[p.value,u,a,p.defaultValue]);var O=function(D){var z,M,k,L,$,B=D.currentTarget,q=D.target.value;if(y.current===void 0)return F(q),(z=h.current)===null||z===void 0||z.call(h,q),(M=g.current)===null||M===void 0||M.call(g,D),d?.(q);var G=new RegExp(Bi(y.current,q,i)),W=(k=B.selectionEnd)!==null&&k!==void 0?k:0,J=function(X,de,H){if(X.type!=="number")return X.setSelectionRange(de,H)};if(r&&b.current&&q.length>=_.length)return B.value=_,J(B,W-1,W-1);var re=!1;q.length<w.length&&(b.current=!1,re=!0),G.test(q)&&(b.current=!0);var ee=W,Y=q[ee-1],K=wg(q,typeof y.current=="function"?y.current(q):y.current,a??Sg,c??as);for(B.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==Y;)ee+=1;re?J(B,W,W):J(B,ee,ee),D.target.value=K,I(K),(L=h.current)===null||L===void 0||L.call(h,K),($=g.current)===null||$===void 0||$.call(g,D)};return S.createElement(x,Mt({},p,{ref:v,pattern:N,onChange:O,defaultValue:Tg(p.defaultValue)?V:void 0,value:Tg(p.value)?C(p.value,p.value):p.value}))}),Tg=function(e){return typeof e=="string"},Eg=S.forwardRef(function(e,t){return Ok(e.mask)?S.createElement(Mk,Mt({},e,{mask:void 0,ref:t})):Nk(e.mask)?S.createElement(Lk,Mt({},e,{mask:void 0,ref:t})):S.createElement(Wk,Mt({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(Eg,Mt({},e,t))}};on(Zt.cellTelephone),on(Zt.cellphone),on(Zt.cep),on(Zt.cnpj),on(Zt.color),on(Zt.cpf),on(Zt.cpfCnpj),on(Zt.creditCard),on(Zt.date),on(Zt.int),on(Zt.isoDate),on(Zt.telephone),on(Zt.time),on(Zt.uuid);var Cg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&Pk(Zt,t.mask)?Zt[t.mask]:{mask:t.mask}},[t.mask]),o=Mt(Mt({},t),r);return S.createElement(Eg,Mt({},o,{ref:n}))});const qk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),kg=e=>{const t=Uk(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ig=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Gk=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Yk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Kk=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...Yk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ig("lucide",o),...!i&&!Gk(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const tt=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(Kk,{ref:i,iconNode:t,className:Ig(`lucide-${qk(kg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=kg(e),n};const Zk=tt("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const Xk=tt("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const Ag=tt("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const Qk=tt("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const Jk=tt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const vu=tt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const eI=tt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const yu=tt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const bu=tt("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const tI=tt("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const nI=tt("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const rI=tt("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Pg=tt("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Og=tt("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const _g=tt("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const oI=tt("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const iI=tt("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const xu=tt("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const aI=tt("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const br=tt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const sI=tt("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const lI=tt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const cI=tt("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const wu=tt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const uI=tt("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const dI=tt("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Su=tt("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ls=tt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Tu=tt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const fI=tt("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Do=tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),cs={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},xr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(xr(a,t,n,s))},[]),Mg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:Mg(a,t,n,s)}},{}),Dg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},us=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},pI={default:e=>us(e,{result:Dg.default}),dark:e=>us(e,{result:Dg.dark})},No=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},hI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Eu=(e,t)=>{const n=xr(e.colors,No(t?.colors)),r=xr(e.spacing,No(t?.spacing)),o=xr(e.rounded,No(t?.rounded)),i=xr(e.shadow,No(t?.rounded)),a=xr(e.zIndex,No(t?.zIndex??hI)),s=e.custom?xr(e.custom,No(t?.customTokens)):[];return n.concat(r,o,s,a,i)},mI=(e,t)=>us(Eu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),gI=(e,t)=>Eu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),vI=(e,t)=>us(Eu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ds={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>m.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},fs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Xr=S.createContext({parser:cs.hsla,tweaks:fs,floatingRef:void 0,map:ds,locale:void 0}),Pt=()=>{const e=S.useContext(Xr);return e?e.map:ds},Cu=()=>{const e=S.useContext(Xr);return e?e.tweaks:fs};function ps(){return typeof window<"u"}function wr(e){return hs(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(hs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hs(e){return ps()?e instanceof Node||e instanceof qt(e).Node:!1}function nt(e){return ps()?e instanceof Element||e instanceof qt(e).Element:!1}function Ot(e){return ps()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Hi(e){return!ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const yI=new Set(["inline","contents"]);function Wi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!yI.has(o)}const bI=new Set(["table","td","th"]);function xI(e){return bI.has(wr(e))}const wI=[":popover-open",":modal"];function ms(e){return wI.some(t=>{try{return e.matches(t)}catch{return!1}})}const SI=["transform","translate","scale","rotate","perspective"],TI=["transform","translate","scale","rotate","perspective","filter"],EI=["paint","layout","strict","content"];function ku(e){const t=gs(),n=nt(e)?cn(e):e;return SI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||TI.some(r=>(n.willChange||"").includes(r))||EI.some(r=>(n.contain||"").includes(r))}function CI(e){let t=cr(e);for(;Ot(t)&&!lr(t);){if(ku(t))return t;if(ms(t))return null;t=cr(t)}return null}function gs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const kI=new Set(["html","body","#document"]);function lr(e){return kI.has(wr(e))}function cn(e){return qt(e).getComputedStyle(e)}function vs(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(wr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hi(e)&&e.host||Bn(e);return Hi(t)?t.host:t}function Ng(e){const t=cr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&Wi(t)?t:Ng(t)}function Sr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ng(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=Iu(a);return t.concat(a,a.visualViewport||[],Wi(o)?o:[],s&&n?Sr(s):[])}return t.concat(o,Sr(o,[],n))}function Iu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const II=["top","right","bottom","left"],Fg=["start","end"],Lg=II.reduce((e,t)=>e.concat(t,t+"-"+Fg[0],t+"-"+Fg[1]),[]),Tr=Math.min,un=Math.max,ys=Math.round,Fo=Math.floor,Hn=e=>({x:e,y:e}),AI={left:"right",right:"left",bottom:"top",top:"bottom"},PI={start:"end",end:"start"};function Au(e,t,n){return un(e,Tr(t,n))}function Qr(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function kn(e){return e.split("-")[1]}function Vg(e){return e==="x"?"y":"x"}function Pu(e){return e==="y"?"height":"width"}const OI=new Set(["top","bottom"]);function ur(e){return OI.has(Wn(e))?"y":"x"}function Ou(e){return Vg(ur(e))}function $g(e,t,n){n===void 0&&(n=!1);const r=kn(e),o=Ou(e),i=Pu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xs(a)),[a,xs(a)]}function _I(e){const t=xs(e);return[bs(e),t,bs(t)]}function bs(e){return e.replace(/start|end/g,t=>PI[t])}const zg=["left","right"],jg=["right","left"],MI=["top","bottom"],DI=["bottom","top"];function NI(e,t,n){switch(e){case"top":case"bottom":return n?t?jg:zg:t?zg:jg;case"left":case"right":return t?MI:DI;default:return[]}}function FI(e,t,n,r){const o=kn(e);let i=NI(Wn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(bs)))),i}function xs(e){return e.replace(/left|right|bottom|top/g,t=>AI[t])}function LI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rg(e){return typeof e!="number"?LI(e):{top:e,right:e,bottom:e,left:e}}function ws(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var VI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ss=VI.join(","),Bg=typeof Element>"u",Lo=Bg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ts=!Bg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Es=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},$I=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Hg=function(t,n,r){if(Es(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ss));return n&&Lo.call(t,Ss)&&o.unshift(t),o=o.filter(r),o},Wg=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Es(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Lo.call(a,Ss);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Es(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},qg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ug=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$I(t))&&!qg(t)?0:t.tabIndex},zI=function(t,n){var r=Ug(t);return r<0&&n&&!qg(t)?0:r},jI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Gg=function(t){return t.tagName==="INPUT"},RI=function(t){return Gg(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},HI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},WI=function(t){if(!t.name)return!0;var n=t.form||Ts(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=HI(o,t.form);return!i||i===t},qI=function(t){return Gg(t)&&t.type==="radio"},UI=function(t){return qI(t)&&!WI(t)},GI=function(t){var n,r=t&&Ts(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ts(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Yg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},YI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ts(t);if(l&&!l.shadowRoot&&o(l)===!0)return Yg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(GI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Yg(t);return!1},KI=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Lo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},_u=function(t,n){return!(n.disabled||Es(n)||RI(n)||YI(n,t)||BI(n)||KI(n))},Mu=function(t,n){return!(UI(n)||Ug(n)<0||!_u(t,n))},ZI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=zI(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(jI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Cs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Wg([t],n.includeContainer,{filter:Mu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZI}):r=Hg(t,n.includeContainer,Mu.bind(null,n)),XI(r)},QI=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Wg([t],n.includeContainer,{filter:_u.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Hg(t,n.includeContainer,_u.bind(null,n)),r},Kg=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lo.call(t,Ss)===!1?!1:Mu(n,t)};function Du(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Xg(){return/apple/i.test(navigator.vendor)}function Nu(){const e=/android/i;return e.test(Du())||e.test(Zg())}function JI(){return Du().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Qg(){return Zg().includes("jsdom/")}const Jg="data-floating-ui-focusable",eA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Fu="ArrowLeft",Lu="ArrowRight",tA="ArrowUp",nA="ArrowDown";function qn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Hi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Vu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function rA(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function $u(e){return Ot(e)&&e.matches(eA)}function zu(e){return e?e.getAttribute("role")==="combobox"&&$u(e):!1}function oA(e){if(!e||Qg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ks(e){return e?e.hasAttribute(Jg)?e:e.querySelector("["+Jg+"]")||e:null}function Jr(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Jr(e,o.id,n)])}function iA(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Jr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function ev(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Gt(e){e.preventDefault(),e.stopPropagation()}function aA(e){return"nativeEvent"in e}function tv(e){return e.mozInputSource===0&&e.isTrusted?!0:Nu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function nv(e){return Qg()?!1:!Nu()&&e.width===0&&e.height===0||Nu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Vo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var sA=typeof document<"u",lA=function(){},rt=sA?S.useLayoutEffect:lA;const cA={...A};function Wt(e){const t=A.useRef(e);return rt(()=>{t.current=e}),t}const uA=cA.useInsertionEffect||(e=>e());function Ct(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return uA(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Is(e,t,n){return Math.floor(e/t)!==n}function qi(e,t){return t<0||t>=e.current.length}function ju(e,t){return Xt(e,{disabledIndices:t})}function rv(e,t){return Xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&As(e,a,o));return a}function dA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===tA){if(d&&Gt(n),u===-1)f=c;else if(f=Xt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const p=u%a,v=c%a,g=c-(v-p);v===p?f=c:f=v>p?g:g-a}qi(e,f)&&(f=u)}if(n.key===nA&&(d&&Gt(n),u===-1?f=l:(f=Xt(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Xt(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),qi(e,f)&&(f=u)),r==="both"){const p=Fo(u/a);n.key===(i?Fu:Lu)&&(d&&Gt(n),u%a!==a-1?(f=Xt(e,{startingIndex:u,disabledIndices:s}),o&&Is(f,a,p)&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s})),Is(f,a,p)&&(f=u)),n.key===(i?Lu:Fu)&&(d&&Gt(n),u%a!==0?(f=Xt(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Is(f,a,p)&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Is(f,a,p)&&(f=u));const v=Fo(c/a)===p;qi(e,f)&&(o&&v?f=n.key===(i?Lu:Fu)?c:Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}):f=u)}return f}function fA(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function pA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function hA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function As(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Ui=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ov(e,t){const n=Cs(e,Ui()),r=n.length;if(r===0)return;const o=qn(Ut(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function iv(e){return ov(Ut(e).body,1)||e}function av(e){return ov(Ut(e).body,-1)||e}function Gi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function mA(e){Cs(e,Ui()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function sv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function lv(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),a=Ou(t),s=Pu(a),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kn(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const gA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=lv(c,r,l),f=r,p={},v=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x:b,y:x,data:T,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=x??d,p={...p,[h]:{...p[h],...T}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=lv(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function Ps(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Qr(t,e),v=Rg(p),h=s[f?d==="floating"?"reference":"floating":d],y=ws(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=ws(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-E.top+v.top)/T.y,bottom:(E.bottom-y.bottom+v.bottom)/T.y,left:(y.left-E.left+v.left)/T.x,right:(E.right-y.right+v.right)/T.x}}const vA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Qr(e,t)||{};if(c==null)return{};const d=Rg(u),f={x:n,y:r},p=Ou(o),v=Pu(p),g=await a.getDimensions(c),h=p==="y",y=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[v]+i.reference[p]-f[p]-i.floating[v],E=f[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(a.isElement==null?void 0:a.isElement(I)))&&(w=s.floating[x]||i.floating[v]);const C=T/2-E/2,P=w/2-g[v]/2-1,_=Tr(d[y],P),F=Tr(d[b],P),V=_,N=w-g[v]-F,O=w/2-g[v]/2+C,D=Au(V,O,N),z=!l.arrow&&kn(o)!=null&&O!==D&&i.reference[v]/2-(O<V?_:F)-g[v]/2<0,M=z?O<V?O-V:O-N:0;return{[p]:f[p]+M,data:{[p]:D,centerOffset:O-D-M,...z&&{alignmentOffset:M}},reset:z}}});function yA(e,t,n){return(e?[...n.filter(o=>kn(o)===e),...n.filter(o=>kn(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?kn(o)===e||(t?bs(o)!==o:!1):!0)}const bA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Lg,autoAlignment:p=!0,...v}=Qr(e,t),g=d!==void 0||f===Lg?yA(d||null,p,f):f,h=await Ps(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,b=g[y];if(b==null)return{};const x=$g(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==b)return{reset:{placement:g[0]}};const T=[h[Wn(b)],h[x[0]],h[x[1]]],E=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=g[y+1];if(I)return{data:{index:y+1,overflows:E},reset:{placement:I}};const w=E.map(_=>{const F=kn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce((V,N)=>V+N,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,kn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==s?{data:{index:y+1,overflows:E},reset:{placement:P}}:{}}}},xA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...h}=Qr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),b=ur(s),x=Wn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!g?[xs(s)]:_I(s)),I=v!=="none";!f&&I&&E.push(...FI(s,g,v,T));const w=[s,...E],C=await Ps(t,h),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(C[y]),d){const O=$g(o,a,T);P.push(C[O[0]],C[O[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(O=>O<=0)){var F,V;const O=(((F=i.flip)==null?void 0:F.index)||0)+1,D=w[O];if(D&&(!(d==="alignment"?b!==ur(D):!1)||_.every(k=>ur(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:O,overflows:_},reset:{placement:D}};let z=(V=_.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:V.placement;if(!z)switch(p){case"bestFit":{var N;const M=(N=_.filter(k=>{if(I){const L=ur(k.placement);return L===b||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,$)=>L+$,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:N[0];M&&(z=M);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}},wA=new Set(["left","top"]);async function SA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wn(n),s=kn(n),l=ur(n)==="y",c=wA.has(a)?-1:1,u=i&&l?-1:1,d=Qr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const TA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await SA(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},EA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:b}=h;return{x:y,y:b}}},...l}=Qr(e,t),c={x:n,y:r},u=await Ps(t,l),d=ur(Wn(o)),f=Vg(d);let p=c[f],v=c[d];if(i){const h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[h],x=p-u[y];p=Au(b,p,x)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[h],x=v-u[y];v=Au(b,v,x)}const g=s.fn({...t,[f]:p,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:a}}}}}},CA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Qr(e,t),u=await Ps(t,c),d=Wn(o),f=kn(o),p=ur(o)==="y",{width:v,height:g}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const b=g-u.top-u.bottom,x=v-u.left-u.right,T=Tr(g-u[h],b),E=Tr(v-u[y],x),I=!t.middlewareData.shift;let w=T,C=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const _=un(u.left,0),F=un(u.right,0),V=un(u.top,0),N=un(u.bottom,0);p?C=v-2*(_!==0||F!==0?_+F:un(u.left,u.right)):w=g-2*(V!==0||N!==0?V+N:un(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const P=await a.getDimensions(s.floating);return v!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function cv(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ys(n)!==i||ys(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ru(e){return nt(e)?e:e.contextElement}function $o(e){const t=Ru(e);if(!Ot(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cv(t);let a=(i?ys(n.width):n.width)/r,s=(i?ys(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const kA=Hn(0);function uv(e){const t=qt(e);return!gs()||!t.visualViewport?kA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function eo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ru(e);let a=Hn(1);t&&(r?nt(r)&&(a=$o(r)):a=$o(e));const s=IA(i,n,r)?uv(i):Hn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=qt(i),p=r&&nt(r)?qt(r):r;let v=f,g=Iu(v);for(;g&&r&&p!==v;){const h=$o(g),y=g.getBoundingClientRect(),b=cn(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,T=y.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=T,v=qt(g),g=Iu(v)}}return ws({width:u,height:d,x:l,y:c})}function Os(e,t){const n=vs(e).scrollLeft;return t?t.left+n:eo(Bn(e)).left+n}function dv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Os(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function AA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Bn(r),s=t?ms(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Ot(r);if((d||!d&&!i)&&((wr(r)!=="body"||Wi(a))&&(l=vs(r)),Ot(r))){const p=eo(r);c=$o(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!i?dv(a,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function PA(e){return Array.from(e.getClientRects())}function OA(e){const t=Bn(e),n=vs(e),r=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Os(e);const s=-n.scrollTop;return cn(r).direction==="rtl"&&(a+=un(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const fv=25;function _A(e,t){const n=qt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=gs();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Os(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-p);v<=fv&&(i-=v)}else c<=fv&&(i+=c);return{width:i,height:a,x:s,y:l}}const MA=new Set(["absolute","fixed"]);function DA(e,t){const n=eo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?$o(e):Hn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function pv(e,t,n){let r;if(t==="viewport")r=_A(e,n);else if(t==="document")r=OA(Bn(e));else if(nt(t))r=DA(t,n);else{const o=uv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ws(r)}function hv(e,t){const n=cr(e);return n===t||!nt(n)||lr(n)?!1:cn(n).position==="fixed"||hv(n,t)}function NA(e,t){const n=t.get(e);if(n)return n;let r=Sr(e,[],!1).filter(s=>nt(s)&&wr(s)!=="body"),o=null;const i=cn(e).position==="fixed";let a=i?cr(e):e;for(;nt(a)&&!lr(a);){const s=cn(a),l=ku(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&MA.has(o.position)||Wi(a)&&!l&&hv(e,a))?r=r.filter(u=>u!==a):o=s,a=cr(a)}return t.set(e,r),r}function FA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ms(t)?[]:NA(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=pv(t,u,o);return c.top=un(d.top,c.top),c.right=Tr(d.right,c.right),c.bottom=Tr(d.bottom,c.bottom),c.left=un(d.left,c.left),c},pv(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LA(e){const{width:t,height:n}=cv(e);return{width:t,height:n}}function VA(e,t,n){const r=Ot(t),o=Bn(t),i=n==="fixed",a=eo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Os(o)}if(r||!r&&!i)if((wr(t)!=="body"||Wi(o))&&(s=vs(t)),r){const p=eo(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?dv(o,s):Hn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Bu(e){return cn(e).position==="static"}function mv(e,t){if(!Ot(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function gv(e,t){const n=qt(e);if(ms(e))return n;if(!Ot(e)){let o=cr(e);for(;o&&!lr(o);){if(nt(o)&&!Bu(o))return o;o=cr(o)}return n}let r=mv(e,t);for(;r&&xI(r)&&Bu(r);)r=mv(r,t);return r&&lr(r)&&Bu(r)&&!ku(r)?n:r||CI(e)||n}const $A=async function(e){const t=this.getOffsetParent||gv,n=this.getDimensions,r=await n(e.floating);return{reference:VA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zA(e){return cn(e).direction==="rtl"}const jA={convertOffsetParentRelativeRectToViewportRelativeRect:AA,getDocumentElement:Bn,getClippingRect:FA,getOffsetParent:gv,getElementRects:$A,getClientRects:PA,getDimensions:LA,getScale:$o,isElement:nt,isRTL:zA};function vv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RA(e,t){let n=null,r;const o=Bn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const v=Fo(d),g=Fo(o.clientWidth-(u+f)),h=Fo(o.clientHeight-(d+p)),y=Fo(u),x={rootMargin:-v+"px "+-g+"px "+-h+"px "+-y+"px",threshold:un(0,Tr(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!vv(c,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return a(!0),i}function to(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ru(e),u=o||i?[...c?Sr(c):[],...Sr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?RA(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?eo(e):null;l&&h();function h(){const y=eo(e);g&&!vv(g,y)&&n(),g=y,v=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const BA=TA,HA=bA,WA=EA,qA=xA,UA=CA,yv=vA,GA=(e,t,n)=>{const r=new Map,o={platform:jA,...n},i={...o.platform,_c:r};return gA(e,t,{...o,platform:i})};var YA=typeof document<"u",KA=function(){},_s=YA?S.useLayoutEffect:KA;function Ms(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ms(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ms(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function bv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xv(e,t){const n=bv(e);return Math.round(t*n)/n}function Hu(e){const t=A.useRef(e);return _s(()=>{t.current=e}),t}function ZA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=A.useState(r);Ms(f,r)||p(r);const[v,g]=A.useState(null),[h,y]=A.useState(null),b=A.useCallback(k=>{k!==I.current&&(I.current=k,g(k))},[]),x=A.useCallback(k=>{k!==w.current&&(w.current=k,y(k))},[]),T=i||v,E=a||h,I=A.useRef(null),w=A.useRef(null),C=A.useRef(u),P=l!=null,_=Hu(l),F=Hu(o),V=Hu(c),N=A.useCallback(()=>{if(!I.current||!w.current)return;const k={placement:t,strategy:n,middleware:f};F.current&&(k.platform=F.current),GA(I.current,w.current,k).then(L=>{const $={...L,isPositioned:V.current!==!1};O.current&&!Ms(C.current,$)&&(C.current=$,jn.flushSync(()=>{d($)}))})},[f,t,n,F,V]);_s(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const O=A.useRef(!1);_s(()=>(O.current=!0,()=>{O.current=!1}),[]),_s(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(_.current)return _.current(T,E,N);N()}},[T,E,N,_,P]);const D=A.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=A.useMemo(()=>({reference:T,floating:E}),[T,E]),M=A.useMemo(()=>{const k={position:n,left:0,top:0};if(!z.floating)return k;const L=xv(z.floating,u.x),$=xv(z.floating,u.y);return s?{...k,transform:"translate("+L+"px, "+$+"px)",...bv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:$}},[n,s,z.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:N,refs:D,elements:z,floatingStyles:M}),[u,N,D,z,M])}const XA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yv({element:r.current,padding:o}).fn(n):{}:r?yv({element:r,padding:o}).fn(n):{}}}},zo=(e,t)=>({...BA(e),options:[e,t]}),Ds=(e,t)=>({...WA(e),options:[e,t]}),Ns=(e,t)=>({...qA(e),options:[e,t]}),wv=(e,t)=>({...UA(e),options:[e,t]}),Sv=(e,t)=>({...HA(e),options:[e,t]}),Wu=(e,t)=>({...XA(e),options:[e,t]});function QA(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Tv=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function JA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Set),a=A.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=A.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=A.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(QA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return m.jsx(Tv.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function Ev(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(Tv),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var f;const p=t!==void 0;a.current[s]=p?t:(f=d?.textContent)!=null?f:null}},[s,i,a,t]);return rt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),rt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const eP="data-floating-ui-focusable",Cv="active",kv="selected",Yi="ArrowLeft",Ki="ArrowRight",Iv="ArrowUp",Fs="ArrowDown",tP={...A};let Av=!1,nP=0;const Pv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nP++;function rP(){const[e,t]=A.useState(()=>Av?Pv():void 0);return rt(()=>{e==null&&t(Pv())},[]),A.useEffect(()=>{Av=!0},[]),e}const Zi=tP.useId||rP;let Xi;process.env.NODE_ENV!=="production"&&(Xi=new Set);function Ls(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Xi)!=null&&e.has(o))){var i;(i=Xi)==null||i.add(o),console.warn(o)}}function oP(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Xi)!=null&&e.has(o))){var i;(i=Xi)==null||i.add(o),console.error(o)}}const qu=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:v,...g}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||Ls("The `ref` prop is required for `FloatingArrow`."));const y=Zi(),[b,x]=A.useState(!1);if(rt(()=>{if(!o)return;cn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&a!=null&&a.x||!I&&a!=null&&a.y)&&(w=null);const C=u*2,P=C/2,_=s/2*(c/-8+1),F=l/2*c/4,V=!!p,N=w&&E==="end"?"bottom":"top";let O=w&&E==="end"?"right":"left";w&&b&&(O=E==="end"?"left":"right");const D=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",k={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[T];return m.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:V?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[O]:D,[N]:z,[T]:I||V?"100%":"calc(100% - "+C/2+"px)",transform:[k,v].filter(L=>!!L).join(" "),...g},children:[C>0&&m.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:C+(p?0:1),d:M}),m.jsx("path",{stroke:C&&!p?h.fill:"none",d:M}),m.jsx("clipPath",{id:y,children:m.jsx("rect",{x:-P,y:P*(V?-1:1),width:s+C,height:s})})]})});function Ov(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const _v=A.createContext(null),Mv=A.createContext(null),Er=()=>{var e;return((e=A.useContext(_v))==null?void 0:e.id)||null},Cr=()=>A.useContext(Mv);function iP(e){const t=Zi(),n=Cr(),o=Er();return rt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function aP(e){const{children:t,id:n}=e,r=Er();return m.jsx(_v.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function sP(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(a=>{n.current=[...n.current,a]},[]),o=A.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=A.useState(()=>Ov());return m.jsx(Mv.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function no(e){return"data-floating-ui-"+e}function Yt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Dv=no("safe-polygon");function Uu(e,t,n){if(n&&!Vo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Gu(e){return typeof e=="function"?e():e}function Nv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Cr(),v=Er(),g=Wt(c),h=Wt(l),y=Wt(n),b=Wt(d),x=A.useRef(),T=A.useRef(-1),E=A.useRef(),I=A.useRef(-1),w=A.useRef(!0),C=A.useRef(!1),P=A.useRef(()=>{}),_=A.useRef(!1),F=Ct(()=>{var M;const k=(M=o.current.openEvent)==null?void 0:M.type;return k?.includes("mouse")&&k!=="mousedown"});A.useEffect(()=>{if(!s)return;function M(k){let{open:L}=k;L||(Yt(T),Yt(I),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!g.current||!n)return;function M(L){F()&&r(!1,L,"hover")}const k=Ut(a.floating).documentElement;return k.addEventListener("mouseleave",M),()=>{k.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,F]);const V=A.useCallback(function(M,k,L){k===void 0&&(k=!0),L===void 0&&(L="hover");const $=Uu(h.current,"close",x.current);$&&!E.current?(Yt(T),T.current=window.setTimeout(()=>r(!1,M,L),$)):k&&(Yt(T),r(!1,M,L))},[h,r]),N=Ct(()=>{P.current(),E.current=void 0}),O=Ct(()=>{if(C.current){const M=Ut(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Dv),C.current=!1}}),D=Ct(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function M(q){if(Yt(T),w.current=!1,u&&!Vo(x.current)||Gu(b.current)>0&&!Uu(h.current,"open"))return;const G=Uu(h.current,"open",x.current);G?T.current=window.setTimeout(()=>{y.current||r(!0,q,"hover")},G):n||r(!0,q,"hover")}function k(q){if(D()){O();return}P.current();const G=Ut(a.floating);if(Yt(I),_.current=!1,g.current&&o.current.floatingContext){n||Yt(T),E.current=g.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q,!0,"safe-polygon")}});const J=E.current;G.addEventListener("mousemove",J),P.current=()=>{G.removeEventListener("mousemove",J)};return}(x.current!=="touch"||!Ht(a.floating,q.relatedTarget))&&V(q)}function L(q){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q)}})(q))}function $(){Yt(T)}function B(q){D()||V(q,!1)}if(nt(a.domReference)){const q=a.domReference,G=a.floating;return n&&q.addEventListener("mouseleave",L),f&&q.addEventListener("mousemove",M,{once:!0}),q.addEventListener("mouseenter",M),q.addEventListener("mouseleave",k),G&&(G.addEventListener("mouseleave",L),G.addEventListener("mouseenter",$),G.addEventListener("mouseleave",B)),()=>{n&&q.removeEventListener("mouseleave",L),f&&q.removeEventListener("mousemove",M),q.removeEventListener("mouseenter",M),q.removeEventListener("mouseleave",k),G&&(G.removeEventListener("mouseleave",L),G.removeEventListener("mouseenter",$),G.removeEventListener("mouseleave",B))}}},[a,s,e,u,f,V,N,O,r,n,y,p,h,g,o,D,b]),rt(()=>{var M;if(s&&n&&(M=g.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){C.current=!0;const L=a.floating;if(nt(a.domReference)&&L){var k;const $=Ut(a.floating).body;$.setAttribute(Dv,"");const B=a.domReference,q=p==null||(k=p.nodesRef.current.find(G=>G.id===v))==null||(k=k.context)==null?void 0:k.elements.floating;return q&&(q.style.pointerEvents=""),$.style.pointerEvents="none",B.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{$.style.pointerEvents="",B.style.pointerEvents="",L.style.pointerEvents=""}}}},[s,n,v,a,p,g,F]),rt(()=>{n||(x.current=void 0,_.current=!1,N(),O())},[n,N,O]),A.useEffect(()=>()=>{N(),Yt(T),Yt(I),O()},[s,a.domReference,N,O]);const z=A.useMemo(()=>{function M(k){x.current=k.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(k){const{nativeEvent:L}=k;function $(){!w.current&&!y.current&&r(!0,L,"hover")}u&&!Vo(x.current)||n||Gu(b.current)===0||_.current&&k.movementX**2+k.movementY**2<2||(Yt(I),x.current==="touch"?$():(_.current=!0,I.current=window.setTimeout($,Gu(b.current))))}}},[u,r,n,y,b]);return A.useMemo(()=>s?{reference:z}:{},[s,z])}let Fv=0;function ro(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Fv);const i=()=>e?.focus({preventScroll:n});o?i():Fv=requestAnimationFrame(i)}function Yu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Hi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function lP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function cP(e){return e?.ownerDocument||document}const jo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Lv(e){return e==="inert"?jo.inert:e==="aria-hidden"?jo["aria-hidden"]:jo.none}let Vs=new WeakSet,$s={},Ku=0;const uP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Vv=e=>e&&(e.host||Vv(e.parentNode)),dP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Vv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function fP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=dP(t,e),s=new Set,l=new Set(a),c=[];$s[o]||($s[o]=new WeakMap);const u=$s[o];a.forEach(d),f(t),s.clear();function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(wr(v)!=="script")if(s.has(v))f(v);else{const g=i?v.getAttribute(i):null,h=g!==null&&g!=="false",y=Lv(i),b=(y.get(v)||0)+1,x=(u.get(v)||0)+1;y.set(v,b),u.set(v,x),c.push(v),b===1&&h&&Vs.add(v),x===1&&v.setAttribute(o,""),!h&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Ku++,()=>{c.forEach(p=>{const v=Lv(i),h=(v.get(p)||0)-1,y=(u.get(p)||0)-1;v.set(p,h),u.set(p,y),h||(!Vs.has(p)&&i&&p.removeAttribute(i),Vs.delete(p)),y||p.removeAttribute(o)}),Ku--,Ku||(jo.inert=new WeakMap,jo["aria-hidden"]=new WeakMap,jo.none=new WeakMap,Vs=new WeakSet,$s={})}}function $v(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=cP(e[0]).body;return fP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const zs={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},js=A.forwardRef(function(t,n){const[r,o]=A.useState();rt(()=>{Xg()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[no("focus-guard")]:"",style:zs};return m.jsx("span",{...t,...i})}),zv=A.createContext(null),jv=no("portal");function pP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zi(),o=Rv(),[i,a]=A.useState(null),s=A.useRef(null);return rt(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),rt(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(jv,""),l.appendChild(c),s.current=c,a(c)},[t,r]),rt(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!hs(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(jv,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function dr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=pP({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=a?.modal,p=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function g(h){i&&Gi(h)&&(h.type==="focusin"?sv:mA)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,f]),A.useEffect(()=>{i&&(p||sv(i))},[p,i]),m.jsxs(zv.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&m.jsx(js,{"data-type":"outside",ref:l,onFocus:g=>{if(Gi(g,i)){var h;(h=u.current)==null||h.focus()}else{const y=a?a.domReference:null,b=av(y);b?.focus()}}}),v&&i&&m.jsx("span",{"aria-owns":i.id,style:zs}),i&&jn.createPortal(t,i),v&&i&&m.jsx(js,{"data-type":"outside",ref:c,onFocus:g=>{if(Gi(g,i)){var h;(h=d.current)==null||h.focus()}else{const y=a?a.domReference:null,b=iv(y);b?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Rv=()=>A.useContext(zv);function Bv(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const hP=20;let kr=[];function Zu(){kr=kr.filter(e=>e.isConnected)}function mP(e){Zu(),e&&wr(e)!=="body"&&(kr.push(e),kr.length>hP&&(kr=kr.slice(-20)))}function Hv(){return Zu(),kr[kr.length-1]}function gP(e){const t=Ui();return Kg(e,t)?e:Cs(e,t)[0]||e}function Wv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Ui(),i=QI(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Kg(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const vP=A.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:zs})});function oo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:h,dataRef:y,elements:{domReference:b,floating:x}}=t,T=Ct(()=>{var H;return(H=y.current.floatingContext)==null?void 0:H.nodeId}),E=Ct(p),I=typeof a=="number"&&a<0,w=zu(b)&&I,C=uP(),P=C?i:!0,_=!P||C&&f,F=Wt(o),V=Wt(a),N=Wt(s),O=Cr(),D=Rv(),z=A.useRef(null),M=A.useRef(null),k=A.useRef(!1),L=A.useRef(!1),$=A.useRef(-1),B=A.useRef(-1),q=D!=null,G=ks(x),W=Ct(function(H){return H===void 0&&(H=G),H?Cs(H,Ui()):[]}),J=Ct(H=>{const se=W(H);return F.current.map(ae=>b&&ae==="reference"?b:G&&ae==="floating"?G:se).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function H(ae){if(ae.key==="Tab"){Ht(G,qn(Ut(G)))&&W().length===0&&!w&&Gt(ae);const Q=J(),le=Un(ae);F.current[0]==="reference"&&le===b&&(Gt(ae),ae.shiftKey?ro(Q[Q.length-1]):ro(Q[1])),F.current[1]==="floating"&&le===G&&ae.shiftKey&&(Gt(ae),ro(Q[0]))}}const se=Ut(G);return se.addEventListener("keydown",H),()=>{se.removeEventListener("keydown",H)}},[r,b,G,c,F,w,W,J]),A.useEffect(()=>{if(r||!x)return;function H(se){const ae=Un(se),le=W().indexOf(ae);le!==-1&&($.current=le)}return x.addEventListener("focusin",H),()=>{x.removeEventListener("focusin",H)}},[r,x,W]),A.useEffect(()=>{if(r||!d)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function se(le){const te=le.relatedTarget,fe=le.currentTarget,pe=Un(le);queueMicrotask(()=>{const ve=T(),Ae=!(Ht(b,te)||Ht(x,te)||Ht(te,x)||Ht(D?.portalNode,te)||te!=null&&te.hasAttribute(no("focus-guard"))||O&&(Jr(O.nodesRef.current,ve).find(me=>{var oe,j;return Ht((oe=me.context)==null?void 0:oe.elements.floating,te)||Ht((j=me.context)==null?void 0:j.elements.domReference,te)})||ev(O.nodesRef.current,ve).find(me=>{var oe,j,R;return[(oe=me.context)==null?void 0:oe.elements.floating,ks((j=me.context)==null?void 0:j.elements.floating)].includes(te)||((R=me.context)==null?void 0:R.elements.domReference)===te})));if(fe===b&&G&&Wv(G,F),l&&fe!==b&&!(pe!=null&&pe.isConnected)&&qn(Ut(G))===Ut(G).body){Ot(G)&&G.focus();const me=$.current,oe=W(),j=oe[me]||oe[oe.length-1]||G;Ot(j)&&j.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&te&&Ae&&!L.current&&te!==Hv()&&(k.current=!0,g(!1,le,"focus-out"))})}const ae=!!(!O&&D);function Q(){Yt(B),y.current.insideReactTree=!0,B.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(x&&Ot(b))return b.addEventListener("focusout",se),b.addEventListener("pointerdown",H),x.addEventListener("focusout",se),ae&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",se),b.removeEventListener("pointerdown",H),x.removeEventListener("focusout",se),ae&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,O,D,g,d,l,W,w,T,F,y]);const re=A.useRef(null),ee=A.useRef(null),Y=Bv([re,D?.beforeInsideRef]),K=Bv([ee,D?.afterInsideRef]);A.useEffect(()=>{var H,se;if(r||!x)return;const ae=Array.from((D==null||(H=D.portalNode)==null?void 0:H.querySelectorAll("["+no("portal")+"]"))||[]),le=(se=(O?ev(O.nodesRef.current,T()):[]).find(pe=>{var ve;return zu(((ve=pe.context)==null?void 0:ve.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,te=[x,le,...ae,...E(),z.current,M.current,re.current,ee.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,F.current.includes("reference")||w?b:null].filter(pe=>pe!=null),fe=c||w?$v(te,!_,_):$v(te);return()=>{fe()}},[r,b,x,c,F,D,w,P,_,O,T,E]),rt(()=>{if(r||!Ot(G))return;const H=Ut(G),se=qn(H);queueMicrotask(()=>{const ae=J(G),Q=V.current,le=(typeof Q=="number"?ae[Q]:Q.current)||G,te=Ht(G,se);!I&&!te&&v&&ro(le,{preventScroll:le===G})})},[r,v,G,I,J,V]),rt(()=>{if(r||!G)return;const H=Ut(G),se=qn(H);mP(se);function ae(te){let{reason:fe,event:pe,nested:ve}=te;if(["hover","safe-polygon"].includes(fe)&&pe.type==="mouseleave"&&(k.current=!0),fe==="outside-press")if(ve)k.current=!1;else if(tv(pe)||nv(pe))k.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?k.current=!1:k.current=!0}}h.on("openchange",ae);const Q=H.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,zs),q&&b&&b.insertAdjacentElement("afterend",Q);function le(){if(typeof N.current=="boolean"){const te=b||Hv();return te&&te.isConnected?te:Q}return N.current.current||Q}return()=>{h.off("openchange",ae);const te=qn(H),fe=Ht(x,te)||O&&Jr(O.nodesRef.current,T(),!1).some(ve=>{var Ae;return Ht((Ae=ve.context)==null?void 0:Ae.elements.floating,te)}),pe=le();queueMicrotask(()=>{const ve=gP(pe);N.current&&!k.current&&Ot(ve)&&(!(ve!==te&&te!==H.body)||fe)&&ve.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,N,y,h,O,q,b,T]),A.useEffect(()=>(queueMicrotask(()=>{k.current=!1}),()=>{queueMicrotask(Zu)}),[r]),rt(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:b}),()=>{D.setFocusManagerState(null)}},[r,D,c,v,g,d,b]),rt(()=>{r||G&&Wv(G,F)},[r,G,F]);function X(H){return r||!u||!c?null:m.jsx(vP,{ref:H==="start"?z:M,onClick:se=>g(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const de=!r&&P&&(c?!w:!0)&&(q||c);return m.jsxs(m.Fragment,{children:[de&&m.jsx(js,{"data-type":"inside",ref:Y,onFocus:H=>{if(c){const ae=J();ro(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(k.current=!1,Gi(H,D.portalNode)){const ae=iv(b);ae?.focus()}else{var se;(se=D.beforeOutsideRef.current)==null||se.focus()}}}),!w&&X("start"),n,X("end"),de&&m.jsx(js,{"data-type":"inside",ref:K,onFocus:H=>{if(c)ro(J()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(k.current=!0),Gi(H,D.portalNode)){const ae=av(b);ae?.focus()}else{var se;(se=D.afterOutsideRef.current)==null||se.focus()}}})]})}let Rs=0;const qv="--floating-ui-scrollbar-width";function yP(){const e=Du(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(qv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(qv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Uv=()=>{};const Xu=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return rt(()=>{if(r)return Rs++,Rs===1&&(Uv=yP()),()=>{Rs--,Rs===0&&Uv()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Gv(e){return Ot(e.target)&&e.target.tagName==="BUTTON"}function bP(e){return Ot(e.target)&&e.target.tagName==="A"}function Yv(e){return $u(e)}function Ro(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const h=f.current;g.button===0&&s!=="click"&&(Vo(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){const h=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Vo(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||Gv(g))&&(g.key===" "&&!Yv(i)&&(g.preventDefault(),p.current=!0),!bP(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||Gv(g)||Yv(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:v}:{},[a,v])}function xP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,f=a.x,p=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=s&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Kv(e){return e!=null&&e.clientX!=null}function wP(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=A.useRef(!1),f=A.useRef(null),[p,v]=A.useState(),[g,h]=A.useState([]),y=Ct((I,w)=>{d.current||r.current.openEvent&&!Kv(r.current.openEvent)||a.setPositionReference(xP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=Ct(I=>{c!=null||u!=null||(n?f.current||h([]):y(I.clientX,I.clientY))}),x=Vo(p)?o:n,T=A.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const I=qt(o);function w(C){const P=Un(C);Ht(o,P)?(I.removeEventListener("mousemove",w),f.current=null):y(C.clientX,C.clientY)}if(!r.current.openEvent||Kv(r.current.openEvent)){I.addEventListener("mousemove",w);const C=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,y]);A.useEffect(()=>T(),[T,g]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),rt(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const E=A.useMemo(()=>{function I(w){let{pointerType:C}=w;v(C)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return A.useMemo(()=>s?{reference:E}:{},[s,E])}const SP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},TP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Ir(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,g=Cr(),h=Ct(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,b=A.useRef(!1),{escapeKey:x,outsidePress:T}=Zv(p),{escapeKey:E,outsidePress:I}=Zv(v),w=A.useRef(!1),C=Ct(O=>{var D;if(!n||!a||!s||O.key!=="Escape"||w.current)return;const z=(D=i.current.floatingContext)==null?void 0:D.nodeId,M=g?Jr(g.nodesRef.current,z):[];if(!x&&(O.stopPropagation(),M.length>0)){let k=!0;if(M.forEach(L=>{var $;if(($=L.context)!=null&&$.open&&!L.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,aA(O)?O.nativeEvent:O,"escape-key")}),P=Ct(O=>{var D;const z=()=>{var M;C(O),(M=Un(O))==null||M.removeEventListener("keydown",z)};(D=Un(O))==null||D.addEventListener("keydown",z)}),_=Ct(O=>{var D;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof y=="function"&&!y(O))return;const k=Un(O),L="["+no("inert")+"]",$=Ut(o.floating).querySelectorAll(L);let B=nt(k)?k:null;for(;B&&!lr(B);){const J=cr(B);if(lr(J)||!nt(J))break;B=J}if($.length&&nt(k)&&!rA(k)&&!Ht(k,o.floating)&&Array.from($).every(J=>!Ht(B,J)))return;if(Ot(k)&&N){const J=lr(k),re=cn(k),ee=/auto|scroll/,Y=J||ee.test(re.overflowX),K=J||ee.test(re.overflowY),X=Y&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,de=K&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,H=re.direction==="rtl",se=de&&(H?O.offsetX<=k.offsetWidth-k.clientWidth:O.offsetX>k.clientWidth),ae=X&&O.offsetY>k.clientHeight;if(se||ae)return}const q=(D=i.current.floatingContext)==null?void 0:D.nodeId,G=g&&Jr(g.nodesRef.current,q).some(J=>{var re;return Vu(O,(re=J.context)==null?void 0:re.elements.floating)});if(Vu(O,o.floating)||Vu(O,o.domReference)||G)return;const W=g?Jr(g.nodesRef.current,q):[];if(W.length>0){let J=!0;if(W.forEach(re=>{var ee;if((ee=re.context)!=null&&ee.open&&!re.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,O,"outside-press")}),F=Ct(O=>{var D;const z=()=>{var M;_(O),(M=Un(O))==null||M.removeEventListener(c,z)};(D=Un(O))==null||D.addEventListener(c,z)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let O=-1;function D($){r(!1,$,"ancestor-scroll")}function z(){window.clearTimeout(O),w.current=!0}function M(){O=window.setTimeout(()=>{w.current=!1},gs()?5:0)}const k=Ut(o.floating);s&&(k.addEventListener("keydown",E?P:C,E),k.addEventListener("compositionstart",z),k.addEventListener("compositionend",M)),y&&k.addEventListener(c,I?F:_,I);let L=[];return f&&(nt(o.domReference)&&(L=Sr(o.domReference)),nt(o.floating)&&(L=L.concat(Sr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(Sr(o.reference.contextElement)))),L=L.filter($=>{var B;return $!==((B=k.defaultView)==null?void 0:B.visualViewport)}),L.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{s&&(k.removeEventListener("keydown",E?P:C,E),k.removeEventListener("compositionstart",z),k.removeEventListener("compositionend",M)),y&&k.removeEventListener(c,I?F:_,I),L.forEach($=>{$.removeEventListener("scroll",D)}),window.clearTimeout(O)}},[i,o,s,y,c,n,r,f,a,x,T,C,E,P,_,I,F]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const V=A.useMemo(()=>({onKeyDown:C,...u&&{[SP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[C,r,u,d]),N=A.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[TP[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return A.useMemo(()=>a?{reference:V,floating:N}:{},[a,V,N])}function EP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zi(),i=A.useRef({}),[a]=A.useState(()=>Ov()),s=Er()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!nt(p)&&oP("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=A.useState(r.reference),u=Ct((p,v,g)=>{i.current.openEvent=p?v:void 0,a.emit("openchange",{open:p,event:v,reason:g,nested:s}),n?.(p,v,g)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=EP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Cr();rt(()=>{u&&(d.current=u)},[u]);const p=ZA({...e,elements:{...o,...s&&{reference:s}}}),v=A.useCallback(x=>{const T=nt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),p.refs.setReference(T)},[p.refs]),g=A.useCallback(x=>{(nt(x)||x===null)&&(d.current=x,a(x)),(nt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!nt(x))&&p.refs.setReference(x)},[p.refs]),h=A.useMemo(()=>({...p.refs,setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=A.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=A.useMemo(()=>({...p,...r,refs:h,elements:y,nodeId:t}),[p,h,y,t,r]);return rt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),A.useMemo(()=>({...p,context:b,refs:h,elements:y}),[p,h,y,b])}function Qu(){return JI()&&Xg()}function CP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const p=qt(a.domReference);function v(){!n&&Ot(a.domReference)&&a.domReference===qn(Ut(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function h(){d.current=!1}return p.addEventListener("blur",v),Qu()&&(p.addEventListener("keydown",g,!0),p.addEventListener("pointerdown",h,!0)),()=>{p.removeEventListener("blur",v),Qu()&&(p.removeEventListener("keydown",g,!0),p.removeEventListener("pointerdown",h,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function p(v){let{reason:g}=v;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,s]),A.useEffect(()=>()=>{Yt(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const v=Un(p.nativeEvent);if(l&&nt(v)){if(Qu()&&!p.relatedTarget){if(!d.current&&!$u(v))return}else if(!oA(v))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const v=p.relatedTarget,g=p.nativeEvent,h=nt(v)&&v.hasAttribute(no("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=qn(a.domReference?a.domReference.ownerDocument:document);!v&&b===a.domReference||Ht((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ht(a.domReference,b)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:f}:{},[s,f])}function Ju(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Cv]:a,[kv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[eP]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Cv,kv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var f,p=arguments.length,v=new Array(p),g=0;g<p;g++)v[g]=arguments[g];return(f=r.get(c))==null?void 0:f.map(h=>h(...v)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=A.useCallback(s=>Ju(s,e,"reference"),t),i=A.useCallback(s=>Ju(s,e,"floating"),n),a=A.useCallback(s=>Ju(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const kP="Escape";function Bs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Hs(e,t){return Bs(t,e===Iv||e===Fs,e===Yi||e===Ki)}function ed(e,t,n){return Bs(t,e===Fs,n?e===Yi:e===Ki)||e==="Enter"||e===" "||e===""}function Xv(e,t,n){return Bs(t,n?e===Yi:e===Ki,e===Fs)}function Qv(e,t,n,r){const o=n?e===Ki:e===Yi,i=e===Iv;return t==="both"||t==="horizontal"&&r&&r>1?e===kP:Bs(t,o,i)}function Ws(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:v=!1,virtual:g=!1,focusItemOnOpen:h="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ls("`useListNavigation` looping must be enabled to allow escaping."),g||Ls("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ls("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=ks(o.floating),V=Wt(F),N=Er(),O=Cr();rt(()=>{e.dataRef.current.orientation=T},[e,T]);const D=Ct(()=>{l(k.current===-1?null:k.current)}),z=zu(o.domReference),M=A.useRef(h),k=A.useRef(u??-1),L=A.useRef(null),$=A.useRef(!0),B=A.useRef(D),q=A.useRef(!!o.floating),G=A.useRef(n),W=A.useRef(!1),J=A.useRef(!1),re=Wt(x),ee=Wt(n),Y=Wt(w),K=Wt(u),[X,de]=A.useState(),[H,se]=A.useState(),ae=Ct(()=>{function me(ne){if(g){var ce;(ce=ne.id)!=null&&ce.endsWith("-fui-option")&&(ne.id=i+"-"+Math.random().toString(16).slice(2,10)),de(ne.id),O?.events.emit("virtualfocus",ne),C&&(C.current=ne)}else ro(ne,{sync:W.current,preventScroll:!0})}const oe=a.current[k.current],j=J.current;oe&&me(oe),(W.current?ne=>ne():requestAnimationFrame)(()=>{const ne=a.current[k.current]||oe;if(!ne)return;oe||me(ne);const ce=Y.current;ce&&le&&(j||!$.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});rt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(J.current=!0,k.current=u,D()):q.current&&(k.current=-1,B.current()))},[c,n,o.floating,u,D]),rt(()=>{if(c&&n&&o.floating)if(s==null){if(W.current=!1,K.current!=null)return;if(q.current&&(k.current=-1,ae()),(!G.current||!q.current)&&M.current&&(L.current!=null||M.current===!0&&L.current==null)){let me=0;const oe=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(oe),me++):(k.current=L.current==null||ed(L.current,T,v)||p?ju(a,re.current):rv(a,re.current),L.current=null,D())};oe()}}else qi(a,s)||(k.current=s,ae(),J.current=!1)},[c,n,o.floating,s,K,p,a,T,v,D,ae,re]),rt(()=>{var me;if(!c||o.floating||!O||g||!q.current)return;const oe=O.nodesRef.current,j=(me=oe.find(ce=>ce.id===N))==null||(me=me.context)==null?void 0:me.elements.floating,R=qn(Ut(o.floating)),ne=oe.some(ce=>ce.context&&Ht(ce.context.elements.floating,R));j&&!ne&&$.current&&j.focus({preventScroll:!0})},[c,o.floating,O,N,g]),rt(()=>{if(!c||!O||!g||N)return;function me(oe){se(oe.id),C&&(C.current=oe)}return O.events.on("virtualfocus",me),()=>{O.events.off("virtualfocus",me)}},[c,O,g,N,C]),rt(()=>{B.current=D,G.current=n,q.current=!!o.floating}),rt(()=>{n||(L.current=null,M.current=h)},[n,h]);const Q=s!=null,le=A.useMemo(()=>{function me(j){if(!ee.current)return;const R=a.current.indexOf(j);R!==-1&&k.current!==R&&(k.current=R,D())}return{onFocus(j){let{currentTarget:R}=j;W.current=!0,me(R)},onClick:j=>{let{currentTarget:R}=j;return R.focus({preventScroll:!0})},onMouseMove(j){let{currentTarget:R}=j;W.current=!0,J.current=!1,y&&me(R)},onPointerLeave(j){let{pointerType:R}=j;if(!(!$.current||R==="touch")&&(W.current=!0,!!y&&(k.current=-1,D(),!g))){var ne;(ne=V.current)==null||ne.focus({preventScroll:!0})}}}},[ee,V,y,a,D,g]),te=A.useCallback(()=>{var me;return E??(O==null||(me=O.nodesRef.current.find(oe=>oe.id===N))==null||(me=me.context)==null||(me=me.dataRef)==null?void 0:me.current.orientation)},[N,O,E]),fe=Ct(me=>{if($.current=!1,W.current=!0,me.which===229||!ee.current&&me.currentTarget===V.current)return;if(p&&Qv(me.key,T,v,I)){Hs(me.key,te())||Gt(me),r(!1,me.nativeEvent,"list-navigation"),Ot(o.domReference)&&(g?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const oe=k.current,j=ju(a,x),R=rv(a,x);if(z||(me.key==="Home"&&(Gt(me),k.current=j,D()),me.key==="End"&&(Gt(me),k.current=R,D())),I>1){const ne=P||Array.from({length:a.current.length},()=>({width:1,height:1})),ce=fA(ne,I,_),xe=ce.findIndex(qe=>qe!=null&&!As(a,qe,x)),ke=ce.reduce((qe,pt,ht)=>pt!=null&&!As(a,pt,x)?ht:qe,-1),_e=ce[dA({current:ce.map(qe=>qe!=null?a.current[qe]:null)},{event:me,orientation:T,loop:f,rtl:v,cols:I,disabledIndices:hA([...(typeof x!="function"?x:null)||a.current.map((qe,pt)=>As(a,pt,x)?pt:void 0),void 0],ce),minIndex:xe,maxIndex:ke,prevIndex:pA(k.current>R?j:k.current,ne,ce,I,me.key===Fs?"bl":me.key===(v?Yi:Ki)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(k.current=_e,D()),T==="both")return}if(Hs(me.key,T)){if(Gt(me),n&&!g&&qn(me.currentTarget.ownerDocument)===me.currentTarget){k.current=ed(me.key,T,v)?j:R,D();return}ed(me.key,T,v)?f?k.current=oe>=R?d&&oe!==a.current.length?-1:j:Xt(a,{startingIndex:oe,disabledIndices:x}):k.current=Math.min(R,Xt(a,{startingIndex:oe,disabledIndices:x})):f?k.current=oe<=j?d&&oe!==-1?a.current.length:R:Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:x}):k.current=Math.max(j,Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:x})),qi(a,k.current)&&(k.current=-1),D()}}),pe=A.useMemo(()=>g&&n&&Q&&{"aria-activedescendant":H||X},[g,n,Q,H,X]),ve=A.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:pe,onKeyDown:fe,onPointerMove(){$.current=!0}}),[pe,fe,T,z]),Ae=A.useMemo(()=>{function me(j){h==="auto"&&tv(j.nativeEvent)&&(M.current=!0)}function oe(j){M.current=h,h==="auto"&&nv(j.nativeEvent)&&(M.current=!0)}return{...pe,onKeyDown(j){$.current=!1;const R=j.key.startsWith("Arrow"),ne=["Home","End"].includes(j.key),ce=R||ne,xe=Xv(j.key,T,v),ke=Qv(j.key,T,v,I),_e=Xv(j.key,te(),v),qe=Hs(j.key,T),pt=(p?_e:qe)||j.key==="Enter"||j.key.trim()==="";if(g&&n){const U=O?.nodesRef.current.find(Oe=>Oe.parentId==null),Z=O&&U?iA(O.nodesRef.current,U.id):null;if(ce&&Z&&C){const Oe=new KeyboardEvent("keydown",{key:j.key,bubbles:!0});if(xe||ke){var ht,$t;const Ge=((ht=Z.context)==null?void 0:ht.elements.domReference)===j.currentTarget,Ze=ke&&!Ge?($t=Z.context)==null?void 0:$t.elements.domReference:xe?a.current.find(Ne=>Ne?.id===X):null;Ze&&(Gt(j),Ze.dispatchEvent(Oe),se(void 0))}if((qe||ne)&&Z.context&&Z.context.open&&Z.parentId&&j.currentTarget!==Z.context.elements.domReference){var $e;Gt(j),($e=Z.context.elements.domReference)==null||$e.dispatchEvent(Oe);return}}return fe(j)}if(!(!n&&!b&&R)){if(pt){const U=Hs(j.key,te());L.current=p&&U?null:j.key}if(p){_e&&(Gt(j),n?(k.current=ju(a,re.current),D()):r(!0,j.nativeEvent,"list-navigation"));return}qe&&(u!=null&&(k.current=u),Gt(j),!n&&b?r(!0,j.nativeEvent,"list-navigation"):fe(j),n&&D())}},onFocus(){n&&!g&&(k.current=-1,D())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:me,onClick:me}},[X,pe,I,fe,re,h,a,p,D,r,n,b,T,te,v,u,O,g,C]);return A.useMemo(()=>c?{reference:Ae,floating:ve,item:le}:{},[c,Ae,ve,le])}const IP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Zi(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var b;return((b=ks(i.floating))==null?void 0:b.id)||a},[i.floating,a]),f=(r=IP.get(l))!=null?r:l,v=Er()!=null,g=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,v,o,u,l]),h=A.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=A.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return A.useMemo(()=>s?{reference:g,floating:h,item:y}:{},[s,g,h,y])}const Jv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Bo(e,t){return typeof e=="function"?e(t):e}function AP(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function PP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=A.useState("unmounted"),c=AP(n,a);return!c&&s==="close"&&l("unmounted"),rt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{jn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function ey(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,f=(u?a:a.close)||0,[p,v]=A.useState(()=>({...Bo(i,c),...Bo(n,c)})),{isMounted:g,status:h}=PP(e,{duration:a}),y=Wt(n),b=Wt(r),x=Wt(o),T=Wt(i);return rt(()=>{const E=Bo(y.current,c),I=Bo(x.current,c),w=Bo(T.current,c),C=Bo(b.current,c)||Object.keys(E).reduce((P,_)=>(P[_]="",P),{});if(h==="initial"&&v(P=>({transitionProperty:P.transitionProperty,...w,...E})),h==="open"&&v({transitionProperty:Object.keys(C).map(Jv).join(","),transitionDuration:d+"ms",...w,...C}),h==="close"){const P=I||E;v({transitionProperty:Object.keys(P).map(Jv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,x,y,b,T,d,h,c]),{isMounted:g,styles:p}}function OP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,v=A.useRef(-1),g=A.useRef(""),h=A.useRef((n=p??a)!=null?n:-1),y=A.useRef(null),b=Ct(s),x=Ct(l),T=Wt(u),E=Wt(f);rt(()=>{r&&(Yt(v),y.current=null,g.current="")},[r]),rt(()=>{if(r&&g.current===""){var _;h.current=(_=p??a)!=null?_:-1}},[r,p,a]);const I=Ct(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),w=Ct(_=>{function F(z,M,k){const L=T.current?T.current(M,k):M.find($=>$?.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())===0);return L?z.indexOf(L):-1}const V=i.current;if(g.current.length>0&&g.current[0]!==" "&&(F(V,V,g.current)===-1?I(!1):_.key===" "&&Gt(_)),V==null||E.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Gt(_),I(!0)),V.every(z=>{var M,k;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((k=z[1])==null?void 0:k.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=y.current),g.current+=_.key,Yt(v),v.current=window.setTimeout(()=>{g.current="",h.current=y.current,I(!1)},d);const O=h.current,D=F(V,[...V.slice((O||0)+1),...V.slice(0,(O||0)+1)],g.current);D!==-1?(b(D),y.current=D):_.key!==" "&&(g.current="",I(!1))}),C=A.useMemo(()=>({onKeyDown:w}),[w]),P=A.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&I(!1)}}),[w,I]);return A.useMemo(()=>c?{reference:C,floating:P}:{},[c,C,P])}function ty(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ty(e,o.id,n)])}function ny(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function _P(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ry(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),v=p-l;if(a===null||s===null||v===0)return a=d,s=f,l=p,null;const g=d-a,h=f-s,b=Math.sqrt(g*g+h*h)/v;return a=d,s=f,l=p,b}const u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:h,nodeId:y,tree:b}=d;return function(T){function E(){Yt(o),h()}if(Yt(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,C=[I,w],P=lP(T),_=T.type==="mouseleave",F=Yu(g.floating,P),V=Yu(g.domReference,P),N=g.domReference.getBoundingClientRect(),O=g.floating.getBoundingClientRect(),D=v.split("-")[0],z=f>O.right-O.width/2,M=p>O.bottom-O.height/2,k=_P(C,N),L=O.width>N.width,$=O.height>N.height,B=(L?N:O).left,q=(L?N:O).right,G=($?N:O).top,W=($?N:O).bottom;if(F&&(i=!0,!_))return;if(V&&(i=!1),V&&!_){i=!0;return}if(_&&nt(T.relatedTarget)&&Yu(g.floating,T.relatedTarget)||b&&ty(b.nodesRef.current,y).length)return;if(D==="top"&&p>=N.bottom-1||D==="bottom"&&p<=N.top+1||D==="left"&&f>=N.right-1||D==="right"&&f<=N.left+1)return E();let J=[];switch(D){case"top":J=[[B,N.top+1],[B,O.bottom-1],[q,O.bottom-1],[q,N.top+1]];break;case"bottom":J=[[B,O.top+1],[B,N.bottom-1],[q,N.bottom-1],[q,O.top+1]];break;case"left":J=[[O.right-1,W],[O.right-1,G],[N.left+1,G],[N.left+1,W]];break;case"right":J=[[N.right-1,W],[N.right-1,G],[O.left+1,G],[O.left+1,W]];break}function re(ee){let[Y,K]=ee;switch(D){case"top":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K+t+1],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K+t+1],H=[[O.left,z||L?O.bottom-t:O.top],[O.right,z?L?O.bottom-t:O.top:O.bottom-t]];return[X,de,...H]}case"bottom":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K-t],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K-t],H=[[O.left,z||L?O.top+t:O.bottom],[O.right,z?L?O.top+t:O.bottom:O.top+t]];return[X,de,...H]}case"left":{const X=[Y+t+1,$?K+t/2:M?K+t*4:K-t*4],de=[Y+t+1,$?K-t/2:M?K+t*4:K-t*4];return[...[[M||$?O.right-t:O.left,O.top],[M?$?O.right-t:O.left:O.right-t,O.bottom]],X,de]}case"right":{const X=[Y-t,$?K+t/2:M?K+t*4:K-t*4],de=[Y-t,$?K-t/2:M?K+t*4:K-t*4],H=[[M||$?O.left+t:O.right,O.top],[M?$?O.left+t:O.right:O.left+t,O.bottom]];return[X,de,...H]}}}if(!ny([I,w],J)){if(i&&!k)return E();if(!_&&r){const ee=c(T.clientX,T.clientY);if(ee!==null&&ee<.1)return E()}ny([I,w],re([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const oy=200,MP=500,Ho=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},iy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ay={basic:/[,[\]]+?/,extend:/[,[\].]+?/},td=(e,t)=>{const n=iy(t,ay.basic,e)||iy(t,ay.extend,e);return n===void 0||n===e?void 0:n},Ar=()=>typeof window>"u",nd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),sy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},DP=e=>!e,Wo=()=>{},ly=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},rd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=Wo,followCursor:d=!1,...f},p){const[v,g]=S.useState(n??!1),h=S.useRef(null),y=t||"span",b=O=>{g(O),u?.(O)},{refs:x,floatingStyles:T,context:E}=Gn({placement:i,open:v,whileElementsMounted:to,onOpenChange:n?void 0:b,middleware:[Ds(),zo(5),Sv(),Wu({padding:5,element:h}),Ns({fallbackAxisSideDirection:"start"})]}),I=Ir(E,{enabled:l}),w=fr(E,{role:"tooltip",enabled:l}),C=CP(E,{enabled:l?a:!1}),P=Ro(E,{enabled:l?c:!1}),_=wP(E,{enabled:!!l&&!!d}),F=Nv(E,{move:!0,delay:{open:oy},enabled:l?s:!1,handleClose:c?ry():null}),{getReferenceProps:V,getFloatingProps:N}=Yn([w,I,_,a?C:void 0,s?F:void 0,c?P:void 0]);return S.useEffect(()=>g(n===void 0?!1:n),[n]),m.jsxs(S.Fragment,{children:[m.jsx(y,{...V(f),ref:sr(x.setReference,p),children:r}),v&&m.jsx(dr,{children:m.jsxs(ln,{...N(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(qu,{ref:h,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),cy=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[a,e||o?m.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?m.jsx(rd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:m.jsx("span",{className:"cursor-help",children:m.jsx(br,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:m.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?m.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[m.jsx(bu,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(tI,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Qi=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:v,componentName:g,placeholder:h,hideLeft:y=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Cu(),C=T!==void 0?T:w.input.iconFeedback,P=d??p,_=Pt(),F=e??_.inputOptionalLabel;return m.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Pe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:P,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:m.jsx(cy,{info:s,hideLeft:y,reportStatus:C,title:v,placeholder:h,children:F||n?m.jsxs(S.Fragment,{children:[b?null:m.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:F}),n?m.jsx(S.Fragment,{children:n}):null]}):null}),m.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:a}):null]})]}),m.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),m.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),uy=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:v="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,C=S.useRef(null);return S.useEffect(()=>{if(C.current===null)return;const P=C.current,_=$i(C.current),F=r?.(P),V=N=>{const O=N;if(O.key==="Enter"&&P.enterKeyHint==="next"){const D=P.getAttribute("data-next");if(D){const z=document.getElementById(D);if(z)return z.focus(),void O.preventDefault()}}};return P.addEventListener("keydown",V),()=>{F?.(),_(),P.removeEventListener("keydown",V)}},[]),m.jsx(Qi,{...n,info:i,left:a,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:h,hideLeft:y,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:g,placeholder:T.placeholder,container:Pe(u,n.container),children:m.jsx(I,{...n,...T,id:w,name:w,type:v,"data-next":s,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:sr(E,C),className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),qo=uy(Cg,"input",{type:"text"}),NP=Ao("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-1 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),pr=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return m.jsxs(ln,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Pe(NP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),io=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:v,error:g,...h},y)=>{const b=Pt(),x=S.useRef(null),T=h.id??h.name;S.useImperativeHandle(y,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,C=$i(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{C(),I.abort()}},[]);const E=()=>x.current?.focus();return m.jsx(Qi,{info:n,left:v,error:g,form:h.form,loading:c,name:h.name,feedback:o,hideLeft:f,required:e,title:h.title,container:d,componentName:"select",rightLabel:s,hiddenLabel:l,interactive:a,id:h.name||h.id,optionalText:u,labelClassName:i,placeholder:h.placeholder,right:m.jsxs("label",{htmlFor:T,children:[p,m.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(vu,{size:20}),m.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:m.jsxs("select",{...h,id:T,name:T,required:e,ref:sr(y,x),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Pe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function In(e){return e?.ownerDocument||document}function FP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
5
|
-
`))},[r,n,e]);const{current:c}=
|
|
6
|
-
`))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||a(c)},[]);return[s,l]}const dy={};function ao(e,t){const n=A.useRef(dy);return n.current===dy&&(n.current=e(t)),n}const od=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],LP=od&&od!==A.useLayoutEffect?od:e=>e();function Ye(e){const t=ao(VP).current;return t.next=e,LP(t.effect),t.trampoline}function VP(){const e={next:void 0,callback:$P,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $P(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const St=typeof document<"u"?A.useLayoutEffect:()=>{};function id(e){const t=ao(zP,e).current;return t.next=e,St(t.effect),t}function zP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let ad;process.env.NODE_ENV!=="production"&&(ad=new Set);function jP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ad.has(t)||(ad.add(t),console.warn(`Base UI: ${t}`))}}function An(){}const Pn=Object.freeze({}),RP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},BP="none",fy="track-press",HP="input-change",WP="focus-out",qP="keyboard",UP="drag";function Uo(e,t,n,r){let o=!1,i=!1;const a=r??Pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function py(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function GP(e,t){const n=A.useRef(e),r=Ye(t);St(()=>{n.current!==e&&r(n.current)},[e,r]),St(()=>{n.current=e},[e])}const YP={...A};let hy=0;function KP(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(hy+=1,r(`${t}-${hy}`))},[n,t]),o}const my=YP.useId;function qs(e,t){if(my!==void 0){const n=my();return e??(t?`${t}-${n}`:n)}return KP(e,t)}function Us(e){return qs(e,"base-ui")}function Pr(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function sd(e,t,n,r){const o=ao(gy).current;return XP(o,e,t,n,r)&&vy(o,[e,t,n,r]),o.callback}function ZP(e){const t=ao(gy).current;return QP(t,e)&&vy(t,e),t.callback}function gy(){return{callback:null,cleanup:null,refs:[]}}function XP(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function QP(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function vy(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const JP=parseInt(A.version,10);function yy(e){return JP>=e}function by(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(yy(19)?n?.ref:t.ref)??null}function ld(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function eO(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function tO(e,t){return typeof e=="function"?e(t):e}function nO(e,t){return typeof e=="function"?e(t):e}const Ji={};function cd(e,t,n,r,o){let i={...ud(e,Ji)};return t&&(i=Gs(i,t)),n&&(i=Gs(i,n)),r&&(i=Gs(i,r)),i}function rO(e){if(e.length===0)return Ji;if(e.length===1)return ud(e[0],Ji);let t={...ud(e[0],Ji)};for(let n=1;n<e.length;n+=1)t=Gs(t,e[n]);return t}function Gs(e,t){return xy(t)?t(e):oO(e,t)}function oO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ld(e.style,r);break}case"className":{e[n]=wy(e.className,r);break}default:iO(n,r)?e[n]=aO(e[n],r):e[n]=r}}return e}function iO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function xy(e){return typeof e=="function"}function ud(e,t){return xy(e)?e(t):e??Ji}function aO(e,t){return t?e?n=>{if(sO(n)){const o=n;dd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function dd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wy(e,t){return t?e?t+" "+e:t:e}function sO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=lO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return cO(e,r,o,i)}function lO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?tO(n,i):void 0,d=c?nO(r,i):void 0,f=c?eO(i,l):Pn,p=c?ld(f,Array.isArray(s)?rO(s):s)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(a)?p.ref=ZP([p.ref,by(o),...a]):p.ref=sd(p.ref,by(o),a):sd(null,null)),c?(u!==void 0&&(p.className=wy(p.className,u)),d!==void 0&&(p.style=ld(p.style,d)),p):Pn}function cO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=cd(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return uO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Pr(8))}function uO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function On(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Sy(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const ea=typeof navigator<"u",fd=mO(),dO=vO(),fO=gO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),fd.platform==="MacIntel"&&fd.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(fd.platform);const pO=ea&&/apple/i.test(navigator.vendor);ea&&dO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const hO=fO.includes("jsdom/");function mO(){if(!ea)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function gO(){if(!ea)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function vO(){if(!ea)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function so(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Or(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Hi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function hd(e){return e?.ownerDocument||document}function md(e){if(!e||hO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}var yO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],gd=yO.join(","),Ty=typeof Element>"u",ta=Ty?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ys=!Ty&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ks=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ks(t.parentNode));return a},bO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},xO=function(t,n,r){if(Ks(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(gd));return n&&ta.call(t,gd)&&o.unshift(t),o=o.filter(r),o},vd=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ks(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=vd(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=ta.call(a,gd);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ks(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=vd(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Ey=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Cy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bO(t))&&!Ey(t)?0:t.tabIndex},wO=function(t,n){var r=Cy(t);return r<0&&n&&!Ey(t)?0:r},SO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ky=function(t){return t.tagName==="INPUT"},TO=function(t){return ky(t)&&t.type==="hidden"},EO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},CO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},kO=function(t){if(!t.name)return!0;var n=t.form||Ys(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=CO(o,t.form);return!i||i===t},IO=function(t){return ky(t)&&t.type==="radio"},AO=function(t){return IO(t)&&!kO(t)},PO=function(t){var n,r=t&&Ys(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ys(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Iy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ta.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ta.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Ys(t);if(c&&!c.shadowRoot&&o(c)===!0)return Iy(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(PO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Iy(t);return!1},_O=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ta.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},MO=function(t,n){return!(n.disabled||TO(n)||OO(n,t)||EO(n)||_O(n))},Ay=function(t,n){return!(AO(n)||Cy(n)<0||!MO(t,n))},DO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Py=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=wO(s,a),c=a?Py(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(SO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Oy=function(t,n){n=n||{};var r;return n.getShadowRoot?r=vd([t],n.includeContainer,{filter:Ay.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DO}):r=xO(t,n.includeContainer,Ay.bind(null,n)),Py(r)};const _y=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function My(e,t){const n=Oy(e,_y()),r=n.length;if(r===0)return;const o=so(hd(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function NO(e){return My(hd(e).body,1)||e}function FO(e){return My(hd(e).body,-1)||e}function yd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Or(n,r)}function LO(e){Oy(e,_y()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Dy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const bd=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(bd.displayName="CompositeListContext");function VO(){return A.useContext(bd)}function $O(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ye(o),a=A.useRef(0),s=ao(jO).current,l=ao(zO).current,[c,u]=A.useState(0),d=A.useRef(c),f=Ye((y,b)=>{l.set(y,b??null),d.current+=1,u(d.current)}),p=Ye(y=>{l.delete(y),d.current+=1,u(d.current)}),v=A.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(RO).forEach((x,T)=>{const E=l.get(x)??{};y.set(x,{...E,index:T})}),y},[l,c]);St(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return v.forEach((b,x)=>{x.parentElement&&y.observe(x.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),St(()=>{d.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),a.current=v.size),i(v)},[i,v,n,r,c]),St(()=>()=>{n.current=[]},[n]),St(()=>()=>{r&&(r.current=[])},[r]);const g=Ye(y=>(s.add(y),()=>{s.delete(y)}));St(()=>{s.forEach(y=>y(v))},[s,v]);const h=A.useMemo(()=>({register:f,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:a}),[f,p,g,n,r,a]);return m.jsx(bd.Provider,{value:h,children:t})}function zO(){return new Map}function jO(){return new Set}function RO(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function BO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Ny=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:An,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Ny.displayName="FormContext");function Fy(){return A.useContext(Ny)}const HO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ly=A.createContext({invalid:void 0,name:void 0,validityData:{state:HO,errors:[],error:"",value:"",initialValue:null},setValidityData:An,disabled:void 0,touched:!1,setTouched:An,dirty:!1,setDirty:An,filled:!1,setFilled:An,focused:!1,setFocused:An,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ly.displayName="FieldRootContext");function xd(e=!0){const t=A.useContext(Ly);if(t.setValidityData===An&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Pr(28));return t}function WO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=Fy(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=xd(),f=Ye(e.getValue);St(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(v=>({...v,initialValue:p}))},[t,d,n,u.initialValue,f]),St(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:BO(u,l),validate(p=!0){let v=n;v===void 0&&(v=f()),c.current=!0,p?jn.flushSync(()=>a(v)):a(v)}})},[a,i,t,s,f,r,l,c,o,u,n]),St(()=>{const p=s.current.fields;return()=>{r&&p.delete(r)}},[s,r])}const Vy=A.createContext({controlId:void 0,setControlId:An,labelId:void 0,setLabelId:An,messageIds:[],setMessageIds:An,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Vy.displayName="LabelableContext");function $y(){return A.useContext(Vy)}function zy(e,t){return e-t}function qO(e,t,n){const r=e.slice();return r[t]=n,r.sort(zy)}function jy(e,t,n,r,o,i){let a=e;return a=On(a,n,r),o&&(a=qO(i,t,On(a,i[t-1]||-1/0,i[t+1]||1/0))),a}function Ry(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,a,s)=>(a===s.length-1||o.push(Math.abs(i-s[a+1])),o),[]);return Math.min(...r)>=t*n}const na={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},wd=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(wd.displayName="SliderRootContext");function Zs(){const e=A.useContext(wd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Pr(62));return e}function UO(e){return"key"in e?qP:HP}function GO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?Sy(e,t):!1}const By=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:a=!1,id:s,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:v=0,name:g,onValueChange:h,onValueCommitted:y,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,C=Us(s),P=Ye(h),_=Ye(y),{clearErrors:F}=Fy(),{state:V,disabled:N,name:O,setTouched:D,setDirty:z,validityData:M,shouldValidateOnChange:k,validation:L}=xd(),{labelId:$}=$y(),B=r??$,q=N||a,G=O??g,[W,J]=FP({controlled:I,default:i??p,name:"Slider"}),re=A.useRef(null),ee=A.useRef(null),Y=A.useRef([]),K=A.useRef(null),X=A.useRef(null),de=A.useRef(-1),H=A.useRef(null),se=A.useRef(null),ae=A.useRef("none"),Q=id(l),[le,te]=A.useState(-1),[fe,pe]=A.useState(-1),[ve,Ae]=A.useState(!1),[me,oe]=A.useState(()=>new Map),[j,R]=A.useState([void 0,void 0]),ne=Ye($e=>{te($e),$e!==-1&&pe($e)});WO({id:C,commit:L.commit,value:W,controlRef:ee,name:G,getValue:()=>W}),GP(W,()=>{F(G),k()?L.commit(W):L.commit(W,!0);const $e=M.initialValue;let U;Array.isArray(W)&&Array.isArray($e)?U=!Sy(W,$e):U=W!==$e,z(U)});const ce=Ye($e=>{$e&&(ee.current=$e)}),xe=Array.isArray(W),ke=A.useMemo(()=>xe?W.slice().sort(zy):[On(W,p,f)],[f,p,xe,W]),_e=Ye(($e,U)=>{if(Number.isNaN($e)||GO($e,W))return;const Z=U??Uo(BP,void 0,void 0,{activeThumbIndex:-1});ae.current=Z.reason;const Oe=new event.constructor(event.type,event);Object.defineProperty(Oe,"target",{writable:!0,value:{value:$e,name:G}}),Z.event=Oe,se.current=$e,P($e,Z),!Z.isCanceled&&J($e)}),qe=Ye(($e,U,Z)=>{const Oe=jy($e,U,p,f,xe,ke);if(Ry(Oe,x,v)){const Ge=UO(Z);_e(Oe,Uo(Ge,Z.nativeEvent,void 0,{activeThumbIndex:U})),D(!0);const Ze=se.current??Oe;_(Ze,py(Ge,Z.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&jP("Slider `max` must be greater than `min`."),St(()=>{const $e=so(In(re.current));q&&$e&&re.current?.contains($e)&&$e.blur()},[q]),q&&le!==-1&&ne(-1);const pt=A.useMemo(()=>({...V,activeThumbIndex:le,disabled:q,dragging:ve,orientation:b,max:f,min:p,minStepsBetweenValues:v,step:x,values:ke}),[V,le,q,ve,f,p,v,b,x,ke]),ht=A.useMemo(()=>({active:le,controlRef:ee,disabled:q,dragging:ve,validation:L,formatOptionsRef:Q,handleInputChange:qe,indicatorPosition:j,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:fe,lastChangedValueRef:se,lastChangeReasonRef:ae,locale:u,max:f,min:p,minStepsBetweenValues:v,name:G,onValueCommitted:_,orientation:b,pressedInputRef:K,pressedThumbCenterOffsetRef:X,pressedThumbIndexRef:de,pressedValuesRef:H,registerFieldControlRef:ce,renderBeforeHydration:E==="edge",setActive:ne,setDragging:Ae,setIndicatorPosition:R,setValue:_e,state:pt,step:x,thumbCollisionBehavior:T,thumbMap:me,thumbRefs:Y,values:ke}),[le,ee,B,q,ve,L,Q,qe,j,c,fe,se,ae,u,f,p,v,G,_,b,K,X,de,H,ce,ne,Ae,R,_e,pt,x,T,E,me,Y,ke]),$t=an("div",t,{state:pt,ref:[n,re],props:[{"aria-labelledby":B,id:C,role:"group"},L.getValidationProps,w],stateAttributesMapping:na});return m.jsx(wd.Provider,{value:ht,children:m.jsx($O,{elementsRef:Y,onMapChange:oe,children:$t})})});process.env.NODE_ENV!=="production"&&(By.displayName="SliderRoot");const Hy=new Map;function YO(e,t){const n=JSON.stringify({locale:e,options:t}),r=Hy.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return Hy.set(n,o),o}function Go(e,t,n){return e==null?"":YO(t,n).format(e)}const KO=[];function Sd(e){A.useEffect(e,KO)}const Xs=null;let Wy=globalThis.requestAnimationFrame;class ZO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&Wy!==requestAnimationFrame&&(Wy=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Qs=new ZO;class Td{static create(){return new Td}static request(t){return Qs.request(t)}static cancel(t){return Qs.cancel(t)}currentId=Xs;request(t){this.cancel(),this.currentId=Qs.request(()=>{this.currentId=Xs,t()})}cancel=()=>{this.currentId!==Xs&&(Qs.cancel(this.currentId),this.currentId=Xs)};disposeEffect=()=>this.cancel}function qy(){const e=ao(Td.create).current;return Sd(e.disposeEffect),e}const Uy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Uy.displayName="DirectionContext");function Gy(){return A.useContext(Uy)?.direction??"ltr"}function Yy(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function XO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Ky(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(XO(t)))}function Zy({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:a,initialValues:s}){if(e.length===0)return[];const l=e.slice(),c=i*a,u=l.length-1,d=s??e,f=r+t*c,p=o-(u-t)*c;l[t]=On(n,f,p);for(let v=t+1;v<=u;v+=1){const g=l[v-1]+c,h=o-(u-v)*c,y=d[v]??l[v];let b=Math.max(l[v],g);y<b&&(b=Math.max(y,g)),l[v]=On(b,g,h)}for(let v=t-1;v>=0;v-=1){const g=l[v+1]-c,h=r+v*c,y=d[v]??l[v];let b=Math.min(l[v],g);y>b&&(b=Math.min(y,g)),l[v]=On(b,h,g)}for(let v=0;v<=u;v+=1)l[v]=Number(l[v].toFixed(12));return l}function QO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const v=u[o],g=1e-7,h=u.slice(),y=h[o-1],b=h[o+1],x=y!=null?y+p:a,T=b!=null?b-p:s,E=On(i,x,T),I=Number(E.toFixed(12));h[o]=I;const w=i>v,C=i<v,P=w&&b!=null&&i>=b-g,_=C&&y!=null&&i<=y+g;if(!P&&!_)return{value:h,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,V=h.map((z,M)=>{if(M===o)return I;const k=d[M];return k??u[M]});let N=i;P?N=Math.max(i,h[F]):N=Math.min(i,h[F]);const O=Zy({values:h,index:F,nextValue:N,min:a,max:s,step:l,minStepsBetweenValues:c,initialValues:V}),D=P?F-1:F+1;if(D>=0&&D<O.length){const z=O[D-1],M=O[D+1];let k=z!=null?z+p:a;k=Math.max(k,a+D*p);let L=M!=null?M-p:s;L=Math.min(L,s-(O.length-1-D)*p);const $=On(I,k,L);O[D]=Number($.toFixed(12))}return{value:O,thumbIndex:F,didSwap:!0}}case"push":return{value:Zy({values:u,index:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const v=u.slice(),g=v[o-1],h=v[o+1],y=g!=null?g+p:a,b=h!=null?h-p:s,x=On(i,y,b);return v[o]=Number(x.toFixed(12)),{value:v,thumbIndex:o,didSwap:!1}}}}const JO=2;function e_(e,t){if(!e)return{start:0,end:0};function n(i){const a=i!=null?parseFloat(i):0;return Number.isNaN(a)?0:a}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Js(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Xy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:a,dragging:s,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:v,onValueCommitted:g,orientation:h,pressedInputRef:y,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:C,setValue:P,state:_,step:F,thumbCollisionBehavior:V,thumbRefs:N,values:O}=Zs(),D=Gy(),z=O.length>1,M=h==="vertical",k=A.useRef(null),L=A.useRef(null),$=Ye(Q=>{Q&&L.current==null&&L.current==null&&(L.current=getComputedStyle(Q))}),B=A.useRef(null),q=A.useRef(0),G=A.useRef(0),W=id(O),J=Ye(Q=>{x.current!==Q&&(x.current=Q);const le=N.current[Q];if(!le){b.current=null,y.current=null;return}y.current=le.querySelector('input[type="range"]')}),re=Ye(Q=>{const le=k.current;if(!le)return null;const{width:te,height:fe,bottom:pe,left:ve,right:Ae}=le.getBoundingClientRect(),me=e_(L.current,M),oe=G.current,j=(M?fe:te)-me.start-me.end-oe*2,R=b.current??0,ne=Q.x-R,ce=Q.y-R,xe=M?pe-ce-me.end:(D==="rtl"?Ae-ne:ne-ve)-me.start,ke=On((xe-oe)/j,0,1);let _e=(f-p)*ke+p;if(_e=Ky(_e,F,p),_e=On(_e,p,f),!z)return{value:_e,thumbIndex:0,didSwap:!1};const qe=x.current;if(qe<0)return null;const pt=QO({behavior:V,values:O,currentValues:W.current??O,initialValues:T.current,pressedIndex:qe,nextValue:_e,min:p,max:f,step:F,minStepsBetweenValues:v});return V==="swap"&&pt.didSwap?J(pt.thumbIndex):x.current=pt.thumbIndex,pt}),ee=Ye(Q=>{T.current=z?O.slice():null,W.current=O;const le=x.current;let te=le;if(le>-1&&le<O.length){if(O[le]===f){let fe=le;for(;fe>0&&O[fe-1]===f;)fe-=1;te=fe}}else{const fe=M?"y":"x";let pe;te=-1;for(let ve=0;ve<N.current.length;ve+=1){const Ae=N.current[ve];if(nt(Ae)){const me=Yy(Ae),oe=Math.abs(Q[fe]-me[fe]);(pe===void 0||oe<=pe)&&(te=ve,pe=oe)}}}if(te>-1&&te!==le&&J(te),c){const fe=N.current[te];if(nt(fe)){const pe=fe.getBoundingClientRect(),ve=M?"height":"width";G.current=pe[ve]/2}}}),Y=Ye(Q=>{N.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),K=Ye(Q=>{const le=Js(Q,B);if(le==null)return;if(q.current+=1,Q.type==="pointermove"&&Q.buttons===0){X(Q);return}const te=re(le);te!=null&&Ry(te.value,F,v)&&(!s&&q.current>JO&&C(!0),P(te.value,Uo(UP,Q,void 0,{activeThumbIndex:te.thumbIndex})),W.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&Y(te.thumbIndex))});function X(Q){w(-1),C(!1),y.current=null,b.current=null;const le=Js(Q,B),te=le!=null?re(le):null;if(te!=null){const fe=d.current;l.commit(u.current??te.value),g(u.current??te.value,py(fe,Q))}"pointerType"in Q&&k.current?.hasPointerCapture(Q.pointerId)&&k.current?.releasePointerCapture(Q.pointerId),x.current=-1,B.current=null,T.current=null,H()}const de=Ye(Q=>{if(a)return;const le=Q.changedTouches[0];le!=null&&(B.current=le.identifier);const te=Js(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Y(pe.thumbIndex),P(pe.value,Uo(fy,Q,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex)}q.current=0;const fe=In(k.current);fe.addEventListener("touchmove",K,{passive:!0}),fe.addEventListener("touchend",X,{passive:!0})}),H=Ye(()=>{const Q=In(k.current);Q.removeEventListener("pointermove",K),Q.removeEventListener("pointerup",X),Q.removeEventListener("touchmove",K),Q.removeEventListener("touchend",X),T.current=null}),se=qy();return A.useEffect(()=>{const Q=k.current;return Q?(Q.addEventListener("touchstart",de,{passive:!0}),()=>{Q.removeEventListener("touchstart",de),se.cancel(),H()}):()=>H()},[H,de,k,se]),A.useEffect(()=>{a&&H()},[a,H]),an("div",t,{state:_,ref:[n,E,k,$],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const le=k.current;if(!le||a||Q.defaultPrevented||!nt(Q.target)||Q.button!==0)return;const te=Js(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Or(N.current[pe.thumbIndex],so(In(le)))?Q.preventDefault():se.request(()=>{Y(pe.thumbIndex)}),C(!0),b.current!=null||(P(pe.value,Uo(fy,Q.nativeEvent,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex))}Q.nativeEvent.pointerId&&le.setPointerCapture(Q.nativeEvent.pointerId),q.current=0;const fe=In(k.current);fe.addEventListener("pointermove",K,{passive:!0}),fe.addEventListener("pointerup",X,{once:!0})},tabIndex:-1},i],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(Xy.displayName="SliderControl");const Qy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=Zs();return an("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(Qy.displayName="SliderTrack");const el={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function tl(e,t,n){return(e-t)*100/(n-t)}const nl="ArrowUp",rl="ArrowDown",ol="ArrowLeft",il="ArrowRight",al="Home",sl="End",t_=new Set([ol,il]),n_=new Set([nl,rl]),r_=new Set([...t_,...n_]);[...r_];const o_=new Set([nl,rl,ol,il,al,sl]);let i_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function a_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=VO(),f=A.useRef(-1),[p,v]=A.useState(i??(o===i_.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),g=A.useRef(null),h=A.useCallback(y=>{if(g.current=y,p!==-1&&y!==null&&(c.current[p]=y,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??y.textContent}},[p,c,u,t,r]);return St(()=>{if(i!=null)return;const y=g.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),St(()=>{if(i==null)return l(y=>{const b=g.current?y.get(g.current)?.index:null;b!=null&&v(b)})},[i,l,v]),A.useMemo(()=>({ref:h,index:p}),[p,h])}const Jy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jy.displayName="CSPContext");const s_={disableStyleElements:!1};function l_(){return A.useContext(Jy)??s_}function c_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=$y(),a=Us(t);return St(()=>{if(!(!n&&!t||i===An)){if(n){const s=r?.current;nt(s)&&s.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}let u_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const d_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',eb="PageUp",tb="PageDown",f_=new Set([nl,rl,ol,il,al,sl,eb,tb]);function p_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Go(e[t],r,n)} start range`:`${Go(e[t],r,n)} end range`:n?Go(e[t],r,n):void 0}function Yo(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const nb=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":a,"aria-label":s,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:v,onBlur:g,onFocus:h,onKeyDown:y,tabIndex:b,...x}=t,{nonce:T}=l_(),E=Us(f),{active:I,lastUsedThumbIndex:w,controlRef:C,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:V,inset:N,labelId:O,largeStep:D,locale:z,max:M,min:k,minStepsBetweenValues:L,name:$,orientation:B,pressedInputRef:q,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:W,renderBeforeHydration:J,setActive:re,setIndicatorPosition:ee,state:Y,step:K,values:X}=Zs(),de=Gy(),H=c||P,se=X.length>1,ae=B==="vertical",Q=de==="rtl",{setTouched:le,setFocused:te,validationMode:fe}=xd(),pe=A.useRef(null),ve=A.useRef(null),Ae=Us(),me=c_(),oe=se?Ae:me,j=A.useMemo(()=>({inputId:oe}),[oe]),{ref:R,index:ne}=a_({metadata:j}),ce=se?p??ne:0,xe=ce===X.length-1,ke=X[ce],_e=tl(ke,k,M),[qe,pt]=A.useState(!1),[ht,$t]=A.useState();Sd(()=>pt(!0));const $e=w>=0&&w<X.length?w:-1,U=Ye(()=>{const it=C.current,mt=pe.current;if(!it||!mt)return;const at=mt.getBoundingClientRect(),vn=it.getBoundingClientRect(),Yr=ae?"height":"width",Kr=vn[Yr]-at[Yr],Di=(at[Yr]/2+Kr*_e/100)/vn[Yr]*100;$t(Di),ce===0?ee(Ni=>[Di,Ni[1]]):xe&&ee(Ni=>[Ni[0],Di])});St(()=>{N&&queueMicrotask(U)},[U,N]),St(()=>{N&&U()},[U,N,_e]);const Z=A.useCallback(()=>{const it=ae?"bottom":"insetInlineStart",mt=ae?"left":"top";let at;return se?I===ce?at=2:$e===ce&&(at=1):I===ce&&(at=1),N?{"--position":`${ht}%`,visibility:J&&!qe||ht===void 0?"hidden":void 0,position:"absolute",[it]:"var(--position)",[mt]:"50%",translate:`${(ae||!Q?-1:1)*50}% ${(ae?1:-1)*50}%`,zIndex:at}:Number.isFinite(_e)?{position:"absolute",[it]:`${_e}%`,[mt]:"50%",translate:`${(ae||!Q?-1:1)*50}% ${(ae?1:-1)*50}%`,zIndex:at}:el},[I,ce,N,qe,ht,se,J,Q,$e,_e,ae]);let Oe;B==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ge=cd({"aria-label":typeof u=="function"?u(ce):s,"aria-labelledby":l??O,"aria-describedby":a,"aria-orientation":B,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(Go(ke,z,F.current??void 0),ke,ce):p_(X,ce,F.current??void 0,z),disabled:H,id:oe,max:M,min:k,name:$,onChange(it){V(it.target.valueAsNumber,ce,it)},onFocus(){re(ce),te(!0)},onBlur(){pe.current&&(re(-1),le(!0),te(!1),fe==="onBlur"&&_.commit(jy(ke,ce,k,M,se,X)))},onKeyDown(it){if(!f_.has(it.key))return;o_.has(it.key)&&it.stopPropagation();let mt=null;const at=Ky(ke,K,k);switch(it.key){case nl:mt=Yo(at,it.shiftKey?D:K,1,k,M);break;case il:mt=Yo(at,it.shiftKey?D:K,Q?-1:1,k,M);break;case rl:mt=Yo(at,it.shiftKey?D:K,-1,k,M);break;case ol:mt=Yo(at,it.shiftKey?D:K,Q?1:-1,k,M);break;case eb:mt=Yo(at,D,1,k,M);break;case tb:mt=Yo(at,D,-1,k,M);break;case sl:mt=M,se&&(mt=Number.isFinite(X[ce+1])?X[ce+1]-K*L:M);break;case al:mt=k,se&&(mt=Number.isFinite(X[ce-1])?X[ce-1]+K*L:k);break}mt!==null&&(V(mt,ce,it),it.preventDefault())},step:K,style:{...el,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:ke??""},_.getInputValidationProps),Ze=sd(ve,_.inputRef,v);return an("div",t,{state:Y,ref:[n,R,pe],props:[{[u_.index]:ce,children:m.jsxs(A.Fragment,{children:[o,m.jsx("input",{ref:Ze,...Ge}),N&&!qe&&J&&xe&&m.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:d_},suppressHydrationWarning:!0})]}),id:E,onBlur:g,onFocus:h,onPointerDown(it){if(W.current=ce,pe.current!=null){const mt=B==="horizontal"?"x":"y",at=Yy(pe.current),vn=(B==="horizontal"?it.clientX:it.clientY)-at[mt];G.current=vn}ve.current!=null&&q.current!==ve.current&&(q.current=ve.current)},style:Z(),suppressHydrationWarning:J||void 0,tabIndex:-1},x],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(nb.displayName="SliderThumb");function h_(e,t,n,r,o,i){const a=n===void 0||t&&r===void 0?"hidden":void 0,s=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":a,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[s]="var(--start-position)",u[l]="var(--relative-size)",u):(u[s]=0,u[l]="var(--start-position)",u)}function m_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",s={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return s[o]=0,s[i]=`${n}%`,s;const l=r-n;return s[o]=`${n}%`,s[i]=`${l}%`,s}const rb=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:a,inset:s,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Zs(),[v,g]=A.useState(!1);Sd(()=>g(!0));const h=u==="vertical",y=p.length>1,b=s?h_(h,y,a[0],a[1],d,v):m_(h,y,tl(p[0],c,l),tl(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:na})});process.env.NODE_ENV!=="production"&&(rb.displayName="SliderIndicator");const ll=e=>{const t=S.useContext(Xr);if(e)return e;if(t)return t.locale||e},g_=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(rd,{title:"",ref:r,as:nb,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},v_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Ho()),s=r||o||[],l=ll();return m.jsx(By,{...i,value:o,locale:l,defaultValue:r,children:m.jsxs(Xy,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(Qy,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(rb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(s)?s.map((c,u)=>m.jsx(g_,{tooltip:t??!1},`${a.current}-${u}`)):null]})})},_r=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},y_=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=_r(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=g=>{d.current&&d.current(g)},v=u.current;return v.addEventListener("change",p),()=>v?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[m.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[m.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:m.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),m.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:m.jsx("span",{className:"font-medium text-foreground",children:e})})]}),m.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ra=S.createContext({});function _n(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const ob=typeof window<"u",cl=ob?S.useLayoutEffect:S.useEffect,ul=S.createContext(null);function Ed(e,t){e.indexOf(t)===-1&&e.push(t)}function oa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function b_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Kn=(e,t,n)=>n>t?t:n<e?e:n;function Cd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ko=()=>{},dn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Ko=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Cd(t,n))},dn=(e,t,n)=>{if(!e)throw new Error(Cd(t,n))});const hr={},ib=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ab(e){return typeof e=="object"&&e!==null}const sb=e=>/^0[^.\s]+$/u.test(e);function kd(e){let t;return()=>(t===void 0&&(t=e()),t)}const yn=e=>e,x_=(e,t)=>n=>t(e(n)),ia=(...e)=>e.reduce(x_),Zo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Id{constructor(){this.subscriptions=[]}add(t){return Ed(this.subscriptions,t),()=>oa(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mn=e=>e*1e3,bn=e=>e/1e3;function lb(e,t){return t?e*(1e3/t):0}const cb=new Set;function Ad(e,t,n){e||cb.has(t)||(console.warn(Cd(t,n)),cb.add(t))}const w_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},ub=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,S_=1e-7,T_=12;function E_(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=ub(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>S_&&++s<T_);return a}function aa(e,t,n,r){if(e===t&&n===r)return yn;const o=i=>E_(i,0,1,e,n);return i=>i===0||i===1?i:ub(o(i),t,r)}const db=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fb=e=>t=>1-e(1-t),pb=aa(.33,1.53,.69,.99),Pd=fb(pb),hb=db(Pd),mb=e=>(e*=2)<1?.5*Pd(e):.5*(2-Math.pow(2,-10*(e-1))),Od=e=>1-Math.sin(Math.acos(e)),gb=fb(Od),vb=db(Od),C_=aa(.42,0,1,1),k_=aa(0,0,.58,1),yb=aa(.42,0,.58,1),bb=e=>Array.isArray(e)&&typeof e[0]!="number";function xb(e,t){return bb(e)?e[w_(0,e.length,t)]:e}const wb=e=>Array.isArray(e)&&typeof e[0]=="number",Sb={linear:yn,easeIn:C_,easeInOut:yb,easeOut:k_,circIn:Od,circInOut:vb,circOut:gb,backIn:Pd,backInOut:hb,backOut:pb,anticipate:mb},I_=e=>typeof e=="string",_d=e=>{if(wb(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return aa(t,n,r,o)}else if(I_(e))return dn(Sb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Sb[e];return e},dl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function A_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const v=f&&o?n:r;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const P_=40;function Tb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=dl.reduce((x,T)=>(x[T]=A_(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=a,g=()=>{const x=hr.useManualTiming?o.timestamp:performance.now();n=!1,hr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,P_),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},h=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:dl.reduce((x,T)=>{const E=a[T];return x[T]=(I,w=!1,C=!1)=>(n||h(),E.schedule(I,w,C)),x},{}),cancel:x=>{for(let T=0;T<dl.length;T++)a[dl[T]].cancel(x)},state:o,steps:a}}const{schedule:gt,cancel:mr,state:Kt,steps:Md}=Tb(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0);let fl;function O_(){fl=void 0}const Jt={now:()=>(fl===void 0&&Jt.set(Kt.isProcessing||hr.useManualTiming?Kt.timestamp:performance.now()),fl),set:e=>{fl=e,queueMicrotask(O_)}},Eb=e=>t=>typeof t=="string"&&t.startsWith(e),Cb=Eb("--"),__=Eb("var(--"),Dd=e=>__(e)?M_.test(e.split("/*")[0].trim()):!1,M_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function kb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Xo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},sa={...Xo,transform:e=>Kn(0,1,e)},pl={...Xo,default:1},la=e=>Math.round(e*1e5)/1e5,Nd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function D_(e){return e==null}const N_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fd=(e,t)=>n=>!!(typeof n=="string"&&N_.test(n)&&n.startsWith(e)||t&&!D_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ib=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Nd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},F_=e=>Kn(0,255,e),Ld={...Xo,transform:e=>Math.round(F_(e))},lo={test:Fd("rgb","red"),parse:Ib("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ld.transform(e)+", "+Ld.transform(t)+", "+Ld.transform(n)+", "+la(sa.transform(r))+")"};function L_(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Vd={test:Fd("#"),parse:L_,transform:lo.transform},ca=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mr=ca("deg"),Zn=ca("%"),Te=ca("px"),V_=ca("vh"),$_=ca("vw"),Ab={...Zn,parse:e=>Zn.parse(e)/100,transform:e=>Zn.transform(e*100)},Qo={test:Fd("hsl","hue"),parse:Ib("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zn.transform(la(t))+", "+Zn.transform(la(n))+", "+la(sa.transform(r))+")"},Ft={test:e=>lo.test(e)||Vd.test(e)||Qo.test(e),parse:e=>lo.test(e)?lo.parse(e):Qo.test(e)?Qo.parse(e):Vd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?lo.transform(e):Qo.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},z_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function j_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Nd)?.length||0)+(e.match(z_)?.length||0)>0}const Pb="number",Ob="color",R_="var",B_="var(",_b="${}",H_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ua(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(H_,l=>(Ft.test(l)?(r.color.push(i),o.push(Ob),n.push(Ft.parse(l))):l.startsWith(B_)?(r.var.push(i),o.push(R_),n.push(l)):(r.number.push(i),o.push(Pb),n.push(parseFloat(l))),++i,_b)).split(_b);return{values:n,split:s,indexes:r,types:o}}function Mb(e){return ua(e).values}function Db(e){const{split:t,types:n}=ua(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===Pb?i+=la(o[a]):s===Ob?i+=Ft.transform(o[a]):i+=o[a]}return i}}const W_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function q_(e){const t=Mb(e);return Db(e)(t.map(W_))}const Dr={test:j_,parse:Mb,createTransformer:Db,getAnimatableNone:q_};function $d(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function U_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=$d(l,s,e+1/3),i=$d(l,s,e),a=$d(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function hl(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,zd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},G_=[Vd,lo,Qo],Y_=e=>G_.find(t=>t.test(e));function Nb(e){const t=Y_(e);if(Ko(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Qo&&(n=U_(n)),n}const Fb=(e,t)=>{const n=Nb(e),r=Nb(t);if(!n||!r)return hl(e,t);const o={...n};return i=>(o.red=zd(n.red,r.red,i),o.green=zd(n.green,r.green,i),o.blue=zd(n.blue,r.blue,i),o.alpha=yt(n.alpha,r.alpha,i),lo.transform(o))},jd=new Set(["none","hidden"]);function K_(e,t){return jd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Z_(e,t){return n=>yt(e,t,n)}function Rd(e){return typeof e=="number"?Z_:typeof e=="string"?Dd(e)?hl:Ft.test(e)?Fb:J_:Array.isArray(e)?Lb:typeof e=="object"?Ft.test(e)?Fb:X_:hl}function Lb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Rd(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function X_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Rd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Q_(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const J_=(e,t)=>{const n=Dr.createTransformer(t),r=ua(e),o=ua(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?jd.has(e)&&!o.values.length||jd.has(t)&&!r.values.length?K_(e,t):ia(Lb(Q_(r,o),o.values),n):(Ko(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),hl(e,t))};function Vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):Rd(e)(e,t)}const eM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>gt.update(t,n),stop:()=>mr(t),now:()=>Kt.isProcessing?Kt.timestamp:Jt.now()}},$b=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ml=2e4;function Bd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ml;)t+=n,r=e.next(t);return t>=ml?1/0:t}function zb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Bd(r),ml);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:bn(o)}}const tM=5;function jb(e,t,n){const r=Math.max(t-tM,0);return lb(n-e(r),t-r)}const kt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Hd=.001;function nM({duration:e=kt.duration,bounce:t=kt.bounce,velocity:n=kt.velocity,mass:r=kt.mass}){let o,i;Ko(e<=Mn(kt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kn(kt.minDamping,kt.maxDamping,a),e=Kn(kt.minDuration,kt.maxDuration,bn(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-n,p=Wd(c,a),v=Math.exp(-d);return Hd-f/p*v},i=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),g=Wd(Math.pow(c,2),a);return(-o(c)+Hd>0?-1:1)*((f-p)*v)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Hd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=oM(o,i,s);if(e=Mn(e),isNaN(l))return{stiffness:kt.stiffness,damping:kt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const rM=12;function oM(e,t,n){let r=n;for(let o=1;o<rM;o++)r=r-e(r)/t(r);return r}function Wd(e,t){return e*Math.sqrt(1-t*t)}const iM=["duration","bounce"],aM=["stiffness","damping","mass"];function Rb(e,t){return t.some(n=>e[n]!==void 0)}function sM(e){let t={velocity:kt.velocity,stiffness:kt.stiffness,damping:kt.damping,mass:kt.mass,isResolvedFromDuration:!1,...e};if(!Rb(e,aM)&&Rb(e,iM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:kt.mass,stiffness:o,damping:i}}else{const n=nM(e);t={...t,...n,mass:kt.mass},t.isResolvedFromDuration=!0}return t}function da(e=kt.visualDuration,t=kt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=sM({...n,velocity:-bn(n.velocity||0)}),v=f||0,g=c/(2*Math.sqrt(l*u)),h=a-i,y=bn(Math.sqrt(l/u)),b=Math.abs(h)<5;r||(r=b?kt.restSpeed.granular:kt.restSpeed.default),o||(o=b?kt.restDelta.granular:kt.restDelta.default);let x;if(g<1){const E=Wd(y,g);x=I=>{const w=Math.exp(-g*y*I);return a-w*((v+g*y*h)/E*Math.sin(E*I)+h*Math.cos(E*I))}}else if(g===1)x=E=>a-Math.exp(-y*E)*(h+(v+y*h)*E);else{const E=y*Math.sqrt(g*g-1);x=I=>{const w=Math.exp(-g*y*I),C=Math.min(E*I,300);return a-w*((v+g*y*h)*Math.sinh(C)+E*h*Math.cosh(C))/E}}const T={calculatedDuration:p&&d||null,next:E=>{const I=x(E);if(p)s.done=E>=d;else{let w=E===0?v:0;g<1&&(w=E===0?Mn(v):jb(x,E,I));const C=Math.abs(w)<=r,P=Math.abs(a-I)<=o;s.done=C&&P}return s.value=s.done?a:I,s},toString:()=>{const E=Math.min(Bd(T),ml),I=$b(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}da.applyToOptions=e=>{const t=zb(e,100,da);return e.ease=t.ease,e.duration=Mn(t.duration),e.type="keyframes",e};function qd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=C=>s!==void 0&&C<s||l!==void 0&&C>l,v=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const h=d+g,y=a===void 0?h:a(h);y!==h&&(g=y-d);const b=C=>-g*Math.exp(-C/r),x=C=>y+b(C),T=C=>{const P=b(C),_=x(C);f.done=Math.abs(P)<=c,f.value=f.done?y:_};let E,I;const w=C=>{p(f.value)&&(E=C,I=da({keyframes:[f.value,v(f.value)],velocity:jb(x,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let P=!1;return!I&&E===void 0&&(P=!0,T(C),w(C)),E!==void 0&&C>=E?I.next(C-E):(!P&&T(C),f)}}}function lM(e,t,n){const r=[],o=n||hr.mix||Vb,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||yn:t;s=ia(l,s)}r.push(s)}return r}function Bb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=lM(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Zo(e[d],e[d+1],u);return s[d](f)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function Hb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Zo(0,t,r);e.push(yt(n,1,o))}}function Wb(e){const t=[0];return Hb(t,e.length-1),t}function cM(e,t){return e.map(n=>n*t)}function uM(e,t){return e.map(()=>t||yb).splice(0,e.length-1)}function Jo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=bb(r)?r.map(_d):_d(r),i={done:!1,value:t[0]},a=cM(n&&n.length===t.length?n:Wb(t),e),s=Bb(a,t,{ease:Array.isArray(o)?o:uM(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const dM=e=>e!==null;function Ud(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(dM),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const fM={decay:qd,inertia:qd,tween:Jo,keyframes:Jo,spring:da};function qb(e){typeof e.type=="string"&&(e.type=fM[e.type])}class Gd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const pM=e=>e/100;class Yd extends Gd{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;qb(t);const{type:n=Jo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Jo;process.env.NODE_ENV!=="production"&&l!==Jo&&dn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Jo&&typeof s[0]!="number"&&(this.mixKeyframes=ia(pM,Vb(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Bd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:v,onUpdate:g,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/s;let P=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/s)):f==="mirror"&&(T=a)),x=Kn(0,1,_)*s}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&v!==qd&&(E.value=Ud(u,this.options,h,this.speed)),g&&g(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return bn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=eM,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function hM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const co=e=>e*180/Math.PI,Kd=e=>{const t=co(Math.atan2(e[1],e[0]));return Zd(t)},mM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Kd,rotateZ:Kd,skewX:e=>co(Math.atan(e[1])),skewY:e=>co(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zd=e=>(e=e%360,e<0&&(e+=360),e),Ub=Kd,Gb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gb,scaleY:Yb,scale:e=>(Gb(e)+Yb(e))/2,rotateX:e=>Zd(co(Math.atan2(e[6],e[5]))),rotateY:e=>Zd(co(Math.atan2(-e[2],e[0]))),rotateZ:Ub,rotate:Ub,skewX:e=>co(Math.atan(e[4])),skewY:e=>co(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xd(e){return e.includes("scale")?1:0}function Qd(e,t){if(!e||e==="none")return Xd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=gM,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=mM,o=s}if(!o)return Xd(t);const i=r[t],a=o[1].split(",").map(yM);return typeof i=="function"?i(a):a[i]}const vM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qd(n,t)};function yM(e){return parseFloat(e.trim())}const ei=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ti=new Set(ei),Kb=e=>e===Xo||e===Te,bM=new Set(["x","y","z"]),xM=ei.filter(e=>!bM.has(e));function wM(e){const t=[];return xM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Nr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qd(t,"x"),y:(e,{transform:t})=>Qd(t,"y")};Nr.translateX=Nr.x,Nr.translateY=Nr.y;const uo=new Set;let Jd=!1,ef=!1,tf=!1;function Zb(){if(ef){const e=Array.from(uo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=wM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ef=!1,Jd=!1,uo.forEach(e=>e.complete(tf)),uo.clear()}function Xb(){uo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ef=!0)})}function SM(){tf=!0,Xb(),Zb(),tf=!1}class nf{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(uo.add(this),Jd||(Jd=!0,gt.read(Xb),gt.resolveKeyframes(Zb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}hM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),uo.delete(this)}cancel(){this.state==="scheduled"&&(uo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const TM=e=>e.startsWith("--");function EM(e,t,n){TM(t)?e.style.setProperty(t,n):e.style[t]=n}const CM=kd(()=>window.ScrollTimeline!==void 0),kM={};function IM(e,t){const n=kd(e);return()=>kM[t]??n()}const Qb=IM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fa=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Jb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fa([0,.65,.55,1]),circOut:fa([.55,0,1,.45]),backIn:fa([.31,.01,.66,-.59]),backOut:fa([.33,1.53,.69,.99])};function ex(e,t){if(e)return typeof e=="function"?Qb()?$b(e,t):"ease-out":wb(e)?fa(e):Array.isArray(e)?e.map(n=>ex(n,t)||Jb.easeOut):Jb[e]}function AM(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ex(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function rf(e){return typeof e=="function"&&"applyToOptions"in e}function PM({type:e,...t}){return rf(e)&&Qb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class OM extends Gd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,dn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=PM(t);this.animation=AM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Ud(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):EM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return bn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Mn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&CM()?(this.animation.timeline=t,yn):n(this)}}const tx={anticipate:mb,backInOut:hb,circInOut:vb};function _M(e){return e in tx}function MM(e){typeof e.ease=="string"&&_M(e.ease)&&(e.ease=tx[e.ease])}const of=10;class DM extends OM{constructor(t){MM(t),qb(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Yd({...a,autoplay:!1}),l=Math.max(of,Jt.now()-this.startTime),c=Kn(0,of,l-of);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const nx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dr.test(e)||e==="0")&&!e.startsWith("url("));function NM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function FM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=nx(o,t),s=nx(i,t);return Ko(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:NM(e)||(n==="spring"||rf(n))&&r}function af(e){e.duration=0,e.type="keyframes"}const LM=new Set(["opacity","clipPath","filter","transform"]),VM=kd(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $M(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return VM()&&n&&LM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const zM=40;class jM extends Gd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||nf;this.keyframeResolver=new p(s,(v,g,h)=>this.onKeyframesResolved(v,g,f,!h),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),FM(t,i,a,s)||((hr.instantAnimations||!l)&&u?.(Ud(t,r,n)),t[0]=t[t.length-1],af(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>zM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&$M(f),v=f.motionValue?.owner?.current,g=p?new DM({...f,element:v}):new Yd(f);g.finished.then(()=>{this.notifyFinished()}).catch(yn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),SM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class RM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return rx(this.animations,"duration")}get iterationDuration(){return rx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function rx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class BM extends RM{then(t,n){return this.finished.finally(t).then(()=>{})}}function ox(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const HM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function WM(e){const t=HM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const qM=4;function ix(e,t,n=1){dn(n<=qM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=WM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return ib(a)?parseFloat(a):a}return Dd(o)?ix(o,t,n+1):o}const UM={type:"spring",stiffness:500,damping:25,restSpeed:10},GM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YM={type:"keyframes",duration:.8},KM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ZM=(e,{keyframes:t})=>t.length>2?YM:ti.has(e)?e.startsWith("scale")?GM(t[1]):UM:KM,XM=e=>e!==null;function QM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(XM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function sf(e,t){return e?.[t]??e?.default??e}function JM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const lf=(e,t,n,r={},o,i)=>a=>{const s=sf(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};JM(s)||Object.assign(u,ZM(e,u)),u.duration&&(u.duration=Mn(u.duration)),u.repeatDelay&&(u.repeatDelay=Mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(af(u),u.delay===0&&(d=!0)),(hr.instantAnimations||hr.skipAnimations)&&(d=!0,af(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=QM(u.keyframes,s);if(f!==void 0){gt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Yd(u):new jM(u)};function ax(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function cf(e,t,n,r){if(typeof t=="function"){const[o,i]=ax(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=ax(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ni(e,t,n){const r=e.getProps();return cf(r,t,n!==void 0?n:r.custom,e)}const sx=new Set(["width","height","top","left","right","bottom",...ei]),lx=30,eD=e=>!isNaN(parseFloat(e)),pa={current:void 0};class tD{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=eD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ad(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Id);const r=this.events[t].add(n);return t==="change"?()=>{r(),gt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return pa.current&&pa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>lx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,lx);return lb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fo(e,t){return new tD(e,t)}const uf=e=>Array.isArray(e);function nD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fo(n))}function rD(e){return uf(e)?e[e.length-1]||0:e}function oD(e,t){const n=ni(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=rD(i[a]);nD(e,a,s)}}const jt=e=>!!(e&&e.getVelocity);function iD(e){return!!(jt(e)&&e.add)}function df(e,t){const n=e.getValue("willChange");if(iD(n))return n.add(t);if(!n&&hr.WillChange){const r=new hr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ff(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const cx="data-"+ff("framerAppearId");function ux(e){return e.props[cx]}function aD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),f=s[u];if(f===void 0||c&&aD(c,u))continue;const p={delay:n,...sf(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=ux(e);if(y){const b=window.MotionHandoffAnimation(y,u,gt);b!==null&&(p.startTime=b,g=!0)}}df(e,u),d.start(lf(u,d,f,e.shouldReduceMotion&&sx.has(u)?{type:!1}:p,e,g));const h=d.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{gt.update(()=>{a&&oD(e,a)})}),l}function hf(e,t,n={}){const r=ni(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(pf(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return sD(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function sD(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(hf(l,t,{...a,delay:n+(typeof r=="function"?0:r)+ox(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function lD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>hf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=hf(e,t,n);else{const o=typeof t=="function"?ni(e,t,n.custom):t;r=Promise.all(pf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const cD={test:e=>e==="auto",parse:e=>e},dx=e=>t=>t.test(e),fx=[Xo,Te,Zn,Mr,$_,V_,cD],px=e=>fx.find(dx(e));function uD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sb(e):!0}const dD=new Set(["brightness","contrast","saturate","opacity"]);function fD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Nd)||[];if(!r)return e;const o=n.replace(r,"");let i=dD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const pD=/\b([a-z-]*)\(.*?\)/gu,mf={...Dr,getAnimatableNone:e=>{const t=e.match(pD);return t?t.map(fD).join(" "):e}},hx={...Xo,transform:Math.round},gf={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,backgroundPositionX:Te,backgroundPositionY:Te,...{rotate:Mr,rotateX:Mr,rotateY:Mr,rotateZ:Mr,scale:pl,scaleX:pl,scaleY:pl,scaleZ:pl,skew:Mr,skewX:Mr,skewY:Mr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:sa,originX:Ab,originY:Ab,originZ:Te},zIndex:hx,fillOpacity:sa,strokeOpacity:sa,numOctaves:hx},hD={...gf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:mf,WebkitFilter:mf},mx=e=>hD[e];function gx(e,t){let n=mx(e);return n!==mf&&(n=Dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mD=new Set(["auto","none","0"]);function gD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!mD.has(i)&&ua(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=gx(n,o)}class vD extends nf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Dd(d))){const f=ix(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!sx.has(r)||t.length!==2)return;const[o,i]=t,a=px(o),s=px(i),l=kb(o),c=kb(i);if(l!==c&&Nr[r]){this.needsMeasurement=!0;return}if(a!==s)if(Kb(a)&&Kb(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Nr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||uD(t[o]))&&r.push(o);r.length&&gD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Nr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Nr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function vx(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const yx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vf(e){return ab(e)&&"offsetHeight"in e}const{schedule:yf}=Tb(queueMicrotask,!1),Dn={x:!1,y:!1};function bx(){return Dn.x||Dn.y}function yD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function xx(e,t){const n=vx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function wx(e){return!(e.pointerType==="touch"||bx())}function bD(e,t,n={}){const[r,o,i]=xx(e,n),a=s=>{if(!wx(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{wx(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const Sx=(e,t)=>t?e===t?!0:Sx(e,t.parentElement):!1,bf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Tx(e){return xD.has(e.tagName)||e.isContentEditable===!0}const gl=new WeakSet;function Ex(e){return t=>{t.key==="Enter"&&e(t)}}function xf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ex(()=>{if(gl.has(n))return;xf(n,"down");const o=Ex(()=>{xf(n,"up")}),i=()=>xf(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Cx(e){return bf(e)&&!bx()}function SD(e,t,n={}){const[r,o,i]=xx(e,n),a=s=>{const l=s.currentTarget;if(!Cx(s))return;gl.add(l);const c=t(l,s),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),gl.has(l)&&gl.delete(l),Cx(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||Sx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),vf(s)&&(s.addEventListener("focus",c=>wD(c,o)),!Tx(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function wf(e){return ab(e)&&"ownerSVGElement"in e}function kx(e){return wf(e)&&e.tagName==="svg"}function TD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function ED(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:TD(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=_d(r)(l/c)*c}return t+l}}function CD(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=Bb(o,i,a);return t?s(r):s}const kD=[...fx,Ft,Dr],ID=e=>kD.find(dx(e)),Ix=()=>({translate:0,scale:1,origin:0,originPoint:0}),ri=()=>({x:Ix(),y:Ix()}),Ax=()=>({min:0,max:0}),Lt=()=>({x:Ax(),y:Ax()}),Sf={current:null},Px={current:!1},AD=typeof window<"u";function PD(){if(Px.current=!0,!!AD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Sf.current=e.matches;e.addEventListener("change",t),t()}else Sf.current=!1}const ha=new WeakMap;function vl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ma(e){return typeof e=="string"||Array.isArray(e)}const Tf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ef=["initial",...Tf];function yl(e){return vl(e.animate)||Ef.some(t=>ma(e[t]))}function Ox(e){return!!(yl(e)||e.variants)}function OD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(jt(o))e.addValue(r,o);else if(jt(i))e.addValue(r,fo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,fo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const _x=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bl={};function Mx(e){bl=e}function _D(){return bl}class Dx{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Jt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,gt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=yl(n),this.isVariantNode=Ox(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&jt(p)&&p.set(l[f])}}mount(t){this.current=t,ha.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Px.current||PD(),this.shouldReduceMotion=Sf.current),process.env.NODE_ENV!=="production"&&Ad(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),mr(this.notifyUpdate),mr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ti.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&>.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bl){const n=bl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<_x.length;r++){const o=_x[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=OD(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=fo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ib(r)||sb(r))?r=parseFloat(r):!ID(r)&&Dr.test(n)&&(r=gx(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=cf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){yf.render(this.render)}}class Nx extends Dx{constructor(){super(...arguments),this.KeyframeResolver=vD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Fr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Fx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function MD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function DD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Cf(e){return e===void 0||e===1}function kf({scale:e,scaleX:t,scaleY:n}){return!Cf(e)||!Cf(t)||!Cf(n)}function po(e){return kf(e)||Lx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Lx(e){return Vx(e.x)||Vx(e.y)}function Vx(e){return e&&e!=="0%"}function xl(e,t,n){const r=e-n,o=t*r;return n+o}function $x(e,t,n,r,o){return o!==void 0&&(e=xl(e,o,r)),xl(e,n,r)+t}function If(e,t=0,n=1,r,o){e.min=$x(e.min,t,n,r,o),e.max=$x(e.max,t,n,r,o)}function zx(e,{x:t,y:n}){If(e.x,t.translate,t.scale,t.originPoint),If(e.y,n.translate,n.scale,n.originPoint)}const jx=.999999999999,Rx=1.0000000000001;function ND(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ii(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,zx(e,a)),r&&po(i.latestValues)&&ii(e,i.latestValues))}t.x<Rx&&t.x>jx&&(t.x=1),t.y<Rx&&t.y>jx&&(t.y=1)}function oi(e,t){e.min=e.min+t,e.max=e.max+t}function Bx(e,t,n,r,o=.5){const i=yt(e.min,e.max,o);If(e,t,n,i,r)}function ii(e,t){Bx(e.x,t.x,t.scaleX,t.scale,t.originX),Bx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Hx(e,t){return Fx(DD(e.getBoundingClientRect(),t))}function FD(e,t,n){const r=Hx(e,n),{scroll:o}=t;return o&&(oi(r.x,o.offset.x),oi(r.y,o.offset.y)),r}const LD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},VD=ei.length;function $D(e,t,n){let r="",o=!0;for(let i=0;i<VD;i++){const a=ei[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=yx(s,gf[a]);if(!l){o=!1;const u=LD[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Af(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if(ti.has(l)){a=!0;continue}else if(Cb(l)){o[l]=c;continue}else{const u=yx(c,gf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=$D(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Wx(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function qx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ga={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=qx(e,t.target.x),r=qx(e,t.target.y);return`${n}% ${r}%`}},zD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Dr.parse(e);if(o.length>5)return r;const i=Dr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=yt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},Pf={borderRadius:{...ga,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ga,borderTopRightRadius:ga,borderBottomLeftRadius:ga,borderBottomRightRadius:ga,boxShadow:zD};function Ux(e,{layout:t,layoutId:n}){return ti.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pf[e]||e==="opacity")}function Of(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(jt(r[a])||o&&jt(o[a])||Ux(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function jD(e){return window.getComputedStyle(e)}class Gx extends Nx{constructor(){super(...arguments),this.type="html",this.renderInstance=Wx}readValueFromInstance(t,n){if(ti.has(n))return this.projection?.isProjecting?Xd(n):vM(t,n);{const r=jD(t),o=(Cb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hx(t,n)}build(t,n,r){Af(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Of(t,n,r)}}function RD(e,t){return e in t}class BD extends Dx{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(RD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const HD={offset:"stroke-dashoffset",array:"stroke-dasharray"},WD={offset:"strokeDashoffset",array:"strokeDasharray"};function qD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?HD:WD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const UD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Af(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of UD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&qD(d,o,i,a,!1)}const Kx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Zx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GD(e,t,n,r){Wx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Kx.has(o)?o:ff(o),t.attrs[o])}function Xx(e,t,n){const r=Of(e,t,n);for(const o in e)if(jt(e[o])||jt(t[o])){const i=ei.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class Qx extends Nx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ti.has(n)){const r=mx(n);return r&&r.default||0}return n=Kx.has(n)?n:ff(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Xx(t,n,r)}build(t,n,r){Yx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){GD(t,n,r,o)}mount(t){this.isSVGTag=Zx(t.tagName),super.mount(t)}}const YD=Ef.length;function Jx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Jx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<YD;n++){const r=Ef[n],o=e.props[r];(ma(o)||o===!1)&&(t[r]=o)}return t}function e0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const KD=[...Tf].reverse(),ZD=Tf.length;function XD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lD(e,n,r)))}function QD(e){let t=XD(e),n=t0(),r=!0;const o=l=>(c,u)=>{const d=ni(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...v}=d;c={...c,...v,...p}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Jx(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let h=0;h<ZD;h++){const y=KD[h],b=n[y],x=c[y]!==void 0?c[y]:u[y],T=ma(x),E=y===l?b.isActive:null;E===!1&&(v=h);let I=x===u[y]&&x!==c[y]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&E===null||!x&&!b.prevProp||vl(x)||typeof x=="boolean")continue;const w=JD(b.prevProp,x);let C=w||y===l&&b.isActive&&!I&&T||h>v&&T,P=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(y),{});E===!1&&(F={});const{prevResolvedValues:V={}}=b,N={...V,...F},O=M=>{C=!0,f.has(M)&&(P=!0,f.delete(M)),b.needsAnimating[M]=!0;const k=e.getValue(M);k&&(k.liveStyle=!1)};for(const M in N){const k=F[M],L=V[M];if(p.hasOwnProperty(M))continue;let $=!1;uf(k)&&uf(L)?$=!e0(k,L):$=k!==L,$?k!=null?O(M):f.add(M):k!==void 0&&f.has(M)?O(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=F,b.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(C=!1);const D=I&&w;C&&(!D||P)&&d.push(..._.map(M=>{const k={type:y};if(typeof M=="string"&&r&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,$=ni(L,M);if(L.enteringChildren&&$){const{delayChildren:B}=$.transition||{};k.delay=ox(L.enteringChildren,e,B)}}return{animation:M,options:k}}))}if(f.size){const h={};if(typeof c.initial!="boolean"){const y=ni(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(h.transition=y.transition)}f.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),h[y]=b??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=t0()}}}function JD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!e0(t,e):!1}function ho(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function t0(){return{animate:ho(!0),whileInView:ho(),whileHover:ho(),whileTap:ho(),whileDrag:ho(),whileFocus:ho(),exit:ho()}}function n0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){n0(e.x,t.x),n0(e.y,t.y)}function r0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const o0=1e-4,eN=1-o0,tN=1+o0,i0=.01,nN=0-i0,rN=0+i0;function en(e){return e.max-e.min}function oN(e,t,n){return Math.abs(e-t)<=n}function a0(e,t,n,r=.5){e.origin=r,e.originPoint=yt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eN&&e.scale<=tN||isNaN(e.scale))&&(e.scale=1),(e.translate>=nN&&e.translate<=rN||isNaN(e.translate))&&(e.translate=0)}function va(e,t,n,r){a0(e.x,t.x,n.x,r?r.originX:void 0),a0(e.y,t.y,n.y,r?r.originY:void 0)}function s0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function iN(e,t,n){s0(e.x,t.x,n.x),s0(e.y,t.y,n.y)}function l0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function wl(e,t,n){l0(e.x,t.x,n.x),l0(e.y,t.y,n.y)}function c0(e,t,n,r,o){return e-=t,e=xl(e,1/n,r),o!==void 0&&(e=xl(e,1/o,r)),e}function aN(e,t=0,n=1,r=.5,o,i=e,a=e){if(Zn.test(t)&&(t=parseFloat(t),t=yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=yt(i.min,i.max,r);e===i&&(s-=t),e.min=c0(e.min,t,n,s,o),e.max=c0(e.max,t,n,s,o)}function u0(e,t,[n,r,o],i,a){aN(e,t[n],t[r],t[o],t.scale,i,a)}const sN=["x","scaleX","originX"],lN=["y","scaleY","originY"];function d0(e,t,n,r){u0(e.x,t,sN,n?n.x:void 0,r?r.x:void 0),u0(e.y,t,lN,n?n.y:void 0,r?r.y:void 0)}function f0(e){return e.translate===0&&e.scale===1}function p0(e){return f0(e.x)&&f0(e.y)}function h0(e,t){return e.min===t.min&&e.max===t.max}function cN(e,t){return h0(e.x,t.x)&&h0(e.y,t.y)}function m0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function g0(e,t){return m0(e.x,t.x)&&m0(e.y,t.y)}function v0(e){return en(e.x)/en(e.y)}function y0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xn(e){return[e("x"),e("y")]}function uN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const b0=["TopLeft","TopRight","BottomLeft","BottomRight"],dN=b0.length,x0=e=>typeof e=="string"?parseFloat(e):e,w0=e=>typeof e=="number"||Te.test(e);function fN(e,t,n,r,o,i){o?(e.opacity=yt(0,n.opacity??1,pN(r)),e.opacityExit=yt(t.opacity??1,0,hN(r))):i&&(e.opacity=yt(t.opacity??1,n.opacity??1,r));for(let a=0;a<dN;a++){const s=`border${b0[a]}Radius`;let l=S0(t,s),c=S0(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||w0(l)===w0(c)?(e[s]=Math.max(yt(x0(l),x0(c),r),0),(Zn.test(c)||Zn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,r))}function S0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pN=T0(0,.5,gb),hN=T0(.5,.95,yn);function T0(e,t,n){return r=>r<e?0:r>t?1:n(Zo(e,t,r))}function E0(e,t,n){const r=jt(e)?e:fo(e);return r.start(lf("",r,t,n)),r.animation}function ya(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const mN=(e,t)=>e.depth-t.depth;class gN{constructor(){this.children=[],this.isDirty=!1}add(t){Ed(this.children,t),this.isDirty=!0}remove(t){oa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mN),this.isDirty=!1,this.children.forEach(t)}}function vN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mr(r),e(i-t))};return gt.setup(r,!0),()=>mr(r)}function Sl(e){return jt(e)?e.get():e}class yN{constructor(){this.members=[]}add(t){Ed(this.members,t),t.scheduleRender()}remove(t){if(oa(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Tl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_f=["","X","Y","Z"],bN=1e3;let xN=0;function Mf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function C0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ux(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&C0(r)}function k0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=xN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(TN),this.nodes.forEach(IN),this.nodes.forEach(AN),this.nodes.forEach(EN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new gN)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Id),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=wf(a)&&!kx(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{d=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=vN(f,250),Tl.hasAnimatedSinceResize&&(Tl.hasAnimatedSinceResize=!1,this.nodes.forEach(P0)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||DN,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=c.getProps(),y=!this.targetLayout||!g0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...sf(v,"layout"),onPlay:g,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||P0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),mr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(PN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&C0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(I0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kN),this.nodes.forEach(wN),this.nodes.forEach(SN)):this.nodes.forEach(A0),this.clearAllSnapshots();const s=Jt.now();Kt.delta=Kn(0,1e3/60,s-Kt.timestamp),Kt.timestamp=s,Kt.isProcessing=!0,Md.update.process(Kt),Md.preRender.process(Kt),Md.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CN),this.sharedNodes.forEach(ON)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!p0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||po(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),NN(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Lt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(FN))){const{scroll:c}=this.root;c&&(oi(s.x,c.offset.x),oi(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Lt();if(Nn(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Nn(s,a),oi(s.x,u.offset.x),oi(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Lt();Nn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ii(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),po(u.latestValues)&&ii(l,u.latestValues)}return po(this.latestValues)&&ii(l,this.latestValues),l}removeTransform(a){const s=Lt();Nn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!po(c.latestValues))continue;kf(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),d0(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return po(this.latestValues)&&d0(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Kt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),iN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),zx(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||kf(this.parent.latestValues)||Lx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),wl(this.relativeTargetOrigin,s,l),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;ND(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(r0(this.prevProjectionDelta.x,this.projectionDelta.x),r0(this.prevProjectionDelta.y,this.projectionDelta.y)),va(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!y0(this.projectionDelta.x,this.prevProjectionDelta.x)||!y0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ri(),this.projectionDelta=ri(),this.projectionDeltaWithTransform=ri()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Lt(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,g=p!==v,h=this.getStack(),y=!h||h.members.length<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(MN));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;O0(d.x,a.x,E),O0(d.y,a.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_N(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&cN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Nn(x,this.relativeTarget)),g&&(this.animationValues=u,fN(u,c,this.latestValues,E,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(mr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{Tl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=fo(0)),this.currentAnimation=E0(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&F0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Nn(s,l),ii(s,u),va(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new yN),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Mf("z",a,c,this.animationValues);for(let u=0;u<_f.length;u++)Mf(`rotate${_f[u]}`,a,c,this.animationValues),Mf(`skew${_f[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Sl(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Sl(s?.pointerEvents)||""),this.hasProjected&&!po(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=uN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Pf){if(u[v]===void 0)continue;const{correct:g,applyTo:h,isCSSVariable:y}=Pf[v],b=d==="none"?u[v]:g(u[v],c);if(h){const x=h.length;for(let T=0;T<x;T++)a[h[T]]=b}else y?this.options.visualElement.renderState.vars[v]=b:a[v]=b}this.options.layoutId&&(a.pointerEvents=c===this?Sl(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(I0),this.root.sharedNodes.clear()}}}function wN(e){e.updateLayout()}function SN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):F0(o,t.layoutBox,n)&&xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=ri();va(a,n,t.layoutBox);const s=ri();i?va(s,e.applyTransform(r,!0),t.measuredBox):va(s,n,t.layoutBox);const l=!p0(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();wl(p,t.layoutBox,d.layoutBox);const v=Lt();wl(v,n,f.layoutBox),g0(p,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function TN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function EN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CN(e){e.clearSnapshot()}function I0(e){e.clearMeasurements()}function A0(e){e.isLayoutDirty=!1}function kN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function P0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function IN(e){e.resolveTargetDelta()}function AN(e){e.calcProjection()}function PN(e){e.resetSkewAndRotation()}function ON(e){e.removeLeadSnapshot()}function O0(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _0(e,t,n,r){e.min=yt(t.min,n.min,r),e.max=yt(t.max,n.max,r)}function _N(e,t,n,r){_0(e.x,t.x,n.x,r),_0(e.y,t.y,n.y,r)}function MN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const DN={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),D0=M0("applewebkit/")&&!M0("chrome/")?Math.round:yn;function N0(e){e.min=D0(e.min),e.max=D0(e.max)}function NN(e){N0(e.x),N0(e.y)}function F0(e,t,n){return e==="position"||e==="preserve-aspect"&&!oN(v0(t),v0(n),.2)}function FN(e){return e!==e.root&&e.scroll?.wasRoot}const LN=k0({attachResizeListener:(e,t)=>ya(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),VN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function L0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(VN);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Df={current:void 0},V0=k0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Df.current){const e=new LN({});e.mount(window),e.setOptions({layoutScroll:!0}),Df.current=e}return Df.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ai=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $N(...e){return t=>{let n=!1;const r=e.map(o=>{const i=$0(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():$0(e[o],null)}}}}function zN(...e){return A.useCallback($N(...e),e)}class jN extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=vf(r)&&r.offsetWidth||0,i=vf(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function RN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=S.useId(),a=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(ai),c=e.props?.ref??e?.ref,u=zN(a,c);return S.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:v,right:g,bottom:h}=s.current;if(t||!a.current||!d||!f)return;const y=n==="left"?`left: ${v}`:`right: ${g}`,b=r==="bottom"?`bottom: ${h}`:`top: ${p}`;a.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const T=o??document.head;return T.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
7
|
-
[data-motion-pop-id="${i}"] {
|
|
1
|
+
(function(se,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(se=typeof globalThis<"u"?globalThis:se||self,S(se.components={},se.React,se["react/jsx-runtime"],se.ReactDOM))})(this,(function(se,S,g,Ri){"use strict";function em(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=em(S),cr=em(Ri);function tm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=tm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=tm(e))&&(r&&(r+=" "),r+=t);return r}const rm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,om=nm,_o=(e,t)=>n=>{var r;if(t?.variants==null)return om(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=rm(u)||rm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[y,m]=h;return Array.isArray(m)?m.includes({...i,...a}[y]):{...i,...a}[y]===m})?[...c,d,f]:c},[]);return om(e,s,l,n?.class,n?.className)};var im=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Ac,am;function Mo(){return am||(am=1,Ac=TypeError),Ac}const dk=uk(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pc,lm;function ra(){if(lm)return Pc;lm=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&typeof i.get=="function"?i.get:null,a=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function C(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||I.call(/e/,K))return K;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Ue=W<0?-O(-W):O(W);if(Ue!==W){var Ye=String(Ue),$e=b.call(K,Ye.length+1);return x.call(Ye,Oe,"$&_")+"."+x.call(x.call($e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Oe,"$&_")}var V=dk,L=V.custom,B=ce(L)?L:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Pc=function W(K,Oe,Ue,Ye){var $e=Oe||{};if(re($e,"quoteStyle")&&!re(U,$e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re($e,"maxStringLength")&&(typeof $e.maxStringLength=="number"?$e.maxStringLength<0&&$e.maxStringLength!==1/0:$e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=re($e,"customInspect")?$e.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(re($e,"indent")&&$e.indent!==null&&$e.indent!==" "&&!(parseInt($e.indent,10)===$e.indent&&$e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(re($e,"numericSeparator")&&typeof $e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var gt=$e.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return me(K,$e);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var it=String(K);return gt?C(K,it):it}if(typeof K=="bigint"){var xn=String(K)+"n";return gt?C(K,xn):xn}var Qr=typeof $e.depth>"u"?5:$e.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=Qr&&Qr>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var Jr=Nt($e,Ue);if(typeof Ye>"u")Ye=[];else if(le(Ye,K)>=0)return"[Circular]";function In(ji,Ic,lW){if(Ic&&(Ye=A.call(Ye),Ye.push(Ic)),lW){var ck={depth:$e.depth};return re($e,"quoteStyle")&&(ck.quoteStyle=$e.quoteStyle),W(ji,ck,Ue+1,Ye)}return W(ji,$e,Ue+1,Ye)}if(typeof K=="function"&&!Y(K)){var $i=oe(K),zi=Re(K,In);return"[Function"+($i?": "+$i:" (anonymous)")+"]"+(zi.length>0?" { "+k.call(zi,", ")+" }":"")}if(ce(K)){var ok=_?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(K);return typeof K=="object"&&!_?ke(ok):ok}if(X(K)){for(var na="<"+E.call(String(K.nodeName)),Gh=K.attributes||[],Cc=0;Cc<Gh.length;Cc++)na+=" "+Gh[Cc].name+"="+H(ee(Gh[Cc].value),"double",$e);return na+=">",K.childNodes&&K.childNodes.length&&(na+="..."),na+="</"+E.call(String(K.nodeName))+">",na}if(te(K)){if(K.length===0)return"[]";var Yh=Re(K,In);return Jr&&!ct(Yh)?"["+Qt(Yh,Jr)+"]":"[ "+k.call(Yh,", ")+" ]"}if(Z(K)){var Kh=Re(K,In);return!("cause"in Error.prototype)&&"cause"in K&&!z.call(K,"cause")?"{ ["+String(K)+"] "+k.call(w.call("[cause]: "+In(K.cause),Kh),", ")+" }":Kh.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+k.call(Kh,", ")+" }"}if(typeof K=="object"&&ot){if(B&&typeof K[B]=="function"&&V)return V(K,{depth:Qr-Ue});if(ot!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(be(K)){var ik=[];return r&&r.call(K,function(ji,Ic){ik.push(In(Ic,K,!0)+" => "+In(ji,K))}),Ne("Map",n.call(K),ik,Jr)}if(J(K)){var sk=[];return a&&a.call(K,function(ji){sk.push(In(ji,K))}),Ne("Set",s.call(K),sk,Jr)}if(de(K))return De("WeakMap");if(j(K))return De("WeakSet");if(ne(K))return De("WeakRef");if(R(K))return ke(In(Number(K)));if(Q(K))return ke(In(N.call(K)));if(ae(K))return ke(h.call(K));if(pe(K))return ke(In(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof im<"u"&&K===im)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var Zh=Re(K,In),ak=D?D(K)===Object.prototype:K instanceof Object||K.constructor===Object,Xh=K instanceof Object?"":"null prototype",lk=!ak&&F&&Object(K)===K&&F in K?b.call(he(K),8,-1):Xh?"Object":"",aW=ak||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Qh=aW+(lk||Xh?"["+k.call(w.call([],lk||[],Xh||[]),": ")+"] ":"");return Zh.length===0?Qh+"{}":Jr?Qh+"{"+Qt(Zh,Jr)+"}":Qh+"{ "+k.call(Zh,", ")+" }"}return String(K)};function H(W,K,Oe){var Ue=Oe.quoteStyle||K,Ye=U[Ue];return Ye+W+Ye}function ee(W){return x.call(String(W),/"/g,""")}function ie(W){return!F||!(typeof W=="object"&&(F in W||typeof W[F]<"u"))}function te(W){return he(W)==="[object Array]"&&ie(W)}function q(W){return he(W)==="[object Date]"&&ie(W)}function Y(W){return he(W)==="[object RegExp]"&&ie(W)}function Z(W){return he(W)==="[object Error]"&&ie(W)}function pe(W){return he(W)==="[object String]"&&ie(W)}function R(W){return he(W)==="[object Number]"&&ie(W)}function ae(W){return he(W)==="[object Boolean]"&&ie(W)}function ce(W){if(_)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function Q(W){if(!W||typeof W!="object"||!N)return!1;try{return N.call(W),!0}catch{}return!1}var ue=Object.prototype.hasOwnProperty||function(W){return W in this};function re(W,K){return ue.call(W,K)}function he(W){return y.call(W)}function oe(W){if(W.name)return W.name;var K=v.call(m.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function le(W,K){if(W.indexOf)return W.indexOf(K);for(var Oe=0,Ue=W.length;Oe<Ue;Oe++)if(W[Oe]===K)return Oe;return-1}function be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{s.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ne(W){if(!p||!W||typeof W!="object")return!1;try{return p.call(W),!0}catch{}return!1}function J(W){if(!s||!W||typeof W!="object")return!1;try{s.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function j(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function X(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function me(W,K){if(W.length>K.maxStringLength){var Oe=W.length-K.maxStringLength,Ue="... "+Oe+" more character"+(Oe>1?"s":"");return me(b.call(W,0,K.maxStringLength),K)+Ue}var Ye=G[K.quoteStyle||"single"];Ye.lastIndex=0;var $e=x.call(x.call(W,Ye,"\\$1"),/[\x00-\x1f]/g,ve);return H($e,"single",K)}function ve(W){var K=W.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Oe?"\\"+Oe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function ke(W){return"Object("+W+")"}function De(W){return W+" { ? }"}function Ne(W,K,Oe,Ue){var Ye=Ue?Qt(Oe,Ue):k.call(Oe,", ");return W+" ("+K+") {"+Ye+"}"}function ct(W){for(var K=0;K<W.length;K++)if(le(W[K],`
|
|
2
|
+
`)>=0)return!1;return!0}function Nt(W,K){var Oe;if(W.indent===" ")Oe=" ";else if(typeof W.indent=="number"&&W.indent>0)Oe=k.call(Array(W.indent+1)," ");else return null;return{base:Oe,prev:k.call(Array(K+1),Oe)}}function Qt(W,K){if(W.length===0)return"";var Oe=`
|
|
3
|
+
`+K.prev+K.base;return Oe+k.call(W,","+Oe)+`
|
|
4
|
+
`+K.prev}function Re(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=re(W,Ye)?K(W[Ye],W):""}var $e=typeof M=="function"?M(W):[],ot;if(_){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)re(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||_&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(K(it,W)+": "+K(W[it],W)):Ue.push(it+": "+K(W[it],W))));if(typeof M=="function")for(var xn=0;xn<$e.length;xn++)z.call(W,$e[xn])&&Ue.push("["+K($e[xn])+"]: "+K(W[$e[xn]],W));return Ue}return Pc}var Oc,cm;function fk(){if(cm)return Oc;cm=1;var e=ra(),t=Mo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Oc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Oc}var _c,um;function dm(){return um||(um=1,_c=Object),_c}var Mc,fm;function pk(){return fm||(fm=1,Mc=Error),Mc}var Dc,pm;function hk(){return pm||(pm=1,Dc=EvalError),Dc}var Nc,hm;function mk(){return hm||(hm=1,Nc=RangeError),Nc}var Fc,mm;function gk(){return mm||(mm=1,Fc=ReferenceError),Fc}var Lc,gm;function yk(){return gm||(gm=1,Lc=SyntaxError),Lc}var Vc,ym;function vk(){return ym||(ym=1,Vc=URIError),Vc}var $c,vm;function bk(){return vm||(vm=1,$c=Math.abs),$c}var zc,bm;function xk(){return bm||(bm=1,zc=Math.floor),zc}var jc,xm;function wk(){return xm||(xm=1,jc=Math.max),jc}var Rc,wm;function Sk(){return wm||(wm=1,Rc=Math.min),Rc}var Bc,Sm;function Tk(){return Sm||(Sm=1,Bc=Math.pow),Bc}var Hc,Tm;function Ek(){return Tm||(Tm=1,Hc=Math.round),Hc}var Wc,Em;function kk(){return Em||(Em=1,Wc=Number.isNaN||function(t){return t!==t}),Wc}var qc,km;function Ck(){if(km)return qc;km=1;var e=kk();return qc=function(n){return e(n)||n===0?n:n<0?-1:1},qc}var Uc,Cm;function Ik(){return Cm||(Cm=1,Uc=Object.getOwnPropertyDescriptor),Uc}var Gc,Im;function Am(){if(Im)return Gc;Im=1;var e=Ik();if(e)try{e([],"length")}catch{e=null}return Gc=e,Gc}var Yc,Pm;function Ak(){if(Pm)return Yc;Pm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Yc=e,Yc}var Kc,Om;function Pk(){return Om||(Om=1,Kc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),Kc}var Zc,_m;function Ok(){if(_m)return Zc;_m=1;var e=typeof Symbol<"u"&&Symbol,t=Pk();return Zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Zc}var Xc,Mm;function Dm(){return Mm||(Mm=1,Xc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xc}var Qc,Nm;function Fm(){if(Nm)return Qc;Nm=1;var e=dm();return Qc=e.getPrototypeOf||null,Qc}var Jc,Lm;function _k(){if(Lm)return Jc;Lm=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return Jc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),h=[],y=0;y<p;y++)h[y]="$"+y;if(d=Function("binder","return function ("+s(h,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Jc}var eu,Vm;function oa(){if(Vm)return eu;Vm=1;var e=_k();return eu=Function.prototype.bind||e,eu}var tu,$m;function nu(){return $m||($m=1,tu=Function.prototype.call),tu}var ru,zm;function jm(){return zm||(zm=1,ru=Function.prototype.apply),ru}var ou,Rm;function Mk(){return Rm||(Rm=1,ou=typeof Reflect<"u"&&Reflect&&Reflect.apply),ou}var iu,Bm;function Dk(){if(Bm)return iu;Bm=1;var e=oa(),t=jm(),n=nu(),r=Mk();return iu=r||e.call(n,t),iu}var su,Hm;function Wm(){if(Hm)return su;Hm=1;var e=oa(),t=Mo(),n=nu(),r=Dk();return su=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},su}var au,qm;function Nk(){if(qm)return au;qm=1;var e=Wm(),t=Am(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return au=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,au}var lu,Um;function Fk(){if(Um)return lu;Um=1;var e=Dm(),t=Fm(),n=Nk();return lu=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,lu}var cu,Gm;function Lk(){if(Gm)return cu;Gm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=oa();return cu=n.call(e,t),cu}var uu,Ym;function du(){if(Ym)return uu;Ym=1;var e,t=dm(),n=pk(),r=hk(),o=mk(),i=gk(),s=yk(),a=Mo(),l=vk(),c=bk(),u=xk(),d=wk(),f=Sk(),p=Tk(),h=Ek(),y=Ck(),m=Function,v=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},b=Am(),x=Ak(),T=function(){throw new a},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=Ok()(),w=Fk(),k=Fm(),A=Dm(),O=jm(),N=nu(),M={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":h,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));_["%Error.prototype%"]=F}var z=function Y(Z){var pe;if(Z==="%AsyncFunction%")pe=v("async function () {}");else if(Z==="%GeneratorFunction%")pe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")pe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var R=Y("%AsyncGeneratorFunction%");R&&(pe=R.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return _[Z]=pe,pe},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=oa(),V=Lk(),L=C.call(N,Array.prototype.concat),B=C.call(O,Array.prototype.splice),U=C.call(N,String.prototype.replace),G=C.call(N,String.prototype.slice),H=C.call(N,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),R=G(Z,-1);if(pe==="%"&&R!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,re){ae[ae.length]=ue?U(re,ie,"$1"):Q||ce}),ae},q=function(Z,pe){var R=Z,ae;if(V(D,R)&&(ae=D[R],R="%"+ae[0]+"%"),V(_,R)){var ce=_[R];if(ce===M&&(ce=z(R)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:R,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return uu=function(Z,pe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var R=te(Z),ae=R.length>0?R[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,re=!1,he=ce.alias;he&&(ae=he[0],B(R,L([0,1],he)));for(var oe=1,le=!0;oe<R.length;oe+=1){var be=R[oe],de=G(be,0,1),ne=G(be,-1);if((de==='"'||de==="'"||de==="`"||ne==='"'||ne==="'"||ne==="`")&&de!==ne)throw new s("property names with quotes must have matching quotes");if((be==="constructor"||!le)&&(re=!0),ae+="."+be,Q="%"+ae+"%",V(_,Q))ue=_[Q];else if(ue!=null){if(!(be in ue)){if(!pe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&oe+1>=R.length){var J=b(ue,be);le=!!J,le&&"get"in J&&!("originalValue"in J.get)?ue=J.get:ue=ue[be]}else le=V(ue,be),ue=ue[be];le&&!re&&(_[Q]=ue)}}return ue},uu}var fu,Km;function Zm(){if(Km)return fu;Km=1;var e=du(),t=Wm(),n=t([e("%String.prototype.indexOf%")]);return fu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},fu}var pu,Xm;function Qm(){if(Xm)return pu;Xm=1;var e=du(),t=Zm(),n=ra(),r=Mo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return pu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var h=l(d,p);return c(d)===0&&(d=void 0),h}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,h){d||(d=new o),s(d,p,h)}};return f},pu}var hu,Jm;function Vk(){if(Jm)return hu;Jm=1;var e=du(),t=Zm(),n=ra(),r=Qm(),o=Mo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return hu=i?function(){var d,f,p={assert:function(h){if(!p.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&f)return f.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?s(d,h):f&&f.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!f&&f.has(h)},set:function(h,y){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),a(d,h,y)):r&&(f||(f=r()),f.set(h,y))}};return p}:r,hu}var mu,eg;function tg(){if(eg)return mu;eg=1;var e=Mo(),t=ra(),n=fk(),r=Qm(),o=Vk(),i=o||r||n;return mu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},mu}var ng=e=>Array.isArray(e),gu=e=>e===void 0,yu=e=>e===null,$k=Function.bind.call(Function.call,Object.prototype.toString),zk=e=>!!e&&$k(e)==="[object Error]"||e instanceof Error,rg=(e,t)=>e instanceof t,jk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Rk=e=>Object.prototype.toString.call(e)==="[object Date]"&&rg(e,Date),Be={array:ng,date:Rk,empty:e=>yu(e)||gu(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:rg,isError:zk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yu(e)||gu(e),null:yu,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!ng(e)&&typeof e=="object",primitive:jk,string:e=>typeof e=="string",undefined:gu},Bk=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},Hk=e=>e.replace(/[^0-9]/g,"");const Wk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qk=(e,t)=>({classGroupId:e,validator:t}),og=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ia="-",ig=[],Uk="arbitrary..",Gk=e=>{const t=Kk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Yk(s);const a=s.split(ia),l=a[0]===""&&a.length>1?1:0;return sg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Wk(c,l):l:c||ig}return n[s]||ig}}},sg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=sg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(ia):e.slice(t).join(ia),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Yk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Uk+r:void 0})(),Kk=e=>{const{theme:t,classGroups:n}=e;return Zk(n,t)},Zk=(e,t)=>{const n=og();for(const r in e){const o=e[r];vu(o,n,r,t)}return n},vu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Xk(s,t,n,r)}},Xk=(e,t,n,r)=>{if(typeof e=="string"){Qk(e,t,n);return}if(typeof e=="function"){Jk(e,t,n,r);return}eC(e,t,n,r)},Qk=(e,t,n)=>{const r=e===""?t:ag(t,e);r.classGroupId=n},Jk=(e,t,n,r)=>{if(tC(e)){vu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qk(n,e))},eC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];vu(l,ag(t,a),n,r)}},ag=(e,t)=>{let n=e;const r=t.split(ia),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=og(),n.nextPart.set(s,a)),n=a}return n},tC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},bu="!",lg=":",rC=[],cg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),oC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(s===0&&a===0){if(m===lg){i.push(o.slice(l,y)),l=y+1;continue}if(m==="/"){c=y;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(bu)?(f=d.slice(0,-1),p=!0):d.startsWith(bu)&&(f=d.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return cg(i,p,f,h)};if(t){const o=t+lg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):cg(rC,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},iC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},sC=e=>({cache:nC(e.cacheSize),parseClassName:oC(e),sortModifiers:iC(e),...Gk(e)}),aC=/\s+/,lC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(aC);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?h.substring(0,y):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+bu:b,T=x+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,m);for(let I=0;I<E.length;++I){const w=E[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},cC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ug(n))&&(o&&(o+=" "),o+=r);return o},ug=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ug(e[r]))&&(n&&(n+=" "),n+=t);return n},uC=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=sC(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=lC(l,n);return o(l,u),u};return i=s,(...l)=>i(cC(...l))},dC=[],$t=e=>{const t=n=>n[e]||dC;return t.isThemeGetter=!0,t},dg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fC=/^\d+\/\d+$/,pC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Do=e=>fC.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),xu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ur=e=>pC.test(e),vC=()=>!0,bC=e=>hC.test(e)&&!mC.test(e),pg=()=>!1,xC=e=>gC.test(e),wC=e=>yC.test(e),SC=e=>!Se(e)&&!Te(e),TC=e=>No(e,vg,pg),Se=e=>dg.test(e),eo=e=>No(e,bg,bC),wu=e=>No(e,AC,qe),hg=e=>No(e,gg,pg),EC=e=>No(e,yg,wC),sa=e=>No(e,xg,xC),Te=e=>fg.test(e),Bi=e=>Fo(e,bg),kC=e=>Fo(e,PC),mg=e=>Fo(e,gg),CC=e=>Fo(e,vg),IC=e=>Fo(e,yg),aa=e=>Fo(e,xg,!0),No=(e,t,n)=>{const r=dg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fo=(e,t,n=!1)=>{const r=fg.exec(e);return r?r[1]?t(r[1]):n:!1},gg=e=>e==="position"||e==="percentage",yg=e=>e==="image"||e==="url",vg=e=>e==="length"||e==="size"||e==="bg-size",bg=e=>e==="length",AC=e=>e==="number",PC=e=>e==="family-name",xg=e=>e==="shadow",OC=uC(()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),o=$t("tracking"),i=$t("leading"),s=$t("breakpoint"),a=$t("container"),l=$t("spacing"),c=$t("radius"),u=$t("shadow"),d=$t("inset-shadow"),f=$t("text-shadow"),p=$t("drop-shadow"),h=$t("blur"),y=$t("perspective"),m=$t("aspect"),v=$t("ease"),b=$t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Te,Se],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Te,Se,l],A=()=>[Do,"full","auto",...k()],O=()=>[Tr,"none","subgrid",Te,Se],N=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],M=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],D=()=>[Do,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Te,Se],V=()=>[...T(),mg,hg,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",CC,TC,{size:[Te,Se]}],U=()=>[xu,Bi,eo],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Bi,eo],ee=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,xu,mg,hg],q=()=>["","none",h,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],R=()=>[Do,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ur],breakpoint:[ur],color:[vC],container:[ur],"drop-shadow":[ur],ease:["in","out","in-out"],font:[SC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ur],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ur],shadow:[ur],spacing:["px",qe],text:[ur],"text-shadow":[ur],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Do,Se,Te,m]}],container:["container"],columns:[{columns:[qe,Se,Te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Te,Se]}],basis:[{basis:[Do,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Do,"auto","initial","none",Se]}],grow:[{grow:["",qe,Te,Se]}],shrink:[{shrink:["",qe,Te,Se]}],order:[{order:[Tr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Bi,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,wu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xu,Se]}],"font-family":[{font:[kC,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Se]}],"line-clamp":[{"line-clamp":[qe,"none",Te,wu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Te,eo]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[qe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},IC,EC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Te,Se]}],"outline-w":[{outline:["",qe,Bi,eo]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,aa,sa]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,aa,sa]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[qe,eo]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,aa,sa]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Te,Se]}],contrast:[{contrast:[qe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",p,aa,sa]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",qe,Te,Se]}],"hue-rotate":[{"hue-rotate":[qe,Te,Se]}],invert:[{invert:["",qe,Te,Se]}],saturate:[{saturate:[qe,Te,Se]}],sepia:[{sepia:["",qe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Te,Se]}],ease:[{ease:["linear","initial",v,Te,Se]}],delay:[{delay:[qe,Te,Se]}],animate:[{animate:["none",b,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,Se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[qe,Bi,eo,wu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),dr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},_C=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Su=e=>Be.function(e),Pe=(...e)=>OC(nm(e)),wg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Hi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Sg=e=>e.scrollHeight>e.clientHeight,Wi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},MC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},Tg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},cn=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),DC={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},NC=_o("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),FC=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:DC,defaultVariants:{theme:"primary",size:"default"}}),la=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return g.jsxs(cn,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(FC({size:s,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:NC({theme:n})}):null,r,a.children]})}),LC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var _t=function(){return _t=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_t.apply(this,arguments)};function Tu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Eu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var qi=function(e){return e.replace(new RegExp(" ","g")," ")},Eg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},VC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},kg=function(e,t,n){var r=e.length-2,o=VC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Cg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ca=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},$C=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ku=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},zC=function(e){return e==="money"||e==="currency"},jC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return _t(_t({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ua=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(t.currency).concat(kg(n,t.group,t.decimal));return qi(r)},RC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Tu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var h=jC(r,i,a);return h.currency=qi("".concat(h.currency.trim()," ")),h.literal=qi(h.literal.trim()),h},[r,i]),f=function(h){var y=ua(h.target.value,d),m=ca(y);h.target.value=y,h.target.setAttribute("data-number",m.toString()),l?.(h),m!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=ua(h,d),m=ca(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(_t(_t({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var p=c.defaultValue?ua(c.defaultValue,d):void 0;return S.createElement("input",_t({},c,{value:typeof c.value=="string"?ua(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),BC=1,HC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},WC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return _t(_t({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},da=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(kg(n,t.group,t.decimal)," ").concat(t.percentSign);return qi(r)},qC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Tu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Eu(S.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(da(b,d))},[s.value]);var d=S.useMemo(function(){var v=WC(r);return v.percentSign=qi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-BC,p=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},h=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&p()}i?.(v)},y=function(v){var b=da(v.target.value,d),x=ca(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=da(v,d),x=ca(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(_t(_t({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=s.defaultValue?da(s.defaultValue,d):void 0;return S.createElement("input",_t({},s,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:p,onKeyUp:h,ref:a,type:"text"}))}),Ui={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},UC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=fa[i];s===void 0?r.push(i.replace(Ui.dots,"\\.").replace(Ui.openParenthesis,"\\(").replace(Ui.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ui.leadingBars,"\\")},Gi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Cu(o,n);var i=UC(o);return n?"^".concat(i,"$"):i},GC=function(e){return e.replace(Ui.escape,"\\$&")},Cu=function(e,t){var n=e.map(function(r){return typeof r=="string"?GC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fa={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},YC=/\d/,Ig="(dd) 9dddd-dddd",Ag="(dd) dddd-dddd",Pg="ddd.ddd.ddd-dd",Og="dd.ddd.ddd/dddd-dd",pa=function(e){return e.replace(/\D/g,"")},KC=["2",/[0-3]/,":",/[0-5]/,/\d/],ZC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Pg,isoDate:"dddd-dd-dd",cnpj:Og,telephone:Ag,cellphone:Ig,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return pa(e).length<=11?Pg:Og},int:function(e){return e===void 0&&(e=""),YC.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=pa(e);return t.length<11?Ag:Ig},time:function(e){var t=pa(e),n=t[0];return n==="2"?KC:ZC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),_t({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Gi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:pa}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function _g(e,t,n,r){var o,i;r===void 0&&(r=fa);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Mg=function(e){return e},XC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Gi(e,n,t));return r.test(n)};function QC(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var JC=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=Tu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=S.useRef(null);S.useImperativeHandle(t,function(){return h.current});var y=ku(a),m=ku(d),v=ku(u),b=S.useRef(XC(u,i,p.value||p.defaultValue)),x=f??"input",T=Eu(S.useState(""),2),E=T[0],I=T[1],w=QC(E),k=S.useCallback(function(F,z){var D,C,V=(D=F??z)!==null&&D!==void 0?D:"";if(u===void 0)return V;var L=(C=V?.toString())!==null&&C!==void 0?C:"";return _g(L,typeof u=="function"?u(L):u,s??Mg,c??fa)},[s,u,c]),A=Eu(S.useState(function(){return k(p.value,p.defaultValue)}),2),O=A[0],N=A[1],M=k(p.defaultValue,p.defaultValue),$=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?Cu(F,i):Gi(u,O,i)}return typeof u=="string"?Gi(u,O,i):Cu(u,i)},[l,O,i,u]);S.useEffect(function(){if(p.value!==void 0){var F=k(p.value,p.defaultValue);N(F),h.current!==null&&(h.current.value=F)}},[p.value,u,s,p.defaultValue]);var _=function(F){var z,D,C,V,L,B=F.currentTarget,U=F.target.value;if(v.current===void 0)return N(U),(z=m.current)===null||z===void 0||z.call(m,U),(D=y.current)===null||D===void 0||D.call(y,F),d?.(U);var G=new RegExp(Gi(v.current,U,i)),H=(C=B.selectionEnd)!==null&&C!==void 0?C:0,ee=function(Z,pe,R){if(Z.type!=="number")return Z.setSelectionRange(pe,R)};if(r&&b.current&&U.length>=O.length)return B.value=O,ee(B,H-1,H-1);var ie=!1;U.length<w.length&&(b.current=!1,ie=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=_g(U,typeof v.current=="function"?v.current(U):v.current,s??Mg,c??fa);for(B.value=Y,N(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;ie?ee(B,H,H):ee(B,te,te),F.target.value=Y,I(Y),(V=m.current)===null||V===void 0||V.call(m,Y),(L=y.current)===null||L===void 0||L.call(y,F)};return S.createElement(x,_t({},p,{ref:h,pattern:$,onChange:_,defaultValue:Dg(p.defaultValue)?M:void 0,value:Dg(p.value)?k(p.value,p.value):p.value}))}),Dg=function(e){return typeof e=="string"},Ng=S.forwardRef(function(e,t){return zC(e.mask)?S.createElement(RC,_t({},e,{mask:void 0,ref:t})):HC(e.mask)?S.createElement(qC,_t({},e,{mask:void 0,ref:t})):S.createElement(JC,_t({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(Ng,_t({},e,t))}};on(Kt.cellTelephone),on(Kt.cellphone),on(Kt.cep),on(Kt.cnpj),on(Kt.color),on(Kt.cpf),on(Kt.cpfCnpj),on(Kt.creditCard),on(Kt.date),on(Kt.int),on(Kt.isoDate),on(Kt.telephone),on(Kt.time),on(Kt.uuid);var Fg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&$C(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=_t(_t({},t),r);return S.createElement(Ng,_t({},o,{ref:n}))});const Lg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const eI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Vg=e=>{const t=tI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const rI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const oI=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...nI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Lg("lucide",o),...!i&&!rI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const et=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(oI,{ref:i,iconNode:t,className:Lg(`lucide-${eI(Vg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vg(e),n};const iI=et("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const sI=et("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const $g=et("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const aI=et("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const lI=et("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Iu=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cI=et("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Au=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Pu=et("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const uI=et("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const dI=et("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const fI=et("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const zg=et("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const jg=et("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Rg=et("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const pI=et("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const hI=et("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Ou=et("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const mI=et("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Er=et("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const gI=et("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const yI=et("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vI=et("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const _u=et("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const bI=et("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const xI=et("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Mu=et("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ha=et("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Du=et("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const wI=et("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Lo=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ma={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},kr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(kr(s,t,n,a))},[]),Bg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:Bg(s,t,n,a)}},{}),Hg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ga=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},SI={default:e=>ga(e,{result:Hg.default}),dark:e=>ga(e,{result:Hg.dark})},Vo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},TI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Nu=(e,t)=>{const n=kr(e.colors,Vo(t?.colors)),r=kr(e.spacing,Vo(t?.spacing)),o=kr(e.rounded,Vo(t?.rounded)),i=kr(e.shadow,Vo(t?.rounded)),s=kr(e.zIndex,Vo(t?.zIndex??TI)),a=e.custom?kr(e.custom,Vo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},EI=(e,t)=>ga(Nu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),kI=(e,t)=>Nu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),CI=(e,t)=>ga(Nu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ya={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>g.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},va={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},to=S.createContext({parser:ma.hsla,tweaks:va,floatingRef:void 0,map:ya,locale:void 0}),At=()=>{const e=S.useContext(to);return e?e.map:ya},Fu=()=>{const e=S.useContext(to);return e?e.tweaks:va};function ba(){return typeof window<"u"}function Cr(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(xa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xa(e){return ba()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return ba()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return ba()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Yi(e){return!ba()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const II=new Set(["inline","contents"]);function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=un(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!II.has(o)}const AI=new Set(["table","td","th"]);function PI(e){return AI.has(Cr(e))}const OI=[":popover-open",":modal"];function wa(e){return OI.some(t=>{try{return e.matches(t)}catch{return!1}})}const _I=["transform","translate","scale","rotate","perspective"],MI=["transform","translate","scale","rotate","perspective","filter"],DI=["paint","layout","strict","content"];function Lu(e){const t=Sa(),n=tt(e)?un(e):e;return _I.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||MI.some(r=>(n.willChange||"").includes(r))||DI.some(r=>(n.contain||"").includes(r))}function NI(e){let t=pr(e);for(;Pt(t)&&!fr(t);){if(Lu(t))return t;if(wa(t))return null;t=pr(t)}return null}function Sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const FI=new Set(["html","body","#document"]);function fr(e){return FI.has(Cr(e))}function un(e){return Wt(e).getComputedStyle(e)}function Ta(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pr(e){if(Cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||Bn(e);return Yi(t)?t.host:t}function Wg(e){const t=pr(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ki(t)?t:Wg(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=Vu(s);return t.concat(s,s.visualViewport||[],Ki(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function Vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const LI=["top","right","bottom","left"],qg=["start","end"],Ug=LI.reduce((e,t)=>e.concat(t,t+"-"+qg[0],t+"-"+qg[1]),[]),Ar=Math.min,dn=Math.max,Ea=Math.round,$o=Math.floor,Hn=e=>({x:e,y:e}),VI={left:"right",right:"left",bottom:"top",top:"bottom"},$I={start:"end",end:"start"};function $u(e,t,n){return dn(e,Ar(t,n))}function no(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function An(e){return e.split("-")[1]}function Gg(e){return e==="x"?"y":"x"}function zu(e){return e==="y"?"height":"width"}const zI=new Set(["top","bottom"]);function hr(e){return zI.has(Wn(e))?"y":"x"}function ju(e){return Gg(hr(e))}function Yg(e,t,n){n===void 0&&(n=!1);const r=An(e),o=ju(e),i=zu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ca(s)),[s,Ca(s)]}function jI(e){const t=Ca(e);return[ka(e),t,ka(t)]}function ka(e){return e.replace(/start|end/g,t=>$I[t])}const Kg=["left","right"],Zg=["right","left"],RI=["top","bottom"],BI=["bottom","top"];function HI(e,t,n){switch(e){case"top":case"bottom":return n?t?Zg:Kg:t?Kg:Zg;case"left":case"right":return t?RI:BI;default:return[]}}function WI(e,t,n,r){const o=An(e);let i=HI(Wn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ka)))),i}function Ca(e){return e.replace(/left|right|bottom|top/g,t=>VI[t])}function qI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xg(e){return typeof e!="number"?qI(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var UI=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Aa=UI.join(","),Qg=typeof Element>"u",zo=Qg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pa=!Qg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Oa=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Oa(t.parentNode));return s},GI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Jg=function(t,n,r){if(Oa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Aa));return n&&zo.call(t,Aa)&&o.unshift(t),o=o.filter(r),o},_a=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Oa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=_a(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=zo.call(s,Aa);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Oa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=_a(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},ey=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||GI(t))&&!ey(t)?0:t.tabIndex},YI=function(t,n){var r=ty(t);return r<0&&n&&!ey(t)?0:r},KI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ny=function(t){return t.tagName==="INPUT"},ZI=function(t){return ny(t)&&t.type==="hidden"},XI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JI=function(t){if(!t.name)return!0;var n=t.form||Pa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=QI(o,t.form);return!i||i===t},eA=function(t){return ny(t)&&t.type==="radio"},tA=function(t){return eA(t)&&!JI(t)},nA=function(t){var n,r=t&&Pa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Pa(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},ry=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=zo.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(zo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Pa(t);if(c&&!c.shadowRoot&&o(c)===!0)return ry(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(nA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ry(t);return!1},oA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ru=function(t,n){return!(n.disabled||ZI(n)||rA(n,t)||XI(n)||oA(n))},Bu=function(t,n){return!(tA(n)||ty(n)<0||!Ru(t,n))},iA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},oy=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=YI(a,s),c=s?oy(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(KI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},jo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Bu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:iA}):r=Jg(t,n.includeContainer,Bu.bind(null,n)),oy(r)},sA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Ru.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Jg(t,n.includeContainer,Ru.bind(null,n)),r},iy=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Aa)===!1?!1:Bu(n,t)};function Hu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function sy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ay(){return/apple/i.test(navigator.vendor)}function Wu(){const e=/android/i;return e.test(Hu())||e.test(sy())}function aA(){return Hu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ly(){return sy().includes("jsdom/")}const cy="data-floating-ui-focusable",lA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qu="ArrowLeft",Uu="ArrowRight",cA="ArrowUp",uA="ArrowDown";function qn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Bt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function dA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function Yu(e){return Pt(e)&&e.matches(lA)}function Ku(e){return e?e.getAttribute("role")==="combobox"&&Yu(e):!1}function fA(e){if(!e||ly())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ma(e){return e?e.hasAttribute(cy)?e:e.querySelector("["+cy+"]")||e:null}function ro(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ro(e,o.id,n)])}function pA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),ro(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function uy(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ut(e){e.preventDefault(),e.stopPropagation()}function hA(e){return"nativeEvent"in e}function dy(e){return e.mozInputSource===0&&e.isTrusted?!0:Wu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fy(e){return ly()?!1:!Wu()&&e.width===0&&e.height===0||Wu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var mA=typeof document<"u",gA=function(){},nt=mA?S.useLayoutEffect:gA;const yA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const vA=yA.useInsertionEffect||(e=>e());function kt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return vA(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Da(e,t,n){return Math.floor(e/t)!==n}function Zi(e,t){return t<0||t>=e.current.length}function Zu(e,t){return Zt(e,{disabledIndices:t})}function py(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Na(e,s,o));return s}function bA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===cA){if(d&&Ut(n),u===-1)f=c;else if(f=Zt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const p=u%s,h=c%s,y=c-(h-p);h===p?f=c:f=h>p?y:y-s}Zi(e,f)&&(f=u)}if(n.key===uA&&(d&&Ut(n),u===-1?f=l:(f=Zt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Zt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Zi(e,f)&&(f=u)),r==="both"){const p=$o(u/s);n.key===(i?qu:Uu)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Da(f,s,p)&&(f=u)),n.key===(i?Uu:qu)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Da(f,s,p)&&(f=u));const h=$o(c/s)===p;Zi(e,f)&&(o&&h?f=n.key===(i?Uu:qu)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function xA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function wA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function SA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Na(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Xi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hy(e,t){const n=jo(e,Xi()),r=n.length;if(r===0)return;const o=qn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function my(e){return hy(qt(e).body,1)||e}function gy(e){return hy(qt(e).body,-1)||e}function Qi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bt(n,r)}function TA(e){jo(e,Xi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function yy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function vy(e,t,n){let{reference:r,floating:o}=e;const i=hr(t),s=ju(t),a=zu(s),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(An(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function EA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=no(t,e),h=Xg(p),m=a[f?d==="floating"?"reference":"floating":d],v=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+h.top)/T.y,bottom:(E.bottom-v.bottom+h.bottom)/T.y,left:(v.left-E.left+h.left)/T.x,right:(E.right-v.right+h.right)/T.x}}const kA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=vy(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){var y;const{name:v,fn:b}=a[m],{x,y:T,data:E,reset:I}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:EA},elements:{reference:e,floating:t}});u=x??u,d=T??d,p={...p,[v]:{...p[v],...E}},I&&h<=50&&(h++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:d}=vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},CA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=no(e,t)||{};if(c==null)return{};const d=Xg(u),f={x:n,y:r},p=ju(o),h=zu(p),y=await s.getDimensions(c),m=p==="y",v=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[h]+i.reference[p]-f[p]-i.floating[h],E=f[p]-i.reference[p],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[h]);const k=T/2-E/2,A=w/2-y[h]/2-1,O=Ar(d[v],A),N=Ar(d[b],A),M=O,$=w-y[h]-N,_=w/2-y[h]/2+k,F=$u(M,_,$),z=!l.arrow&&An(o)!=null&&_!==F&&i.reference[h]/2-(_<M?O:N)-y[h]/2<0,D=z?_<M?_-M:_-$:0;return{[p]:f[p]+D,data:{[p]:F,centerOffset:_-F-D,...z&&{alignmentOffset:D}},reset:z}}});function IA(e,t,n){return(e?[...n.filter(o=>An(o)===e),...n.filter(o=>An(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?An(o)===e||(t?ka(o)!==o:!1):!0)}const AA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ug,autoAlignment:p=!0,...h}=no(e,t),y=d!==void 0||f===Ug?IA(d||null,p,f):f,m=await l.detectOverflow(t,h),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=Yg(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[m[Wn(b)],m[x[0]],m[x[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=y[v+1];if(I)return{data:{index:v+1,overflows:E},reset:{placement:I}};const w=E.map(O=>{const N=An(O.placement);return[O.placement,N&&u?O.overflows.slice(0,2).reduce((M,$)=>M+$,0):O.overflows[0],O.overflows]}).sort((O,N)=>O[1]-N[1]),A=((o=w.filter(O=>O[2].slice(0,An(O[0])?2:3).every(N=>N<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},PA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...m}=no(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Wn(o),b=hr(a),x=Wn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[Ca(a)]:jI(a)),I=h!=="none";!f&&I&&E.push(...WI(a,y,h,T));const w=[a,...E],k=await l.detectOverflow(t,m),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(k[v]),d){const _=Yg(o,s,T);A.push(k[_[0]],k[_[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(_=>_<=0)){var N,M;const _=(((N=i.flip)==null?void 0:N.index)||0)+1,F=w[_];if(F&&(!(d==="alignment"?b!==hr(F):!1)||O.every(C=>hr(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:F}};let z=(M=O.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!z)switch(p){case"bestFit":{var $;const D=($=O.filter(C=>{if(I){const V=hr(C.placement);return V===b||V==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort((C,V)=>C[1]-V[1])[0])==null?void 0:$[0];D&&(z=D);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},OA=new Set(["left","top"]);async function _A(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wn(n),a=An(n),l=hr(n)==="y",c=OA.has(s)?-1:1,u=i&&l?-1:1,d=no(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const MA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await _A(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},DA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=no(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=hr(Wn(o)),p=Gg(f);let h=u[p],y=u[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],T=h-d[b];h=$u(x,h,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=$u(x,y,T)}const m=l.fn({...t,[p]:h,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[f]:a}}}}}},NA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=no(e,t),u=await s.detectOverflow(t,c),d=Wn(o),f=An(o),p=hr(o)==="y",{width:h,height:y}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const b=y-u.top-u.bottom,x=h-u.left-u.right,T=Ar(y-u[m],b),E=Ar(h-u[v],x),I=!t.middlewareData.shift;let w=T,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=dn(u.left,0),N=dn(u.right,0),M=dn(u.top,0),$=dn(u.bottom,0);p?k=h-2*(O!==0||N!==0?O+N:dn(u.left,u.right)):w=y-2*(M!==0||$!==0?M+$:dn(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const A=await s.getDimensions(a.floating);return h!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function by(e){const t=un(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ea(n)!==i||Ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Xu(e){return tt(e)?e:e.contextElement}function Bo(e){const t=Xu(e);if(!Pt(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=by(t);let s=(i?Ea(n.width):n.width)/r,a=(i?Ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const FA=Hn(0);function xy(e){const t=Wt(e);return!Sa()||!t.visualViewport?FA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function oo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xu(e);let s=Hn(1);t&&(r?tt(r)&&(s=Bo(r)):s=Bo(e));const a=LA(i,n,r)?xy(i):Hn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),p=r&&tt(r)?Wt(r):r;let h=f,y=Vu(h);for(;y&&r&&p!==h;){const m=Bo(y),v=y.getBoundingClientRect(),b=un(y),x=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*m.x,T=v.top+(y.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=T,h=Wt(y),y=Vu(h)}}return Ia({width:u,height:d,x:l,y:c})}function Fa(e,t){const n=Ta(e).scrollLeft;return t?t.left+n:oo(Bn(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function VA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Bn(r),a=t?wa(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Pt(r);if((d||!d&&!i)&&((Cr(r)!=="body"||Ki(s))&&(l=Ta(r)),Pt(r))){const p=oo(r);c=Bo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?wy(s,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function $A(e){return Array.from(e.getClientRects())}function zA(e){const t=Bn(e),n=Ta(e),r=e.ownerDocument.body,o=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fa(e);const a=-n.scrollTop;return un(r).direction==="rtl"&&(s+=dn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sy=25;function jA(e,t){const n=Wt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Sa();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Fa(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=Sy&&(i-=h)}else c<=Sy&&(i+=c);return{width:i,height:s,x:a,y:l}}const RA=new Set(["absolute","fixed"]);function BA(e,t){const n=oo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Bo(e):Hn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ty(e,t,n){let r;if(t==="viewport")r=jA(e,n);else if(t==="document")r=zA(Bn(e));else if(tt(t))r=BA(t,n);else{const o=xy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ia(r)}function Ey(e,t){const n=pr(e);return n===t||!tt(n)||fr(n)?!1:un(n).position==="fixed"||Ey(n,t)}function HA(e,t){const n=t.get(e);if(n)return n;let r=Ir(e,[],!1).filter(a=>tt(a)&&Cr(a)!=="body"),o=null;const i=un(e).position==="fixed";let s=i?pr(e):e;for(;tt(s)&&!fr(s);){const a=un(s),l=Lu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&RA.has(o.position)||Ki(s)&&!l&&Ey(e,s))?r=r.filter(u=>u!==s):o=a,s=pr(s)}return t.set(e,r),r}function WA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?wa(t)?[]:HA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ty(t,u,o);return c.top=dn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=dn(d.left,c.left),c},Ty(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qA(e){const{width:t,height:n}=by(e);return{width:t,height:n}}function UA(e,t,n){const r=Pt(t),o=Bn(t),i=n==="fixed",s=oo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Fa(o)}if(r||!r&&!i)if((Cr(t)!=="body"||Ki(o))&&(a=Ta(t)),r){const p=oo(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?wy(o,a):Hn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Qu(e){return un(e).position==="static"}function ky(e,t){if(!Pt(e)||un(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function Cy(e,t){const n=Wt(e);if(wa(e))return n;if(!Pt(e)){let o=pr(e);for(;o&&!fr(o);){if(tt(o)&&!Qu(o))return o;o=pr(o)}return n}let r=ky(e,t);for(;r&&PI(r)&&Qu(r);)r=ky(r,t);return r&&fr(r)&&Qu(r)&&!Lu(r)?n:r||NI(e)||n}const GA=async function(e){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=await n(e.floating);return{reference:UA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YA(e){return un(e).direction==="rtl"}const KA={convertOffsetParentRelativeRectToViewportRelativeRect:VA,getDocumentElement:Bn,getClippingRect:WA,getOffsetParent:Cy,getElementRects:GA,getClientRects:$A,getDimensions:qA,getScale:Bo,isElement:tt,isRTL:YA};function Iy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ZA(e,t){let n=null,r;const o=Bn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const h=$o(d),y=$o(o.clientWidth-(u+f)),m=$o(o.clientHeight-(d+p)),v=$o(u),x={rootMargin:-h+"px "+-y+"px "+-m+"px "+-v+"px",threshold:dn(0,Ar(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Iy(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function io(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Xu(e),u=o||i?[...c?Ir(c):[],...Ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?ZA(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,y=l?oo(e):null;l&&m();function m(){const v=oo(e);y&&!Iy(y,v)&&n(),y=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const XA=MA,QA=AA,JA=DA,eP=PA,tP=NA,Ay=CA,nP=(e,t,n)=>{const r=new Map,o={platform:KA,...n},i={...o.platform,_c:r};return kA(e,t,{...o,platform:i})};var rP=typeof document<"u",oP=function(){},La=rP?S.useLayoutEffect:oP;function Va(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Va(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Va(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Py(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=Py(e);return Math.round(t*n)/n}function Ju(e){const t=P.useRef(e);return La(()=>{t.current=e}),t}function iP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Va(f,r)||p(r);const[h,y]=P.useState(null),[m,v]=P.useState(null),b=P.useCallback(C=>{C!==I.current&&(I.current=C,y(C))},[]),x=P.useCallback(C=>{C!==w.current&&(w.current=C,v(C))},[]),T=i||h,E=s||m,I=P.useRef(null),w=P.useRef(null),k=P.useRef(u),A=l!=null,O=Ju(l),N=Ju(o),M=Ju(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};N.current&&(C.platform=N.current),nP(I.current,w.current,C).then(V=>{const L={...V,isPositioned:M.current!==!1};_.current&&!Va(k.current,L)&&(k.current=L,cr.flushSync(()=>{d(L)}))})},[f,t,n,N,M]);La(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const _=P.useRef(!1);La(()=>(_.current=!0,()=>{_.current=!1}),[]),La(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(O.current)return O.current(T,E,$);$()}},[T,E,$,O,A]);const F=P.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=P.useMemo(()=>({reference:T,floating:E}),[T,E]),D=P.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const V=Oy(z.floating,u.x),L=Oy(z.floating,u.y);return a?{...C,transform:"translate("+V+"px, "+L+"px)",...Py(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:L}},[n,a,z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:F,elements:z,floatingStyles:D}),[u,$,F,z,D])}const sP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ay({element:r.current,padding:o}).fn(n):{}:r?Ay({element:r,padding:o}).fn(n):{}}}},Ho=(e,t)=>({...XA(e),options:[e,t]}),$a=(e,t)=>({...JA(e),options:[e,t]}),za=(e,t)=>({...eP(e),options:[e,t]}),_y=(e,t)=>({...tP(e),options:[e,t]}),My=(e,t)=>({...QA(e),options:[e,t]}),ed=(e,t)=>({...sP(e),options:[e,t]});function aP(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Dy=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function lP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),s=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(aP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(Dy.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Ny(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Dy),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const p=t!==void 0;s.current[a]=p?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const cP="data-floating-ui-focusable",Fy="active",Ly="selected",Ji="ArrowLeft",es="ArrowRight",Vy="ArrowUp",ja="ArrowDown",uP={...P};let $y=!1,dP=0;const zy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dP++;function fP(){const[e,t]=P.useState(()=>$y?zy():void 0);return nt(()=>{e==null&&t(zy())},[]),P.useEffect(()=>{$y=!0},[]),e}const ts=uP.useId||fP;let ns;process.env.NODE_ENV!=="production"&&(ns=new Set);function Ra(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.warn(o)}}function pP(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.error(o)}}const td=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...y}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Ra("The `ref` prop is required for `FloatingArrow`."));const v=ts(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;un(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const k=u*2,A=k/2,O=a/2*(c/-8+1),N=l/2*c/4,M=!!p,$=w&&E==="end"?"bottom":"top";let _=w&&E==="end"?"right":"left";w&&b&&(_=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-N))+(" Q"+a/2+","+l+" "+O+","+(l-N))+" Z",C={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[T];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:M?a:a+k,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[_]:F,[$]:z,[T]:I||M?"100%":"calc(100% - "+k/2+"px)",transform:[C,h].filter(V=>!!V).join(" "),...y},children:[k>0&&g.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:D}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:D}),g.jsx("clipPath",{id:v,children:g.jsx("rect",{x:-A,y:A*(M?-1:1),width:a+k,height:a})})]})});function jy(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Ry=P.createContext(null),By=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(Ry))==null?void 0:e.id)||null},Or=()=>P.useContext(By);function hP(e){const t=ts(),n=Or(),o=Pr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function mP(e){const{children:t,id:n}=e,r=Pr();return g.jsx(Ry.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function gP(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(s=>{n.current=[...n.current,s]},[]),o=P.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=P.useState(()=>jy());return g.jsx(By.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function so(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Hy=so("safe-polygon");function nd(e,t,n){if(n&&!Ro(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function rd(e){return typeof e=="function"?e():e}function Wy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Or(),h=Pr(),y=Ht(c),m=Ht(l),v=Ht(n),b=Ht(d),x=P.useRef(),T=P.useRef(-1),E=P.useRef(),I=P.useRef(-1),w=P.useRef(!0),k=P.useRef(!1),A=P.useRef(()=>{}),O=P.useRef(!1),N=kt(()=>{var D;const C=(D=o.current.openEvent)==null?void 0:D.type;return C?.includes("mouse")&&C!=="mousedown"});P.useEffect(()=>{if(!a)return;function D(C){let{open:V}=C;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function D(V){N()&&r(!1,V,"hover")}const C=qt(s.floating).documentElement;return C.addEventListener("mouseleave",D),()=>{C.removeEventListener("mouseleave",D)}},[s.floating,n,r,a,y,N]);const M=P.useCallback(function(D,C,V){C===void 0&&(C=!0),V===void 0&&(V="hover");const L=nd(m.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,D,V),L)):C&&(Gt(T),r(!1,D,V))},[m,r]),$=kt(()=>{A.current(),E.current=void 0}),_=kt(()=>{if(k.current){const D=qt(s.floating).body;D.style.pointerEvents="",D.removeAttribute(Hy),k.current=!1}}),F=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function D(U){if(Gt(T),w.current=!1,u&&!Ro(x.current)||rd(b.current)>0&&!nd(m.current,"open"))return;const G=nd(m.current,"open",x.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function C(U){if(F()){_();return}A.current();const G=qt(s.floating);if(Gt(I),O.current=!1,y.current&&o.current.floatingContext){n||Gt(T),E.current=y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),$(),F()||M(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Bt(s.floating,U.relatedTarget))&&M(U)}function V(U){F()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){_(),$(),F()||M(U)}})(U))}function L(){Gt(T)}function B(U){F()||M(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",D,{once:!0}),U.addEventListener("mouseenter",D),U.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",B)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",D),U.removeEventListener("mouseenter",D),U.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",B))}}},[s,a,e,u,f,M,$,_,r,n,v,p,m,y,o,F,b]),nt(()=>{var D;if(a&&n&&(D=y.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&N()){k.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var C;const L=qt(s.floating).body;L.setAttribute(Hy,"");const B=s.domReference,U=p==null||(C=p.nodesRef.current.find(G=>G.id===h))==null||(C=C.context)==null?void 0:C.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",B.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",B.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,h,s,p,y,N]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),_())},[n,$,_]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),_()},[a,s.domReference,$,_]);const z=P.useMemo(()=>{function D(C){x.current=C.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(C){const{nativeEvent:V}=C;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!Ro(x.current)||n||rd(b.current)===0||O.current&&C.movementX**2+C.movementY**2<2||(Gt(I),x.current==="touch"?L():(O.current=!0,I.current=window.setTimeout(L,rd(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let qy=0;function ao(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qy);const i=()=>e?.focus({preventScroll:n});o?i():qy=requestAnimationFrame(i)}function od(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vP(e){return e?.ownerDocument||document}const Wo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Uy(e){return e==="inert"?Wo.inert:e==="aria-hidden"?Wo["aria-hidden"]:Wo.none}let Ba=new WeakSet,Ha={},id=0;const bP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Gy=e=>e&&(e.host||Gy(e.parentNode)),xP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Gy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function wP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=xP(t,e),a=new Set,l=new Set(s),c=[];Ha[o]||(Ha[o]=new WeakMap);const u=Ha[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,h=>{if(Cr(h)!=="script")if(a.has(h))f(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",v=Uy(i),b=(v.get(h)||0)+1,x=(u.get(h)||0)+1;v.set(h,b),u.set(h,x),c.push(h),b===1&&m&&Ba.add(h),x===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,i==="inert"?"":"true")}})}return id++,()=>{c.forEach(p=>{const h=Uy(i),m=(h.get(p)||0)-1,v=(u.get(p)||0)-1;h.set(p,m),u.set(p,v),m||(!Ba.has(p)&&i&&p.removeAttribute(i),Ba.delete(p)),v||p.removeAttribute(o)}),id--,id||(Wo.inert=new WeakMap,Wo["aria-hidden"]=new WeakMap,Wo.none=new WeakMap,Ba=new WeakSet,Ha={})}}function Yy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vP(e[0]).body;return wP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const sd={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Wa=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{ay()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[so("focus-guard")]:"",style:sd};return g.jsx("span",{...t,...i})}),SP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ky=P.createContext(null),Zy=so("portal");function TP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ts(),o=Xy(),[i,s]=P.useState(null),a=P.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Zy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!xa(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Zy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function mr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=TP({id:n,root:r}),[s,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=s?.modal,p=s?.open,h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(m){i&&Qi(m)&&(m.type==="focusin"?yy:TA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),P.useEffect(()=>{i&&(p||yy(i))},[p,i]),g.jsxs(Ky.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[h&&i&&g.jsx(Wa,{"data-type":"outside",ref:l,onFocus:y=>{if(Qi(y,i)){var m;(m=u.current)==null||m.focus()}else{const v=s?s.domReference:null,b=gy(v);b?.focus()}}}),h&&i&&g.jsx("span",{"aria-owns":i.id,style:SP}),i&&cr.createPortal(t,i),h&&i&&g.jsx(Wa,{"data-type":"outside",ref:c,onFocus:y=>{if(Qi(y,i)){var m;(m=d.current)==null||m.focus()}else{const v=s?s.domReference:null,b=my(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const Xy=()=>P.useContext(Ky);function Qy(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const EP=20;let _r=[];function ad(){_r=_r.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function kP(e){ad(),e&&Cr(e)!=="body"&&(_r.push(new WeakRef(e)),_r.length>EP&&(_r=_r.slice(-20)))}function Jy(){ad();const e=_r[_r.length-1];return e?.deref()}function CP(e){const t=Xi();return iy(e,t)?e:jo(e,t)[0]||e}function ev(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Xi(),i=sA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return iy(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const IP=P.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:sd})});function lo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:h,onOpenChange:y,events:m,dataRef:v,elements:{domReference:b,floating:x}}=t,T=kt(()=>{var R;return(R=v.current.floatingContext)==null?void 0:R.nodeId}),E=kt(p),I=typeof s=="number"&&s<0,w=Ku(b)&&I,k=bP(),A=k?i:!0,O=!A||k&&f,N=Ht(o),M=Ht(s),$=Ht(a),_=Or(),F=Xy(),z=P.useRef(null),D=P.useRef(null),C=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),B=P.useRef(-1),U=F!=null,G=Ma(x),H=kt(function(R){return R===void 0&&(R=G),R?jo(R,Xi()):[]}),ee=kt(R=>{const ae=H(R);return N.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function R(ce){if(ce.key==="Tab"){Bt(G,qn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Un(ce);N.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?ao(Q[Q.length-1]):ao(Q[1])),N.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),ao(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",R),()=>{ae.removeEventListener("keydown",R)}},[r,b,G,c,N,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function R(ae){const ce=Un(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",R),()=>{x.removeEventListener("focusin",R)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function R(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const re=ue.relatedTarget,he=ue.currentTarget,oe=Un(ue);queueMicrotask(()=>{const le=T(),be=!(Bt(b,re)||Bt(x,re)||Bt(re,x)||Bt(F?.portalNode,re)||re!=null&&re.hasAttribute(so("focus-guard"))||_&&(ro(_.nodesRef.current,le).find(de=>{var ne,J;return Bt((ne=de.context)==null?void 0:ne.elements.floating,re)||Bt((J=de.context)==null?void 0:J.elements.domReference,re)})||uy(_.nodesRef.current,le).find(de=>{var ne,J,j;return[(ne=de.context)==null?void 0:ne.elements.floating,Ma((J=de.context)==null?void 0:J.elements.floating)].includes(re)||((j=de.context)==null?void 0:j.elements.domReference)===re})));if(he===b&&G&&ev(G,N),l&&he!==b&&!(oe!=null&&oe.isConnected)&&qn(qt(G))===qt(G).body){Pt(G)&&G.focus();const de=L.current,ne=H(),J=ne[de]||ne[ne.length-1]||G;Pt(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&re&&be&&!V.current&&re!==Jy()&&(C.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!_&&F);function Q(){Gt(B),v.current.insideReactTree=!0,B.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",R),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",R),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,_,F,y,d,l,H,w,T,N,v]);const ie=P.useRef(null),te=P.useRef(null),q=Qy([ie,F?.beforeInsideRef]),Y=Qy([te,F?.afterInsideRef]);P.useEffect(()=>{var R,ae;if(r||!x)return;const ce=Array.from((F==null||(R=F.portalNode)==null?void 0:R.querySelectorAll("["+so("portal")+"]"))||[]),ue=(ae=(_?uy(_.nodesRef.current,T()):[]).find(oe=>{var le;return Ku(((le=oe.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,re=[x,ue,...ce,...E(),z.current,D.current,ie.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,N.current.includes("reference")||w?b:null].filter(oe=>oe!=null),he=c||w?Yy(re,!O,O):Yy(re);return()=>{he()}},[r,b,x,c,N,F,w,A,O,_,T,E]),nt(()=>{if(r||!Pt(G))return;const R=qt(G),ae=qn(R);queueMicrotask(()=>{const ce=ee(G),Q=M.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,re=Bt(G,ae);!I&&!re&&h&&ao(ue,{preventScroll:ue===G})})},[r,h,G,I,ee,M]),nt(()=>{if(r||!G)return;const R=qt(G),ae=qn(R);kP(ae);function ce(re){let{reason:he,event:oe,nested:le}=re;if(["hover","safe-polygon"].includes(he)&&oe.type==="mouseleave"&&(C.current=!0),he==="outside-press")if(le)C.current=!1;else if(dy(oe)||fy(oe))C.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?C.current=!1:C.current=!0}}m.on("openchange",ce);const Q=R.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,sd),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const re=b||Jy();return re&&re.isConnected?re:Q}return $.current.current||Q}return()=>{m.off("openchange",ce);const re=qn(R),he=Bt(x,re)||_&&ro(_.nodesRef.current,T(),!1).some(le=>{var be;return Bt((be=le.context)==null?void 0:be.elements.floating,re)}),oe=ue();queueMicrotask(()=>{const le=CP(oe);$.current&&!C.current&&Pt(le)&&(!(le!==re&&re!==R.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,m,_,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(ad)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,y,d,b]),nt(()=>{r||G&&ev(G,N)},[r,G,N]);function Z(R){return r||!u||!c?null:g.jsx(IP,{ref:R==="start"?z:D,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return g.jsxs(g.Fragment,{children:[pe&&g.jsx(Wa,{"data-type":"inside",ref:q,onFocus:R=>{if(c){const ce=ee();ao(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(C.current=!1,Qi(R,F.portalNode)){const ce=my(b);ce?.focus()}else{var ae;(ae=F.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Z("start"),n,Z("end"),pe&&g.jsx(Wa,{"data-type":"inside",ref:Y,onFocus:R=>{if(c)ao(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(C.current=!0),Qi(R,F.portalNode)){const ce=gy(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let qa=0;const tv="--floating-ui-scrollbar-width";function AP(){const e=Hu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(tv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(tv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let nv=()=>{};const ld=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return qa++,qa===1&&(nv=AP()),()=>{qa--,qa===0&&nv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function rv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function PP(e){return Pt(e.target)&&e.target.tagName==="A"}function ov(e){return Yu(e)}function qo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=P.useRef(),p=P.useRef(!1),h=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const m=f.current;y.button===0&&a!=="click"&&(Ro(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Ro(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||rv(y))&&(y.key===" "&&!ov(i)&&(y.preventDefault(),p.current=!0),!PP(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||rv(y)||ov(i)||y.key===" "&&p.current&&(p.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return P.useMemo(()=>s?{reference:h}:{},[s,h])}function OP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function iv(e){return e!=null&&e.clientX!=null}function _P(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),f=P.useRef(null),[p,h]=P.useState(),[y,m]=P.useState([]),v=kt((I,w)=>{d.current||r.current.openEvent&&!iv(r.current.openEvent)||s.setPositionReference(OP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||m([]):v(I.clientX,I.clientY))}),x=Ro(p)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(k){const A=Un(k);Bt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||iv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);P.useEffect(()=>T(),[T,y]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=P.useMemo(()=>{function I(w){let{pointerType:k}=w;h(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const MP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},sv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Mr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,y=Or(),m=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,b=P.useRef(!1),{escapeKey:x,outsidePress:T}=sv(p),{escapeKey:E,outsidePress:I}=sv(h),w=P.useRef(!1),k=kt(_=>{var F;if(!n||!s||!a||_.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,D=y?ro(y.nodesRef.current,z):[];if(!x&&(_.stopPropagation(),D.length>0)){let C=!0;if(D.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,hA(_)?_.nativeEvent:_,"escape-key")}),A=kt(_=>{var F;const z=()=>{var D;k(_),(D=Un(_))==null||D.removeEventListener("keydown",z)};(F=Un(_))==null||F.addEventListener("keydown",z)}),O=kt(_=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const D=b.current;if(b.current=!1,c==="click"&&D||z||typeof v=="function"&&!v(_))return;const C=Un(_),V="["+so("inert")+"]",L=qt(o.floating).querySelectorAll(V);let B=tt(C)?C:null;for(;B&&!fr(B);){const ee=pr(B);if(fr(ee)||!tt(ee))break;B=ee}if(L.length&&tt(C)&&!dA(C)&&!Bt(C,o.floating)&&Array.from(L).every(ee=>!Bt(B,ee)))return;if(Pt(C)&&$){const ee=fr(C),ie=un(C),te=/auto|scroll/,q=ee||te.test(ie.overflowX),Y=ee||te.test(ie.overflowY),Z=q&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,pe=Y&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,R=ie.direction==="rtl",ae=pe&&(R?_.offsetX<=C.offsetWidth-C.clientWidth:_.offsetX>C.clientWidth),ce=Z&&_.offsetY>C.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&ro(y.nodesRef.current,U).some(ee=>{var ie;return Gu(_,(ie=ee.context)==null?void 0:ie.elements.floating)});if(Gu(_,o.floating)||Gu(_,o.domReference)||G)return;const H=y?ro(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(ie=>{var te;if((te=ie.context)!=null&&te.open&&!ie.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,_,"outside-press")}),N=kt(_=>{var F;const z=()=>{var D;O(_),(D=Un(_))==null||D.removeEventListener(c,z)};(F=Un(_))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let _=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(_),w.current=!0}function D(){_=window.setTimeout(()=>{w.current=!1},Sa()?5:0)}const C=qt(o.floating);a&&(C.addEventListener("keydown",E?A:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",D)),v&&C.addEventListener(c,I?N:O,I);let V=[];return f&&(tt(o.domReference)&&(V=Ir(o.domReference)),tt(o.floating)&&(V=V.concat(Ir(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ir(o.reference.contextElement)))),V=V.filter(L=>{var B;return L!==((B=C.defaultView)==null?void 0:B.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(C.removeEventListener("keydown",E?A:k,E),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",D)),v&&C.removeEventListener(c,I?N:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(_)}},[i,o,a,v,c,n,r,f,s,x,T,k,E,A,O,I,N]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const M=P.useMemo(()=>({onKeyDown:k,...u&&{[MP[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[DP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return P.useMemo(()=>s?{reference:M,floating:$}:{},[s,M,$])}function NP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ts(),i=P.useRef({}),[s]=P.useState(()=>jy()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&pP("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=P.useState(r.reference),u=kt((p,h,y)=>{i.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:y,nested:a}),n?.(p,h,y)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=NP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=P.useState(null),[a,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),f=Or();nt(()=>{u&&(d.current=u)},[u]);const p=iP({...e,elements:{...o,...a&&{reference:a}}}),h=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),p.refs.setReference(T)},[p.refs]),y=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,s(x)),(tt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!tt(x))&&p.refs.setReference(x)},[p.refs]),m=P.useMemo(()=>({...p.refs,setReference:y,setPositionReference:h,domReference:d}),[p.refs,y,h]),v=P.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=P.useMemo(()=>({...p,...r,refs:m,elements:v,nodeId:t}),[p,m,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),P.useMemo(()=>({...p,context:b,refs:m,elements:v}),[p,m,v,b])}function cd(){return aA()&&ay()}function FP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const p=Wt(s.domReference);function h(){!n&&Pt(s.domReference)&&s.domReference===qn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",h),cd()&&(p.addEventListener("keydown",y,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",h),cd()&&(p.removeEventListener("keydown",y,!0),p.removeEventListener("pointerdown",m,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function p(h){let{reason:y}=h;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),P.useEffect(()=>()=>{Gt(u)},[]);const f=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const h=Un(p.nativeEvent);if(l&&tt(h)){if(cd()&&!p.relatedTarget){if(!d.current&&!Yu(h))return}else if(!fA(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const h=p.relatedTarget,y=p.nativeEvent,m=tt(h)&&h.hasAttribute(so("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=qn(s.domReference?s.domReference.ownerDocument:document);!h&&b===s.domReference||Bt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Bt(s.domReference,b)||m||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function ud(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Fy]:s,[Ly]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[cP]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Fy,Ly].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(m=>m(...h)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=P.useCallback(a=>ud(a,e,"reference"),t),i=P.useCallback(a=>ud(a,e,"floating"),n),s=P.useCallback(a=>ud(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const LP="Escape";function Ua(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ga(e,t){return Ua(t,e===Vy||e===ja,e===Ji||e===es)}function dd(e,t,n){return Ua(t,e===ja,n?e===Ji:e===es)||e==="Enter"||e===" "||e===""}function av(e,t,n){return Ua(t,n?e===Ji:e===es,e===ja)}function lv(e,t,n,r){const o=n?e===es:e===Ji,i=e===Vy;return t==="both"||t==="horizontal"&&r&&r>1?e===LP:Ua(t,o,i)}function Ya(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ra("`useListNavigation` looping must be enabled to allow escaping."),y||Ra("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ra("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=Ma(o.floating),M=Ht(N),$=Pr(),_=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=kt(()=>{l(C.current===-1?null:C.current)}),z=Ku(o.domReference),D=P.useRef(m),C=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),B=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),ie=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[R,ae]=P.useState(),ce=kt(()=>{function de(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),pe(X.id),_?.events.emit("virtualfocus",X),k&&(k.current=X)}else ao(X,{sync:H.current,preventScroll:!0})}const ne=s.current[C.current],J=ee.current;ne&&de(ne),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[C.current]||ne;if(!X)return;ne||de(X);const me=q.current;me&&ue&&(J||!L.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?D.current&&u!=null&&(ee.current=!0,C.current=u,F()):U.current&&(C.current=-1,B.current()))},[c,n,o.floating,u,F]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(C.current=-1,ce()),(!G.current||!U.current)&&D.current&&(V.current!=null||D.current===!0&&V.current==null)){let de=0;const ne=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(ne),de++):(C.current=V.current==null||dd(V.current,T,h)||p?Zu(s,ie.current):py(s,ie.current),V.current=null,F())};ne()}}else Zi(s,a)||(C.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,p,s,T,h,F,ce,ie]),nt(()=>{var de;if(!c||o.floating||!_||y||!U.current)return;const ne=_.nodesRef.current,J=(de=ne.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=qn(qt(o.floating)),X=ne.some(me=>me.context&&Bt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,_,$,y]),nt(()=>{if(!c||!_||!y||$)return;function de(ne){ae(ne.id),k&&(k.current=ne)}return _.events.on("virtualfocus",de),()=>{_.events.off("virtualfocus",de)}},[c,_,y,$,k]),nt(()=>{B.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,D.current=m)},[n,m]);const Q=a!=null,ue=P.useMemo(()=>{function de(J){if(!te.current)return;const j=s.current.indexOf(J);j!==-1&&C.current!==j&&(C.current=j,F())}return{onFocus(J){let{currentTarget:j}=J;H.current=!0,de(j)},onClick:J=>{let{currentTarget:j}=J;return j.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:j}=J;H.current=!0,ee.current=!1,v&&de(j)},onPointerLeave(J){let{pointerType:j}=J;if(!(!L.current||j==="touch")&&(H.current=!0,!!v&&(C.current=-1,F(),!y))){var X;(X=M.current)==null||X.focus({preventScroll:!0})}}}},[te,M,v,s,F,y]),re=P.useCallback(()=>{var de;return E??(_==null||(de=_.nodesRef.current.find(ne=>ne.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,_,E]),he=kt(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===M.current)return;if(p&&lv(de.key,T,h,I)){Ga(de.key,re())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?_?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ne=C.current,J=Zu(s,x),j=py(s,x);if(z||(de.key==="Home"&&(Ut(de),C.current=J,F()),de.key==="End"&&(Ut(de),C.current=j,F())),I>1){const X=A||Array.from({length:s.current.length},()=>({width:1,height:1})),me=xA(X,I,O),ve=me.findIndex(Ne=>Ne!=null&&!Na(s,Ne,x)),ke=me.reduce((Ne,ct,Nt)=>ct!=null&&!Na(s,ct,x)?Nt:Ne,-1),De=me[bA({current:me.map(Ne=>Ne!=null?s.current[Ne]:null)},{event:de,orientation:T,loop:f,rtl:h,cols:I,disabledIndices:SA([...(typeof x!="function"?x:null)||s.current.map((Ne,ct)=>Na(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:ke,prevIndex:wA(C.current>j?J:C.current,X,me,I,de.key===ja?"bl":de.key===(h?Ji:es)?"tr":"tl"),stopEvent:!0})];if(De!=null&&(C.current=De,F()),T==="both")return}if(Ga(de.key,T)){if(Ut(de),n&&!y&&qn(de.currentTarget.ownerDocument)===de.currentTarget){C.current=dd(de.key,T,h)?J:j,F();return}dd(de.key,T,h)?f?C.current=ne>=j?d&&ne!==s.current.length?-1:J:Zt(s,{startingIndex:ne,disabledIndices:x}):C.current=Math.min(j,Zt(s,{startingIndex:ne,disabledIndices:x})):f?C.current=ne<=J?d&&ne!==-1?s.current.length:j:Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x}):C.current=Math.max(J,Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x})),Zi(s,C.current)&&(C.current=-1),F()}}),oe=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":R||Z},[y,n,Q,R,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:oe,onKeyDown:he,onPointerMove(){L.current=!0}}),[oe,he,T,z]),be=P.useMemo(()=>{function de(J){m==="auto"&&dy(J.nativeEvent)&&(D.current=!0)}function ne(J){D.current=m,m==="auto"&&fy(J.nativeEvent)&&(D.current=!0)}return{...oe,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=av(J.key,T,h),ke=lv(J.key,T,h,I),De=av(J.key,re(),h),Ne=Ga(J.key,T),ct=(p?De:Ne)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=_?.nodesRef.current.find(Oe=>Oe.parentId==null),K=_&&W?pA(_.nodesRef.current,W.id):null;if(me&&K&&k){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||ke){var Nt,Qt;const Ue=((Nt=K.context)==null?void 0:Nt.elements.domReference)===J.currentTarget,Ye=ke&&!Ue?(Qt=K.context)==null?void 0:Qt.elements.domReference:ve?s.current.find($e=>$e?.id===Z):null;Ye&&(Ut(J),Ye.dispatchEvent(Oe),ae(void 0))}if((Ne||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Re;Ut(J),(Re=K.context.elements.domReference)==null||Re.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=Ga(J.key,re());V.current=p&&W?null:J.key}if(p){De&&(Ut(J),n?(C.current=Zu(s,ie.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}Ne&&(u!=null&&(C.current=u),Ut(J),!n&&b?r(!0,J.nativeEvent,"list-navigation"):he(J),n&&F())}},onFocus(){n&&!y&&(C.current=-1,F())},onPointerDown:ne,onPointerEnter:ne,onMouseDown:de,onClick:de}},[Z,oe,I,he,ie,m,s,p,F,r,n,b,T,re,h,u,_,y,k]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const VP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=ts(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=Ma(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=VP.get(l))!=null?r:l,h=Pr()!=null,y=P.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,o,u,l]),m=P.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=P.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>a?{reference:y,floating:m,item:v}:{},[a,y,m,v])}const cv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Uo(e,t){return typeof e=="function"?e(t):e}function $P(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function zP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=$P(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{cr.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function uv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[p,h]=P.useState(()=>({...Uo(i,c),...Uo(n,c)})),{isMounted:y,status:m}=zP(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Uo(v.current,c),I=Uo(x.current,c),w=Uo(T.current,c),k=Uo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(m==="initial"&&h(A=>({transitionProperty:A.transitionProperty,...w,...E})),m==="open"&&h({transitionProperty:Object.keys(k).map(cv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const A=I||E;h({transitionProperty:Object.keys(A).map(cv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,m,c]),{isMounted:y,styles:p}}function jP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=P.useRef(-1),y=P.useRef(""),m=P.useRef((n=p??s)!=null?n:-1),v=P.useRef(null),b=kt(a),x=kt(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(h),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var O;m.current=(O=p??s)!=null?O:-1}},[r,p,s]);const I=kt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=kt(O=>{function N(z,D,C){const V=T.current?T.current(D,C):D.find(L=>L?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const M=i.current;if(y.current.length>0&&y.current[0]!==" "&&(N(M,M,y.current)===-1?I(!1):O.key===" "&&Ut(O)),M==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),M.every(z=>{var D,C;return z?((D=z[0])==null?void 0:D.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&y.current===O.key&&(y.current="",m.current=v.current),y.current+=O.key,Gt(h),h.current=window.setTimeout(()=>{y.current="",m.current=v.current,I(!1)},d);const _=m.current,F=N(M,[...M.slice((_||0)+1),...M.slice(0,(_||0)+1)],y.current);F!==-1?(b(F),v.current=F):O.key!==" "&&(y.current="",I(!1))}),k=P.useMemo(()=>({onKeyDown:w}),[w]),A=P.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return P.useMemo(()=>c?{reference:k,floating:A}:{},[c,k,A])}function dv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...dv(e,o.id,n)])}function fv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function RP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function pv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),h=p-l;if(s===null||a===null||h===0)return s=d,a=f,l=p,null;const y=d-s,m=f-a,b=Math.sqrt(y*y+m*m)/h;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:h,elements:y,onClose:m,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),m()}if(Gt(o),!y.domReference||!y.floating||h==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,k=[I,w],A=yP(T),O=T.type==="mouseleave",N=od(y.floating,A),M=od(y.domReference,A),$=y.domReference.getBoundingClientRect(),_=y.floating.getBoundingClientRect(),F=h.split("-")[0],z=f>_.right-_.width/2,D=p>_.bottom-_.height/2,C=RP(k,$),V=_.width>$.width,L=_.height>$.height,B=(V?$:_).left,U=(V?$:_).right,G=(L?$:_).top,H=(L?$:_).bottom;if(N&&(i=!0,!O))return;if(M&&(i=!1),M&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&od(y.floating,T.relatedTarget)||b&&dv(b.nodesRef.current,v).length)return;if(F==="top"&&p>=$.bottom-1||F==="bottom"&&p<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return E();let ee=[];switch(F){case"top":ee=[[B,$.top+1],[B,_.bottom-1],[U,_.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[B,_.top+1],[B,$.bottom-1],[U,$.bottom-1],[U,_.top+1]];break;case"left":ee=[[_.right-1,H],[_.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[_.left+1,G],[_.left+1,H]];break}function ie(te){let[q,Y]=te;switch(F){case"top":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y+t+1],pe=[V?q-t/2:z?q+t*4:q-t*4,Y+t+1],R=[[_.left,z||V?_.bottom-t:_.top],[_.right,z?V?_.bottom-t:_.top:_.bottom-t]];return[Z,pe,...R]}case"bottom":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y-t],pe=[V?q-t/2:z?q+t*4:q-t*4,Y-t],R=[[_.left,z||V?_.top+t:_.bottom],[_.right,z?V?_.top+t:_.bottom:_.top+t]];return[Z,pe,...R]}case"left":{const Z=[q+t+1,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||L?_.right-t:_.left,_.top],[D?L?_.right-t:_.left:_.right-t,_.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:D?Y+t*4:Y-t*4],R=[[D||L?_.left+t:_.right,_.top],[D?L?_.left+t:_.right:_.left+t,_.bottom]];return[Z,pe,...R]}}}if(!fv([I,w],ee)){if(i&&!C)return E();if(!O&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}fv([I,w],ie([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const hv=200,BP=500,Go=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},mv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},fd=(e,t)=>{const n=mv(t,gv.basic,e)||mv(t,gv.extend,e);return n===void 0||n===e?void 0:n},Dr=()=>typeof window>"u",pd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},HP=e=>!e,Yo=()=>{},vv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},hd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Yo,followCursor:d=!1,...f},p){const[h,y]=S.useState(n??!1),m=S.useRef(null),v=t||"span",b=_=>{y(_),u?.(_)},{refs:x,floatingStyles:T,context:E}=Gn({placement:i,open:h,whileElementsMounted:io,onOpenChange:n?void 0:b,middleware:[$a(),Ho(5),My(),ed({padding:5,element:m}),za({fallbackAxisSideDirection:"start"})]}),I=Mr(E,{enabled:l}),w=gr(E,{role:"tooltip",enabled:l}),k=FP(E,{enabled:l?s:!1}),A=qo(E,{enabled:l?c:!1}),O=_P(E,{enabled:!!l&&!!d}),N=Wy(E,{move:!0,delay:{open:hv},enabled:l?a:!1,handleClose:c?pv():null}),{getReferenceProps:M,getFloatingProps:$}=Yn([w,I,O,s?k:void 0,a?N:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(v,{...M(f),ref:dr(x.setReference,p),children:r}),h&&g.jsx(mr,{children:g.jsxs(cn,{...$(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(td,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),bv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>g.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:g.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[s,e||o?g.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?g.jsx(hd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:g.jsx("span",{className:"cursor-help",children:g.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?g.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[g.jsx(Pu,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),g.jsx(uI,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),rs=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:h,componentName:y,placeholder:m,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Fu(),k=T!==void 0?T:w.input.iconFeedback,A=d??p,O=At(),N=e??O.inputOptionalLabel;return g.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:Pe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:A,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:g.jsx(bv,{info:a,hideLeft:v,reportStatus:k,title:h,placeholder:m,children:N||n?g.jsxs(S.Fragment,{children:[b?null:g.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:N}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?g.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,s?g.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:s}):null]})]}),g.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),g.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),xv=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:h="text",labelClassName:y,feedback:m=null,hideLeft:v=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const A=k.current,O=Hi(k.current),N=r?.(A),M=$=>{const _=$;if(_.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void _.preventDefault()}}};return A.addEventListener("keydown",M),()=>{N?.(),O(),A.removeEventListener("keydown",M)}},[]),g.jsx(rs,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:m,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:y,placeholder:T.placeholder,container:Pe(u,n.container),children:g.jsx(I,{...n,...T,id:w,name:w,type:h,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:dr(E,k),className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),Ko=xv(Fg,"input",{type:"text"}),WP=_o("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-1 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),yr=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return g.jsxs(cn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Pe(WP({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),co=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:h,error:y,...m},v)=>{const b=At(),x=S.useRef(null),T=m.id??m.name;S.useImperativeHandle(v,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,k=Hi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{k(),I.abort()}},[]);const E=()=>x.current?.focus();return g.jsx(rs,{info:n,left:h,error:y,form:m.form,loading:c,name:m.name,feedback:o,hideLeft:f,required:e,title:m.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:m.name||m.id,optionalText:u,labelClassName:i,placeholder:m.placeholder,right:g.jsxs("label",{htmlFor:T,children:[p,g.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:g.jsxs("select",{...m,id:T,name:T,required:e,ref:dr(v,x),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Pe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[g.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function sn(e){return e?.ownerDocument||document}function qP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
5
|
+
`))},[r,n,e]);const{current:c}=P.useRef(t);P.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
6
|
+
`))},[JSON.stringify(t)])}const l=P.useCallback(c=>{o||s(c)},[]);return[a,l]}const wv={};function Kn(e,t){const n=P.useRef(wv);return n.current===wv&&(n.current=e(t)),n}const md=P[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],UP=md&&md!==P.useLayoutEffect?md:e=>e();function ut(e){const t=Kn(GP).current;return t.next=e,UP(t.effect),t.trampoline}function GP(){const e={next:void 0,callback:YP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function YP(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const pt=typeof document<"u"?P.useLayoutEffect:()=>{};function gd(e){const t=Kn(KP,e).current;return t.next=e,pt(t.effect),t}function KP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let yd;process.env.NODE_ENV!=="production"&&(yd=new Set);function ZP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");yd.has(t)||(yd.add(t),console.warn(`Base UI: ${t}`))}}function fn(){}const Pn=Object.freeze({}),XP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},QP="none",Sv="track-press",JP="input-change",eO="focus-out",tO="keyboard",nO="drag";function Zo(e,t,n,r){let o=!1,i=!1;const s=r??Pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Tv(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function rO(e,t){const n=P.useRef(e),r=ut(t);pt(()=>{n.current!==e&&r(n.current)},[e,r]),pt(()=>{n.current=e},[e])}const vd={...P};let Ev=0;function oO(e,t="mui"){const[n,r]=P.useState(e),o=e||n;return P.useEffect(()=>{n==null&&(Ev+=1,r(`${t}-${Ev}`))},[n,t]),o}const kv=vd.useId;function Ka(e,t){if(kv!==void 0){const n=kv();return e??(t?`${t}-${n}`:n)}return oO(e,t)}function Za(e){return Ka(e,"base-ui")}function On(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function bd(e,t,n,r){const o=Kn(Cv).current;return sO(o,e,t,n,r)&&Iv(o,[e,t,n,r]),o.callback}function iO(e){const t=Kn(Cv).current;return aO(t,e)&&Iv(t,e),t.callback}function Cv(){return{callback:null,cleanup:null,refs:[]}}function sO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function aO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Iv(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const lO=parseInt(P.version,10);function xd(e){return lO>=e}function Av(e){if(!P.isValidElement(e))return null;const t=e,n=t.props;return(xd(19)?n?.ref:t.ref)??null}function wd(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function cO(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function uO(e,t){return typeof e=="function"?e(t):e}function dO(e,t){return typeof e=="function"?e(t):e}const os={};function Sd(e,t,n,r,o){let i={...Td(e,os)};return t&&(i=Xa(i,t)),n&&(i=Xa(i,n)),r&&(i=Xa(i,r)),i}function fO(e){if(e.length===0)return os;if(e.length===1)return Td(e[0],os);let t={...Td(e[0],os)};for(let n=1;n<e.length;n+=1)t=Xa(t,e[n]);return t}function Xa(e,t){return Pv(t)?t(e):pO(e,t)}function pO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=wd(e.style,r);break}case"className":{e[n]=Ov(e.className,r);break}default:hO(n,r)?e[n]=mO(e[n],r):e[n]=r}}return e}function hO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Pv(e){return typeof e=="function"}function Td(e,t){return Pv(e)?e(t):e??os}function mO(e,t){return t?e?n=>{if(gO(n)){const o=n;Ed(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Ed(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ov(e,t){return t?e?t+" "+e:t:e}function gO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=yO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return bO(e,r,o,i)}function yO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?uO(n,i):void 0,d=c?dO(r,i):void 0,f=c?cO(i,l):Pn,p=c?wd(f,Array.isArray(a)?fO(a):a)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(s)?p.ref=iO([p.ref,Av(o),...s]):p.ref=bd(p.ref,Av(o),s):bd(null,null)),c?(u!==void 0&&(p.className=Ov(p.className,u)),d!==void 0&&(p.style=wd(p.style,d)),p):Pn}const vO=Symbol.for("react.lazy");function bO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Sd(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===vO&&(i=P.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!P.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
7
|
+
`));return P.cloneElement(i,o)}if(e&&typeof e=="string")return xO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":On(8))}function xO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):P.createElement(e,t)}function _n(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function _v(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const is=typeof navigator<"u",kd=kO(),wO=IO(),SO=CO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),kd.platform==="MacIntel"&&kd.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(kd.platform);const TO=is&&/apple/i.test(navigator.vendor);is&&wO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const EO=SO.includes("jsdom/");function kO(){if(!is)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function CO(){if(!is)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function IO(){if(!is)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function uo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Nr(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Cd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Id(e){if(!e||EO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const Mv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Dv(e,t){const n=jo(e,Mv()),r=n.length;if(r===0)return;const o=uo(sn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function AO(e){return Dv(sn(e).body,1)||e}function PO(e){return Dv(sn(e).body,-1)||e}function Ad(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nr(n,r)}function OO(e){jo(e,Mv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Nv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Pd=P.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Pd.displayName="CompositeListContext");function _O(){return P.useContext(Pd)}function MO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=P.useRef(0),a=Kn(NO).current,l=Kn(DO).current,[c,u]=P.useState(0),d=P.useRef(c),f=ut((v,b)=>{l.set(v,b??null),d.current+=1,u(d.current)}),p=ut(v=>{l.delete(v),d.current+=1,u(d.current)}),h=P.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(FO).forEach((x,T)=>{const E=l.get(x)??{};v.set(x,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||h.size===0)return;const v=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return h.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[h]),pt(()=>{d.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),s.current=h.size),i(h)},[i,h,n,r,c]),pt(()=>()=>{n.current=[]},[n]),pt(()=>()=>{r&&(r.current=[])},[r]);const y=ut(v=>(a.add(v),()=>{a.delete(v)}));pt(()=>{a.forEach(v=>v(h))},[a,h]);const m=P.useMemo(()=>({register:f,unregister:p,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,p,y,n,r,s]);return g.jsx(Pd.Provider,{value:m,children:t})}function DO(){return new Map}function NO(){return new Set}function FO(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function LO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Fv=P.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:fn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Fv.displayName="FormContext");function Lv(){return P.useContext(Fv)}let Vv=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const VO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},$O={valid(e){return e===null?null:e?{[Vv.valid]:""}:{[Vv.invalid]:""}}},$v=P.createContext({invalid:void 0,name:void 0,validityData:{state:VO,errors:[],error:"",value:"",initialValue:null},setValidityData:fn,disabled:void 0,touched:!1,setTouched:fn,dirty:!1,setDirty:fn,filled:!1,setFilled:fn,focused:!1,setFocused:fn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&($v.displayName="FieldRootContext");function Od(e=!0){const t=P.useContext($v);if(t.setValidityData===fn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":On(28));return t}function zO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=Lv(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=Od(),f=ut(e.getValue);pt(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(h=>({...h,initialValue:p}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:LO(u,l),validate(p=!0){let h=n;h===void 0&&(h=f()),c.current=!0,p?cr.flushSync(()=>s(h)):s(h)}})},[s,i,t,a,f,r,l,c,o,u,n]),pt(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const zv=P.createContext({controlId:void 0,registerControlId:fn,labelId:void 0,setLabelId:fn,messageIds:[],setMessageIds:fn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(zv.displayName="LabelableContext");function jv(){return P.useContext(zv)}function Rv(e,t){return e-t}function jO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Rv)}function Bv(e,t,n,r,o,i){let s=e;return s=_n(s,n,r),o&&(s=jO(i,t,_n(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function Hv(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const ss={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...$O},_d=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(_d.displayName="SliderRootContext");function Qa(){const e=P.useContext(_d);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":On(62));return e}function RO(e){return"key"in e?tO:JP}function BO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?_v(e,t):!1}const Wv=P.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:h=0,name:y,onValueChange:m,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,k=Za(a),A=ut(m),O=ut(v),{clearErrors:N}=Lv(),{state:M,disabled:$,name:_,setTouched:F,setDirty:z,validityData:D,shouldValidateOnChange:C,validation:V}=Od(),{labelId:L}=jv(),B=r??L,U=$||s,G=_??y,[H,ee]=qP({controlled:I,default:i??p,name:"Slider"}),ie=P.useRef(null),te=P.useRef(null),q=P.useRef([]),Y=P.useRef(null),Z=P.useRef(null),pe=P.useRef(-1),R=P.useRef(null),ae=P.useRef(null),ce=P.useRef("none"),Q=gd(l),[ue,re]=P.useState(-1),[he,oe]=P.useState(-1),[le,be]=P.useState(!1),[de,ne]=P.useState(()=>new Map),[J,j]=P.useState([void 0,void 0]),X=ut(Re=>{re(Re),Re!==-1&&oe(Re)});zO({id:k,commit:V.commit,value:H,controlRef:te,name:G,getValue:()=>H}),rO(H,()=>{N(G),C()?V.commit(H):V.commit(H,!0);const Re=D.initialValue;let W;Array.isArray(H)&&Array.isArray(Re)?W=!_v(H,Re):W=H!==Re,z(W)});const me=ut(Re=>{Re&&(te.current=Re)}),ve=Array.isArray(H),ke=P.useMemo(()=>ve?H.slice().sort(Rv):[_n(H,p,f)],[f,p,ve,H]),De=ut((Re,W)=>{if(Number.isNaN(Re)||BO(Re,H))return;const K=W??Zo(QP,void 0,void 0,{activeThumbIndex:-1});ce.current=K.reason;const Oe=K.event,Ue=Oe.constructor??Event,Ye=new Ue(Oe.type,Oe);Object.defineProperty(Ye,"target",{writable:!0,value:{value:Re,name:G}}),K.event=Ye,ae.current=Re,A(Re,K),!K.isCanceled&&ee(Re)}),Ne=ut((Re,W,K)=>{const Oe=Bv(Re,W,p,f,ve,ke);if(Hv(Oe,x,h)){const Ue=RO(K);De(Oe,Zo(Ue,K.nativeEvent,void 0,{activeThumbIndex:W})),F(!0);const Ye=ae.current??Oe;O(Ye,Tv(Ue,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&ZP("Slider `max` must be greater than `min`."),pt(()=>{const Re=uo(sn(ie.current));U&&Re&&ie.current?.contains(Re)&&Re.blur()},[U]),U&&ue!==-1&&X(-1);const ct=P.useMemo(()=>({...M,activeThumbIndex:ue,disabled:U,dragging:le,orientation:b,max:f,min:p,minStepsBetweenValues:h,step:x,values:ke}),[M,ue,U,le,f,p,h,b,x,ke]),Nt=P.useMemo(()=>({active:ue,controlRef:te,disabled:U,dragging:le,validation:V,formatOptionsRef:Q,handleInputChange:Ne,indicatorPosition:J,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:he,lastChangedValueRef:ae,lastChangeReasonRef:ce,locale:u,max:f,min:p,minStepsBetweenValues:h,name:G,onValueCommitted:O,orientation:b,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:pe,pressedValuesRef:R,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:be,setIndicatorPosition:j,setValue:De,state:ct,step:x,thumbCollisionBehavior:T,thumbMap:de,thumbRefs:q,values:ke}),[ue,te,B,U,le,V,Q,Ne,J,c,he,ae,ce,u,f,p,h,G,O,b,Y,Z,pe,R,me,X,be,j,De,ct,x,T,E,de,q,ke]),Qt=an("div",t,{state:ct,ref:[n,ie],props:[{"aria-labelledby":B,id:k,role:"group"},V.getValidationProps,w],stateAttributesMapping:ss});return g.jsx(_d.Provider,{value:Nt,children:g.jsx(MO,{elementsRef:q,onMapChange:ne,children:Qt})})});process.env.NODE_ENV!=="production"&&(Wv.displayName="SliderRoot");const qv=new Map;function HO(e,t){const n=JSON.stringify({locale:e,options:t}),r=qv.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return qv.set(n,o),o}function Xo(e,t,n){return e==null?"":HO(t,n).format(e)}function WO(e,t,n){return e==null?"":n?Xo(e,t,n):Xo(e/100,t,{style:"percent"})}const qO=[];function as(e){P.useEffect(e,qO)}const Ja=null;let Uv=globalThis.requestAnimationFrame;class UO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Uv!==requestAnimationFrame&&(Uv=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const el=new UO;class Md{static create(){return new Md}static request(t){return el.request(t)}static cancel(t){return el.cancel(t)}currentId=Ja;request(t){this.cancel(),this.currentId=el.request(()=>{this.currentId=Ja,t()})}cancel=()=>{this.currentId!==Ja&&(el.cancel(this.currentId),this.currentId=Ja)};disposeEffect=()=>this.cancel}function Gv(){const e=Kn(Md.create).current;return as(e.disposeEffect),e}const Yv=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Yv.displayName="DirectionContext");function Kv(){return P.useContext(Yv)?.direction??"ltr"}function Zv(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function GO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Xv(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(GO(t)))}function Qv({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,p=o-(u-t)*c;l[t]=_n(n,f,p);for(let h=t+1;h<=u;h+=1){const y=l[h-1]+c,m=o-(u-h)*c,v=d[h]??l[h];let b=Math.max(l[h],y);v<b&&(b=Math.max(v,y)),l[h]=_n(b,y,m)}for(let h=t-1;h>=0;h-=1){const y=l[h+1]-c,m=r+h*c,v=d[h]??l[h];let b=Math.min(l[h],y);v>b&&(b=Math.min(v,y)),l[h]=_n(b,m,y)}for(let h=0;h<=u;h+=1)l[h]=Number(l[h].toFixed(12));return l}function YO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const h=u[o],y=1e-7,m=u.slice(),v=m[o-1],b=m[o+1],x=v!=null?v+p:s,T=b!=null?b-p:a,E=_n(i,x,T),I=Number(E.toFixed(12));m[o]=I;const w=i>h,k=i<h,A=w&&b!=null&&i>=b-y,O=k&&v!=null&&i<=v+y;if(!A&&!O)return{value:m,thumbIndex:o,didSwap:!1};const N=A?o+1:o-1,M=m.map((z,D)=>{if(D===o)return I;const C=d[D];return C??u[D]});let $=i;A?$=Math.max(i,m[N]):$=Math.min(i,m[N]);const _=Qv({values:m,index:N,nextValue:$,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:M}),F=A?N-1:N+1;if(F>=0&&F<_.length){const z=_[F-1],D=_[F+1];let C=z!=null?z+p:s;C=Math.max(C,s+F*p);let V=D!=null?D-p:a;V=Math.min(V,a-(_.length-1-F)*p);const L=_n(I,C,V);_[F]=Number(L.toFixed(12))}return{value:_,thumbIndex:N,didSwap:!0}}case"push":return{value:Qv({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const h=u.slice(),y=h[o-1],m=h[o+1],v=y!=null?y+p:s,b=m!=null?m-p:a,x=_n(i,v,b);return h[o]=Number(x.toFixed(12)),{value:h,thumbIndex:o,didSwap:!1}}}}const KO=2;function ZO(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function tl(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Jv=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:h,onValueCommitted:y,orientation:m,pressedInputRef:v,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:A,state:O,step:N,thumbCollisionBehavior:M,thumbRefs:$,values:_}=Qa(),F=Kv(),z=_.length>1,D=m==="vertical",C=P.useRef(null),V=P.useRef(null),L=ut(Q=>{Q&&V.current==null&&V.current==null&&(V.current=getComputedStyle(Q))}),B=P.useRef(null),U=P.useRef(0),G=P.useRef(0),H=gd(_),ee=ut(Q=>{x.current!==Q&&(x.current=Q);const ue=$.current[Q];if(!ue){b.current=null,v.current=null;return}v.current=ue.querySelector('input[type="range"]')}),ie=ut(Q=>{const ue=C.current;if(!ue)return null;const{width:re,height:he,bottom:oe,left:le,right:be}=ue.getBoundingClientRect(),de=ZO(V.current,D),ne=G.current,J=(D?he:re)-de.start-de.end-ne*2,j=b.current??0,X=Q.x-j,me=Q.y-j,ve=D?oe-me-de.end:(F==="rtl"?be-X:X-le)-de.start,ke=_n((ve-ne)/J,0,1);let De=(f-p)*ke+p;if(De=Xv(De,N,p),De=_n(De,p,f),!z)return{value:De,thumbIndex:0,didSwap:!1};const Ne=x.current;if(Ne<0)return null;const ct=YO({behavior:M,values:_,currentValues:H.current??_,initialValues:T.current,pressedIndex:Ne,nextValue:De,min:p,max:f,step:N,minStepsBetweenValues:h});return M==="swap"&&ct.didSwap?ee(ct.thumbIndex):x.current=ct.thumbIndex,ct}),te=ut(Q=>{T.current=z?_.slice():null,H.current=_;const ue=x.current;let re=ue;if(ue>-1&&ue<_.length){if(_[ue]===f){let he=ue;for(;he>0&&_[he-1]===f;)he-=1;re=he}}else{const he=D?"y":"x";let oe;re=-1;for(let le=0;le<$.current.length;le+=1){const be=$.current[le];if(tt(be)){const de=Zv(be),ne=Math.abs(Q[he]-de[he]);(oe===void 0||ne<=oe)&&(re=le,oe=ne)}}}if(re>-1&&re!==ue&&ee(re),c){const he=$.current[re];if(tt(he)){const oe=he.getBoundingClientRect(),le=D?"height":"width";G.current=oe[le]/2}}}),q=ut(Q=>{$.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ue=tl(Q,B);if(ue==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const re=ie(ue);re!=null&&Hv(re.value,N,h)&&(!a&&U.current>KO&&k(!0),A(re.value,Zo(nO,Q,void 0,{activeThumbIndex:re.thumbIndex})),H.current=Array.isArray(re.value)?re.value:[re.value],re.didSwap&&q(re.thumbIndex))});function Z(Q){w(-1),k(!1),v.current=null,b.current=null;const ue=tl(Q,B),re=ue!=null?ie(ue):null;if(re!=null){const he=d.current;l.commit(u.current??re.value),y(u.current??re.value,Tv(he,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),x.current=-1,B.current=null,T.current=null,R()}const pe=ut(Q=>{if(s)return;const ue=Q.changedTouches[0];ue!=null&&(B.current=ue.identifier);const re=tl(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;q(oe.thumbIndex),A(oe.value,Zo(Sv,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex)}U.current=0;const he=sn(C.current);he.addEventListener("touchmove",Y,{passive:!0}),he.addEventListener("touchend",Z,{passive:!0})}),R=ut(()=>{const Q=sn(C.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),ae=Gv();return P.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",pe,{passive:!0}),()=>{Q.removeEventListener("touchstart",pe),ae.cancel(),R()}):()=>R()},[R,pe,C,ae]),P.useEffect(()=>{s&&R()},[s,R]),an("div",t,{state:O,ref:[n,E,C,L],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const ue=C.current;if(!ue||s||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const re=tl(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;Nr($.current[oe.thumbIndex],uo(sn(ue)))?Q.preventDefault():ae.request(()=>{q(oe.thumbIndex)}),k(!0),b.current!=null||(A(oe.value,Zo(Sv,Q.nativeEvent,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))}Q.nativeEvent.pointerId&&ue.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const he=sn(C.current);he.addEventListener("pointermove",Y,{passive:!0}),he.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(Jv.displayName="SliderControl");const eb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=Qa();return an("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(eb.displayName="SliderTrack");const nl={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function rl(e,t,n){return(e-t)*100/(n-t)}const ol="ArrowUp",il="ArrowDown",sl="ArrowLeft",al="ArrowRight",ll="Home",cl="End",XO=new Set([sl,al]),QO=new Set([ol,il]),JO=new Set([...XO,...QO]);[...JO];const e_=new Set([ol,il,sl,al,ll,cl]);let t_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function n_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=_O(),f=P.useRef(-1),[p,h]=P.useState(i??(o===t_.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),y=P.useRef(null),m=P.useCallback(v=>{if(y.current=v,p!==-1&&v!==null&&(c.current[p]=v,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??v.textContent}},[p,c,u,t,r]);return pt(()=>{if(i!=null)return;const v=y.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),pt(()=>{if(i==null)return l(v=>{const b=y.current?v.get(y.current)?.index:null;b!=null&&h(b)})},[i,l,h]),P.useMemo(()=>({ref:m,index:p}),[p,m])}const tb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(tb.displayName="CSPContext");const r_={disableStyleElements:!1};function o_(){return P.useContext(tb)??r_}function i_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=jv(),s=Za(t),a=n?o:void 0,l=Kn(()=>Symbol("labelable-control")),c=P.useRef(!1),u=P.useRef(t!=null),d=ut(()=>{!c.current||i===fn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===fn)return;let f;if(n){const p=r?.current;tt(p)&&p.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)u.current=!0,f=t;else if(u.current)f=s;else{d();return}if(f===void 0){d();return}c.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),P.useEffect(()=>d,[d]),o??s}let s_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const a_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',nb="PageUp",rb="PageDown",l_=new Set([ol,il,sl,al,ll,cl,nb,rb]);function c_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Xo(e[t],r,n)} start range`:`${Xo(e[t],r,n)} end range`:n?Xo(e[t],r,n):void 0}function Qo(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const ob=P.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:h,onBlur:y,onFocus:m,onKeyDown:v,tabIndex:b,...x}=t,{nonce:T}=o_(),E=Za(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:A,validation:O,formatOptionsRef:N,handleInputChange:M,inset:$,labelId:_,largeStep:F,locale:z,max:D,min:C,minStepsBetweenValues:V,name:L,orientation:B,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:ie,setIndicatorPosition:te,state:q,step:Y,values:Z}=Qa(),pe=Kv(),R=c||A,ae=Z.length>1,ce=B==="vertical",Q=pe==="rtl",{setTouched:ue,setFocused:re,validationMode:he}=Od(),oe=P.useRef(null),le=P.useRef(null),be=Za(),de=i_(),ne=ae?be:de,J=P.useMemo(()=>({inputId:ne}),[ne]),{ref:j,index:X}=n_({metadata:J}),me=ae?p??X:0,ve=me===Z.length-1,ke=Z[me],De=rl(ke,C,D),[Ne,ct]=P.useState(!1),[Nt,Qt]=P.useState();as(()=>ct(!0));const Re=w>=0&&w<Z.length?w:-1,W=ut(()=>{const ot=k.current,gt=oe.current;if(!ot||!gt)return;const it=gt.getBoundingClientRect(),xn=ot.getBoundingClientRect(),Qr=ce?"height":"width",Jr=xn[Qr]-it[Qr],$i=(it[Qr]/2+Jr*De/100)/xn[Qr]*100;Qt($i),me===0?te(zi=>[$i,zi[1]]):ve&&te(zi=>[zi[0],$i])});pt(()=>{$&&queueMicrotask(W)},[W,$]),pt(()=>{$&&W()},[W,$,De]);const K=P.useCallback(()=>{const ot=ce?"bottom":"insetInlineStart",gt=ce?"left":"top";let it;return ae?I===me?it=2:Re===me&&(it=1):I===me&&(it=1),$?{"--position":`${Nt}%`,visibility:ee&&!Ne||Nt===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:Number.isFinite(De)?{position:"absolute",[ot]:`${De}%`,[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:nl},[I,me,$,Ne,Nt,ae,ee,Q,Re,De,ce]);let Oe;B==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ue=Sd({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??_,"aria-describedby":s,"aria-orientation":B,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(Xo(ke,z,N.current??void 0),ke,me):c_(Z,me,N.current??void 0,z),disabled:R,id:ne,max:D,min:C,name:L,onChange(ot){M(ot.target.valueAsNumber,me,ot)},onFocus(){ie(me),re(!0)},onBlur(){oe.current&&(ie(-1),ue(!0),re(!1),he==="onBlur"&&O.commit(Bv(ke,me,C,D,ae,Z)))},onKeyDown(ot){if(!l_.has(ot.key))return;e_.has(ot.key)&&ot.stopPropagation();let gt=null;const it=Xv(ke,Y,C);switch(ot.key){case ol:gt=Qo(it,ot.shiftKey?F:Y,1,C,D);break;case al:gt=Qo(it,ot.shiftKey?F:Y,Q?-1:1,C,D);break;case il:gt=Qo(it,ot.shiftKey?F:Y,-1,C,D);break;case sl:gt=Qo(it,ot.shiftKey?F:Y,Q?1:-1,C,D);break;case nb:gt=Qo(it,F,1,C,D);break;case rb:gt=Qo(it,F,-1,C,D);break;case cl:gt=D,ae&&(gt=Number.isFinite(Z[me+1])?Z[me+1]-Y*V:D);break;case ll:gt=C,ae&&(gt=Number.isFinite(Z[me-1])?Z[me-1]+Y*V:C);break}gt!==null&&(M(gt,me,ot),ot.preventDefault())},step:Y,style:{...nl,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:ke??""},O.getInputValidationProps),Ye=bd(le,O.inputRef,h);return an("div",t,{state:q,ref:[n,j,oe],props:[{[s_.index]:me,children:g.jsxs(P.Fragment,{children:[o,g.jsx("input",{ref:Ye,...Ue}),$&&!Ne&&ee&&ve&&g.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:a_},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:m,onPointerDown(ot){if(H.current=me,oe.current!=null){const gt=B==="horizontal"?"x":"y",it=Zv(oe.current),xn=(B==="horizontal"?ot.clientX:ot.clientY)-it[gt];G.current=xn}le.current!=null&&U.current!==le.current&&(U.current=le.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},x],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(ob.displayName="SliderThumb");function u_(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function d_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const ib=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Qa(),[h,y]=P.useState(!1);as(()=>y(!0));const m=u==="vertical",v=p.length>1,b=a?u_(m,v,s[0],s[1],d,h):d_(m,v,rl(p[0],c,l),rl(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(ib.displayName="SliderIndicator");const ul=e=>{const t=S.useContext(to);if(e)return e;if(t)return t.locale||e},f_=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Be.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Be.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),g.jsx(hd,{title:"",ref:r,as:ob,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},p_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Go()),a=r||o||[],l=ul();return g.jsx(Wv,{...i,value:o,locale:l,defaultValue:r,children:g.jsxs(Jv,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[g.jsx(eb,{className:"relative h-2 rounded-full grow bg-background",children:g.jsx(ib,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>g.jsx(f_,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Fr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},h_=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=S.useId(),[a,l]=S.useState(o.checked??!1),c=a,u=S.useRef(null),d=Fr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=y=>{d.current&&d.current(y)},h=u.current;return h.addEventListener("change",p),()=>h?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return g.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[g.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[g.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),g.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:g.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),g.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:g.jsx("span",{className:"font-medium text-foreground",children:e})})]}),g.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ls=S.createContext({});function Zn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const sb=typeof window<"u",dl=sb?S.useLayoutEffect:S.useEffect,fl=S.createContext(null);function Dd(e,t){e.indexOf(t)===-1&&e.push(t)}function Jo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function m_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Xn=(e,t,n)=>n>t?t:n<e?e:n;function Nd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ei=()=>{},pn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(ei=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Nd(t,n))},pn=(e,t,n)=>{if(!e)throw new Error(Nd(t,n))});const vr={},ab=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lb(e){return typeof e=="object"&&e!==null}const cb=e=>/^0[^.\s]+$/u.test(e);function ub(e){let t;return()=>(t===void 0&&(t=e()),t)}const wn=e=>e,g_=(e,t)=>n=>t(e(n)),cs=(...e)=>e.reduce(g_),ti=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fd{constructor(){this.subscriptions=[]}add(t){return Dd(this.subscriptions,t),()=>Jo(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hn=e=>e*1e3,Sn=e=>e/1e3;function db(e,t){return t?e*(1e3/t):0}const fb=new Set;function pl(e,t,n){e||fb.has(t)||(console.warn(Nd(t,n)),fb.add(t))}const y_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},pb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,v_=1e-7,b_=12;function x_(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=pb(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>v_&&++a<b_);return s}function us(e,t,n,r){if(e===t&&n===r)return wn;const o=i=>x_(i,0,1,e,n);return i=>i===0||i===1?i:pb(o(i),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,mb=e=>t=>1-e(1-t),gb=us(.33,1.53,.69,.99),Ld=mb(gb),yb=hb(Ld),vb=e=>(e*=2)<1?.5*Ld(e):.5*(2-Math.pow(2,-10*(e-1))),Vd=e=>1-Math.sin(Math.acos(e)),bb=mb(Vd),xb=hb(Vd),w_=us(.42,0,1,1),S_=us(0,0,.58,1),wb=us(.42,0,.58,1),Sb=e=>Array.isArray(e)&&typeof e[0]!="number";function Tb(e,t){return Sb(e)?e[y_(0,e.length,t)]:e}const Eb=e=>Array.isArray(e)&&typeof e[0]=="number",kb={linear:wn,easeIn:w_,easeInOut:wb,easeOut:S_,circIn:Vd,circInOut:xb,circOut:bb,backIn:Ld,backInOut:yb,backOut:gb,anticipate:vb},T_=e=>typeof e=="string",$d=e=>{if(Eb(e)){pn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return us(t,n,r,o)}else if(T_(e))return pn(kb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kb[e];return e},hl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function E_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const h=f&&o?n:r;return d&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const k_=40;function Cb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=hl.reduce((x,T)=>(x[T]=E_(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=s,y=()=>{const x=vr.useManualTiming?o.timestamp:performance.now();n=!1,vr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,k_),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},m=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:hl.reduce((x,T)=>{const E=s[T];return x[T]=(I,w=!1,k=!1)=>(n||m(),E.schedule(I,w,k)),x},{}),cancel:x=>{for(let T=0;T<hl.length;T++)s[hl[T]].cancel(x)},state:o,steps:s}}const{schedule:ht,cancel:br,state:Yt,steps:zd}=Cb(typeof requestAnimationFrame<"u"?requestAnimationFrame:wn,!0);let ml;function C_(){ml=void 0}const Jt={now:()=>(ml===void 0&&Jt.set(Yt.isProcessing||vr.useManualTiming?Yt.timestamp:performance.now()),ml),set:e=>{ml=e,queueMicrotask(C_)}},Ib=e=>t=>typeof t=="string"&&t.startsWith(e),Ab=Ib("--"),I_=Ib("var(--"),jd=e=>I_(e)?A_.test(e.split("/*")[0].trim()):!1,A_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ni={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ds={...ni,transform:e=>Xn(0,1,e)},gl={...ni,default:1},fs=e=>Math.round(e*1e5)/1e5,Rd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function P_(e){return e==null}const O_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bd=(e,t)=>n=>!!(typeof n=="string"&&O_.test(n)&&n.startsWith(e)||t&&!P_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ob=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Rd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},__=e=>Xn(0,255,e),Hd={...ni,transform:e=>Math.round(__(e))},fo={test:Bd("rgb","red"),parse:Ob("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hd.transform(e)+", "+Hd.transform(t)+", "+Hd.transform(n)+", "+fs(ds.transform(r))+")"};function M_(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Wd={test:Bd("#"),parse:M_,transform:fo.transform},ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lr=ps("deg"),Qn=ps("%"),Ee=ps("px"),D_=ps("vh"),N_=ps("vw"),_b={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},ri={test:Bd("hsl","hue"),parse:Ob("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(fs(t))+", "+Qn.transform(fs(n))+", "+fs(ds.transform(r))+")"},Ft={test:e=>fo.test(e)||Wd.test(e)||ri.test(e),parse:e=>fo.test(e)?fo.parse(e):ri.test(e)?ri.parse(e):Wd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fo.transform(e):ri.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},F_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function L_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Rd)?.length||0)+(e.match(F_)?.length||0)>0}const Mb="number",Db="color",V_="var",$_="var(",Nb="${}",z_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(z_,l=>(Ft.test(l)?(r.color.push(i),o.push(Db),n.push(Ft.parse(l))):l.startsWith($_)?(r.var.push(i),o.push(V_),n.push(l)):(r.number.push(i),o.push(Mb),n.push(parseFloat(l))),++i,Nb)).split(Nb);return{values:n,split:a,indexes:r,types:o}}function Fb(e){return hs(e).values}function Lb(e){const{split:t,types:n}=hs(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Mb?i+=fs(o[s]):a===Db?i+=Ft.transform(o[s]):i+=o[s]}return i}}const j_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function R_(e){const t=Fb(e);return Lb(e)(t.map(j_))}const Mn={test:L_,parse:Fb,createTransformer:Lb,getAnimatableNone:R_};function qd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function B_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=qd(l,a,e+1/3),i=qd(l,a,e),s=qd(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function yl(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Ud=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},H_=[Wd,fo,ri],W_=e=>H_.find(t=>t.test(e));function Vb(e){const t=W_(e);if(ei(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ri&&(n=B_(n)),n}const $b=(e,t)=>{const n=Vb(e),r=Vb(t);if(!n||!r)return yl(e,t);const o={...n};return i=>(o.red=Ud(n.red,r.red,i),o.green=Ud(n.green,r.green,i),o.blue=Ud(n.blue,r.blue,i),o.alpha=vt(n.alpha,r.alpha,i),fo.transform(o))},Gd=new Set(["none","hidden"]);function q_(e,t){return Gd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U_(e,t){return n=>vt(e,t,n)}function Yd(e){return typeof e=="number"?U_:typeof e=="string"?jd(e)?yl:Ft.test(e)?$b:K_:Array.isArray(e)?zb:typeof e=="object"?Ft.test(e)?$b:G_:yl}function zb(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Yd(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function G_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Yd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Y_(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const K_=(e,t)=>{const n=Mn.createTransformer(t),r=hs(e),o=hs(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Gd.has(e)&&!o.values.length||Gd.has(t)&&!r.values.length?q_(e,t):cs(zb(Y_(r,o),o.values),n):(ei(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),yl(e,t))};function jb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Yd(e)(e,t)}const Z_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>br(t),now:()=>Yt.isProcessing?Yt.timestamp:Jt.now()}},Rb=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},vl=2e4;function Kd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<vl;)t+=n,r=e.next(t);return t>=vl?1/0:t}function Bb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Kd(r),vl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Sn(o)}}const X_=5;function Hb(e,t,n){const r=Math.max(t-X_,0);return db(n-e(r),t-r)}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zd=.001;function Q_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;ei(e<=hn(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Xn(Ct.minDamping,Ct.maxDamping,s),e=Xn(Ct.minDuration,Ct.maxDuration,Sn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,p=Xd(c,s),h=Math.exp(-d);return Zd-f/p*h},i=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,h=Math.exp(-d),y=Xd(Math.pow(c,2),s);return(-o(c)+Zd>0?-1:1)*((f-p)*h)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Zd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=eM(o,i,a);if(e=hn(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const J_=12;function eM(e,t,n){let r=n;for(let o=1;o<J_;o++)r=r-e(r)/t(r);return r}function Xd(e,t){return e*Math.sqrt(1-t*t)}const tM=["duration","bounce"],nM=["stiffness","damping","mass"];function Wb(e,t){return t.some(n=>e[n]!==void 0)}function rM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!Wb(e,nM)&&Wb(e,tM))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=Q_({...e,velocity:0});t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ms(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=rM({...n,velocity:-Sn(n.velocity||0)}),h=f||0,y=c/(2*Math.sqrt(l*u)),m=s-i,v=Sn(Math.sqrt(l/u)),b=Math.abs(m)<5;r||(r=b?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=b?Ct.restDelta.granular:Ct.restDelta.default);let x;if(y<1){const E=Xd(v,y);x=I=>{const w=Math.exp(-y*v*I);return s-w*((h+y*v*m)/E*Math.sin(E*I)+m*Math.cos(E*I))}}else if(y===1)x=E=>s-Math.exp(-v*E)*(m+(h+v*m)*E);else{const E=v*Math.sqrt(y*y-1);x=I=>{const w=Math.exp(-y*v*I),k=Math.min(E*I,300);return s-w*((h+y*v*m)*Math.sinh(k)+E*m*Math.cosh(k))/E}}const T={calculatedDuration:p&&d||null,next:E=>{const I=x(E);if(p)a.done=E>=d;else{let w=E===0?h:0;y<1&&(w=E===0?hn(h):Hb(x,E,I));const k=Math.abs(w)<=r,A=Math.abs(s-I)<=o;a.done=k&&A}return a.value=a.done?s:I,a},toString:()=>{const E=Math.min(Kd(T),vl),I=Rb(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}ms.applyToOptions=e=>{const t=Bb(e,100,ms);return e.ease=t.ease,e.duration=hn(t.duration),e.type="keyframes",e};function Qd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=k=>a!==void 0&&k<a||l!==void 0&&k>l,h=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let y=n*t;const m=d+y,v=s===void 0?m:s(m);v!==m&&(y=v-d);const b=k=>-y*Math.exp(-k/r),x=k=>v+b(k),T=k=>{const A=b(k),O=x(k);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let E,I;const w=k=>{p(f.value)&&(E=k,I=ms({keyframes:[f.value,h(f.value)],velocity:Hb(x,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let A=!1;return!I&&E===void 0&&(A=!0,T(k),w(k)),E!==void 0&&k>=E?I.next(k-E):(!A&&T(k),f)}}}function oM(e,t,n){const r=[],o=n||vr.mix||jb,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||wn:t;a=cs(l,a)}r.push(a)}return r}function qb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(pn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=oM(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ti(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Xn(e[0],e[i-1],u)):c}function Ub(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ti(0,t,r);e.push(vt(n,1,o))}}function Gb(e){const t=[0];return Ub(t,e.length-1),t}function iM(e,t){return e.map(n=>n*t)}function sM(e,t){return e.map(()=>t||wb).splice(0,e.length-1)}function oi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sb(r)?r.map($d):$d(r),i={done:!1,value:t[0]},s=iM(n&&n.length===t.length?n:Gb(t),e),a=qb(s,t,{ease:Array.isArray(o)?o:sM(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const aM=e=>e!==null;function Jd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(aM),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const lM={decay:Qd,inertia:Qd,tween:oi,keyframes:oi,spring:ms};function Yb(e){typeof e.type=="string"&&(e.type=lM[e.type])}class ef{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const cM=e=>e/100;class tf extends ef{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Yb(t);const{type:n=oi,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||oi;process.env.NODE_ENV!=="production"&&l!==oi&&pn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==oi&&typeof a[0]!="number"&&(this.mixKeyframes=cs(cM,jb(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Kd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const k=Math.min(this.currentTime,o)/a;let A=Math.floor(k),O=k%1;!O&&k>=1&&(O=1),O===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(O=1-O,p&&(O-=p/a)):f==="mirror"&&(T=s)),x=Xn(0,1,O)*a}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&h!==Qd&&(E.value=Jd(u,this.options,m,this.speed)),y&&y(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Sn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(this.currentTime)}set time(t){t=hn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Sn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Z_,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const po=e=>e*180/Math.PI,nf=e=>{const t=po(Math.atan2(e[1],e[0]));return rf(t)},dM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:nf,rotateZ:nf,skewX:e=>po(Math.atan(e[1])),skewY:e=>po(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rf=e=>(e=e%360,e<0&&(e+=360),e),Kb=nf,Zb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zb,scaleY:Xb,scale:e=>(Zb(e)+Xb(e))/2,rotateX:e=>rf(po(Math.atan2(e[6],e[5]))),rotateY:e=>rf(po(Math.atan2(-e[2],e[0]))),rotateZ:Kb,rotate:Kb,skewX:e=>po(Math.atan(e[4])),skewY:e=>po(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function of(e){return e.includes("scale")?1:0}function sf(e,t){if(!e||e==="none")return of(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=fM,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dM,o=a}if(!o)return of(t);const i=r[t],s=o[1].split(",").map(hM);return typeof i=="function"?i(s):s[i]}const pM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sf(n,t)};function hM(e){return parseFloat(e.trim())}const ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],si=new Set(ii),Qb=e=>e===ni||e===Ee,mM=new Set(["x","y","z"]),gM=ii.filter(e=>!mM.has(e));function yM(e){const t=[];return gM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Vr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>sf(t,"x"),y:(e,{transform:t})=>sf(t,"y")};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const ho=new Set;let af=!1,lf=!1,cf=!1;function Jb(){if(lf){const e=Array.from(ho).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=yM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}lf=!1,af=!1,ho.forEach(e=>e.complete(cf)),ho.clear()}function ex(){ho.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(lf=!0)})}function vM(){cf=!0,ex(),Jb(),cf=!1}class uf{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(ho.add(this),af||(af=!0,ht.read(ex),ht.resolveKeyframes(Jb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}uM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ho.delete(this)}cancel(){this.state==="scheduled"&&(ho.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bM=e=>e.startsWith("--");function xM(e,t,n){bM(t)?e.style.setProperty(t,n):e.style[t]=n}const wM={};function tx(e,t){const n=ub(e);return()=>wM[t]??n()}const SM=tx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),nx=tx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gs([0,.65,.55,1]),circOut:gs([.55,0,1,.45]),backIn:gs([.31,.01,.66,-.59]),backOut:gs([.33,1.53,.69,.99])};function ox(e,t){if(e)return typeof e=="function"?nx()?Rb(e,t):"ease-out":Eb(e)?gs(e):Array.isArray(e)?e.map(n=>ox(n,t)||rx.easeOut):rx[e]}function TM(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ox(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function df(e){return typeof e=="function"&&"applyToOptions"in e}function EM({type:e,...t}){return df(e)&&nx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ix extends ef{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,pn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=EM(t);this.animation=TM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Jd(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):xM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Sn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&SM()?(this.animation.timeline=t,wn):n(this)}}const sx={anticipate:vb,backInOut:yb,circInOut:xb};function kM(e){return e in sx}function CM(e){typeof e.ease=="string"&&kM(e.ease)&&(e.ease=sx[e.ease])}const ff=10;class IM extends ix{constructor(t){CM(t),Yb(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new tf({...s,autoplay:!1}),l=Math.max(ff,Jt.now()-this.startTime),c=Xn(0,ff,l-ff);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const ax=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Mn.test(e)||e==="0")&&!e.startsWith("url("));function AM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function PM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=ax(o,t),a=ax(i,t);return ei(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:AM(e)||(n==="spring"||df(n))&&r}function pf(e){e.duration=0,e.type="keyframes"}const OM=new Set(["opacity","clipPath","filter","transform"]),_M=ub(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return _M()&&n&&OM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const DM=40;class NM extends ef{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||uf;this.keyframeResolver=new p(a,(h,y,m)=>this.onKeyframesResolved(h,y,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),PM(t,i,s,a)||((vr.instantAnimations||!l)&&u?.(Jd(t,r,n)),t[0]=t[t.length-1],pf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>DM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&MM(f),h=f.motionValue?.owner?.current,y=p?new IM({...f,element:h}):new tf(f);y.finished.then(()=>{this.notifyFinished()}).catch(wn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class FM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return lx(this.animations,"duration")}get iterationDuration(){return lx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function lx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class LM extends FM{then(t,n){return this.finished.finally(t).then(()=>{})}}function cx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const VM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $M(e){const t=VM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const zM=4;function ux(e,t,n=1){pn(n<=zM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=$M(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return ab(s)?parseFloat(s):s}return jd(o)?ux(o,t,n+1):o}const jM={type:"spring",stiffness:500,damping:25,restSpeed:10},RM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BM={type:"keyframes",duration:.8},HM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WM=(e,{keyframes:t})=>t.length>2?BM:si.has(e)?e.startsWith("scale")?RM(t[1]):jM:HM,qM=e=>e!==null;function UM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(qM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function hf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function mf(e,t){const n=e?.[t]??e?.default??e;return n!==e?hf(n,e):n}function GM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const gf=(e,t,n,r={},o,i)=>s=>{const a=mf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};GM(a)||Object.assign(u,WM(e,u)),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(pf(u),u.delay===0&&(d=!0)),(vr.instantAnimations||vr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,pf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=UM(u.keyframes,a);if(f!==void 0){ht.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new tf(u):new NM(u)};function dx(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function yf(e,t,n,r){if(typeof t=="function"){const[o,i]=dx(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=dx(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ai(e,t,n){const r=e.getProps();return yf(r,t,n!==void 0?n:r.custom,e)}const fx=new Set(["width","height","top","left","right","bottom",...ii]),px=30,YM=e=>!isNaN(parseFloat(e)),ys={current:void 0};class KM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ys.current&&ys.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>px)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,px);return db(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $r(e,t){return new KM(e,t)}const vf=e=>Array.isArray(e);function ZM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$r(n))}function XM(e){return vf(e)?e[e.length-1]||0:e}function QM(e,t){const n=ai(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=XM(i[s]);ZM(e,s,a)}}const zt=e=>!!(e&&e.getVelocity);function JM(e){return!!(zt(e)&&e.add)}function bf(e,t){const n=e.getValue("willChange");if(JM(n))return n.add(t);if(!n&&vr.WillChange){const r=new vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function xf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hx="data-"+xf("framerAppearId");function mx(e){return e.props[hx]}function eD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?hf(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in a){const p=e.getValue(f,e.latestValues[f]??null),h=a[f];if(h===void 0||d&&eD(d,f))continue;const y={delay:n,...mf(i||{},f)},m=p.get();if(m!==void 0&&!p.isAnimating&&!Array.isArray(h)&&h===m&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const T=mx(e);if(T){const E=window.MotionHandoffAnimation(T,f,ht);E!==null&&(y.startTime=E,v=!0)}}bf(e,f);const b=c??e.shouldReduceMotion;p.start(gf(f,p,h,b&&fx.has(f)?{type:!1}:y,e,v));const x=p.animation;x&&u.push(x)}if(s){const f=()=>ht.update(()=>{s&&QM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function Sf(e,t,n={}){const r=ai(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(wf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return tD(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function tD(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Sf(l,t,{...s,delay:n+(typeof r=="function"?0:r)+cx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function nD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Sf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Sf(e,t,n);else{const o=typeof t=="function"?ai(e,t,n.custom):t;r=Promise.all(wf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rD={test:e=>e==="auto",parse:e=>e},gx=e=>t=>t.test(e),yx=[ni,Ee,Qn,Lr,N_,D_,rD],vx=e=>yx.find(gx(e));function oD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cb(e):!0}const iD=new Set(["brightness","contrast","saturate","opacity"]);function sD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Rd)||[];if(!r)return e;const o=n.replace(r,"");let i=iD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const aD=/\b([a-z-]*)\(.*?\)/gu,Tf={...Mn,getAnimatableNone:e=>{const t=e.match(aD);return t?t.map(sD).join(" "):e}},Ef={...Mn,getAnimatableNone:e=>{const t=Mn.parse(e);return Mn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},bx={...ni,transform:Math.round},kf={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,inset:Ee,insetBlock:Ee,insetBlockStart:Ee,insetBlockEnd:Ee,insetInline:Ee,insetInlineStart:Ee,insetInlineEnd:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,paddingBlock:Ee,paddingBlockStart:Ee,paddingBlockEnd:Ee,paddingInline:Ee,paddingInlineStart:Ee,paddingInlineEnd:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,marginBlock:Ee,marginBlockStart:Ee,marginBlockEnd:Ee,marginInline:Ee,marginInlineStart:Ee,marginInlineEnd:Ee,fontSize:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:Lr,rotateX:Lr,rotateY:Lr,rotateZ:Lr,scale:gl,scaleX:gl,scaleY:gl,scaleZ:gl,skew:Lr,skewX:Lr,skewY:Lr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ds,originX:_b,originY:_b,originZ:Ee},zIndex:bx,fillOpacity:ds,strokeOpacity:ds,numOctaves:bx},lD={...kf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Tf,WebkitFilter:Tf,mask:Ef,WebkitMask:Ef},xx=e=>lD[e],cD=new Set([Tf,Ef]);function wx(e,t){let n=xx(e);return cD.has(n)||(n=Mn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uD=new Set(["auto","none","0"]);function dD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!uD.has(i)&&hs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=wx(n,o)}class fD extends uf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),jd(d))){const f=ux(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!fx.has(r)||t.length!==2)return;const[o,i]=t,s=vx(o),a=vx(i),l=Pb(o),c=Pb(i);if(l!==c&&Vr[r]){this.needsMeasurement=!0;return}if(s!==a)if(Qb(s)&&Qb(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Vr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||oD(t[o]))&&r.push(o);r.length&&dD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Vr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const pD=new Set(["opacity","clipPath","filter","transform"]);function Cf(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const Sx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function If(e){return lb(e)&&"offsetHeight"in e}const{schedule:Af}=Cb(queueMicrotask,!1),Dn={x:!1,y:!1};function Tx(){return Dn.x||Dn.y}function hD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function Ex(e,t){const n=Cf(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function mD(e){return!(e.pointerType==="touch"||Tx())}function gD(e,t,n={}){const[r,o,i]=Ex(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",h)},d=m=>{c&&(c(m),c=void 0),u()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(m))},p=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},h=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}d(m)}},y=m=>{if(!mD(m))return;l=!1;const v=t(s,m);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",h,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",p,o)}),i}const kx=(e,t)=>t?e===t?!0:kx(e,t.parentElement):!1,Pf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vD(e){return yD.has(e.tagName)||e.isContentEditable===!0}const bD=new Set(["INPUT","SELECT","TEXTAREA"]);function xD(e){return bD.has(e.tagName)||e.isContentEditable===!0}const bl=new WeakSet;function Cx(e){return t=>{t.key==="Enter"&&e(t)}}function Of(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Cx(()=>{if(bl.has(n))return;Of(n,"down");const o=Cx(()=>{Of(n,"up")}),i=()=>Of(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ix(e){return Pf(e)&&!Tx()}const Ax=new WeakSet;function SD(e,t,n={}){const[r,o,i]=Ex(e,n),s=a=>{const l=a.currentTarget;if(!Ix(a)||Ax.has(a))return;bl.add(l),n.stopPropagation&&Ax.add(a);const c=t(l,a),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),bl.has(l)&&bl.delete(l),Ix(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||kx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),If(a)&&(a.addEventListener("focus",c=>wD(c,o)),!vD(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function xl(e){return lb(e)&&"ownerSVGElement"in e}const wl=new WeakMap;let Sl;const Px=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:xl(r)&&"getBBox"in r?r.getBBox()[t]:r[n],TD=Px("inline","width","offsetWidth"),ED=Px("block","height","offsetHeight");function kD({target:e,borderBoxSize:t}){wl.get(e)?.forEach(n=>{n(e,{get width(){return TD(e,t)},get height(){return ED(e,t)}})})}function CD(e){e.forEach(kD)}function ID(){typeof ResizeObserver>"u"||(Sl=new ResizeObserver(CD))}function AD(e,t){Sl||ID();const n=Cf(e);return n.forEach(r=>{let o=wl.get(r);o||(o=new Set,wl.set(r,o)),o.add(t),Sl?.observe(r)}),()=>{n.forEach(r=>{const o=wl.get(r);o?.delete(t),o?.size||Sl?.unobserve(r)})}}const Tl=new Set;let li;function PD(){li=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tl.forEach(t=>t(e))},window.addEventListener("resize",li)}function OD(e){return Tl.add(e),li||PD(),()=>{Tl.delete(e),!Tl.size&&typeof li=="function"&&(window.removeEventListener("resize",li),li=void 0)}}function Ox(e,t){return typeof e=="function"?OD(e):AD(e,t)}function _x(e){return xl(e)&&e.tagName==="svg"}function _D(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function MD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:_D(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=$d(r)(l/c)*c}return t+l}}function DD(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=qb(o,i,s);return t?a(r):a}const ND=[...yx,Ft,Mn],FD=e=>ND.find(gx(e)),Mx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:Mx(),y:Mx()}),Dx=()=>({min:0,max:0}),Lt=()=>({x:Dx(),y:Dx()}),vs=new WeakMap;function El(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bs(e){return typeof e=="string"||Array.isArray(e)}const _f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mf=["initial",..._f];function kl(e){return El(e.animate)||Mf.some(t=>bs(e[t]))}function Nx(e){return!!(kl(e)||e.variants)}function LD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(zt(o))e.addValue(r,o);else if(zt(i))e.addValue(r,$r(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,$r(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cl={current:null},Df={current:!1},VD=typeof window<"u";function Fx(){if(Df.current=!0,!!VD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cl.current=e.matches;e.addEventListener("change",t),t()}else Cl.current=!1}const Lx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Il={};function Vx(e){Il=e}function $D(){return Il}class $x{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=uf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Jt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=kl(n),this.isVariantNode=Nx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];c[p]!==void 0&&zt(h)&&h.set(c[p])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,vs.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Df.current||Fx(),this.shouldReduceMotion=Cl.current),process.env.NODE_ENV!=="production"&&pl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&pD.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new ix({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:hn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=si.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Il){const n=Il[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Lx.length;r++){const o=Lx[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=LD(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=$r(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ab(r)||cb(r))?r=parseFloat(r):!FD(r)&&Mn.test(n)&&(r=wx(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=yf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Af.render(this.render)}}class zx extends $x{constructor(){super(...arguments),this.KeyframeResolver=fD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Nf(e){return e===void 0||e===1}function Ff({scale:e,scaleX:t,scaleY:n}){return!Nf(e)||!Nf(t)||!Nf(n)}function mo(e){return Ff(e)||Rx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Rx(e){return Bx(e.x)||Bx(e.y)}function Bx(e){return e&&e!=="0%"}function Al(e,t,n){const r=e-n,o=t*r;return n+o}function Hx(e,t,n,r,o){return o!==void 0&&(e=Al(e,o,r)),Al(e,n,r)+t}function Lf(e,t=0,n=1,r,o){e.min=Hx(e.min,t,n,r,o),e.max=Hx(e.max,t,n,r,o)}function Wx(e,{x:t,y:n}){Lf(e.x,t.translate,t.scale,t.originPoint),Lf(e.y,n.translate,n.scale,n.originPoint)}const qx=.999999999999,Ux=1.0000000000001;function RD(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&di(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Wx(e,s)),r&&mo(i.latestValues)&&di(e,i.latestValues))}t.x<Ux&&t.x>qx&&(t.x=1),t.y<Ux&&t.y>qx&&(t.y=1)}function ui(e,t){e.min=e.min+t,e.max=e.max+t}function Gx(e,t,n,r,o=.5){const i=vt(e.min,e.max,o);Lf(e,t,n,i,r)}function di(e,t){Gx(e.x,t.x,t.scaleX,t.scale,t.originX),Gx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yx(e,t){return jx(jD(e.getBoundingClientRect(),t))}function BD(e,t,n){const r=Yx(e,n),{scroll:o}=t;return o&&(ui(r.x,o.offset.x),ui(r.y,o.offset.y)),r}const HD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WD=ii.length;function qD(e,t,n){let r="",o=!0;for(let i=0;i<WD;i++){const s=ii[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=Sx(a,kf[s]);if(!l){o=!1;const u=HD[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Vf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(si.has(l)){s=!0;continue}else if(Ab(l)){o[l]=c;continue}else{const u=Sx(c,kf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=qD(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Kx(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function Zx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=Zx(e,t.target.x),r=Zx(e,t.target.y);return`${n}% ${r}%`}},UD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Mn.parse(e);if(o.length>5)return r;const i=Mn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=vt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},$f={borderRadius:{...xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomLeftRadius:xs,borderBottomRightRadius:xs,boxShadow:UD};function Xx(e,{layout:t,layoutId:n}){return si.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$f[e]||e==="opacity")}function zf(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(zt(r[s])||o&&zt(o[s])||Xx(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function GD(e){return window.getComputedStyle(e)}class Qx extends zx{constructor(){super(...arguments),this.type="html",this.renderInstance=Kx}readValueFromInstance(t,n){if(si.has(n))return this.projection?.isProjecting?of(n):pM(t,n);{const r=GD(t),o=(Ab(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yx(t,n)}build(t,n,r){Vf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zf(t,n,r)}}function YD(e,t){return e in t}class KD extends $x{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(YD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const ZD={offset:"stroke-dashoffset",array:"stroke-dasharray"},XD={offset:"strokeDashoffset",array:"strokeDasharray"};function QD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZD:XD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const JD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Jx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Vf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of JD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&QD(d,o,i,s,!1)}const e0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),t0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eN(e,t,n,r){Kx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(e0.has(o)?o:xf(o),t.attrs[o])}function n0(e,t,n){const r=zf(e,t,n);for(const o in e)if(zt(e[o])||zt(t[o])){const i=ii.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class r0 extends zx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(si.has(n)){const r=xx(n);return r&&r.default||0}return n=e0.has(n)?n:xf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return n0(t,n,r)}build(t,n,r){Jx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){eN(t,n,r,o)}mount(t){this.isSVGTag=t0(t.tagName),super.mount(t)}}const tN=Mf.length;function o0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?o0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<tN;n++){const r=Mf[n],o=e.props[r];(bs(o)||o===!1)&&(t[r]=o)}return t}function i0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const nN=[..._f].reverse(),rN=_f.length;function oN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nD(e,n,r)))}function iN(e){let t=oN(e),n=s0(),r=!0;const o=l=>(c,u)=>{const d=ai(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...h}=d;c={...c,...h,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=o0(e.parent)||{},d=[],f=new Set;let p={},h=1/0;for(let m=0;m<rN;m++){const v=nN[m],b=n[v],x=c[v]!==void 0?c[v]:u[v],T=bs(x),E=v===l?b.isActive:null;E===!1&&(h=m);let I=x===u[v]&&x!==c[v]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&E===null||!x&&!b.prevProp||El(x)||typeof x=="boolean")continue;if(v==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(p={...p,...b.prevResolvedValues});continue}const w=sN(b.prevProp,x);let k=w||v===l&&b.isActive&&!I&&T||m>h&&T,A=!1;const O=Array.isArray(x)?x:[x];let N=O.reduce(o(v),{});E===!1&&(N={});const{prevResolvedValues:M={}}=b,$={...M,...N},_=D=>{k=!0,f.has(D)&&(A=!0,f.delete(D)),b.needsAnimating[D]=!0;const C=e.getValue(D);C&&(C.liveStyle=!1)};for(const D in $){const C=N[D],V=M[D];if(p.hasOwnProperty(D))continue;let L=!1;vf(C)&&vf(V)?L=!i0(C,V):L=C!==V,L?C!=null?_(D):f.add(D):C!==void 0&&f.has(D)?_(D):b.protectedKeys[D]=!0}b.prevProp=x,b.prevResolvedValues=N,b.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(k=!1);const F=I&&w;k&&(!F||A)&&d.push(...O.map(D=>{const C={type:v};if(typeof D=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,L=ai(V,D);if(V.enteringChildren&&L){const{delayChildren:B}=L.transition||{};C.delay=cx(V.enteringChildren,e,B)}}return{animation:D,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=ai(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),m[v]=b??null}),d.push({animation:m})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=s0()}}}function sN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!i0(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function s0(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}function a0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){a0(e.x,t.x),a0(e.y,t.y)}function l0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const c0=1e-4,aN=1-c0,lN=1+c0,u0=.01,cN=0-u0,uN=0+u0;function en(e){return e.max-e.min}function dN(e,t,n){return Math.abs(e-t)<=n}function d0(e,t,n,r=.5){e.origin=r,e.originPoint=vt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aN&&e.scale<=lN||isNaN(e.scale))&&(e.scale=1),(e.translate>=cN&&e.translate<=uN||isNaN(e.translate))&&(e.translate=0)}function ws(e,t,n,r){d0(e.x,t.x,n.x,r?r.originX:void 0),d0(e.y,t.y,n.y,r?r.originY:void 0)}function f0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function fN(e,t,n){f0(e.x,t.x,n.x),f0(e.y,t.y,n.y)}function p0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function Pl(e,t,n){p0(e.x,t.x,n.x),p0(e.y,t.y,n.y)}function h0(e,t,n,r,o){return e-=t,e=Al(e,1/n,r),o!==void 0&&(e=Al(e,1/o,r)),e}function pN(e,t=0,n=1,r=.5,o,i=e,s=e){if(Qn.test(t)&&(t=parseFloat(t),t=vt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=vt(i.min,i.max,r);e===i&&(a-=t),e.min=h0(e.min,t,n,a,o),e.max=h0(e.max,t,n,a,o)}function m0(e,t,[n,r,o],i,s){pN(e,t[n],t[r],t[o],t.scale,i,s)}const hN=["x","scaleX","originX"],mN=["y","scaleY","originY"];function g0(e,t,n,r){m0(e.x,t,hN,n?n.x:void 0,r?r.x:void 0),m0(e.y,t,mN,n?n.y:void 0,r?r.y:void 0)}function y0(e){return e.translate===0&&e.scale===1}function v0(e){return y0(e.x)&&y0(e.y)}function b0(e,t){return e.min===t.min&&e.max===t.max}function gN(e,t){return b0(e.x,t.x)&&b0(e.y,t.y)}function x0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function w0(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function S0(e){return en(e.x)/en(e.y)}function T0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Jn(e){return[e("x"),e("y")]}function yN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const E0=["TopLeft","TopRight","BottomLeft","BottomRight"],vN=E0.length,k0=e=>typeof e=="string"?parseFloat(e):e,C0=e=>typeof e=="number"||Ee.test(e);function bN(e,t,n,r,o,i){o?(e.opacity=vt(0,n.opacity??1,xN(r)),e.opacityExit=vt(t.opacity??1,0,wN(r))):i&&(e.opacity=vt(t.opacity??1,n.opacity??1,r));for(let s=0;s<vN;s++){const a=`border${E0[s]}Radius`;let l=I0(t,a),c=I0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||C0(l)===C0(c)?(e[a]=Math.max(vt(k0(l),k0(c),r),0),(Qn.test(c)||Qn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,r))}function I0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xN=A0(0,.5,bb),wN=A0(.5,.95,wn);function A0(e,t,n){return r=>r<e?0:r>t?1:n(ti(e,t,r))}function P0(e,t,n){const r=zt(e)?e:$r(e);return r.start(gf("",r,t,n)),r.animation}function Ss(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const SN=(e,t)=>e.depth-t.depth;class TN{constructor(){this.children=[],this.isDirty=!1}add(t){Dd(this.children,t),this.isDirty=!0}remove(t){Jo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SN),this.isDirty=!1,this.children.forEach(t)}}function EN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(br(r),e(i-t))};return ht.setup(r,!0),()=>br(r)}function Ol(e){return zt(e)?e.get():e}class kN{constructor(){this.members=[]}add(t){Dd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&Jo(this.members,r)}t.scheduleRender()}remove(t){if(Jo(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o],s=i.instance;if(i.isPresent!==!1&&(!s||s.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const _l={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jf=["","X","Y","Z"],CN=1e3;let IN=0;function Rf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function O0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&O0(r)}function _0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=IN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ON),this.nodes.forEach(NN),this.nodes.forEach(FN),this.nodes.forEach(_N)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new TN)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Fd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=xl(s)&&!_x(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=EN(f,250),_l.hasAnimatedSinceResize&&(_l.hasAnimatedSinceResize=!1,this.nodes.forEach(N0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||c.getDefaultTransition()||jN,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!w0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...mf(h,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||N0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LN),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&O0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(M0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(D0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DN),this.nodes.forEach(AN),this.nodes.forEach(PN)):this.nodes.forEach(D0),this.clearAllSnapshots();const a=Jt.now();Yt.delta=Xn(0,1e3/60,a-Yt.timestamp),Yt.timestamp=a,Yt.isProcessing=!0,zd.update.process(Yt),zd.preRender.process(Yt),zd.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Af.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MN),this.sharedNodes.forEach(VN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!v0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||mo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),RN(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(BN))){const{scroll:c}=this.root;c&&(ui(a.x,c.offset.x),ui(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Lt();if(Nn(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Nn(a,s),ui(a.x,u.offset.x),ui(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();Nn(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&di(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mo(u.latestValues)&&di(l,u.latestValues)}return mo(this.latestValues)&&di(l,this.latestValues),l}removeTransform(s){const a=Lt();Nn(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!mo(c.latestValues))continue;Ff(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),g0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return mo(this.latestValues)&&g0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),Wx(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ff(this.parent.latestValues)||Rx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),Pl(this.relativeTargetOrigin,a,l),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;RD(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(l0(this.prevProjectionDelta.x,this.projectionDelta.x),l0(this.prevProjectionDelta.y,this.projectionDelta.y)),ws(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!T0(this.projectionDelta.x,this.prevProjectionDelta.x)||!T0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ci(),this.projectionDelta=ci(),this.projectionDeltaWithTransform=ci()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Lt(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,y=p!==h,m=this.getStack(),v=!m||m.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(zN));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;F0(d.x,s.x,E),F0(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$N(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&gN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Nn(x,this.relativeTarget)),y&&(this.animationValues=u,bN(u,c,this.latestValues,E,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{_l.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$r(0)),this.motionValue.jump(0,!1),this.currentAnimation=P0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&j0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Nn(a,l),di(a,u),ws(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new kN),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Rf("z",s,c,this.animationValues);for(let u=0;u<jf.length;u++)Rf(`rotate${jf[u]}`,s,c,this.animationValues),Rf(`skew${jf[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ol(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ol(a?.pointerEvents)||""),this.hasProjected&&!mo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=yN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in $f){if(u[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=$f[h],b=d==="none"?u[h]:y(u[h],c);if(m){const x=m.length;for(let T=0;T<x;T++)s[m[T]]=b}else v?this.options.visualElement.renderState.vars[h]=b:s[h]=b}this.options.layoutId&&(s.pointerEvents=c===this?Ol(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(M0),this.root.sharedNodes.clear()}}}function AN(e){e.updateLayout()}function PN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?Jn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):j0(o,t.layoutBox,n)&&Jn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=ci();ws(s,n,t.layoutBox);const a=ci();i?ws(a,e.applyTransform(r,!0),t.measuredBox):ws(a,n,t.layoutBox);const l=!v0(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();Pl(p,t.layoutBox,d.layoutBox);const h=Lt();Pl(h,n,f.layoutBox),w0(p,h)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ON(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _N(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MN(e){e.clearSnapshot()}function M0(e){e.clearMeasurements()}function D0(e){e.isLayoutDirty=!1}function DN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function N0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NN(e){e.resolveTargetDelta()}function FN(e){e.calcProjection()}function LN(e){e.resetSkewAndRotation()}function VN(e){e.removeLeadSnapshot()}function F0(e,t,n){e.translate=vt(t.translate,0,n),e.scale=vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function L0(e,t,n,r){e.min=vt(t.min,n.min,r),e.max=vt(t.max,n.max,r)}function $N(e,t,n,r){L0(e.x,t.x,n.x,r),L0(e.y,t.y,n.y,r)}function zN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const jN={duration:.45,ease:[.4,0,.1,1]},V0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$0=V0("applewebkit/")&&!V0("chrome/")?Math.round:wn;function z0(e){e.min=$0(e.min),e.max=$0(e.max)}function RN(e){z0(e.x),z0(e.y)}function j0(e,t,n){return e==="position"||e==="preserve-aspect"&&!dN(S0(t),S0(n),.2)}function BN(e){return e!==e.root&&e.scroll?.wasRoot}const HN=_0({attachResizeListener:(e,t)=>Ss(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),WN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function R0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(WN);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Bf={current:void 0},B0=_0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bf.current){const e=new HN({});e.mount(window),e.setOptions({layoutScroll:!0}),Bf.current=e}return Bf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function H0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=H0(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():H0(e[o],null)}}}}function UN(...e){return P.useCallback(qN(...e),e)}class GN extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=If(r)&&r.offsetWidth||0,i=If(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function YN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const s=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(yo),u=e.props?.ref??e?.ref,d=UN(a,u);return S.useInsertionEffect(()=>{const{width:f,height:p,top:h,left:y,right:m,bottom:v}=l.current;if(t||i===!1||!a.current||!f||!p)return;const b=n==="left"?`left: ${y}`:`right: ${m}`,x=r==="bottom"?`bottom: ${v}`:`top: ${h}`;a.current.dataset.motionPopId=s;const T=document.createElement("style");c&&(T.nonce=c);const E=o??document.head;return E.appendChild(T),T.sheet&&T.sheet.insertRule(`
|
|
8
|
+
[data-motion-pop-id="${s}"] {
|
|
8
9
|
position: absolute !important;
|
|
9
|
-
width: ${
|
|
10
|
-
height: ${
|
|
11
|
-
${y}px !important;
|
|
10
|
+
width: ${f}px !important;
|
|
11
|
+
height: ${p}px !important;
|
|
12
12
|
${b}px !important;
|
|
13
|
+
${x}px !important;
|
|
13
14
|
}
|
|
14
|
-
`),()=>{T.contains(x)&&T.removeChild(x)}},[t]),m.jsx(jN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const BN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=_n(HN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const g of u.values())if(!g)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,g)=>u.set(g,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(RN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),m.jsx(ul.Provider,{value:p,children:e})};function HN(){return new Map}function z0(e=!0){const t=S.useContext(ul);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const El=e=>e.key||"";function j0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const fn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=z0(a),f=S.useMemo(()=>j0(e),[e]),p=a&&!u?[]:f.map(El),v=S.useRef(!0),g=S.useRef(f),h=_n(()=>new Map),y=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);cl(()=>{v.current=!1,g.current=f;for(let C=0;C<T.length;C++){const P=El(T[C]);p.includes(P)?(h.delete(P),y.current.delete(P)):h.get(P)!==!0&&h.set(P,!1)}},[T,p.length,p.join("-")]);const I=[];if(f!==b){let C=[...f];for(let P=0;P<T.length;P++){const _=T[P],F=El(_);p.includes(F)||(C.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(C=I),E(j0(C)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(ra);return m.jsx(m.Fragment,{children:T.map(C=>{const P=El(C),_=a&&!u?!1:f===T||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),h.has(P))h.set(P,!0);else return;let V=!0;h.forEach(N=>{N||(V=!1)}),V&&(w?.(),E(g.current),a&&d?.(),r&&r())};return m.jsx(BN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:C},P)})})},WN=S.createContext(null);function qN(){const e=S.useRef(!1);return cl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function UN(){const e=qN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const R0=e=>e===!0,GN=e=>R0(e===!0)||e==="id",YN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(ra),o=S.useContext(WN),[i,a]=UN(),s=S.useRef(null),l=r.id||o;s.current===null&&(GN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:R0(n)&&r.group||L0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(ra.Provider,{value:c,children:e})},B0=S.createContext({strict:!1}),H0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let W0=!1;function KN(){if(W0)return;const e={};for(const t in H0)e[t]={isEnabled:n=>H0[t].some(r=>!!n[r])};Mx(e),W0=!0}function q0(){return KN(),_D()}function ZN(e){const t=q0();for(const n in e)t[n]={...t[n],...e[n]};Mx(t)}const XN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Cl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XN.has(e)}let U0=e=>!Cl(e);function G0(e){typeof e=="function"&&(U0=t=>t.startsWith("on")?!Cl(t):e(t))}try{G0(require("@emotion/is-prop-valid").default)}catch{}function QN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(U0(o)||n===!0&&Cl(o)||!t&&!Cl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Nf({children:e,isValidProp:t,...n}){t&&G0(t),n={...S.useContext(ai),...n},n.isStatic=_n(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(ai.Provider,{value:r,children:e})}const kl=S.createContext({});function JN(e,t){if(yl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ma(n)?n:void 0,animate:ma(r)?r:void 0}}return e.inherit!==!1?t:{}}function e2(e){const{initial:t,animate:n}=JN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[Y0(t),Y0(n)])}function Y0(e){return Array.isArray(e)?e.join(" "):e}const Ff=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function K0(e,t,n){for(const r in t)!jt(t[r])&&!Ux(r,n)&&(e[r]=t[r])}function t2({transformTemplate:e},t){return S.useMemo(()=>{const n=Ff();return Af(n,t,e),Object.assign({},n.vars,n.style)},[t])}function n2(e,t){const n=e.style||{},r={};return K0(r,n,e),Object.assign(r,t2(e,t)),r}function r2(e,t){const n={},r=n2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Z0=()=>({...Ff(),attrs:{}});function o2(e,t,n,r){const o=S.useMemo(()=>{const i=Z0();return Yx(i,t,Zx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};K0(i,e.style,e),o.style={...i,...o.style}}return o}const i2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Lf(e){return typeof e!="string"||e.includes("-")?!1:!!(i2.indexOf(e)>-1||/[A-Z]/u.test(e))}function a2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Lf(e)?o2:r2)(t,r,o,e),c=QN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>jt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function s2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:l2(n,r,o,e),renderState:t()}}function l2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Sl(i[f]);let{initial:a,animate:s}=e;const l=yl(e),c=Ox(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!vl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=cf(e,f[p]);if(v){const{transitionEnd:g,transition:h,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[b]=x)}for(const b in g)o[b]=g[b]}}}return o}const X0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(ul),i=()=>s2(e,t,r,o);return n?i():_n(i)},c2=X0({scrapeMotionValuesFromProps:Of,createRenderState:Ff}),u2=X0({scrapeMotionValuesFromProps:Xx,createRenderState:Z0}),d2=Symbol.for("motionComponentSymbol");function f2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const Q0=S.createContext({});function ba(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function p2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(B0),l=S.useContext(ul),c=S.useContext(ai).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(Q0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&h2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[cx],g=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return cl(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),g.current=!1),d.enteringChildren=void 0)}),d}function h2(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:J0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ba(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function J0(e){if(e)return e.options.allowProjection!==!1?e.projection:J0(e.parent)}function Vf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&ZN(r);const i=n?n==="svg":Lf(e),a=i?u2:c2;function s(c,u){let d;const f={...S.useContext(ai),...c,layoutId:m2(c)},{isStatic:p}=f,v=e2(c),g=a(c,p);if(!p&&ob){g2(f,r);const h=v2(f);d=h.MeasureLayout,v.visualElement=p2(e,g,f,o,h.ProjectionNode,i)}return m.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?m.jsx(d,{visualElement:v.visualElement,...f}):null,a2(e,c,f2(g,v.visualElement,u),g,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[d2]=e,l}function m2({layoutId:e}){const t=S.useContext(ra).id;return t&&e!==void 0?t+"-"+e:e}function g2(e,t){const n=S.useContext(B0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ko(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function v2(e){const t=q0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function y2(e,t){if(typeof Proxy>"u")return Vf;const n=new Map,r=(i,a)=>Vf(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&Ad(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Vf(a,void 0,e,t)),n.get(a))})}const b2=(e,t)=>t.isSVG??Lf(e)?new Qx(t):new Gx(t,{allowProjection:e!==S.Fragment});class x2 extends Fr{constructor(t){super(t),t.animationState||(t.animationState=QD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let w2=0;class S2 extends Fr{constructor(){super(...arguments),this.id=w2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const T2={animation:{Feature:x2},exit:{Feature:S2}};function xa(e){return{point:{x:e.pageX,y:e.pageY}}}const E2=e=>t=>bf(t)&&e(t,xa(t));function wa(e,t,n,r){return ya(e,t,E2(n),r)}const ew=({current:e})=>e?e.ownerDocument.defaultView:null,tw=(e,t)=>Math.abs(e-t);function C2(e,t){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}const nw=new Set(["auto","scroll"]);class rw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=zf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,g=C2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!g)return;const{point:h}=p,{timestamp:y}=Kt;this.history.push({...h,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=$f(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:g,onSessionEnd:h,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=zf(p.type==="pointercancel"?this.lastMoveEventInfo:$f(v,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),h&&h(p,b)},!bf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=xa(t),c=$f(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,zf(c,this.history)),this.removeListeners=ia(wa(this.contextWindow,"pointermove",this.handlePointerMove),wa(this.contextWindow,"pointerup",this.handlePointerUp),wa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(nw.has(r.overflowX)||nw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),mr(this.updatePoint)}}function $f(e,t){return t?{point:t(e.point)}:e}function ow(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zf({point:e},t){return{point:e,delta:ow(e,iw(t)),offset:ow(e,k2(t)),velocity:I2(t,.1)}}function k2(e){return e[0]}function iw(e){return e[e.length-1]}function I2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=iw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=bn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function A2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function aw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function P2(e,{top:t,left:n,bottom:r,right:o}){return{x:aw(e.x,n,o),y:aw(e.y,t,r)}}function sw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function O2(e,t){return{x:sw(e.x,t.x),y:sw(e.y,t.y)}}function _2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Zo(t.min,t.max-r,e.min):r>o&&(n=Zo(e.min,e.max-o,t.min)),Kn(0,1,n)}function M2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jf=.35;function D2(e=jf){return e===!1?e=0:e===!0&&(e=jf),{x:lw(e,"left","right"),y:lw(e,"top","bottom")}}function lw(e,t,n){return{min:cw(e,t),max:cw(e,n)}}function cw(e,t){return typeof e=="number"?e:e[t]||0}const N2=new WeakMap;class F2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(xa(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:g}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Zn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[y];T&&(b=en(T)*(parseFloat(b)/100))}}this.originPoint[y]=b}),g&>.postRender(()=>g(d,f)),df(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:g,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=L2(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>xn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new rw(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:ew(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&>.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Il(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=A2(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&ba(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P2(r.layoutBox,t):this.constraints=!1,this.elastic=D2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=M2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ba(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=FD(r,o.root,this.visualElement.getTransformPagePoint());let a=O2(o.layout.layoutBox,i);if(n){const s=n(MD(a));this.hasMutatedConstraints=!!s,s&&(a=Fx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=xn(u=>{if(!Il(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return df(this.visualElement,t),r.start(lf(t,r,0,n,this.visualElement,!1))}stopAnimation(){xn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){xn(n=>{const{drag:r}=this.getProps();if(!Il(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ba(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};xn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=_2({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),xn(a=>{if(!Il(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;N2.set(this.visualElement,this);const t=this.visualElement.current,n=wa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&Tx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ba(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),gt.read(r);const a=ya(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(xn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=jf,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Il(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function L2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class V2 extends Fr{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new F2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const uw=e=>(t,n)=>{e&>.postRender(()=>e(t,n))};class $2 extends Fr{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new rw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ew(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:uw(t),onStart:uw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&>.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=wa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Rf=!1;class z2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Rf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Tl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,Rf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Rf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function dw(e){const[t,n]=z0(),r=S.useContext(ra);return m.jsx(z2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Q0),isPresent:t,safeToRemove:n})}const j2={pan:{Feature:$2},drag:{Feature:V2,ProjectionNode:V0,MeasureLayout:dw}};function fw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&>.postRender(()=>i(t,xa(t)))}class R2 extends Fr{mount(){const{current:t}=this.node;t&&(this.unmount=bD(t,(n,r)=>(fw(this.node,r,"Start"),o=>fw(this.node,o,"End"))))}unmount(){}}class B2 extends Fr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ia(ya(this.node.current,"focus",()=>this.onFocus()),ya(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function pw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&>.postRender(()=>i(t,xa(t)))}class H2 extends Fr{mount(){const{current:t}=this.node;t&&(this.unmount=SD(t,(n,r)=>(pw(this.node,r,"Start"),(o,{success:i})=>pw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bf=new WeakMap,Hf=new WeakMap,W2=e=>{const t=Bf.get(e.target);t&&t(e)},q2=e=>{e.forEach(W2)};function U2({root:e,...t}){const n=e||document;Hf.has(n)||Hf.set(n,{});const r=Hf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(q2,{root:e,...t})),r[o]}function G2(e,t,n){const r=U2(t);return Bf.set(e,n),r.observe(e),()=>{Bf.delete(e),r.unobserve(e)}}const Y2={some:0,all:1};class K2 extends Fr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Y2[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return G2(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Z2(t,n))&&this.startObserver()}unmount(){}}function Z2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const X2={...T2,...{inView:{Feature:K2},tap:{Feature:H2},focus:{Feature:B2},hover:{Feature:R2}},...j2,...{layout:{ProjectionNode:V0,MeasureLayout:dw}}},Be=y2(X2,b2);function Q2(e){return S.useEffect(()=>()=>e(),[])}function mo(e){const t=_n(()=>fo(e)),{isStatic:n}=S.useContext(ai);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function hw(e,t){const n=mo(t()),r=()=>n.set(t());return r(),cl(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),mr(r)}}),n}function J2(e){pa.current=[],e();const t=hw(pa.current,e);return pa.current=void 0,t}function eF(e,t,n,r){if(typeof e=="function")return J2(e);const i=typeof t=="function"?t:CD(t,n,r);return Array.isArray(e)?mw(e,i):mw([e],([a])=>i(a))}function mw(e,t){const n=_n(()=>[]);return hw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Wf(e){return typeof e=="object"&&!Array.isArray(e)}function gw(e,t,n,r){return e==null?[]:typeof e=="string"&&Wf(t)?vx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function tF(e,t,n){return e*(t+1)}function vw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function nF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(oa(e,o),r--)}}function rF(e,t,n,r,o,i){nF(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:xb(n,a)})}function oF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function iF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const aF="easeInOut",sF=20;function lF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,vw(d,v.at,u,c));continue}let[g,h,y={}]=v;y.at!==void 0&&(d=vw(d,y.at,u,c));let b=0;const x=(T,E,I,w=0,C=0)=>{const P=cF(T),{delay:_=0,times:F=Wb(P),type:V=t.type||"keyframes",repeat:N,repeatType:O,repeatDelay:D=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:k}=E;const L=typeof _=="function"?_(w,C):_,$=P.length,B=rf(V)?V:o?.[V||"keyframes"];if($<=2&&B){let J=100;if($===2&&fF(P)){const Y=P[1]-P[0];J=Math.abs(Y)}const re={...t,...z};k!==void 0&&(re.duration=Mn(k));const ee=zb(re,J,B);M=ee.ease,k=ee.duration}k??(k=i);const q=d+L;F.length===1&&F[0]===0&&(F[1]=1);const G=F.length-P.length;if(G>0&&Hb(F,G),P.length===1&&P.unshift(null),N){dn(N<sF,"Repeat count too high, must be less than 20","repeat-count-high"),k=tF(k,N);const J=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let Y=0;Y<N;Y++){P.push(...J);for(let K=0;K<J.length;K++)F.push(re[K]+(Y+1)),M.push(K===0?"linear":xb(ee,K-1))}oF(F,N)}const W=q+k;rF(I,P,M,F,q,W),b=Math.max(L+k,b),f=Math.max(W,f)};if(jt(g)){const T=yw(g,s);x(h,y,bw("default",T))}else{const T=gw(g,h,r,l),E=T.length;for(let I=0;I<E;I++){h=h,y=y;const w=T[I],C=yw(w,s);for(const P in h)x(h[P],uF(y,P),bw(P,C),I,E)}}u=d,d+=b}return s.forEach((p,v)=>{for(const g in p){const h=p[g];h.sort(iF);const y=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:C,value:P,easing:_}=h[w];y.push(P),b.push(Zo(0,f,C)),x.push(_||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(aF)),b[b.length-1]!==1&&(b.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const T=a.get(v);T.keyframes[g]=y;const{type:E,...I}=t;T.transition[g]={...I,duration:f,ease:x,times:b,...n}}}),a}function yw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function bw(e,t){return t[e]||(t[e]=[]),t[e]}function cF(e){return Array.isArray(e)?e:[e]}function uF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const dF=e=>typeof e=="number",fF=e=>e.every(dF);function pF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wf(e)&&!kx(e)?new Qx(t):new Gx(t);n.mount(e),ha.set(e,n)}function hF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new BD(t);n.mount(e),ha.set(e,n)}function mF(e,t){return jt(e)||typeof e=="number"||typeof e=="string"&&!Wf(t)}function xw(e,t,n,r){const o=[];if(mF(e,t))o.push(E0(e,Wf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=gw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?pF:hF;ha.has(l)||c(l);const u=ha.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...pf(u,{...t,transition:d},{}))}}return o}function gF(e,t,n){const r=[];return lF(e,t,n,{spring:da}).forEach(({keyframes:i,transition:a},s)=>{r.push(...xw(s,i,a))}),r}function vF(e){return Array.isArray(e)&&e.some(Array.isArray)}function ww(e){function t(n,r,o){let i=[],a;if(vF(n))i=gF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=xw(n,r,c,e)}const s=new BM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{oa(e.animations,s)})),s}return t}const Sw=ww();function yF(){const e=_n(()=>({current:null,animations:[]})),t=_n(()=>ww(e));return Q2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class bF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const xF=()=>new bF;function wF(){return _n(xF)}const Tw=S.createContext(null);function SF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?b_(e,o,o+i):e}function TF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=_n(()=>Be[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,g)=>{const h=l.findIndex(y=>v===y.value);h!==-1?l[h].layout=g[n]:l.push({value:v,layout:g[n]}),l.sort(CF)},updateOrder:(v,g,h)=>{if(c.current)return;const y=SF(l,v,g,h);l!==y&&(c.current=!0,r(y.map(EF).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return m.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:m.jsx(Tw.Provider,{value:d,children:e})})}const Ew=S.forwardRef(TF);function EF(e){return e.value}function CF(e,t){return e.layout.min-t.layout.min}const Al=50,Cw=25,kF=new Set(["auto","scroll"]),Sa=new WeakMap,Ta=new WeakMap;let Ea=null;function IF(){if(Ea){const e=qf(Ea,"y");e&&(Ta.delete(e),Sa.delete(e));const t=qf(Ea,"x");t&&t!==e&&(Ta.delete(t),Sa.delete(t)),Ea=null}}function AF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return kF.has(r)}function qf(e,t){let n=e?.parentElement;for(;n;){if(AF(n,t))return n;n=n.parentElement}return null}function PF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Al){const l=1-a/Al;return{amount:-Cw*l*l,edge:"start"}}else if(s<Al){const l=1-s/Al;return{amount:Cw*l*l,edge:"end"}}return{amount:0,edge:null}}function OF(e,t,n,r){if(!e)return;Ea=e;const o=qf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=PF(i,o,n);if(s===null){Ta.delete(o),Sa.delete(o);return}if(Ta.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Ta.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;Sa.set(o,u)}if(a>0){const c=Sa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function kw(e,t=0){return jt(e)?e:mo(t)}function _F({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=_n(()=>Be[r]),u=S.useContext(Tw),d={x:kw(t.x),y:kw(t.y)},f=eF([d.x,d.y],([y,b])=>y||b?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:g,groupRef:h}=u;return m.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,b)=>{const{velocity:x,point:T}=b,E=d[p].get();g(n,E,x[p]),OF(h.current,T[p],p,x[p]),o&&o(y,b)},onDragEnd:(y,b)=>{IF(),i&&i(y,b)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const Iw=S.forwardRef(_F);var Pl={exports:{}},Uf={},Ol={exports:{}},Gf={};var Aw;function MF(){if(Aw)return Gf;Aw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),g=v[0].inst,h=v[1];return i(function(){g.value=p,g.getSnapshot=f,l(g)&&h({inst:g})},[d,p,f]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Gf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Gf}var Yf={};var Pw;function DF(){return Pw||(Pw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=v();if(!d){var h=v();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:v}});var y=h[0].inst,b=h[1];return l(function(){y.value=g,y.getSnapshot=v,n(y)&&b({inst:y})},[p,g,v]),s(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!i(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Yf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Yf}var Ow;function _w(){return Ow||(Ow=1,process.env.NODE_ENV==="production"?Ol.exports=MF():Ol.exports=DF()),Ol.exports}var Mw;function NF(){if(Mw)return Uf;Mw=1;var e=S,t=_w();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Uf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&g.hasValue){var w=g.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},Uf}var Kf={};var Dw;function FF(){return Dw||(Dw=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=_w(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Kf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&g.hasValue){var w=g.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return p!==void 0&&p(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kf}var Nw;function LF(){return Nw||(Nw=1,process.env.NODE_ENV==="production"?Pl.exports=NF():Pl.exports=FF()),Pl.exports}LF();var si=function(){return si=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},si.apply(this,arguments)};function Ca(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Fw(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var li=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},VF=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},$F=function(e){return Object.entries(e)},Lw=function(e){return e instanceof Promise},Vw=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},si(si({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},zF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,Fw([],Ca(a),!1)),u=function(d,f){return n(function(p){return Vw(d,p,i,f)})};return Lw(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},jF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,Fw([],Ca(a),!1)),c=function(u){return n(function(d){return Vw(u,d,i,o.current)})};return Lw(l)?l.then(function(u){return c(u)}):c(l)}},Zf=function(e,t,n){var r,o,i,a=Ca(S.useState(function(){return e}),2),s=a[0],l=a[1],c=li(s),u=li((r=n?.props)!==null&&r!==void 0?r:{}),d=li(t),f=li((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=li((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),g=VF(s),h=li(g),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var T=y.current;f.current.forEach(function(E){E(s,g,T)})}},[s,f,g]);var b=Ca(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:v.current,previousState:function(){return h.current}});return $F(E).reduce(function(I,w){var C,P=Ca(w,2),_=P[0],F=P[1];return si(si({},I),(C={},C[_]=n?.debug?zF(_,F,l,T,y,p.current):jF(_,F,l,T,y,p.current),C))},{})}),1),x=b[0];return[s,x,u.current]},RF=Object.defineProperty,$w=Object.getOwnPropertySymbols,BF=Object.prototype.hasOwnProperty,HF=Object.prototype.propertyIsEnumerable,zw=(e,t,n)=>t in e?RF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WF=(e,t)=>{for(var n in t||(t={}))BF.call(t,n)&&zw(e,n,t[n]);if($w)for(var n of $w(t))HF.call(t,n)&&zw(e,n,t[n]);return e},Xf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},qF=(e,t,n,r)=>Ml(Xf,e,t,n,r),ci=e=>typeof e=="object",Lr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ci(e)&&!ci(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Lr(e[r],t[r]))},UF=(e,t)=>(ci(e)||Array.isArray(e))&&t?e[t]:e,GF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,_l=e=>/[0-9.]+/.test(e),jw=e=>["string","number"].includes(typeof e),Rw=e=>e==null||e?.length===0||e==="",Bw={eq:Lr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:Rw,notEmpty:e=>!Rw(e),in:(e,t)=>Xf(t,n=>Lr(e,n)),notIn:(e,t)=>Hw(t,n=>!Lr(e,n))},YF=e=>{if(e in Bw)return Bw[e];throw new Error("Linq - Symbol not found")},ui=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Ml=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=YF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},KF=(e,t,n,r)=>Ml(ui,e,t,n,r),Hw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},ZF=(e,t,n,r)=>Ml(Hw,e,t,n,r),Ww=e=>{if(e===null)return null;const t=WF({},e);return Object.keys(t).forEach(n=>t[n]=ci(e[n])?Ww(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},qw=(e,t)=>{if(ci(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Lr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Lr(t,r))return!0}return!1},XF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},QF=e=>ui(e,(t,n,r)=>ci(t)?n===r.findIndex(o=>Lr(o,t)):n===r.indexOf(t)),JF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Uw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},eL=(e,t)=>Uw(e,n=>n[t]),Gw=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},tL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},nL=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return _l(e)&&_l(t)?r.map(a=>Number.parseInt(a)):r},Qf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&_l(e)&&_l(t)){const o=[],[i,a]=tL(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return nL(e,t,r)},rL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Qf(r,o,1):Qf(r,i,Number.parseInt(o,10))}return jw(e)&&jw(t)?Qf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Jf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Yw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},oL=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},iL=(e,t,n,r)=>Ml(oL,e,t,n,r),Kw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(GF(t))},Zw=(e=>(e.Asc="asc",e.Desc="desc",e))(Zw||{}),aL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),sL=(e,t)=>e.sort(aL(t)),lL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ui(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},cL=class Hh{constructor(t=[]){this.array=t}static Range(...t){return rL(...t)}static New(t){return new Hh(t)}Where(t,n,r){return this.array=KF(this.array,t,n,r),this}Some(t,n,r){return qF(this.array,t,n,r)}All(t,n,r){return ZF(this.array,t,n,r)}Reverse(){return this.array=Yw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=iL(this.array,t,n,r),this}Distinct(){return this.array=QF(this.array),this}First(t){return t===void 0?this.array[0]:JF(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Jf((n,r)=>n+r,0,this.array):Jf((n,r)=>n+UF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return eL(this.array,t)}GroupWith(t){return Uw(this.array,t)}Except(t){return ui(this.array,n=>!qw(t,n))}Intersect(t){return ui(this.array,n=>qw(t,n))}OrderBy(t,n){let r;return r=t?Kw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Yw(r):r,this}Includes(t){return Xf(this.array,n=>Lr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Jf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Gw(this.array,n=>[t,n]))}Zip(t,n){return Gw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ui(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Hh(Ww(this.array))}ToObject(t){return XF(this.array,t)}Sort(t){return Array.isArray(t)?sL(this.array,t):Kw(this.array,t)}Unique(t){return lL(this.array,t)}},Xw=cL;const Dl=0,Vr=1,di=2,Qw=4;function Jw(e){return()=>e}function uL(e){e()}function ka(e,t){return n=>e(t(n))}function e1(e,t){return()=>e(t)}function dL(e,t){return n=>e(t,n)}function ep(e){return e!==void 0}function fL(...e){return()=>{e.map(uL)}}function fi(){}function Nl(e,t){return t(e),e}function pL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Vr,t)}function ze(e,t){e(Dl,t)}function tp(e){e(di)}function Tt(e){return e(Qw)}function Ie(e,t){return st(e,dL(t,Dl))}function Fn(e,t){const n=e(Vr,r=>{n(),t(r)});return n}function t1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function n1(e,t){return e===t}function xt(e=n1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Me(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ue(e,...t){const n=hL(...t);return((r,o)=>{switch(r){case di:tp(e);return;case Vr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function go(e){return t=>n=>{e>0?e--:t(n)}}function gr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function hL(...e){return t=>e.reduceRight(pL,t)}function mL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Vr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),fi);case di:r(),n=null;return}}}function he(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Dl:t=o;break;case Vr:{o(t);break}case Qw:return t}return n(r,o)})}function Qt(e,t){return Nl(he(t),n=>Ie(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Dl:e.slice().forEach(r=>{r(n)});return;case di:e.splice(0,e.length);return;case Vr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function pn(e){return Nl(Ke(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:gL(),singleton:n}}const gL=()=>Symbol();function vL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{n[a]=l,r=r|s,r===o&&ze(t,n)})}),function(i,a){switch(i){case di:{tp(t);return}case Vr:return r===o&&a(n),st(t,a)}}}function De(e,t=n1){return ue(e,xt(t))}function np(...e){return function(t,n){switch(t){case di:return;case Vr:return fL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const yL={0:"debug",3:"error",1:"log",2:"warn"},bL=()=>typeof globalThis>"u"?window:globalThis,$r=Qe(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=bL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[yL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return rp(e,t,n).callbackRef}function rp(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function r1(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=xL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i?.(s?o1("column-gap",getComputedStyle(u).columnGap,o):o1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return rp(c,n,l)}function xL(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function o1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function op(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=rp(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const tn=Qe(()=>{const e=Ke(),t=Ke(),n=he(0),r=Ke(),o=he(0),i=Ke(),a=Ke(),s=he(0),l=he(0),c=he(0),u=he(0),d=Ke(),f=Ke(),p=he(!1),v=he(!1),g=he(!1);return Ie(ue(e,be(({scrollTop:h})=>h)),t),Ie(ue(e,be(({scrollHeight:h})=>h)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ia={lvl:0};function i1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ft(e){return e===Ia}function Aa(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Aa(e.l,t):Aa(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function hn(e,t,n){return ft(e)?l1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?c1(Rt(e,{l:hn(e.l,t,n)})):c1(Rt(e,{r:hn(e.r,t,n)}))}function pi(){return Ia}function hi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return wL(ap(e,r,n))}function ip(e,t){if(ft(e))return Ia;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=s1(r);return Fl(Rt(e,{k:i,l:a1(r),v:a}))}}else return t<n?Fl(Rt(e,{l:ip(r,t)})):Fl(Rt(e,{r:ip(o,t)}))}function vo(e){return ft(e)?[]:[...vo(e.l),{k:e.k,v:e.v},...vo(e.r)]}function ap(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ap(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ap(i,t,n))),s}function Fl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(sp(t))return u1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(sp(e))return lp(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=sp(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:lp(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return l1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function a1(e){return ft(e.r)?e.l:Fl(Rt(e,{r:a1(e.r)}))}function sp(e){return ft(e)||e.lvl>e.r.lvl}function s1(e){return ft(e.r)?[e.k,e.v]:s1(e.r)}function l1(e,t,n,r=Ia,o=Ia){return{k:e,l:r,lvl:n,r:o,v:t}}function c1(e){return lp(u1(e))}function u1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function lp(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function wL(e){return i1(e,({k:t,v:n})=>({index:t,value:n}))}function d1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Pa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const cp=Qe(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function f1(e,t,n){return e[Ll(e,t,n)]}function Ll(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function SL(e,t,n,r){const o=Ll(e,t,r),i=Ll(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Vl(e){return!ft(e.groupOffsetTree)}function up({index:e},t){return t===e?0:t<e?-1:1}function TL(){return{groupIndices:[],groupOffsetTree:pi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:pi()}}function EL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=hn(e,0,i);continue}const s=hi(e,a-1,o+1);if(s.some(_L(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=ip(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=hn(e,o+1,f));c&&(e=hn(e,a,i))}return[e,n]}function CL(e){return typeof e.groupIndex<"u"}function kL({offset:e},t){return t===e?0:t<e?-1:1}function Oa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=f1(t,e,up),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function p1(e,t){if(!Vl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function h1(e,t,n){if(CL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=p1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function IL(e,t,n,r=0){return r>0&&(t=Math.max(t,f1(e,r,up).offset)),i1(SL(e,t,n,kL),OL)}function AL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,g)=>hn(hn(v,g,f),g+1,p),a)}else[a,s]=EL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=dp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>hn(f,p,Oa(p,d,o)),pi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function PL(e){return vo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function m1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function dp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Ll(o,t-1,up),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of hi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function OL(e){return{index:e.index,value:e}}function _L(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const ML={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Qt(r,0),i=Ke(),a=Ke(),s=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),p=he((w,C)=>Vn(w,ML[C])),v=he(void 0),g=he(0),h=TL(),y=Qt(ue(n,He(l,e,g),Qn(AL,h),xt()),h),b=Qt(ue(l,xt(),Qn((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ue(l,Me(w=>w.length>0),He(y,g),be(([w,C,P])=>{const _=w.reduce((F,V,N)=>hn(F,V,Oa(V,C.offsetTree,P)||N),pi());return{...C,groupIndices:w,groupOffsetTree:_}})),y),Ie(ue(r,He(y),Me(([w,{lastIndex:C}])=>w<C),be(([w,{lastIndex:C,lastSize:P}])=>[{endIndex:C,size:P,startIndex:w}])),n),Ie(c,u);const x=Qt(ue(c,be(w=>w===void 0)),!0);Ie(ue(u,Me(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const C=Tt(d),P=Tt(l).length>0;return C?P?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ue(f,Me(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const C=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const V=w[F];V!==P&&(C.push({endIndex:F-1,size:P,startIndex:_}),P=V,_=F)}return C.push({endIndex:w.length-1,size:P,startIndex:_}),C})),n),Ie(ue(l,He(d,u),Me(([,w,C])=>w!==void 0&&C!==void 0),be(([w,C,P])=>{const _=[];for(let F=0;F<w.length;F++){const V=w[F],N=w[F+1];_.push({startIndex:V,endIndex:V,size:C}),N!==void 0&&_.push({startIndex:V+1,endIndex:N-1,size:P})}return _})),n);const T=pn(ue(n,He(y),Qn(({sizes:w},[C,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:h}),be(w=>w.changed)));st(ue(s,Qn((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:C}=Tt(y);if(w>0)ze(t,!0),ze(i,w+m1(w,C));else if(w<0){const P=Tt(b);P.length>0&&(w-=m1(-w,P)),ze(a,w)}}),st(ue(s,He(e)),([w,C])=>{w<0&&C("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},sn.ERROR)});const E=pn(i);Ie(ue(i,He(y),be(([w,C])=>{const P=C.groupIndices.length>0,_=[],F=C.lastSize;if(P){const V=Aa(C.sizeTree,0);let N=0,O=0;for(;N<w;){const z=C.groupIndices[O],M=C.groupIndices.length===O+1?1/0:C.groupIndices[O+1]-z-1;_.push({endIndex:z,size:V,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,N+=M+1}const D=vo(C.sizeTree);return N!==w&&D.shift(),D.reduce((z,{k:M,v:k})=>{let L=z.ranges;return z.prevSize!==0&&(L=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:k,ranges:L}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return vo(C.sizeTree).reduce((V,{k:N,v:O})=>({prevIndex:N+w,prevSize:O,ranges:[...V.ranges,{endIndex:N+w-1,size:V.prevSize,startIndex:V.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=pn(ue(a,He(y,g),be(([w,{offsetTree:C},P])=>{const _=-w;return Oa(_,C,P)})));return Ie(ue(a,He(y,g),be(([w,C,P])=>{if(C.groupIndices.length>0){if(ft(C.sizeTree))return C;let _=pi();const F=Tt(b);let V=0,N=0,O=0;for(;V<-w;){O=F[N];const D=F[N+1]-O-1;N++,V+=D+1}if(_=vo(C.sizeTree).reduce((D,{k:z,v:M})=>hn(D,Math.max(0,z+w),M),_),V!==-w){const D=Aa(C.sizeTree,O);_=hn(_,0,D);const z=Ln(C.sizeTree,-w+1)[1];_=hn(_,1,z)}return{...C,sizeTree:_,...dp(C.offsetTree,0,_,P)}}else{const _=vo(C.sizeTree).reduce((F,{k:V,v:N})=>hn(F,Math.max(0,V+w),N),pi());return{...C,sizeTree:_,...dp(C.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:E,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:g,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:T,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt($r,cp),{singleton:!0});function DL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const g1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),a=Ke(),s=pn(ue(i,be(DL)));return Ie(ue(s,be(l=>l.totalCount)),n),Ie(ue(s,be(l=>l.groupIndices)),e),Ie(ue(Vt(o,t,r),Me(([l,c])=>Vl(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),zr=Qe(([{log:e}])=>{const t=he(!1),n=pn(ue(t,Me(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt($r),{singleton:!0}),NL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function v1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!NL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const _a=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ke(),v=Ke(),g=he(0);let h=null,y=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),ze(l,!1)}return Ie(ue(p,He(n,d,r,g,s,a,f),He(e,i,o),be(([[T,E,I,w,C,P,_,F],V,N,O])=>{const D=v1(T),{align:z,behavior:M,offset:k}=D,L=w-1,$=h1(D,E,L);let B=Oa($,E.offsetTree,V)+P;z==="end"?(B+=N+Ln(E.sizeTree,$)[1]-I+O,$===L&&(B+=_)):z==="center"?B+=(N+Ln(E.sizeTree,$)[1]-I+O)/2:B-=C,k&&(B+=k);const q=G=>{x(),G?(F("retrying to scroll to",{location:T},sn.DEBUG),ze(p,T)):(ze(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(x(),M==="smooth"){let G=!1;b=st(t,W=>{G=G||W}),h=Fn(u,()=>{q(G)})}else h=Fn(ue(t,FL(150)),q);return y=setTimeout(()=>{x()},1200),ze(l,!0),F("scrolling from index to",{behavior:M,index:$,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:g}},bt(er,tn,$r),{singleton:!0});function FL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function fp(e,t){e==0?t():requestAnimationFrame(()=>{fp(e-1,t)})}function pp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ma=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=he(!0),l=he(0),c=he(!0);return Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),s),Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),c),st(ue(Vt(t,a),He(s,n,e,c),Me(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||ep(p))&&!d&&!v),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),fp(4,()=>{Fn(r,()=>{ze(s,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,_a,zr),{singleton:!0});function y1(e,t){return Math.abs(e-t)<1.01}const Da="up",Na="down",LL="none",VL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},$L=0,Fa=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=he(!1),s=he(!0),l=Ke(),c=Ke(),u=he(4),d=he($L),f=Qt(ue(np(ue(De(o),go(1),Xn(!0)),ue(De(o),go(1),Xn(!1),t1(100))),xt()),!1),p=Qt(ue(np(ue(n,Xn(!0)),ue(n,Xn(!1),t1(200))),xt()),!1);Ie(ue(Vt(De(o),De(d)),be(([b,x])=>b<=x),xt()),s),Ie(ue(s,gr(50)),c);const v=pn(ue(Vt(r,De(i),De(t),De(e),De(u)),Qn((b,[{scrollHeight:x,scrollTop:T},E,I,w,C])=>{const P=T+E-x>-C,_={scrollHeight:x,scrollTop:T,viewportHeight:E};if(P){let V,N;return T>b.state.scrollTop?(V="SCROLLED_DOWN",N=b.state.scrollTop-T):(V="SIZE_DECREASED",N=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:N,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":E<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},VL),xt((b,x)=>b&&b.atBottom===x.atBottom))),g=Qt(ue(r,Qn((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if(y1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const I=x-(T+E)<1;return b.scrollTop!==T&&I?{changed:!0,jump:b.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Me(b=>b.changed),be(b=>b.jump)),0);Ie(ue(v,be(b=>b.atBottom)),a),Ie(ue(a,gr(50)),l);const h=he(Na);Ie(ue(r,be(({scrollTop:b})=>b),xt(),Qn((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Da:Na,prevScrollTop:x},{direction:Na,prevScrollTop:0}),be(b=>b.direction)),h),Ie(ue(r,gr(50),Xn(LL)),h);const y=he(0);return Ie(ue(f,Me(b=>!b),Xn(0)),y),Ie(ue(o,gr(100),He(f),Me(([b,x])=>x),Qn(([b,x],[T])=>[x,T],[0,0]),be(([b,x])=>x-b)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},bt(tn)),La="top",Va="bottom",b1="none";function x1(e,t,n){return typeof e=="number"?n===Da&&t===La||n===Na&&t===Va?e:0:n===Da?t===La?e.main:e.reverse:t===Va?e.main:e.reverse}function w1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const hp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),a=he(0),s=he(0),l=he(0),c=Qt(ue(Vt(De(r),De(o),De(n),De(i,Pa),De(l),De(a),De(t),De(e),De(s)),be(([u,d,f,[p,v],g,h,y,b,x])=>{const T=u-b,E=h+y,I=Math.max(f-T,0);let w=b1;const C=w1(x,La),P=w1(x,Va);return p-=b,p+=f+y,v+=f+y,v-=b,p>u+E-C&&(w=Da),v<u-I+d+P&&(w=Na),w!==b1?[Math.max(T-f-x1(g,La,w)-C,0),T-I-y+d+x1(g,Va,w)+P]:null}),Me(u=>u!=null),xt(Pa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function zL(e,t,n){if(Vl(t)){const r=p1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const mp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function $l(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:T1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:T1(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function S1(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=pp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return $l(c,[],s,o,n,r)}function T1(e,t,n){if(e.length===0)return[];if(!Vl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=hi(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function E1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const yo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const g=he([]),h=he(0),y=Ke(),b=he(0);Ie(i.topItemsIndexes,g);const x=Qt(ue(Vt(p,v,De(l,Pa),De(o),De(r),De(c),u,De(g),De(t),De(n),De(b),e),Me(([w,C,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!C&&!F}),be(([,,[w,C],P,_,F,V,N,O,D,z,M])=>{var k,L,$,B;const q=_,{offsetTree:G,sizeTree:W}=q,J=Tt(h);if(P===0)return{...mp,totalCount:P};if(w===0&&C===0)return J===0?{...mp,totalCount:P}:S1(J,F,_,O,D,M||[]);if(ft(W))return J>0?null:$l(zL(pp(F,P),q,M),[],P,D,q,O);const re=[];if(N.length>0){const se=N[0],ae=N[N.length-1];let Q=0;for(const le of hi(W,se,ae)){const te=le.value,fe=Math.max(le.start,se),pe=Math.min(le.end,ae);for(let ve=fe;ve<=pe;ve++)re.push({data:M?.[ve],index:ve,offset:Q,size:te}),Q+=te}}if(!V)return $l([],re,P,D,q,O);const ee=N.length>0?N[N.length-1]+1:0,Y=IL(G,w,C,ee);if(Y.length===0)return null;const K=P-1,X=Nl([],se=>{for(const ae of Y){const Q=ae.value;let le=Q.offset,te=ae.start;const fe=Q.size;if(Q.offset<w){te+=Math.floor((w-Q.offset+D)/(fe+D));const ve=te-ae.start;le+=ve*fe+ve*D}te<ee&&(le+=(ee-te)*fe,te=ee);const pe=Math.min(ae.end,K);for(let ve=te;ve<=pe&&!(le>=C);ve++)se.push({data:M?.[ve],index:ve,offset:le,size:fe}),le+=fe+D}}),de=E1(z,La),H=E1(z,Va);if(X.length>0&&(de>0||H>0)){const se=X[0],ae=X[X.length-1];if(de>0&&se.index>ee){const Q=Math.min(de,se.index-ee),le=[];let te=se.offset;for(let fe=se.index-1;fe>=se.index-Q;fe--){const pe=(L=(k=hi(W,fe,fe)[0])==null?void 0:k.value)!=null?L:se.size;te-=pe+D,le.unshift({data:M?.[fe],index:fe,offset:te,size:pe})}X.unshift(...le)}if(H>0&&ae.index<K){const Q=Math.min(H,K-ae.index);let le=ae.offset+ae.size+D;for(let te=ae.index+1;te<=ae.index+Q;te++){const fe=(B=($=hi(W,te,te)[0])==null?void 0:$.value)!=null?B:ae.size;X.push({data:M?.[te],index:te,offset:le,size:fe}),le+=fe+D}}}return $l(X,re,P,D,q,O)}),Me(w=>w!==null),xt()),mp);Ie(ue(e,Me(ep),be(w=>w?.length)),o),Ie(ue(x,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ue(x,be(w=>[w.top,w.bottom])),a),Ie(ue(x,be(w=>w.items)),y);const T=pn(ue(x,Me(({items:w})=>w.length>0),He(o,e),Me(([{items:w},C])=>w[w.length-1].originalIndex===C-1),be(([,w,C])=>[w-1,C]),xt(Pa),be(([w])=>w))),E=pn(ue(x,gr(200),Me(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),be(({items:w})=>w[0].index),xt())),I=pn(ue(x,Me(({items:w})=>w.length>0),be(({items:w})=>{let C=0,P=w.length-1;for(;w[C].type==="group"&&C<P;)C++;for(;w[P].type==="group"&&P>C;)P--;return{endIndex:w[P].index,startIndex:w[C].index}}),xt(d1)));return{endReached:T,initialItemCount:h,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:g,...f}},bt(er,g1,hp,Ma,_a,Fa,zr,cp),{singleton:!0}),C1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),a=Qt(ue(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(De(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,yo),{singleton:!0}),jL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Qt(ue(Vt(n,e,t),Me(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),gr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,C1),{singleton:!0}),k1=Qe(()=>({context:he(null)})),RL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,I1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ie(ue(u,He(t,l,n,i,o,r,s),He(e),be(([[d,f,p,v,g,h,y,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=RL,done:w,...C}=d,P=h1(d,f,v-1),_=Oa(P,f.offsetTree,x)+g+h,F=_+Ln(f.sizeTree,P)[1],V=b+h,N=b+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:T,behavior:E,...C},viewportBottom:N,viewportTop:V});return O?w&&Fn(ue(a,Me(D=>!D),go(Tt(a)?1:2)),w):w?.(),O}),Me(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,_a,yo,$r),{singleton:!0});function A1(e){return e?e==="smooth"?"smooth":"auto":!1}const BL=(e,t)=>typeof e=="function"?A1(e(t)):t&&A1(e),HL=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const v=he(!1),g=Ke();let h=null;function y(E){ze(a,{align:"end",behavior:E,index:"LAST"})}st(ue(Vt(ue(De(t),go(1)),l),He(De(v),i,s,d),be(([[E,I],w,C,P,_])=>{let F=I&&P,V="auto";return F&&(V=BL(w,C||_),F=F&&!!V),{followOutputBehavior:V,shouldFollow:F,totalCount:E}}),Me(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E)}):h=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E),h=null})});function b(E){const I=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ue(Vt(De(v),t,c),Me(([E,,I])=>E&&I),Qn(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),Me(({refreshed:E})=>E),He(v,t)),([,E])=>{Tt(s)&&b(E!==!1)}),st(g,()=>{b(Tt(v)!==!1)}),st(Vt(De(v),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=he(null),T=Ke();return Ie(np(ue(De(r),be(E=>{var I;return(I=E?.length)!=null?I:0})),ue(De(t))),T),st(ue(Vt(ue(T,go(1)),l),He(De(x),s,d,f),be(([[E,I],w,C,P,_])=>I&&C&&w?.({context:_,totalCount:E,scrollingInProgress:P})),Me(E=>!!E),gr(0)),E=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,E)}):h=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,E),h=null})}),{autoscrollToBottom:g,followOutput:v,scrollIntoViewOnChange:x}},bt(er,Fa,_a,Ma,zr,$r,tn,k1,I1)),WL=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ue(s,He(i),Me(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>S1(l,c,u,d,f,p))),a),{}),bt(er,Ma,yo,zr),{singleton:!0}),qL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return st(ue(e,He(r),Me(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ue(n,go(1),Me(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(zr,tn,yo),{singleton:!0}),P1=Qe(([{scrollVelocity:e}])=>{const t=he(!1),n=Ke(),r=he(!1);return Ie(ue(e,He(r,t,n),Me(([o,i])=>!!i),be(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),xt()),t),st(ue(Vt(t,e,n),He(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Fa),{singleton:!0}),gp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=he(!1),a=he(void 0);return Ie(ue(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ue(t,He(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),UL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ke(),u=he(void 0),d=he(null),f=he(null);return Ie(s,d),Ie(l,f),st(ue(c,He(t,r,a,d,f,n)),([p,v,g,h,y,b,x])=>{const T=PL(v.sizeTree);h&&y!==null&&b!==null&&(g=y.scrollTop-b.offsetTop),g-=x,p({ranges:T,scrollTop:g})}),Ie(ue(u,Me(ep),be(GL)),o),Ie(ue(i,He(u),Me(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,Ma,zr,gp));function GL(e){return{align:"start",index:0,offset:e.scrollTop}}const YL=Qe(([{topItemsIndexes:e}])=>{const t=he(0);return Ie(ue(t,Me(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(yo));function O1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const KL=O1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ZL=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:v}])=>{const g=pn(ue(l,He(a),Qn(([,y,b,x],[{bottom:T,items:E,offsetBottom:I,totalCount:w},C])=>{const P=T+I;let _=0;return b===w&&y.length>0&&E.length>0&&(E[0].originalIndex===0&&y[0].originalIndex===0||(_=P-x,_!==0&&(_+=C))),[_,E,w,P]},[0,[],0,0]),Me(([y])=>y!==0),He(r,s,n,o,p,v),Me(([,y,b,x,,,T])=>!T&&!x&&y!==0&&b===Da),be(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function h(y){y>0?(ze(t,{behavior:"auto",top:-y}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-y}))}return st(ue(g,He(e,i)),([y,b,x])=>{x&&KL()?ze(e,b-y):h(-y)}),st(ue(Vt(Qt(i,!1),e,v),Me(([y,b,x])=>!y&&!x&&b!==0),be(([y,b])=>b),gr(1)),h),Ie(ue(d,be(y=>({top:-y}))),t),st(ue(c,He(f,u),be(([y,{groupIndices:b,lastSize:x,sizeTree:T},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(y);{let w=0;const C=Aa(T,0);let P=0,_=0;for(;P<y;){P++,w+=C;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;P+F>y&&(w-=C,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{ze(e,y),requestAnimationFrame(()=>{ze(t,{top:y}),requestAnimationFrame(()=>{ze(e,0),ze(v,!1)})})}),{deviation:e}},bt(tn,Fa,yo,er,$r,cp)),XL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(hp,WL,zr,P1,C1,qL,jL,gp,I1,$r,k1)),_1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:g,scrolledToInitialItem:h},y,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:C},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:V,rangeChanged:N,...O}=T;return Ie(N,P.scrollSeekRangeChanged),Ie(ue(P.windowViewportRect,be(D=>D.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:g,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:V,totalCount:f,...x,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:N,...O,...P,...y,sizes:u,...b}},bt(er,Ma,tn,UL,HL,yo,_a,ZL,YL,g1,XL));function QL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const zl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function vp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(h,y){h.propsReady&&ze(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];ze(x,y[b])}for(const b of o)if(b in y){const x=h[t.optional[b]];ze(x,y[b])}h.propsReady&&ze(h.propsReady,!0)}function c(h){return i.reduce((y,b)=>(y[b]=x=>{const T=h[t.methods[b]];ze(T,x)},y),{})}function u(h){return a.reduce((y,b)=>(y[b]=mL(h[t.events[b]]),y),{})}const d=S.forwardRef((h,y)=>{const{children:b,...x}=h,[T]=S.useState(()=>Nl(vL(e),w=>{l(w,x)})),[E]=S.useState(e1(u,T));zl(()=>{for(const w of a)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(tp)}},[x,E,T]),zl(()=>{l(T,x)}),S.useImperativeHandle(y,Jw(c(T)));const I=n;return m.jsx(s.Provider,{value:T,children:n?m.jsx(I,{...QL([...r,...o,...a],x),children:b}):b})}),f=h=>{const y=S.useContext(s);return S.useCallback(b=>{ze(y[h],b)},[y,h])},p=h=>{const y=S.useContext(s)[h],b=S.useCallback(x=>st(y,x),[y]);return S.useSyncExternalStore(b,()=>Tt(y),()=>Tt(y))},v=h=>{const y=S.useContext(s)[h],[b,x]=S.useState(e1(Tt,y));return zl(()=>st(y,T=>{T!==b&&x(Jw(T))}),[y,b]),b},g=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(h,y)=>{const b=S.useContext(s)[h];zl(()=>st(b,y),[y,b])},useEmitterValue:g,usePublisher:f}}const jl=S.createContext(void 0),M1=S.createContext(void 0),D1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function yp(e){return"self"in e}function JL(e){return"body"in e}function N1(e,t,n,r=fi,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,g;const h=f.target;if(JL(h)||yp(h)){const b=yp(h)?h:h.defaultView;g=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,v=i?b.innerWidth:b.innerHeight}else g=i?h.scrollLeft:h.scrollTop,p=i?h.scrollWidth:h.scrollHeight,v=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(g,0),viewportHeight:v})};f.suppressFlushSync?y():Li.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let g,h,y;yp(p)?(h=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),g=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(h=p[i?"scrollWidth":"scrollHeight"],g=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const b=h-g;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),y1(g,h)||f.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const bp="-webkit-sticky",F1="sticky",xp=O1(()=>{if(typeof document>"u")return F1;const e=document.createElement("div");return e.style.position=bp,e.style.position===bp?bp:F1});function wp(e){return e}const eV=Qe(()=>{const e=he(s=>`Item ${s}`),t=he(s=>`Group ${s}`),n=he({}),r=he(wp),o=he("div"),i=he(fi),a=(s,l=null)=>Qt(ue(n,be(c=>c[s]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),tV=Qe(([e,t])=>({...e,...t}),bt(_1,eV)),nV=({height:e})=>m.jsx("div",{style:{height:e}}),rV={overflowAnchor:"none",position:xp(),zIndex:1},L1={overflowAnchor:"none"},oV={...L1,display:"inline-block",height:"100%"},V1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=wn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=wn("gap"),g=Fe("horizontalDirection"),{callbackRef:h}=r1(n,f,d,e?fi:s,p,v,o,g,Fe("skipAnimationFrameInResizeObserver")),[y,b]=S.useState(0);Ep("deviation",O=>{y!==O&&b(O)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||nV,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),C=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),V=Fe("initialItemFinalLocationReached"),N=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...wt(x,c)}):m.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:N,children:(e?t.topItems:t.items).map(O=>{const D=O.originalIndex,z=C(D+t.firstItemIndex,O.data,c);return P?S.createElement(T,{...wt(T,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":D,"data-item-index":O.index,"data-known-size":O.size,key:z,style:rV},u(O.index,c)):S.createElement(I,{...wt(I,c),...$1(I,O.data),"data-index":D,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:g?oV:L1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),iV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},aV={outline:"none",overflowX:"auto",position:"relative"},mi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),sV={position:xp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function $1(e,t){return{item:typeof e=="string"?void 0:t}}const lV=S.memo(function(){const e=Fe("HeaderComponent"),t=wn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),cV=S.memo(function(){const e=Fe("FooterComponent"),t=wn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null});function Sp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=N1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),m.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?aV:iV,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function Tp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=N1(s,c,l,v,f);return D1(()=>{var b;return h.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",y),e("scrollBy",g),m.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const uV=({children:e})=>{const t=S.useContext(jl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:mi(o),children:e})},dV=({children:e})=>{const t=S.useContext(jl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Fe("customScrollParent"),i=op(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),m.jsx("div",{"data-viewport-type":"window",ref:i,style:mi(a),children:e})},fV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...sV,marginTop:`${n}px`},o=Fe("context");return m.jsx(t,{style:r,...wt(t,o),children:e})},pV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return m.jsxs(r||t?gV:mV,{...e,context:o,children:[n&&m.jsx(fV,{children:m.jsx(V1,{showTopList:!0})}),m.jsxs(r||t?dV:uV,{children:[m.jsx(lV,{}),m.jsx(V1,{}),m.jsx(cV,{})]})]})}),{Component:hV,useEmitter:Ep,useEmitterValue:Fe,usePublisher:wn}=vp(tV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},pV),mV=Sp({useEmitter:Ep,useEmitterValue:Fe,usePublisher:wn}),gV=Tp({useEmitter:Ep,useEmitterValue:Fe,usePublisher:wn}),Cp=hV,vV=Qe(()=>{const e=he(c=>m.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),a=he(wp),s=he(fi),l=(c,u=null)=>Qt(ue(i,be(d=>d[c]),xt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),yV=Qe(([e,t])=>({...e,...t}),bt(_1,vV)),bV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),xV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),wV={overflowAnchor:"none"},z1={position:xp(),zIndex:2,overflowAnchor:"none"},j1=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),a=je("fixedHeaderHeight"),s=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||bV,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((g,h,y)=>(y===0?g.push(h.size):g.push(g[y-1]+h.size),g),[]),v=(e?t.topItems:t.items).map(g=>{const h=g.originalIndex,y=n(h+r,g.data,o),b=e?h===0?0:p[h-1]:0;return i?S.createElement(u,{...wt(u,o),height:g.size,index:g.index,key:y,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...wt(d,o),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,key:y,style:{...z1,top:a}},c(g.index,o)):S.createElement(f,{...wt(f,o),...$1(f,g.data),"data-index":h,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:y,style:e?{...z1,top:a+b}:wV},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:v})}),SV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=r1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);kp("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const g=je("EmptyPlaceholder"),h=je("FillerRow")||xV,y=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),T=je("context");if(x===0&&g)return m.jsx(g,{...wt(g,T)});const E=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+b+p-E,w=e.offsetBottom,C=I>0?m.jsx(h,{context:T,height:I},"padding-top"):null,P=w>0?m.jsx(h,{context:T,height:w},"padding-bottom"):null;return m.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,T),children:[C,t&&m.jsx(j1,{showTopList:!0}),m.jsx(j1,{}),P]})}),TV=({children:e})=>{const t=S.useContext(jl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:mi(!1),children:e})},EV=({children:e})=>{const t=S.useContext(jl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=op(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),m.jsx("div",{"data-viewport-type":"window",ref:i,style:mi(!1),children:e})},CV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?AV:IV,d=n||t?EV:TV,f=je("TableComponent"),p=je("TableHeadComponent"),v=je("TableFooterComponent"),g=i?m.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,h=a?m.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...wt(u,s),children:m.jsx(d,{children:m.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[g,m.jsx(SV,{},"TableBody"),h]})})})}),{Component:kV,useEmitter:kp,useEmitterValue:je,usePublisher:$n}=vp(yV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},CV),IV=Sp({useEmitter:kp,useEmitterValue:je,usePublisher:$n}),AV=Tp({useEmitter:kp,useEmitterValue:je,usePublisher:$n}),PV=kV,R1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},OV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:B1,floor:Rl,max:$a,min:Ip,round:H1}=Math;function W1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function _V(e){return{...OV,items:e}}function Bl(e,t){return e&&e.width===t.width&&e.height===t.height}function MV(e,t){return e&&e.column===t.column&&e.row===t.row}const DV=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:v,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=he(0),w=he(0),C=he(R1),P=he({height:0,width:0}),_=he({height:0,width:0}),F=Ke(),V=Ke(),N=he(0),O=he(null),D=he({column:0,row:0}),z=Ke(),M=Ke(),k=he(!1),L=he(0),$=he(!0),B=he(!1),q=he(!1);st(ue(v,He(L),Me(([Y,K])=>!!K)),()=>{ze($,!1)}),st(ue(Vt(v,$,_,P,L,B),Me(([Y,K,X,de,,H])=>Y&&!K&&X.height!==0&&de.height!==0&&!H)),([,,,,Y])=>{ze(B,!0),fp(1,()=>{ze(F,Y)}),Fn(ue(c),()=>{ze(t,[0,0]),ze($,!0)})}),Ie(ue(M,Me(Y=>Y!=null&&Y.scrollTop>0),Xn(0)),w),st(ue(v,He(M),Me(([,Y])=>Y!=null)),([,Y])=>{Y&&(ze(P,Y.viewport),ze(_,Y.item),ze(D,Y.gap),Y.scrollTop>0&&(ze(k,!0),Fn(ue(c,go(1)),K=>{ze(k,!1)}),ze(l,{top:Y.scrollTop})))}),Ie(ue(P,be(({height:Y})=>Y)),d),Ie(ue(Vt(De(P,Bl),De(_,Bl),De(D,(Y,K)=>Y&&Y.column===K.column&&Y.row===K.row),De(c)),be(([Y,K,X,de])=>({gap:X,item:K,scrollTop:de,viewport:Y}))),z),Ie(ue(Vt(De(I),r,De(D,MV),De(_,Bl),De(P,Bl),De(O),De(w),De(k),De($),De(L)),Me(([,,,,,,,Y])=>!Y),be(([Y,[K,X],de,H,se,ae,Q,,le,te])=>{const{column:fe,row:pe}=de,{height:ve,width:Ae}=H,{width:me}=se;if(Q===0&&(Y===0||me===0))return R1;if(Ae===0){const qe=pp(te,Y),pt=qe+Math.max(Q-1,0);return _V(W1(qe,pt,ae))}const oe=q1(me,Ae,fe);let j,R;le?K===0&&X===0&&Q>0?(j=0,R=Q-1):(j=oe*Rl((K+pe)/(ve+pe)),R=oe*B1((X+pe)/(ve+pe))-1,R=Ip(Y-1,$a(R,oe-1)),j=Ip(R,$a(0,j))):(j=0,R=-1);const ne=W1(j,R,ae),{bottom:ce,top:xe}=U1(se,de,H,ne),ke=B1(Y/oe),_e=ke*ve+(ke-1)*pe-ce;return{bottom:ce,itemHeight:ve,items:ne,itemWidth:Ae,offsetBottom:_e,offsetTop:xe,top:xe}})),C),Ie(ue(O,Me(Y=>Y!==null),be(Y=>Y.length)),I),Ie(ue(Vt(P,_,C,D),Me(([Y,K,{items:X}])=>X.length>0&&K.height!==0&&Y.height!==0),be(([Y,K,{items:X},de])=>{const{bottom:H,top:se}=U1(Y,de,K,X);return[se,H]}),xt(Pa)),t);const G=he(!1);Ie(ue(c,He(G),be(([Y,K])=>K||Y!==0)),G);const W=pn(ue(Vt(C,I),Me(([{items:Y}])=>Y.length>0),He(G),Me(([[Y,K],X])=>{const de=Y.items[Y.items.length-1].index===K-1;return(X||Y.bottom>0&&Y.itemHeight>0&&Y.offsetBottom===0&&Y.items.length===K)&&de}),be(([[,Y]])=>Y-1),xt())),J=pn(ue(De(C),Me(({items:Y})=>Y.length>0&&Y[0].index===0),Xn(0),xt())),re=pn(ue(De(C),He(k),Me(([{items:Y},K])=>Y.length>0&&!K),be(([{items:Y}])=>({endIndex:Y[Y.length-1].index,startIndex:Y[0].index})),xt(d1),gr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ue(F,He(P,_,I,D),be(([Y,K,X,de,H])=>{const se=v1(Y),{align:ae,behavior:Q,offset:le}=se;let te=se.index;te==="LAST"&&(te=de-1),te=$a(0,te,Ip(de-1,te));let fe=Ap(K,H,X,te);return ae==="end"?fe=H1(fe-K.height+X.height):ae==="center"&&(fe=H1(fe-K.height/2+X.height/2)),le&&(fe+=le),{behavior:Q,top:fe}})),l);const ee=Qt(ue(C,be(Y=>Y.offsetBottom+Y.bottom)),0);return Ie(ue(T,be(Y=>({height:Y.visibleHeight,width:Y.visibleWidth}))),P),{customScrollParent:h,data:O,deviation:N,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T,...p,gridState:C,horizontalDirection:q,initialTopMostItemIndex:L,totalListHeight:ee,...f,endReached:W,propsReady:g,rangeChanged:re,startReached:J,stateChanged:z,stateRestoreInProgress:k,...E}},bt(hp,tn,Fa,P1,zr,gp,$r));function q1(e,t,n){return $a(1,Rl((e+n)/(Rl(t)+n)))}function U1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Ap(e,t,n,r[0].index);return{bottom:Ap(e,t,n,r[r.length-1].index)+o,top:i}}function Ap(e,t,n,r){const o=q1(e.width,n.width,t.column),i=Rl(r/o),a=i*n.height+$a(0,i-1)*t.row;return a>0?a+t.row:a}const NV=Qe(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(wp),a=he("div"),s=he(fi),l=(d,f=null)=>Qt(ue(t,be(p=>p[d]),xt()),f),c=he(!1),u=he(!1);return Ie(De(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),FV=Qe(([e,t])=>({...e,...t}),bt(DV,NV)),LV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=Sn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),g=Sn("reportReadyState"),h=Jn(S.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const x=y.firstChild;if(x){const{height:T,width:E}=x.getBoundingClientRect();d({height:T,width:E})}f({column:Y1("column-gap",getComputedStyle(y).columnGap,p),row:Y1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return D1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),v?null:m.jsx(l,{className:t,ref:h,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const b=o(y.index,y.data,u);return i?m.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),VV=S.memo(function(){const e=Et("HeaderComponent"),t=Sn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),$V=S.memo(function(){const e=Et("FooterComponent"),t=Sn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...wt(e,o)})}):null}),zV=({children:e})=>{const t=S.useContext(M1),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=Jn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),m.jsx("div",{ref:o,style:mi(!1),children:e})},jV=({children:e})=>{const t=S.useContext(M1),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=Et("customScrollParent"),i=op(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),m.jsx("div",{ref:i,style:mi(!1),children:e})},RV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?HV:BV,o=n||t?jV:zV,i=Et("context");return m.jsx(r,{...e,...wt(r,i),children:m.jsxs(o,{children:[m.jsx(VV,{}),m.jsx(LV,{}),m.jsx($V,{})]})})}),{useEmitter:G1,useEmitterValue:Et,usePublisher:Sn}=vp(FV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},RV),BV=Sp({useEmitter:G1,useEmitterValue:Et,usePublisher:Sn}),HV=Tp({useEmitter:G1,useEmitterValue:Et,usePublisher:Sn});function Y1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const K1=e=>{const t=e.Icon??_g,n=Pt();return m.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[m.jsx(t,{size:64,className:"text-disabled"}),m.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Pp=m.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),za=e=>m.jsx(ln,{...e,as:e.as||"span",className:Pe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function WV(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const qV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>WV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return m.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[m.jsx("p",{children:m.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?m.jsxs(S.Fragment,{children:[m.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),m.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>m.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),m.jsx("nav",{children:m.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?m.jsx("li",{children:m.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:m.jsx(S.Fragment,{children:typeof i=="string"?m.jsx("li",{children:"..."}):m.jsx("li",{children:m.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?m.jsx("li",{children:m.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},UV=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),m.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:m.jsx("div",{ref:n,className:"block isolate",children:e.children})})},GV=(e,t,n)=>{const r=n.cols,o=n.loading;return m.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=td(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?m.jsx(UV,{children:m.jsx(f,{col:i,row:t,rowIndex:e})}):null,m.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),m.jsx("span",{className:"relative",children:o?Pp:c?m.jsx(S.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},gi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[zo(10),Ns({fallbackAxisSideDirection:"end"}),Ds(),Wu({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:to,onOpenChange:(v,g)=>{const h=g?.relatedTarget;h&&h.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=Ro(l),u=Ir(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return m.jsxs(S.Fragment,{children:[m.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(oo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[m.jsx(qu,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),m.jsx("header",{className:"mb-2",children:m.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Op={},Z1;function YV(){return Z1||(Z1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const b=y.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((y,b)=>({...y,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=f.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},p=h=>{const y=new Set,b=x=>{h().removeItem(x);const T=i(h());y.forEach(E=>E(T))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),b),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),y.forEach(E=>E(h()))}}},v=p(()=>window.sessionStorage),g=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=g,e.SessionStorage=v,e.createStorage=p})(Op)),Op}var ja=YV();const _p=e=>e.headerLabel??e.thead??e.id,Mp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var vi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(vi||{});const Dp=e=>e.type==="number"?e.valueAsNumber:e.value,KV=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},ZV={},XV=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},QV=(e,t,n=ZV)=>{const r=Ar()?null:ja.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Zf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:XV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Ar()||ja.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},JV=e=>{const t=_r(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},e$=()=>Ar()?void 0:document.querySelector('[data-component="modal-body"]'),t$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),n$=(e,t)=>e.toSorted(t$(t)),X1=(e,t,n)=>({label:t,id:Ho(),type:n,value:e.id}),r$=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,X1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return m.jsx(S.Fragment,{children:m.jsx(gi,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(Ag,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:m.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>m.jsxs("li",{className:"flex flex-nowrap gap-3",children:[m.jsx(io,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(io,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),m.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:m.jsx(ls,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[m.jsx(wu,{size:14})," ",t.tableSortAddButton]})})]})})})},o$=e=>{const t=Pt(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=X1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=_p(e.col);return m.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[m.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?m.jsx(Xk,{size:14}):null,n==="desc"?m.jsx(Zk,{size:14}):null,n==="undefined"?m.jsx(Ag,{size:14}):null]})},Q1=S.createContext({}),i$=Q1.Provider,a$=()=>S.useContext(Q1),Np=(e,t,n,r={})=>{const o=e.id,i=e.type??vi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Ho(),operation:l,label:_p(e),name:o,type:i,value:"",...r}},Fp=()=>{const e=Pt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[vi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[vi.Boolean]:[t.is,t.isNot],[vi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},s$=e=>{const t=Pt(),n=Fp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Np(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return Np(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=Dp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return m.jsx(S.Fragment,{children:m.jsx(gi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(sI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:m.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return m.jsxs("li",{className:"flex flex-nowrap gap-3",children:[m.jsx(io,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(io,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(qo,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),m.jsx("div",{className:"flex justify-center items-center mt-5",children:m.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:m.jsx(ls,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[m.jsx(wu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},l$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Fp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=Dp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return m.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[m.jsx(io,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(qo,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),m.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:m.jsx(ls,{className:"text-danger",size:14})})]})},c$={top:0,left:0,right:0,bottom:-1},u$=e=>{const t=Cu(),n=Pt(),r=e.filters.filter(g=>g.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Fp(),l=o?uI:dI,c=S.useRef(null),u=g=>{const h=g.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==h))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const h=new AbortController;return g.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(g=>e.header.id===g.value),p=f?.type?f.type===Zw.Asc?"ascending":"descending":"none",v=_p(e.header);return m.jsxs(Iw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[m.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:m.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?m.jsx(gi,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),m.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:m.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",m.jsx("span",{className:"font-medium",children:v})]}),children:m.jsxs("ul",{className:"font-medium",children:[r.length===0?null:m.jsx(S.Fragment,{children:r.map(g=>m.jsx("li",{className:"my-1",children:m.jsx(l$,{onDelete:u,filter:g,set:e.setFilters})},`thead-filter-${g.id}`))}),m.jsx("li",{children:m.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(g=>g.concat(Np(e.header,s.options,s.operations))),children:[m.jsx(wu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,m.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?m.jsx(o$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(Be.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:c$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:g=>{g.currentTarget.focus()},onKeyDown:g=>{if(g.key==="ArrowLeft"||g.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,b=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(g,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=h.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},d$=e=>{const[t,n]=JV(e.setCols);return m.jsx(Ew,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(fn,{children:e.headers.map((r,o)=>m.jsx(u$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},f$=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:m.jsx(fn,{children:n.children})})),p$=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),h$=S.forwardRef(({context:e,...t},n)=>{const r=a$(),o={...t?.style,top:Re.number(r.sticky)?`${r.sticky}px`:void 0};return m.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),m$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return m.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),g$=S.forwardRef((e,t)=>e.context.loadingMore?m.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:m.jsx("tr",{role:"row",className:"bg-card-background",children:m.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:m.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),v$={TableRow:m$,TableFoot:g$,TableHead:h$,Table:p$,TableBody:f$},y$=[0,0,0,0,0,0,0,0,0,0],b$=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Pp:m.jsx(K1,{})}),x$=()=>m.jsx(S.Fragment,{}),w$=[],J1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=_r(a),v=_r(u.loadingMore),g=S.useMemo(()=>{if(u.loading)return y$;if(c)return u.rows;const b=new Xw(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():n$(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[v,p]);const h=g.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return m.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[m.jsx(PV,{components:v$,context:y,totalCount:g.length,itemContent:h?x$:GV,data:h?w$:g,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(d$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),h?m.jsx(b$,{loading:u.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?m.jsx(qV,{...l}):null]})},S$=({item:e,onPointerDown:t})=>{const n=mo(0);return m.jsxs(Iw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[m.jsx("button",{type:"button",className:"cursor-grab",children:m.jsx(aI,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},T$=e=>{const t=Pt(),n=Mp(e.cols),r=wF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Xw(e.rows).GroupBy(u),v=e.cols.find(g=>g.id===u);e.setGroups(DC(p).map((g,h)=>{const y=p[g];return{...v,groupId:Ho(),groupKey:u,index:h,rows:y,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(S.Fragment,{children:m.jsxs(gi,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(fI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[m.jsxs("div",{className:"flex flex-nowrap items-center",children:[m.jsx(io,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(pr,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(ls,{size:16,className:"text-danger"})})]}),e.groups.length>0?m.jsxs("section",{className:"my-4",children:[m.jsx("header",{children:m.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),m.jsx(YN,{children:m.jsx(Ew,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>m.jsx(S$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},E$=e=>m.jsx("header",{className:"mb-1 min-w-full",children:m.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[m.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[m.jsx("span",{children:m.jsx(s$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(r$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(T$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[m.jsxs("span",{children:[m.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),m.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[m.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),m.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Dp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),C$=(e,t)=>typeof t=="function"?t(e):t,Hl=(e,t,n)=>e===t?void 0:n?.(t),k$=e=>{const t=Cu(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Mp(e.cols),[e.cols]),[i,a]=Zf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:C$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Hl(l?.filters??[],s.filters??[],e.setFilters),Hl(l?.sorters??[],s.sorters??[],e.setSorters),Hl(l?.groups??[],s.groups??[],e.setGroups),Hl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),m.jsx(i$,{value:n,children:m.jsxs(fn,{initial:!1,children:[r?m.jsx(E$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?m.jsx(J1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):m.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>m.jsx("div",{className:"min-w-full",children:m.jsx(J1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},Wl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>m.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Pe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-3",i),children:[e?m.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",a),children:e}):o,m.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",s.className),children:t?m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(za,{className:"w-full"}),m.jsx(za,{className:"w-8/12"}),m.jsx(za,{className:"w-10/12"}),m.jsx(za,{className:"w-1/2"})]}):n})]});Wl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return m.jsxs(i,{...o,title:Re.string(o.title)?o.title:void 0,className:Pe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[m.jsx(a,{className:"font-semibold",children:o.title}),r?m.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const I$=e=>{const t=e.interactive??!0,n=e.Icon??br;return m.jsx(Wl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:m.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[m.jsx("div",{className:Pe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:m.jsx(n,{size:48})}),m.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[m.jsx("p",{className:"text-lg",children:e.title}),e.loading?m.jsx(za,{className:"h-10"}):m.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},A$=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(dr,{children:m.jsx(Nf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(fn,{presenceAffectsLayout:!0,children:[e?m.jsx(Be.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?m.jsx(Xu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(oo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(Be.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[m.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:m.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:m.jsx(Do,{})})}),m.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[m.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),P$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=Ro(o),s=fr(o,{role:"dialog"}),l=Ir(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return m.jsxs(S.Fragment,{children:[m.jsx(A$,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,g=`${r}-${p}`,h=()=>n({...v,id:g}),y=v.leading;return m.jsx(Be.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(Be.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(S.Fragment,{children:[v.avatar?m.jsx("div",{children:m.jsx("div",{className:"relative px-1",children:m.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,m.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:m.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[m.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[m.jsx("h3",{children:v.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?m.jsx(y,{open:h}):null]})})]})})})},g)})})]})},O$=e=>m.jsx(S.Fragment,{children:e.children}),eS=()=>{const e=S.useContext(Xr);return e?e.parser:cs.hsla},Lp=.3,ql={duration:Lp,type:"tween",ease:"easeInOut"},tS=S.createContext(null),Vp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},yi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},_$=e=>m.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx(Be.path,{className:"currentColor",initial:yi.initial,animate:yi.animate,transition:Vp,d:"M18 6 6 18"}),m.jsx(Be.path,{className:"currentColor",initial:yi.initial,animate:yi.animate,transition:Vp,d:"m6 6 12 12"})]}),M$=e=>m.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:m.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:yi.animate,initial:yi.initial,transition:Vp})}),D$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},N$={duration:.6,delay:.2,type:"tween",ease:"circOut"},F$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",L$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,nS=()=>S.useContext(tS),V$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=eS(),s=nS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=L$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=F$(e,l,n);return s?.steps&&100/s?.steps,m.jsxs(S.Fragment,{children:[m.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),m.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[m.jsx(Be.div,{variants:D$,transition:N$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),m.jsx(Be.div,{initial:!1,animate:u,transition:ql,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:ql,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:ql,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:ql,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:m.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?m.jsx(M$,{className:"size-6 text-primary-foreground"}):u==="error"?m.jsx(_$,{className:"size-6 text-danger-foreground"}):m.jsx(S.Fragment,{children:m.jsx("span",{children:e})})})}),m.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:m.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},$$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Lp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Lp,steps:S.Children.count(e.children)};return m.jsx(tS.Provider,{value:o,children:m.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},rS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},oS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},iS=S.createContext(""),z$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",$p=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!z$(a))return a}return n==="backward"?$p(e,e.length-1,"backward"):$p(e,-1,"forward")},aS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=$p(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},sS={[oS.ArrowLeft]:(e,t)=>aS(t,"backward"),[oS.ArrowRight]:(e,t)=>aS(t,"forward")},j$=e=>{const[t,n]=rS(e.active),r=S.useRef(null),o=_r(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Re.keyof(sS,c)){const u=sS[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(iS.Provider,{value:t,children:m.jsx(Wl,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[m.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return m.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Pe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:m.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},R$=()=>S.useContext(iS),B$=e=>{const t=R$();return m.jsx(S.Fragment,{children:e.id===t?e.children:null})},lS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},H$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},cS=e=>m.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lS,exit:lS.false,transition:H$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),W$=Ao("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),q$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx(fn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?m.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx(cS,{"data-open":!!i,open:!!i,children:m.jsx(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Pe(W$({theme:n}),t),children:m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?m.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:m.jsx(Do,{size:20})}):null,m.jsxs("div",{className:Pe("flex gap-2 items-center",a.title?"":"w-fit"),children:[!r&&n==="success"?m.jsx(bu,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(br,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(Tu,{"aria-hidden":"true",size:20}):null,r]}),a.title?m.jsx("h4",{className:"col-start-2 text-lg font-semibold tracking-3 text-balance",children:a.title}):null,m.jsx("div",{className:"col-start-2 w-full",children:a.children})]})})})}):null})}),U$=e=>m.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[m.jsxs("header",{className:"flex items-start gap-4 p-6",children:[m.jsx("div",{className:Pe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:m.jsx("div",{children:m.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("header",{children:m.jsx("h3",{className:"text-base leading-none",children:e.title})}),m.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?m.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),G$=Symbol.for("react.lazy");function uS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Y$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=uS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():uS(e[o],null)}}}}const Ul=A[" use ".trim().toString()];function K$(e){return typeof e=="object"&&e!==null&&"then"in e}function dS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===G$&&"_payload"in e&&K$(e._payload)}function Z$(e){const t=X$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;dS(i)&&typeof Ul=="function"&&(i=Ul(i._payload));const s=A.Children.toArray(i),l=s.find(J$);if(l){const c=l.props.children,u=s.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return m.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return m.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const fS=Z$("Slot");function X$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(dS(o)&&typeof Ul=="function"&&(o=Ul(o._payload)),A.isValidElement(o)){const a=tz(o),s=ez(i,o.props);return o.type!==A.Fragment&&(s.ref=r?Y$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const Q$=Symbol("radix.slottable");function J$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q$}function ez(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function tz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const pS=(e="")=>Pe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),zp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),hS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[v,g]=S.useState(null),h=S.useRef([]),y=S.useRef([]),b=S.useContext(zp),x=Er(),T=Cr(),E=iP(),I=Ev(),w=x!==null,{floatingStyles:C,refs:P,context:_}=Gn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:to,placement:w?"right":"bottom-start",middleware:[zo({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ns(),Ds()]}),F=fr(_,{role:"menu"}),V=Ir(_,{bubbles:!0}),N=Nv(_,{move:!1,enabled:n,delay:{open:oy},handleClose:ry({blockPointerEvents:!0,requireIntent:!1})}),O=Ro(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=Ws(_,{loop:!0,activeIndex:v,nested:w,listRef:h,onNavigate:g}),z=OP(_,{activeIndex:v,listRef:y,resetMs:MP,onMatch:u?g:void 0}),{getReferenceProps:M,getFloatingProps:k,getItemProps:L}=Yn([N,O,F,V,D,z]);S.useEffect(()=>{if(!T)return;const B=()=>d(!1),q=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",B),T.events.on("menuopen",q),()=>{T.events.off("click",B),T.events.off("menuopen",q)}},[T,E,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:E})},[T,u,E,x]);const $=o?l.className:Pe(pS(l.className));return m.jsxs(aP,{id:E,children:[m.jsx(S.Fragment,{children:l.asChild?m.jsx(fS,{...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:s,className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[s,w&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(yu,{size:14})]})]})}),m.jsx(zp.Provider,{value:{activeIndex:v,setActiveIndex:g,getItemProps:L,setHasFocusInside:p,isOpen:u},children:m.jsx(JA,{elementsRef:h,labelsRef:y,children:u&&m.jsx(dr,{children:m.jsx(oo,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:m.jsx(t,{...k(),ref:P.setFloating,style:{...l.style,...C},className:Pe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),nz=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(zp),s=Ev({label:n?null:e}),l=Cr(),c=s.index===a.activeIndex;return m.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sr(s.ref,i),className:pS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?m.jsx(t,{size:16}):null]})}),rz=S.forwardRef((e,t)=>Er()===null?m.jsx(sP,{children:m.jsx(hS,{...e,isParent:!0,ref:t})}):m.jsx(hS,{...e,isParent:!1,ref:t})),jp=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return m.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Pe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[m.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Pe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,m.jsx("span",{"data-name":"checkbox-label",className:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),oz=({children:e,className:t="",size:n,...r})=>m.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[m.jsx("input",{...r,type:"radio",className:Pe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),iz=uy("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
15
|
-
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),az=(e,t)=>Ar()?t:window.matchMedia(e).matches,sz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(az(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},lz=()=>S.useContext(Xr).floatingRef??void 0,mS=S.createContext(async()=>!1),cz=()=>S.useContext(mS),Tn="500ms",uz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Tn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Tn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Tn}},dz={enter:{x:"0%",opacity:1,animationDuration:Tn},exit:{x:["0%","30%"],opacity:0,animationDuration:Tn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Tn}},Rp={drawer:e=>e==="left"?uz:dz,sheet:{enter:{opacity:1,y:"0%",animationDuration:Tn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Tn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Tn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Tn},enter:{opacity:1,scale:[1.05,1],animationDuration:Tn},initial:{opacity:.5,scale:.95,animationDuration:Tn,transition:{duration:.5,ease:"easeInOut"}}}},fz=Ao("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),gS={top:0,left:0,right:0,bottom:0},vS=e=>e*.6,pz=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=vS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return m.jsx(Be.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:gS,whileDrag:{cursor:"grabbing"},className:Pe("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?m.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Gl={drawer:"right",sheet:"none",dialog:"none"},hz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Gl.drawer:Gl[o]:t?Gl[o]:Gl.sheet},mz=[],yS=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=mz,...E},I)=>{const w=lz(),C=S.useRef(null),P=S.useRef(null),_=S.useId(),F=S.useId(),V=sz("(min-width: 64rem)"),N=hz(V,p,h,y),O=V||p?Rp[h]:Rp.sheet,D=typeof O=="function"?O(N):O,z=V||p?h:"sheet",M=z!=="dialog",k=Gn({open:e,onOpenChange:a,strategy:"fixed"}),L=Ro(k.context,{}),$=fr(k.context,{role:"dialog"}),B=Ir(k.context,{bubbles:!0,escapeKey:!0,outsidePress:ae=>{const Q=ae.target;return b&&!!Q?.isConnected}}),q=Yn([L,B,$].concat(T)),G=o,W=mo(void 0),J=mo(void 0),re=S.useRef(!1),ee=S.useRef(0);S.useEffect(()=>{W.set(void 0),J.set(void 0)},[z,W,J]);const Y=()=>a(!1);S.useImperativeHandle(I,()=>({context:k.context,floating:P.current}),[k.context,P]);const X=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:gS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ae,Q)=>{const te=k.refs.floating.current.getBoundingClientRect(),fe=W.get()||te.height,pe=Math.abs(fe-Q.delta.y),ve=window.outerHeight,Ae=vS(ve);return pe>=Ae?W.set(pe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>W.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},de=mo(void 0),H=mo(void 0),se=r?fS:Be.button;return m.jsxs(S.Fragment,{children:[o?m.jsx(se,{ref:k.refs.setReference,...q.getReferenceProps(),layoutId:v,type:"button",children:G}):null,m.jsx(Nf,{reducedMotion:d?"user":"always",children:m.jsx(dr,{preserveTabOrder:!0,root:w,children:m.jsx(fn,{mode:"wait",propagate:!0,children:e?m.jsx(Xu,{lockScroll:!0,className:Pe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",g),children:m.jsx(oo,{guards:!0,modal:!0,closeOnFocusOut:x,context:k.context,children:m.jsx(fn,{propagate:!0,children:m.jsxs(Be.div,{...E,...t?{"aria-labelledby":_,"aria-describedby":F}:{"aria-label":s},...q.getFloatingProps({"aria-modal":e,ref:sr(k.refs.setFloating,P),className:Pe(fz({position:N,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:D,"data-component":"modal",style:z==="drawer"?{width:W}:{height:W,y:J},children:[M&&u?m.jsx(pz,{onChange:a,value:W,sheet:z==="sheet",position:N,parent:k.refs.floating}):null,t?m.jsx(Be.header,{...X,className:"relative w-full isolate",children:t?m.jsx("h2",{id:_,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,m.jsx(Be.section,{ref:C,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(H.set(void 0),de.set(void 0),re.current){const ae=J.get()||0,Q=window.innerHeight*.2;ae>Q?(await Sw(J,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):Sw(J,0,{type:"spring",bounce:0,duration:.3}),re.current=!1}},onTouchStart:ae=>{const Q=ae.changedTouches[0];de.set(Q.pageY),H.set(Q.pageY),re.current=!1},onTouchMove:ae=>{const le=ae.changedTouches[0].pageY,te=H.get()||le,fe=C.current?.scrollTop||0;if(!re.current&&fe<=0&&le>te&&z==="sheet"&&(re.current=!0,ee.current=le),re.current){const pe=le-ee.current;pe<0?J.set(pe*.2):J.set(pe)}H.set(le)},children:i}),n?m.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?m.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:m.jsx("button",{type:"button",onClick:Y,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:m.jsx(Do,{})})}):null]})})})}):null})})})]})});let bS=async()=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);const Bp=Object.assign(yS,{confirm:e=>bS(e)}),xS=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,a]=S.useState(()=>{}),s=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{a(()=>d)})),[]);S.useEffect(()=>{bS=s},[s]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return m.jsxs(mS.Provider,{value:s,children:[e,m.jsx(yS,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:m.jsxs("div",{className:"flex gap-2 justify-end",children:[m.jsx(pr,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),m.jsx(pr,{theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:m.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},gz=e=>{const[t,n]=yF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:ED(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},vz=e=>m.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),yz=e=>m.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),bz=e=>m.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:m.jsxs(S.Fragment,{children:[m.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),m.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"text-base w-fit":"w-full text-lg"),children:e.children})]})}),wS=e=>m.jsxs("div",{children:[m.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),m.jsx("p",{className:"text-secondary typography",children:e.children})]}),xz=e=>m.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[m.jsx("div",{children:m.jsx(wS,{title:e.title,children:e.description})}),m.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),SS=e=>m.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),wz=()=>m.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:m.jsx(SS,{})}),Sz=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ro(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=Ir(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(pr,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(Be.span,{layoutId:o,children:e.trigger})}),m.jsx(fn,{children:i?m.jsx(dr,{root:t,children:m.jsx(oo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Tz=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},Ez=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},Cz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),kz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,Iz=({steps:e,active:t=!1,onClose:n=Wo,onFinish:r=Wo,onChange:o=Wo,labels:i})=>{const a=Pt(),[s,l]=S.useState(0),c=e[s],[u,d]=S.useState(null),[f,p]=S.useState(Cz()),[v,g]=S.useState(!1),h=S.useRef(null),{width:y,height:b}=Ez(),x={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:T,floatingStyles:E,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:to,middleware:[zo(10),Ns(),Ds(),Wu({element:h})]}),{getFloatingProps:w}=Yn([fr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{g(!1)},[s,t]),S.useEffect(()=>{if(!t||!c)return;const V=kz(c.element);V?(c.onEnter?.(),setTimeout(()=>{p(V.getBoundingClientRect()),T.setReference(V),d(V)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const V=()=>p(u.getBoundingClientRect());return V(),window.addEventListener("scroll",V,{capture:!0,passive:!0}),window.addEventListener("resize",V,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",V,{capture:!0}),window.removeEventListener("resize",V,{capture:!0})}},[u,y,b]),Tz(u,V=>{p(V.target.getBoundingClientRect())});const C=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l(V=>V+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l(V=>V-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return m.jsx(dr,{children:m.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[m.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("defs",{children:m.jsxs("mask",{id:"driver-mask",children:[m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),m.jsx(Be.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>g(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),m.jsx(fn,{mode:"wait",children:c&&v&&m.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:m.jsxs(Be.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-floating-background border-floating-border",children:[u&&m.jsx(qu,{ref:h,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&m.jsx("h3",{children:c.title}),c.description&&m.jsx(S.Fragment,{children:c.description}),m.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[m.jsx(pr,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),m.jsxs("div",{className:"flex gap-2",children:[F&&m.jsx(pr,{size:"small",theme:"ghost-muted",onClick:P,children:x.previous}),m.jsx(pr,{size:"small",onClick:C,children:_?x.next:x.finish})]})]}),m.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},TS=6048e5,Az=864e5,Pz=6e4,Oz=36e5,_z=1e3,ES=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ES in e?e[ES](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Yl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function CS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function bi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n?.in),d=o||r?CS(u,o+r*12):u,f=a||i?Yl(d,a+i*7):d,p=l+s*60,g=(c+p*60)*1e3;return ut(e,+f+g)}let Mz={};function bo(){return Mz}function tr(e,t){const n=bo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function xi(e,t){return tr(e,{...t,weekStartsOn:1})}function kS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=xi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=xi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kl(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Zl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function xo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function Dz(e,t,n){const[r,o]=Zl(n?.in,e,t),i=xo(r),a=xo(o),s=+i-Kl(i),l=+a-Kl(a);return Math.round((s-l)/Az)}function Nz(e,t){const n=kS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xi(r)}function Fz(e){return ut(e,Date.now())}function Lz(e,t,n){const[r,o]=Zl(n?.in,e,t);return+xo(r)==+xo(o)}function Vz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Xl(e){return!(!Vz(e)&&typeof e!="number"||isNaN(+Je(e)))}function $z(e,t){const[n,r]=Zl(e,t.start,t.end);return{start:n,end:r}}function IS(e,t){const{start:n,end:r}=$z(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function AS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function zz(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function jz(e,t){const n=bo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const Rz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Bz=(e,t,n)=>{let r;const o=Rz[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Hp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Hz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uz={date:Hp({formats:Hz,defaultWidth:"full"}),time:Hp({formats:Wz,defaultWidth:"full"}),dateTime:Hp({formats:qz,defaultWidth:"full"})},Gz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Yz=(e,t,n,r)=>Gz[e];function Ra(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Kz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Qz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Jz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ej={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},tj={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ra({values:Kz,defaultWidth:"wide"}),quarter:Ra({values:Zz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ra({values:Xz,defaultWidth:"wide"}),day:Ra({values:Qz,defaultWidth:"wide"}),dayPeriod:Ra({values:Jz,defaultWidth:"wide",formattingValues:ej,defaultFormattingWidth:"wide"})};function Ba(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?rj(s,d=>d.test(a)):nj(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function nj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const ij=/^(\d+)(th|st|nd|rd)?/i,aj=/\d+/i,sj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lj={any:[/^b/i,/^(a|c)/i]},cj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uj={any:[/1/i,/2/i,/3/i,/4/i]},dj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},mj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vj={ordinalNumber:oj({matchPattern:ij,parsePattern:aj,valueCallback:e=>parseInt(e,10)}),era:Ba({matchPatterns:sj,defaultMatchWidth:"wide",parsePatterns:lj,defaultParseWidth:"any"}),quarter:Ba({matchPatterns:cj,defaultMatchWidth:"wide",parsePatterns:uj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ba({matchPatterns:dj,defaultMatchWidth:"wide",parsePatterns:fj,defaultParseWidth:"any"}),day:Ba({matchPatterns:pj,defaultMatchWidth:"wide",parsePatterns:hj,defaultParseWidth:"any"}),dayPeriod:Ba({matchPatterns:mj,defaultMatchWidth:"any",parsePatterns:gj,defaultParseWidth:"any"})},PS={code:"en-US",formatDistance:Bz,formatLong:Uz,formatRelative:Yz,localize:tj,match:vj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yj(e,t){const n=Je(e,t?.in);return Dz(n,zz(n))+1}function OS(e,t){const n=Je(e,t?.in),r=+xi(n)-+Nz(n);return Math.round(r/TS)+1}function Wp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=bo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function bj(e,t){const n=bo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Wp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function _S(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+bj(n,t);return Math.round(r/TS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const jr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},wi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return jr.y(e,t)},Y:function(e,t,n,r){const o=Wp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=kS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return jr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=_S(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=OS(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):jr.d(e,t)},D:function(e,t,n){const r=yj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return dt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return dt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=wi.noon:r===0?o=wi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=wi.evening:r>=12?o=wi.afternoon:r>=4?o=wi.morning:o=wi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return jr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):jr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jr.s(e,t)},S:function(e,t){return jr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return NS(r);case"XXXX":case"XX":return wo(r);default:return wo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return NS(r);case"xxxx":case"xx":return wo(r);default:return wo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+DS(r,":");default:return"GMT"+wo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+DS(r,":");default:return"GMT"+wo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function DS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+dt(i,2)}function NS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):wo(e,t)}function wo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const FS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},LS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},qp={p:LS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return FS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",FS(r,t)).replace("{{time}}",LS(o,t))}},xj=/^D+$/,wj=/^Y+$/,Sj=["D","DD","YY","YYYY"];function VS(e){return xj.test(e)}function $S(e){return wj.test(e)}function Up(e,t,n){const r=Tj(e,t,n);if(console.warn(r),Sj.includes(e))throw new RangeError(r)}function Tj(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ej=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Cj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kj=/^'([^]*?)'?$/,Ij=/''/g,Aj=/[a-zA-Z]/;function Gp(e,t,n){const r=bo(),o=r.locale??PS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Xl(s))throw new RangeError("Invalid time value");let l=t.match(Cj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=qp[d];return f(u,o.formatLong)}return u}).join("").match(Ej).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Pj(u)};if(MS[d])return{isToken:!0,value:u};if(d.match(Aj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;($S(d)||VS(d))&&Up(d,t,String(e));const f=MS[d[0]];return f(s,d,o.localize,c)}).join("")}function Pj(e){const t=e.match(kj);return t?t[1].replace(Ij,"'"):e}function Oj(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function _j(){return Object.assign({},bo())}function Mj(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function Dj(e,t){return+Je(e)>+Je(t)}function Nj(e,t){return+Je(e)<+Je(t)}function Fj(e,t){const n=Lj(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Lj(e){return typeof e=="function"&&e.prototype?.constructor===e}const Vj=10;class zS{subPriority=0;validate(t,n){return!0}}class $j extends zS{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class zj extends zS{priority=Vj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Fj(t,this.context))}}class ot{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new $j(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class jj extends ot{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},nr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Oz+i*Pz+a*_z),rest:t.slice(n[0].length)}}function jS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Ql(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Yp(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function RS(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function BS(e){return e%400===0||e%4===0&&e%100!==0}class Rj extends ot{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=RS(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class Bj extends ot{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Wp(t,o);if(r.isTwoDigitYear){const s=RS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Hj extends ot{priority=130;parse(t,n){return Ql(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),xi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Wj extends ot{priority=130;parse(t,n){return Ql(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class qj extends ot{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Uj extends ot{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Gj extends ot{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class Yj extends ot{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Kj(e,t,n){const r=Je(e,n?.in),o=_S(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class Zj extends ot{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Kj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Xj(e,t,n){const r=Je(e,n?.in),o=OS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Qj extends ot{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return xi(Xj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Jj=[31,28,31,30,31,30,31,31,30,31,30,31],eR=[31,29,31,30,31,30,31,31,30,31,30,31];class tR extends ot{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=BS(r),i=t.getMonth();return o?n>=1&&n<=eR[i]:n>=1&&n<=Jj[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class nR extends ot{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return BS(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Kp(e,t,n){const r=bo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return Yl(i,u,n)}class rR extends ot{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Kp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class oR extends ot{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Nt(_t(n.length,t),i);case"eo":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Kp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class iR extends ot{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Nt(_t(n.length,t),i);case"co":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Kp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function aR(e,t,n){const r=Je(e,n?.in),o=Mj(r,n),i=t-o;return Yl(r,i,n)}class sR extends ot{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=aR(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class lR extends ot{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Yp(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class cR extends ot{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Yp(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class uR extends ot{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Yp(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class dR extends ot{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class fR extends ot{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class pR extends ot{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class hR extends ot{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class mR extends ot{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class gR extends ot{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class vR extends ot{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class yR extends ot{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Kl(t)-r)}incompatibleTokens=["t","T","x"]}class bR extends ot{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Kl(t)-r)}incompatibleTokens=["t","T","X"]}class xR extends ot{priority=40;parse(t){return jS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class wR extends ot{priority=20;parse(t){return jS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const SR={G:new jj,y:new Rj,Y:new Bj,R:new Hj,u:new Wj,Q:new qj,q:new Uj,M:new Gj,L:new Yj,w:new Zj,I:new Qj,d:new tR,D:new nR,E:new rR,e:new oR,c:new iR,i:new sR,a:new lR,b:new cR,B:new uR,h:new dR,H:new fR,K:new pR,k:new hR,m:new mR,s:new gR,S:new vR,X:new yR,x:new bR,t:new xR,T:new wR},TR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ER=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CR=/^'([^]*?)'?$/,kR=/''/g,IR=/\S/,AR=/[a-zA-Z]/;function PR(e,t,n,r){const o=()=>ut(n,NaN),i=_j(),a=i.locale??PS,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new zj(r?.in,n)],d=t.match(ER).map(h=>{const y=h[0];if(y in qp){const b=qp[y];return b(h,a.formatLong)}return h}).join("").match(TR),f=[];for(let h of d){$S(h)&&Up(h,t,e),VS(h)&&Up(h,t,e);const y=h[0],b=SR[y];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${h}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);f.push({token:y,fullToken:h});const T=b.run(e,h,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(y.match(AR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(h==="''"?h="'":y==="'"&&(h=OR(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&IR.test(e))return o();const p=u.map(h=>h.priority).sort((h,y)=>y-h).filter((h,y,b)=>b.indexOf(h)===y).map(h=>u.filter(y=>y.priority===h).sort((y,b)=>b.subPriority-y.subPriority)).map(h=>h[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const g={};for(const h of p){if(!h.validate(v,c))return o();const y=h.set(v,g,c);Array.isArray(y)?(v=y[0],Object.assign(g,y[1])):v=y}return v}function OR(e){return e.match(CR)[1].replace(kR,"'")}function _R(e,t,n){const[r,o]=Zl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function MR(e,t){return Lz(ut(e,e),Fz(e))}function DR(e,t,n){return Yl(e,-t,n)}function NR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Oj(a);return r.setMonth(t,Math.min(i,s)),r}function FR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=NR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function LR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function VR(e,t,n){return CS(e,-t,n)}function Ha(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=VR(e,o+r*12,n),d=DR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const $R=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function zR(e,t){return S.useRef($R(e,t)).current}function HS(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const jR=/^(?<hour>\d\d):(?<min>\d\d)$/,RR={type:"spring",bounce:.3,duration:.6},WS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),qS={enter:WS(1),exit:WS(-1),middle:{x:"0%",opacity:1}},US={exit:{visibility:"hidden"}},BR=e=>{const t=tr(AS(e));return IS({start:t,end:bi(t,{days:41})})},GS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),HR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=AS(new Date(1970,o,1).setMonth(o)),a=GS(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Zp={ArrowLeft:(e,t)=>t==="days"?Ha(e,{days:1}):Ha(e,{months:1}),ArrowRight:(e,t)=>t==="days"?bi(e,{days:1}):bi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ha(e,{weeks:1}):Ha(e,{years:1}),ArrowDown:(e,t)=>t==="days"?bi(e,{weeks:1}):bi(e,{years:1})},YS=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},So=e=>e.getFullYear().toString().padStart(4,"0"),WR=(e,t,n)=>e===void 0||n===void 0?!1:Dj(t,e)&&Nj(t,n),qR=e=>{const t=Pt();return m.jsx(Be.tbody,{layout:!0,variants:qS,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return m.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?xo(e.date).toISOString():void 0),l=MR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=_R(i,e.stateDate),d=!u||c,f=e.rangeMode?WR(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:Pe("relative",Re.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[m.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Pe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Re.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?m.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:m.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?m.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:m.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?m.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},UR=()=>xo(new Date),KS=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...v})=>{const g=S.useRef(Ho()),h=Pt(),y=ll(o),b=S.useRef(null),{date:x,range:T}=v,E=x||new Date,I=S.useRef(null),[w,C]=Zf({date:E,isAnimating:!1,year:So(E),direction:void 0,range:{from:T?.from,to:T?.to},months:HR(g.current,E,y),selectMode:l?"from":void 0,week:IS({start:tr(E),end:jz(E)})},M=>({onChangeYear:k=>({year:k}),onExitComplete:()=>(YS(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:k=>{const L=k(M.state().date);return{date:L,year:So(L)}},nextMonth:k=>{k&&(I.current=k.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=bi(L.date,{months:1});return{date:$,isAnimating:!0,direction:1,year:So($)}},previousMonth:k=>{k&&(I.current=k.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=Ha(L.date,{months:1});return{date:$,isAnimating:!0,direction:-1,year:So($)}},onSelectDate:k=>{const L=M.state(),$=k.currentTarget.dataset.range==="true",B=k.currentTarget.dataset.date||"",q=new Date(B);return{date:q,year:So(q),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:$?{from:L.selectMode==="from"?q:L.range.from,to:L.selectMode==="to"?q:L.range.to}:L.range}},onChangeMonth:k=>{const L=k.target.value,B=Array.from(k.target.options).find(G=>G.value===L),q=M.state();if(B){const G=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+G),{...q,date:W,year:So(W)}}return q},onKeyDown:k=>{const L=k.key,$=M.state();if(L in Zp){(L==="ArrowUp"||L==="ArrowDown")&&k.preventDefault();const B=M.state().date,q=Re.keyof(Zp,L)?Zp[L](B,k.shiftKey?"month":"days"):null;if(q!==null)return YS(k.target,b,q),{...$,date:q,year:So(q)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,k,L)=>((L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&L.props.onChangeMonth?.(M.date),M),(M,k,L)=>(L.method==="onChangeYear"&&L.props.onChangeYear?.(M.date),M),(M,k,L)=>{const $=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&$&&t?(c?.(M.range),M):($&&t&&c?.(M.date),M)}]}),P=BR(w.date),_=sy(P,7),F=w.date.toISOString(),V=GS(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[F,t]);const N=zR(M=>C.date(k=>LR(new Date(k),+M)),1200),O=M=>{const k=M.currentTarget.value;C.onChangeYear(k),s?.(new Date(k)),N(k)},D=HS((M,k)=>(M.preventDefault(),k==="right"?C.previousMonth():C.nextMonth()),10),z=()=>{const M=UR();C.date(()=>M),c?.(M)};return m.jsx(Nf,{transition:RR,children:m.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:D.onTouchEnd,onTouchStart:D.onTouchStart,className:Pe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(fn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:m.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:US,onClick:C.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(eI,{className:"h-4 w-4"})}),m.jsx(Be.span,{layout:!0,variants:qS,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:m.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[m.jsx("select",{value:V,onChange:C.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${V.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),m.jsx(Cg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:US,onClick:C.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(yu,{className:"h-4 w-4"})}),m.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),m.jsxs(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[m.jsx("thead",{children:m.jsx("tr",{children:w.week.map(M=>m.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),m.jsx(qR,{zip:_,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},V)})}),f==="datetime"?m.jsx("section",{className:"grid items-center my-4",children:m.jsx(qo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Gp(x,"HH:mm"):void 0,title:p||h.calendarDatetimeTitle,onChange:M=>{const k=M.target.value,L=jR.exec(k);if(!L)return;const $=L.groups.hour,B=L.groups.min,q=FR(w.date,{hours:Number($),minutes:Number(B),seconds:0});C.date(()=>q),c?.(q)}})}):null,m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Xp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xp.displayName="ProgressRootContext");function GR(){const e=A.useContext(Xp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Pr(51));return e}let Qp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const ZS={status(e){return e==="progressing"?{[Qp.progressing]:""}:e==="complete"?{[Qp.complete]:""}:e==="indeterminate"?{[Qp.indeterminate]:""}:null}};function YR(e,t,n){return e==null?"":n?Go(e,t,n):Go(e/100,t,{style:"percent"})}function KR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const XS=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=KR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=id(r);let g="indeterminate";Number.isFinite(l)&&(g=l===a?"complete":"progressing");const h=YR(l,i,v.current),y=A.useMemo(()=>({status:g}),[g]),b={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(h,l),role:"progressbar"},x=A.useMemo(()=>({formattedValue:h,max:a,min:s,setLabelId:p,state:y,status:g,value:l}),[h,a,s,p,y,g,l]),T=an("div",t,{state:y,ref:n,props:[b,d],stateAttributesMapping:ZS});return m.jsx(Xp.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(XS.displayName="ProgressRoot");const QS=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=GR(),u=Number.isFinite(l)&&l!==null?tl(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:ZS})});process.env.NODE_ENV!=="production"&&(QS.displayName="ProgressIndicator");const ZR=e=>m.jsxs(XS,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(QS,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Re.number(e.percent)?m.jsx("p",{className:Pe("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),Jl=e=>m.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[m.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),m.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Jl.Icon=function(t){return m.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Jl.Body=function(t){return m.jsx(ln,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},Jl.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(ln,{...t,type:"button"})})};const XR=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),QR=e=>m.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),JS=new Date(1970,11,31),Jp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},eT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},JR={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},eh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},eB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},tB={day:"numeric",month:"numeric",year:"numeric"},nB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=ll(t),d=S.useId(),f=Pt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?eB:tB),[u,s]),[v,g]=S.useState(e||void 0),[h,y]=S.useState(!1),b=eh(p,JS).flatMap(V=>Re.keyof(Jp,V.type)?Jp[V.type](V.value):[]),x=S.useMemo(()=>eh(p,JS).reduce((V,N)=>V+(Re.keyof(eT,N.type)?eT[N.type](N.value):""),""),[p]),T=e?.toISOString(),[E,I]=S.useState(v?eh(p,v).reduce((V,N)=>V+(Re.keyof(Jp,N.type)?JR[N.type](v,N.value):""),""):""),w=V=>{const N=V.target.value;if(I(N),b.length===N.length&&b.every((D,z)=>{const M=N.charAt(z);return typeof D=="string"?M===D:D.test(M)})){const D=PR(N,x,new Date),z=s==="datetime"?D:xo(D);return g(z),r?.(z)}return g(void 0),r?.(void 0)};S.useEffect(()=>{Xl(e)&&(g(e),I(Gp(e,x)))},[T,x]);const C=V=>(g(V),r?.(V),i&&y(!1),I(V?Gp(V,x):"")),P=Xl(v),_=P?v.toISOString():void 0,F=m.jsx(KS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:P?v:void 0});return m.jsx(S.Fragment,{children:m.jsx(qo,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":_,formNoValidate:!h,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:h?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:a?m.jsxs(S.Fragment,{children:[m.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),m.jsx(gi,{open:h,onChange:y,buttonProps:{"aria-describedby":d},trigger:m.jsxs("span",{"aria-labelledby":d,children:[m.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),m.jsx(Jk,{})]}),children:F})]}):null})})}),rB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],oB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],iB=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],aB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],tT=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},nT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},sB=e=>typeof e=="number"?Math.log(e):nT(e)*Math.log(10),lB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},rT=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},cB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function uB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?aB:iB:t.binary?oB:rB,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return rT(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=cB(t);let l;if(e<1){const c=tT(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?sB(e)/Math.log(1024):nT(e)/3),n.length-1);if(e=lB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=tT(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return rT(l,t.fixedWidth)}var ec={exports:{}},tc={exports:{}},lt={};var oT;function dB(){if(oT)return lt;oT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case u:case v:case p:case a:return E;default:return I}}case n:return I}}}function T(E){return x(E)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(E){return T(E)||x(E)===l},lt.isConcurrentMode=T,lt.isContextConsumer=function(E){return x(E)===s},lt.isContextProvider=function(E){return x(E)===a},lt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},lt.isForwardRef=function(E){return x(E)===u},lt.isFragment=function(E){return x(E)===r},lt.isLazy=function(E){return x(E)===v},lt.isMemo=function(E){return x(E)===p},lt.isPortal=function(E){return x(E)===n},lt.isProfiler=function(E){return x(E)===i},lt.isStrictMode=function(E){return x(E)===o},lt.isSuspense=function(E){return x(E)===d},lt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===p||E.$$typeof===a||E.$$typeof===s||E.$$typeof===u||E.$$typeof===h||E.$$typeof===y||E.$$typeof===b||E.$$typeof===g)},lt.typeOf=x,lt}var ct={};var iT;function fB(){return iT||(iT=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===v||H.$$typeof===p||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===h||H.$$typeof===y||H.$$typeof===b||H.$$typeof===g)}function T(H){if(typeof H=="object"&&H!==null){var se=H.$$typeof;switch(se){case t:var ae=H.type;switch(ae){case l:case c:case r:case i:case o:case d:return ae;default:var Q=ae&&ae.$$typeof;switch(Q){case s:case u:case v:case p:case a:return Q;default:return se}}case n:return se}}}var E=l,I=c,w=s,C=a,P=t,_=u,F=r,V=v,N=p,O=n,D=i,z=o,M=d,k=!1;function L(H){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(H)||T(H)===l}function $(H){return T(H)===c}function B(H){return T(H)===s}function q(H){return T(H)===a}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function W(H){return T(H)===u}function J(H){return T(H)===r}function re(H){return T(H)===v}function ee(H){return T(H)===p}function Y(H){return T(H)===n}function K(H){return T(H)===i}function X(H){return T(H)===o}function de(H){return T(H)===d}ct.AsyncMode=E,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=C,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=V,ct.Memo=N,ct.Portal=O,ct.Profiler=D,ct.StrictMode=z,ct.Suspense=M,ct.isAsyncMode=L,ct.isConcurrentMode=$,ct.isContextConsumer=B,ct.isContextProvider=q,ct.isElement=G,ct.isForwardRef=W,ct.isFragment=J,ct.isLazy=re,ct.isMemo=ee,ct.isPortal=Y,ct.isProfiler=K,ct.isStrictMode=X,ct.isSuspense=de,ct.isValidElementType=x,ct.typeOf=T})()),ct}var aT;function sT(){return aT||(aT=1,process.env.NODE_ENV==="production"?tc.exports=dB():tc.exports=fB()),tc.exports}var th,lT;function pB(){if(lT)return th;lT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return th=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},th}var nh,cT;function rh(){if(cT)return nh;cT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return nh=e,nh}var oh,uT;function dT(){return uT||(uT=1,oh=Function.call.bind(Object.prototype.hasOwnProperty)),oh}var ih,fT;function hB(){if(fT)return ih;fT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=rh(),n={},r=dT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ih=o,ih}var ah,pT;function mB(){if(pT)return ah;pT=1;var e=sT(),t=pB(),n=rh(),r=dT(),o=hB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return ah=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:x,element:T(),elementType:E(),instanceOf:I,node:_(),objectOf:C,oneOf:w,oneOfType:P,shape:V,exact:N};function v($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function g($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h($){if(process.env.NODE_ENV!=="production")var B={},q=0;function G(J,re,ee,Y,K,X,de){if(Y=Y||f,X=X||ee,de!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=Y+":"+ee;!B[se]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[se]=!0,q++)}}return re[ee]==null?J?re[ee]===null?new g("The "+K+" `"+X+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new g("The "+K+" `"+X+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:$(re,ee,Y,K,X)}var W=G.bind(null,!1);return W.isRequired=G.bind(null,!0),W}function y($){function B(q,G,W,J,re,ee){var Y=q[G],K=z(Y);if(K!==$){var X=M(Y);return new g("Invalid "+J+" `"+re+"` of type "+("`"+X+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return h(B)}function b(){return h(a)}function x($){function B(q,G,W,J,re){if(typeof $!="function")return new g("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=q[G];if(!Array.isArray(ee)){var Y=z(ee);return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var K=0;K<ee.length;K++){var X=$(ee,K,W,J,re+"["+K+"]",n);if(X instanceof Error)return X}return null}return h(B)}function T(){function $(B,q,G,W,J){var re=B[q];if(!s(re)){var ee=z(re);return new g("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return h($)}function E(){function $(B,q,G,W,J){var re=B[q];if(!e.isValidElementType(re)){var ee=z(re);return new g("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return h($)}function I($){function B(q,G,W,J,re){if(!(q[G]instanceof $)){var ee=$.name||f,Y=L(q[G]);return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return h(B)}function w($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(q,G,W,J,re){for(var ee=q[G],Y=0;Y<$.length;Y++)if(v(ee,$[Y]))return null;var K=JSON.stringify($,function(de,H){var se=M(H);return se==="symbol"?String(H):H});return new g("Invalid "+J+" `"+re+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+K+"."))}return h(B)}function C($){function B(q,G,W,J,re){if(typeof $!="function")return new g("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var K in ee)if(r(ee,K)){var X=$(ee,K,W,J,re+"."+K,n);if(X instanceof Error)return X}return null}return h(B)}function P($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var q=$[B];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(q)+" at index "+B+"."),a}function G(W,J,re,ee,Y){for(var K=[],X=0;X<$.length;X++){var de=$[X],H=de(W,J,re,ee,Y,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&K.push(H.data.expectedType)}var se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+ee+" `"+Y+"` supplied to "+("`"+re+"`"+se+"."))}return h(G)}function _(){function $(B,q,G,W,J){return O(B[q])?null:new g("Invalid "+W+" `"+J+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return h($)}function F($,B,q,G,W){return new g(($||"React class")+": "+B+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function V($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var K in $){var X=$[K];if(typeof X!="function")return F(W,J,re,K,M(X));var de=X(ee,K,W,J,re+"."+K,n);if(de)return de}return null}return h(B)}function N($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new g("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var K=t({},q[G],$);for(var X in K){var de=$[X];if(r($,X)&&typeof de!="function")return F(W,J,re,X,M(de));if(!de)return new g("Invalid "+J+" `"+re+"` key `"+X+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
|
|
16
|
-
Valid keys: `+JSON.stringify(Object.keys($),null," "));var H=de(ee,X,W,J,re+"."+X,n);if(H)return H}return null}return h(B)}function O($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(O);if($===null||s($))return!0;var B=d($);if(B){var q=B.call($),G;if(B!==$.entries){for(;!(G=q.next()).done;)if(!O(G.value))return!1}else for(;!(G=q.next()).done;){var W=G.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function D($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(B,$)?"symbol":B}function M($){if(typeof $>"u"||$===null)return""+$;var B=z($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function k($){var B=M($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function L($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},ah}var sh,hT;function gB(){if(hT)return sh;hT=1;var e=rh();function t(){}function n(){}return n.resetWarningCache=t,sh=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},sh}var mT;function vB(){if(mT)return ec.exports;if(mT=1,process.env.NODE_ENV!=="production"){var e=sT(),t=!0;ec.exports=mB()(e.isElement,t)}else ec.exports=gB()();return ec.exports}var yB=vB();const vt=Zh(yB);function To(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const bB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Si(e,t,n){const r=xB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&gT(r,"path",i),gT(r,"relativePath",i),r}function xB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=bB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function gT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const wB=[".DS_Store","Thumbs.db"];function SB(e){return To(this,void 0,void 0,function*(){return nc(e)&&TB(e.dataTransfer)?IB(e.dataTransfer,e.type):EB(e)?CB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?kB(e):[]})}function TB(e){return nc(e)}function EB(e){return nc(e)&&nc(e.target)}function nc(e){return typeof e=="object"&&e!==null}function CB(e){return lh(e.target.files).map(t=>Si(t))}function kB(e){return To(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Si(n))})}function IB(e,t){return To(this,void 0,void 0,function*(){if(e.items){const n=lh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(AB));return vT(yT(r))}return vT(lh(e.files).map(n=>Si(n)))})}function vT(e){return e.filter(t=>wB.indexOf(t.name)===-1)}function lh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function AB(e){if(typeof e.webkitGetAsEntry!="function")return bT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?xT(t):bT(e,t)}function yT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?yT(n):[n]],[])}function bT(e,t){return To(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,Si(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Si(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function PB(e){return To(this,void 0,void 0,function*(){return e.isDirectory?xT(e):OB(e)})}function xT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>To(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(PB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function OB(e){return To(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Si(r,e.fullPath);t(o)},r=>{n(r)})})})}var rc={},wT;function _B(){return wT||(wT=1,rc.__esModule=!0,rc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),rc}var MB=_B();const ch=Zh(MB);function ST(e){return FB(e)||NB(e)||kT(e)||DB()}function DB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
19
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
20
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NT(e,t){if(e){if(typeof e=="string")return fh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fh(e,t)}}function fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function d4(e){if(Array.isArray(e))return e}function FT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(n),!0).forEach(function(r){ph(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ac(e,t){if(e==null)return{};var n=f4(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f4(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var hh=S.forwardRef(function(e,t){var n=e.children,r=ac(e,t4),o=VT(r),i=o.open,a=ac(o,n4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(At(At({},a),{},{open:i})))});hh.displayName="Dropzone";var LT={disabled:!1,getFilesFromEvent:SB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};hh.defaultProps=LT,hh.propTypes={children:vt.func,accept:vt.objectOf(vt.arrayOf(vt.string)),multiple:vt.bool,preventDropOnDocument:vt.bool,noClick:vt.bool,noKeyboard:vt.bool,noDrag:vt.bool,noDragEventsBubbling:vt.bool,minSize:vt.number,maxSize:vt.number,maxFiles:vt.number,disabled:vt.bool,getFilesFromEvent:vt.func,onFileDialogCancel:vt.func,onFileDialogOpen:vt.func,useFsAccessApi:vt.bool,autoFocus:vt.bool,onDragEnter:vt.func,onDragLeave:vt.func,onDragOver:vt.func,onDrop:vt.func,onDropAccepted:vt.func,onDropRejected:vt.func,onError:vt.func,validator:vt.func};var mh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function VT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=At(At({},LT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,P=t.validator,_=S.useMemo(function(){return QB(n)},[n]),F=S.useMemo(function(){return XB(n)},[n]),V=S.useMemo(function(){return typeof h=="function"?h:$T},[h]),N=S.useMemo(function(){return typeof g=="function"?g:$T},[g]),O=S.useRef(null),D=S.useRef(null),z=S.useReducer(p4,mh),M=dh(z,2),k=M[0],L=M[1],$=k.isFocused,B=k.isFileDialogActive,q=S.useRef(typeof window<"u"&&window.isSecureContext&&y&&ZB()),G=function(){!q.current&&B&&setTimeout(function(){if(D.current){var R=D.current.files;R.length||(L({type:"closeDialog"}),N())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[D,B,N,q]);var W=S.useRef([]),J=function(R){O.current&&O.current.contains(R.target)||(R.preventDefault(),W.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",_T,!1),document.addEventListener("drop",J,!1)),function(){x&&(document.removeEventListener("dragover",_T),document.removeEventListener("drop",J))}},[O,x]),S.useEffect(function(){return!r&&b&&O.current&&O.current.focus(),function(){}},[O,b,r]);var re=S.useCallback(function(j){C?C(j):console.error(j)},[C]),ee=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[].concat(i4(W.current),[j.target]),ic(j)&&Promise.resolve(o(j)).then(function(R){if(!(oc(j)&&!w)){var ne=R.length,ce=ne>0&&UB({files:R,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:P}),xe=ne>0&&!ce;L({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(R){return re(R)})},[o,c,re,w,_,a,i,s,l,P]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=ic(j);if(R&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return R&&d&&d(j),!1},[d,w]),K=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=W.current.filter(function(ce){return O.current&&O.current.contains(ce)}),ne=R.indexOf(j.target);ne!==-1&&R.splice(ne,1),W.current=R,!(R.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ic(j)&&u&&u(j))},[O,u,w]),X=S.useCallback(function(j,R){var ne=[],ce=[];j.forEach(function(xe){var ke=PT(xe,_),_e=dh(ke,2),qe=_e[0],pt=_e[1],ht=OT(xe,a,i),$t=dh(ht,2),$e=$t[0],U=$t[1],Z=P?P(xe):null;if(qe&&$e&&!Z)ne.push(xe);else{var Oe=[pt,U];Z&&(Oe=Oe.concat(Z)),ce.push({file:xe,errors:Oe.filter(function(Ge){return Ge})})}}),(!s&&ne.length>1||s&&l>=1&&ne.length>l)&&(ne.forEach(function(xe){ce.push({file:xe,errors:[qB]})}),ne.splice(0)),L({acceptedFiles:ne,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(ne,ce,R),ce.length>0&&v&&v(ce,R),ne.length>0&&p&&p(ne,R)},[L,s,_,a,i,l,f,p,v,P]),de=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[],ic(j)&&Promise.resolve(o(j)).then(function(R){oc(j)&&!w||X(R,j)}).catch(function(R){return re(R)}),L({type:"reset"})},[o,X,re,w]),H=S.useCallback(function(){if(q.current){L({type:"openDialog"}),V();var j={multiple:s,types:F};window.showOpenFilePicker(j).then(function(R){return o(R)}).then(function(R){X(R,null),L({type:"closeDialog"})}).catch(function(R){JB(R)?(N(R),L({type:"closeDialog"})):e4(R)?(q.current=!1,D.current?(D.current.value=null,D.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(R)});return}D.current&&(L({type:"openDialog"}),V(),D.current.value=null,D.current.click())},[L,V,N,y,X,re,F,s]),se=S.useCallback(function(j){!O.current||!O.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),H())},[O,H]),ae=S.useCallback(function(){L({type:"focus"})},[]),Q=S.useCallback(function(){L({type:"blur"})},[]),le=S.useCallback(function(){T||(KB()?setTimeout(H,0):H())},[T,H]),te=function(R){return r?null:R},fe=function(R){return E?null:te(R)},pe=function(R){return I?null:te(R)},ve=function(R){w&&R.stopPropagation()},Ae=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.role,xe=j.onKeyDown,ke=j.onFocus,_e=j.onBlur,qe=j.onClick,pt=j.onDragEnter,ht=j.onDragOver,$t=j.onDragLeave,$e=j.onDrop,U=ac(j,r4);return At(At(ph({onKeyDown:fe(or(xe,se)),onFocus:fe(or(ke,ae)),onBlur:fe(or(_e,Q)),onClick:te(or(qe,le)),onDragEnter:pe(or(pt,ee)),onDragOver:pe(or(ht,Y)),onDragLeave:pe(or($t,K)),onDrop:pe(or($e,de)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},ne,O),!r&&!E?{tabIndex:0}:{}),U)}},[O,se,ae,Q,le,ee,Y,K,de,E,I,r]),me=S.useCallback(function(j){j.stopPropagation()},[]),oe=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.onChange,xe=j.onClick,ke=ac(j,o4),_e=ph({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:te(or(ce,de)),onClick:te(or(xe,me)),tabIndex:-1},ne,D);return At(At({},_e),ke)}},[D,n,s,de,r]);return At(At({},k),{},{isFocused:$&&!r,getRootProps:Ae,getInputProps:oe,rootRef:O,inputRef:D,open:te(H)})}function p4(e,t){switch(t.type){case"focus":return At(At({},e),{},{isFocused:!0});case"blur":return At(At({},e),{},{isFocused:!1});case"openDialog":return At(At({},mh),{},{isFileDialogActive:!0});case"closeDialog":return At(At({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return At(At({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return At(At({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return At({},mh);default:return e}}function $T(){}const zT=S.createContext([null,()=>{}]),h4=()=>S.useContext(zT),m4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,g4={csv:Su,xls:Su,mov:Og,mp4:Og,xlsx:Su,pdf:Pg,txt:Pg,json:rI,mp3:Qk},v4=e=>{const[,t]=h4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:m4(l),size:uB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},a=g4[e.file.name.split(".").at(-1)]??_g,s=n.type==="img"?m.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):m.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return m.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[m.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),m.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[m.jsx("span",{children:e.file.name}),m.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?m.jsx("div",{className:"flex-1 min-w-full",children:m.jsx(e.File,{file:e.file})}):null]}),m.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:m.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:m.jsx(Do,{size:16})})})]})},y4=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(v4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),jT=e=>{const t=Pt(),n=e.dragging?oI:iI;return m.jsxs("div",{className:"flex flex-col justify-center items-center",children:[m.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:m.jsx(n,{className:"text-primary",size:80})}),m.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[m.jsx("p",{children:t.uploadIdle}),m.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},b4=e=>e.isDragActive?m.jsx(jT,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(y4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(S.Fragment,{children:e.idle}),x4=m.jsx(jT,{dragging:!1}),w4=e=>{const t=e.item.file,n=e.item.type;return m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),m.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?m.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?m.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?m.jsx("figure",{children:m.jsx("audio",{controls:!0,src:e.item.url})}):null]})},S4=({idle:e=x4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Pt(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(h=>h.concat(g))},{getRootProps:f,getInputProps:p,isDragActive:v}=VT({onDrop:d});return m.jsxs(zT.Provider,{value:a,children:[m.jsx(Bp,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(w4,{item:a[0]}):null}),m.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[m.jsx("input",{...p(o),name:o.name,id:o.name}),m.jsx(b4,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},RT=()=>window.matchMedia("@media (pointer: coarse)"),T4=()=>{const e=S.useRef(Ar()?null:RT()),[t,n]=S.useState(Ar()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?RT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},BT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=T4(),o=S.useRef(Ar()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||ly())return;document.documentElement.style.padding=fg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(NC(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},E4=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},HT=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},WT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},qT=(e,t)=>{const n=HT(t,WT.basic,e);return n!==void 0&&n!==e?n:HT(t,WT.extend,e)},UT=e=>e.replace(/[^0-9]/g,""),sc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),GT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?UT(e).includes(UT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?E4(e,t)!==null:!1,C4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>GT(e,o,n,r)):GT(e,t,n,r),gh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(sc):sc(`${i.value}`)}));return e.forEach(i=>{const a=qT(i,t);o.forEach(s=>{const l=qT(i,s.key);if(!l)return;const c=sc(`${s.value}`.toLocaleLowerCase()).trim(),u=sc(`${l}`.toLocaleLowerCase()).trim();if(C4(u,c,s.score,s.match))return void r.set(a,i);Re.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},k4=e=>m.jsx(S.Fragment,{children:e.children}),I4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},A4=[],P4=S.forwardRef(function(t,n){return m.jsx(Be.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:m.jsx(fn,{children:t.children})})}),O4=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),_4={List:P4,Item:O4},Ti=40,M4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,...g},h)=>{const y=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=g.value??g.defaultValue??"",E=Pt(),[I,w]=S.useState(()=>Math.min(320,Ti*o.length)),[C,P]=S.useState(!1),[_,F]=S.useState(""),[V,N]=S.useState(T),[O,D]=S.useState(()=>o.find(R=>R.value===T)?.label??T),[z,M]=S.useState(null),k=S.useRef(A4),L=BT(C,"block-only"),$=v&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=()=>Li.flushSync(()=>P(!0)),q=_?gh($,"value",[{key:"value",value:_},{key:"label",value:_}]):$,G=()=>{P(!1),w(0)},W=q.filter(R=>R.hidden!==!0),J=v?void 0:`^(${o.map(R=>`${nd(R.value)}${R.label?"|"+nd(R.label):""}`).join("|")})$`,{x:re,y:ee,strategy:Y,refs:K,context:X,placement:de}=Gn({open:C,transform:!0,onOpenChange:P,placement:"bottom-start",whileElementsMounted:to,middleware:[zo(4),Sv({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),wv({padding:10,elementContext:"reference",apply(R){const ce=R.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,xe=zi(K.reference.current,window.innerHeight),ke=Math.min(ce<Ti?xe:ce,xe,R.availableHeight),_e=W.length===0?Ti:Math.min(ke,xe,ce),qe=`${b.current.getBoundingClientRect().width}px`;Object.assign(R.elements.floating.style,{width:qe,maxWidth:qe,height:_e})}})]}),H=ey(X,I4),{getReferenceProps:se,getFloatingProps:ae,getItemProps:Q}=Yn([fr(X,{role:"listbox"}),Ir(X),Ws(X,{cols:0,listRef:k,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(g.value){const R=o.find(ne=>ne.value===g.value);R&&(D(R.label??R.value),N(g.value))}},[g.value,o.length]),S.useEffect(()=>{if(!C)return w(0);const R=K.reference;if(R.current===null)return;const ne=zi(R.current,window.innerHeight);setTimeout(()=>w(Math.min(ne,W.length*Ti)),100)},[_,C,K.reference,W.length]),S.useEffect(()=>{const R=K.reference.current;if(R)return $i(R)},[]);const le=(R,ne)=>{N(R.value);const ce=K.reference.current;if(!ce)return;ce?.setAttribute("data-value",R.value),ce.value=R.value;const xe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(xe),g.onChange&&g.onChange(xe),D(R.label??""),G(),F(""),M(ne)},te=R=>{const ne=R.target.value;return F(ne),!C&&ne===""?P(!0):(R.target.name=g.name||"",ne?P(!0):g.onChange?.(R))},fe=()=>{B(),F(""),K.reference.current?.focus()},pe=()=>{M(R=>R===null?0:R),B(),F("")},ve=()=>{K.reference.current?.setAttribute("data-value",""),F(""),N(""),D(""),dg(K.reference.current),G()},Ae=g.id||g.name,me=`${Ae}-shadow`,oe=W.length===0,j=de==="top"||de==="top-start";return m.jsxs(Qi,{...g,left:e,error:t,ref:b,form:g.form,loading:r,name:g.name,feedback:C&&j?g.title:d,hideLeft:f,required:p,title:g.title,container:i,rightLabel:a,interactive:s,id:me,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:fe,children:[m.jsx(vu,{size:20}),m.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),V?m.jsx("button",{type:"button",onClick:ve,className:"p-2 transition-colors md:p-1 link:text-danger",children:m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[m.jsx("input",{"data-shadow":"true",...se({...g,onFocus:pe,pattern:J,onChange:te,id:me,name:me,ref:K.setReference,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),G();if(C){if(R.key==="ArrowDown"){let ne=Re.number(z)?z+1:0;return ne>W.length-1&&(ne=0),x.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="ArrowUp"){let ne=Re.number(z)?z-1:W.length-1;return ne<0&&(ne=W.length-1),x.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="Enter"){if(z!==null&&W[z])return R.preventDefault(),le(W[z],z);if(W.length===1)return R.preventDefault(),le(W[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Ae,"data-target":Ae,required:p,value:C?_:o.length===0?"":O||V,"aria-autocomplete":"list",autoComplete:"off",className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),m.jsx("input",{id:Ae,name:Ae,type:"hidden","data-origin":Ae,ref:h,required:p,defaultValue:g.value||V||void 0}),m.jsx(dr,{preserveTabOrder:!0,children:C?m.jsx(oo,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(Be.div,{...ae({ref:sr(L,K.setFloating),style:{...H.styles,left:re,top:ee??0,position:Y,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:oe?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",j?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!C)return w(0);const ne=K.floating.current.querySelectorAll("li").item(0),ce=(ne?ne.getBoundingClientRect().height:Ti)*W.length;return Li.flushSync(()=>w(ce+2))},children:[oe?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,m.jsx(Cp,{overscan:40,ref:x,hidden:oe,data:W,style:{height:I},defaultItemHeight:Ti,components:_4,scrollerRef:R=>{y.current=R},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(R,ne)=>{const ce=ne.Render??k4,xe=V===ne.value||V===ne.label,ke=z===R,_e=ne.label??ne.value;return m.jsx("button",{"data-value":ne.value,...Q({ref:qe=>{k.current[R]=qe},role:"option",type:"button","aria-checked":xe,"aria-current":xe,"aria-selected":xe,"aria-busy":ne.disabled,onClick:()=>le(ne,R),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${xe?"bg-primary-hover text-primary-foreground":""} ${ke?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(ce,{...g,label:ne.label,value:ne.value,children:_e})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const YT=40,D4=e=>m.jsx(S.Fragment,{children:e.children}),N4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},KT=[],F4=S.forwardRef(function(t,n){return m.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:m.jsx(fn,{children:t.children})})}),L4=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),V4={List:F4,Item:L4},$4=e=>{const t=Pt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),m.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?m.jsxs(ns,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},z4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,onChangeOptions:g,...h},y)=>{const b=S.useMemo(()=>new zn(r.map(oe=>[oe.value,oe])),[r]),x=S.useRef(null),T=S.useRef(null),E=h.value??h.defaultValue??KT,I=Pt(),[w,C]=S.useState(0),[P,_]=S.useState(!1),[F,V]=S.useState(""),[N,O]=S.useState(()=>{const oe=new zn;return E.forEach(j=>{const R=b.get(j);return R?oe.set(j,R):void 0}),oe}),D=S.useMemo(()=>Array.from(N.keys()),[N]),[z,M]=S.useState(()=>{const oe=new Set(E);return r.reduce((j,R)=>oe.has(R.value)?[...j,R.label??R.value]:j,[])??E}),[k,L]=S.useState(null),$=S.useRef(KT),B=v&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,q=F.length===0?B:gh(B,"value",[{key:"value",value:F},{key:"label",value:F}]),G=BT(P,"block-only"),W=q.filter(oe=>oe.hidden!==!0),J=W.length===0,{x:re,y:ee,strategy:Y,refs:K,context:X}=Gn({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:to,middleware:[zo(4),wv({padding:10,elementContext:"reference",apply(oe){const R=oe.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ne=zi(K.reference.current,window.innerHeight),ce=Math.min(R<YT?ne:R,ne,oe.availableHeight),xe=W.length===0?YT:Math.min(ce,ne,R),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:ke,maxWidth:ke,height:xe})}})]}),de=ey(X,N4),{getReferenceProps:H,getFloatingProps:se,getItemProps:ae}=Yn([fr(X,{role:"listbox"}),Ir(X),Ws(X,{cols:0,listRef:$,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:oe=>L(j=>oe??j)})]);S.useEffect(()=>{if(!P)return C(0);const oe=K.reference;if(oe.current===null)return;const j=zi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(j,W.length*40)),100)},[F,P,K.reference]),S.useEffect(()=>{h.value&&O(new zn(h.value.map(oe=>[oe,b.get(oe)])))},[h.value,b]),S.useEffect(()=>{const oe=K.reference.current;if(oe)return $i(oe)},[]);const Q=(oe,j)=>{const R=N.clone(xe=>xe.has(oe.value)?xe.remove(oe.value):xe.set(oe.value,oe));O(R);const ne=K.reference.current;if(!ne)return;const ce=R.map(xe=>xe.value);ne?.setAttribute("data-value",JSON.stringify(ce)),g&&g(ce),M(xe=>xe.concat(oe.label??"")),V(""),L(j)},le=oe=>{const j=oe.target.value;return V(j),!P&&j===""?_(!0):(oe.target.name=h.name||"",j?_(!0):void 0)},te=()=>{_(!0),V(""),K.reference.current?.focus()},fe=()=>{_(!0),V("")},pe=()=>{K.reference.current?.setAttribute("data-value","[]"),V(""),_(!1),O(new zn),g?.([])},ve=h.id||h.name,Ae=N.map((oe,j)=>m.jsx(ns,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:R=>{R.preventDefault(),R.stopPropagation(),Q(oe,j)},children:m.jsx(Do,{size:14})}),children:oe.label??oe.value},`MultiSelect-${oe.value}-x`)),me={height:J?"0":N.size===0?w-49:w-86};return m.jsxs(Qi,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:f,required:p,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:m.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:te,children:[m.jsx(vu,{size:20}),m.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),N?m.jsx("button",{type:"button",onClick:pe,className:"transition-colors link:text-danger",children:m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[m.jsxs("ul",{...H({...h,onFocus:fe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),className:Pe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[D.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),m.jsx($4,{label:c,children:Ae})]}),m.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:p,defaultValue:h.value||D||void 0}),m.jsx(dr,{preserveTabOrder:!0,children:P?m.jsx(Xu,{lockScroll:!0,children:m.jsx(oo,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...se({ref:K.setFloating,style:{...de.styles,top:ee??0,position:Y,left:re,height:w-(D.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[m.jsx("input",{autoFocus:!0,value:F,onChange:le,title:h.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:oe=>{if(oe.key==="ArrowDown"){let j=k+1;return j>W.length-1&&(j=0),T.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="ArrowUp"){let j=k-1;return j<0&&(j=W.length-1),T.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="Escape")return oe.currentTarget.blur(),_(!1);if(oe.key==="Enter"){if(k!==null&&W[k])return oe.preventDefault(),Q(W[k],k);if(W.length===1)return oe.preventDefault(),Q(W[0],0)}}}),J?m.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:m.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:s||I.autocompleteEmpty})}):null,J?null:m.jsx(Be.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:J?"auto":w},style:me,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return C(0);const j=K.floating.current.querySelectorAll("li").item(0),R=(j?j.getBoundingClientRect().height:40)*W.length;return Li.flushSync(()=>C(R+2))},children:m.jsx(Cp,{ref:T,hidden:J,data:W,components:V4,style:me,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(oe,j)=>{const R=j.Render??D4,ne=N.has(j.value)||N.has(j.label??""),ce=k===oe,xe=j.label??j.value;return m.jsxs("button",{"data-value":j.value,...ae({ref:ke=>{$.current[oe]=ke},role:"option",type:"button","aria-checked":ne,"aria-current":ne,"aria-selected":ne,"aria-busy":j.disabled,onClick:()=>Q(j,oe)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ne||ce?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx(jp,{onChange:Wo,checked:ne,"aria-checked":ne,onClick:ke=>{ke.stopPropagation(),Q(j,oe)}}),m.jsx(R,{...h,label:j.label,value:j.value,children:xe})]})}})}),m.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:N.size===0?m.jsx(ns,{theme:"muted",size:"small",children:I.autocompleteEmpty}):Ae})]})})}):null})]})}),j4=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},R4={Item:S.forwardRef(function(t,n){return m.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return m.jsx("ul",{...t,ref:n,className:"space-y-3"})})},B4=e=>{const t=S.useRef(null),n=j4(t);return m.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[m.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[m.jsx("header",{className:"border-b border-card-border pb-2"}),m.jsxs("div",{className:"px-8 space-y-2",children:[m.jsx(qo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(Cp,{height:n,useWindowScroll:!0,data:e.source,components:R4,itemContent:(r,o)=>m.jsx(S.Fragment,{children:m.jsx(jp,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(pr,{children:m.jsx(yu,{})})}),m.jsx("div",{})]})};function H4(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const W4=({children:e,...t})=>{const n=_r(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:H4(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),m.jsx("div",{...t,ref:r,children:o?e:null})};let ZT=0;function q4(e){return ZT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${ZT}`}const qa=0;class lc{static create(){return new lc}currentId=qa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qa,n()},t)}isStarted(){return this.currentId!==qa}clear=()=>{this.currentId!==qa&&(clearTimeout(this.currentId),this.currentId=qa)};disposeEffect=()=>this.clear}const cc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(cc.displayName="ToastContext");function vh(){const e=A.useContext(cc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Pr(73));return e}function yh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const XT=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,s]=A.useState([]),[l,c]=A.useState(!1),[u,d]=A.useState(!1),[f,p]=A.useState(null);a.length===0&&(l&&c(!1),u&&d(!1));const v=l||u,g=A.useRef(new Map),h=A.useRef(null),y=A.useRef(!0),b=A.useRef(!1);function x(N){const O=so(In(h.current));if(!h.current||!Or(h.current,O)||!md(O))return;const D=a.findIndex(k=>k.id===N);let z=null,M=D+1;for(;M<a.length;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M+=1}if(!z)for(M=D-1;M>=0;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M-=1}z?z.ref?.current?.focus():f?.focus({preventScroll:!0})}const T=Ye(()=>{b.current||(b.current=!0,g.current.forEach(N=>{if(N.timeout){N.timeout.clear();const O=Date.now()-N.start,D=N.delay-O;N.remaining=D>0?D:0}}))}),E=Ye(()=>{b.current&&(b.current=!1,g.current.forEach((N,O)=>{N.remaining=N.remaining>0?N.remaining:N.delay,N.timeout??=lc.create(),N.timeout.start(N.remaining,()=>{g.current.delete(O),N.callback()}),N.start=Date.now()}))}),I=Ye(N=>{s(z=>{const M=z.map(L=>L.id===N?{...L,transitionStatus:"ending",height:0}:L),k=M.filter(L=>L.transitionStatus!=="ending");return M.map(L=>{if(L.transitionStatus==="ending")return L;const $=k.indexOf(L)>=o;return{...L,limited:$}})});const O=g.current.get(N);O&&O.timeout&&(O.timeout.clear(),g.current.delete(N)),a.find(z=>z.id===N)?.onClose?.(),x(N),a.length===1&&(c(!1),d(!1))}),w=Ye(N=>{s(D=>D.filter(z=>z.id!==N)),a.find(D=>D.id===N)?.onRemove?.()}),C=Ye((N,O,D)=>{const z=Date.now(),M=y.current&&!l&&!u,k=M?lc.create():void 0;k?.start(O,()=>{g.current.delete(N),D()}),g.current.set(N,{timeout:k,start:M?z:0,delay:O,remaining:O,callback:D})}),P=Ye(N=>{const O=N.id||q4("toast"),D={...N,id:O,transitionStatus:"starting"};s(M=>{const k=[D,...M],L=k.filter($=>$.transitionStatus!=="ending");if(L.length>o){const $=L.length-o,B=L.slice(-$);return k.map(q=>B.some(G=>G.id===q.id)?{...q,limited:!0}:{...q,limited:!1})}return k.map($=>({...$,limited:!1}))});const z=D.timeout??r;return D.type!=="loading"&&z>0&&C(O,z,()=>I(O)),(l||u||!y.current)&&T(),O}),_=Ye((N,O)=>{const D=a.find(W=>W.id===N)??null,z=D?{...D,...O}:null;if(jn.flushSync(()=>{s(W=>W.map(J=>J.id===N?{...J,...O}:J))}),!z)return;const M=z.timeout??r,k=D?.timeout??r,L=Object.hasOwn(O,"timeout"),$=z.transitionStatus!=="ending"&&z.type!=="loading"&&M>0,B=g.current.has(N),q=k!==M,G=D?.type==="loading";if(!$&&B){g.current.get(N)?.timeout?.clear(),g.current.delete(N);return}if($&&(!B||q||L||G)){const W=g.current.get(N);W&&(W.timeout?.clear(),g.current.delete(N)),C(N,M,()=>I(N)),(l||u||!y.current)&&T()}}),F=Ye((N,O)=>{const D=yh(O.loading),z=P({...D,type:"loading"}),M=N.then(k=>{const L=yh(O.success,k);return _(z,{...L,type:"success",timeout:L.timeout}),k}).catch(k=>{const L=yh(O.error,k);return _(z,{...L,type:"error",timeout:L.timeout}),Promise.reject(k)});return{}.hasOwnProperty.call(O,"setPromise")&&O.setPromise(M),M});A.useEffect(function(){return i?i[" subscribe"](({action:D,options:z})=>{const M=z.id;D==="promise"&&z.promise?F(z.promise,z):D==="update"&&M?_(M,z):D==="close"&&M?I(M):P(z)}):void 0},[P,_,C,r,i,F,I]);const V=A.useMemo(()=>({toasts:a,setToasts:s,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:v,add:P,close:I,remove:w,update:_,promise:F,pauseTimers:T,resumeTimers:E,prevFocusElement:f,setPrevFocusElement:p,viewportRef:h,scheduleTimer:C,windowFocusedRef:y}),[P,I,u,l,v,T,f,F,w,E,C,a,_]);return m.jsx(cc.Provider,{value:V,children:n})};process.env.NODE_ENV!=="production"&&(XT.displayName="ToastProvider");const Ei=A.forwardRef(function(t,n){const[r,o]=A.useState();St(()=>{pO&&o("button")},[]);const i={tabIndex:0,role:r};return m.jsx("span",{...t,ref:n,style:el,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ei.displayName="FocusGuard");const QT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(QT.displayName="ToastViewportContext");let U4=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const JT=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{toasts:s,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:v,setPrevFocusElement:g,expanded:h,focused:y}=vh(),b=A.useRef(!1),x=A.useRef(!1),T=s.length,E=s[0]?.height??0,I=A.useMemo(()=>s.some(k=>k.transitionStatus==="ending"),[s]);A.useEffect(()=>{if(!f.current)return;function k($){T!==0&&$.key==="F6"&&$.target!==f.current&&($.preventDefault(),g(so(In(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const L=qt(f.current);return L.addEventListener("keydown",k),()=>{L.removeEventListener("keydown",k)}},[l,d,g,T,f]),A.useEffect(()=>{if(!f.current||!T)return;const k=qt(f.current);function L(B){B.target===k&&(p.current=!1,l())}function $(B){if(B.relatedTarget||B.target===k)return;const q=pd(B),G=so(In(f.current));(!Or(f.current,q)||!md(G))&&c(),setTimeout(()=>{p.current=!0})}return k.addEventListener("blur",L,!0),k.addEventListener("focus",$,!0),()=>{k.removeEventListener("blur",L,!0),k.removeEventListener("focus",$,!0)}},[l,c,f,p,d,T]),A.useEffect(()=>{const k=f.current;if(!k||T===0)return;const L=In(k);function $(B){if(B.pointerType!=="touch")return;const q=pd(B);Or(k,q)||(c(),u(!1),d(!1))}return L.addEventListener("pointerdown",$,!0),()=>{L.removeEventListener("pointerdown",$,!0)}},[T,c,d,u,f]);function w(k){f.current&&(b.current=!0,k.relatedTarget===f.current?s[0]?.ref?.current?.focus():v?.focus({preventScroll:!0}))}function C(k){k.key==="Tab"&&k.shiftKey&&k.target===f.current&&(k.preventDefault(),v?.focus({preventScroll:!0}),c())}A.useEffect(()=>{!p.current||I||!x.current||(c(),u(!1),x.current=!1)},[I,c,u,p]);function P(){l(),u(!0),x.current=!1}function _(){s.some(k=>k.transitionStatus==="ending")?x.current=!0:(c(),u(!1))}function F(){if(b.current){b.current=!1;return}y||md(In(f.current).activeElement)&&(d(!0),l())}function V(k){!y||Or(f.current,k.relatedTarget)||(d(!1),c())}const N={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:V,onKeyDown:C,onClick:F},O=A.useMemo(()=>({expanded:h}),[h]),D=an("div",t,{ref:[n,f],state:O,props:[N,{style:{[U4.frontmostHeight]:E?`${E}px`:void 0}},a,{children:m.jsxs(A.Fragment,{children:[T>0&&v&&m.jsx(Ei,{onFocus:w}),i,T>0&&v&&m.jsx(Ei,{onFocus:w})]})}]}),z=A.useMemo(()=>({viewportRef:f}),[f]),M=A.useMemo(()=>s.filter(k=>k.priority==="high"),[s]);return m.jsxs(QT.Provider,{value:z,children:[T>0&&v&&m.jsx(Ei,{onFocus:w}),D,!y&&M.length>0&&m.jsx("div",{style:el,children:M.map(k=>m.jsxs("div",{role:"alert","aria-atomic":!0,children:[m.jsx("div",{children:k.title}),m.jsx("div",{children:k.description})]},k.id))})]})});process.env.NODE_ENV!=="production"&&(JT.displayName="ToastViewport");function G4(e){return yy(19)?e:e?"true":void 0}const bh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(bh.displayName="ToastRootContext");function Ci(){const e=A.useContext(bh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Pr(66));return e}let xh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Y4={[xh.startingStyle]:""},K4={[xh.endingStyle]:""},Z4={transitionStatus(e){return e==="starting"?Y4:e==="ending"?K4:null}};function X4(e){return e==null?e:"current"in e?e.current:e}function Q4(e,t=!1,n=!0){const r=qy();return Ye((o,i=null)=>{r.cancel();function a(){jn.flushSync(o)}const s=X4(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=xh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;a()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function J4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ye(o),a=Q4(r,n,!1);A.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}let Co=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const e3={...Z4,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Ua=40,t3=10,Rr=.5,n3=1;function eE(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function r3(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const s=a[1].split(", ").map(parseFloat);s.length===6?(r=s[4],o=s[5],i=Math.sqrt(s[0]*s[0]+s[1]*s[1])):s.length===16&&(r=s[12],o=s[13],i=s[0])}}return{x:r,y:o,scale:i}}const tE=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...s}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(a)?a:[a]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:v,setToasts:g,pauseTimers:h,expanded:y,setHovering:b}=vh(),[x,T]=A.useState(void 0),[E,I]=A.useState(!1),[w,C]=A.useState(!1),[P,_]=A.useState(!1),[F,V]=A.useState({x:0,y:0}),[N,O]=A.useState({x:0,y:0,scale:1}),[D,z]=A.useState(),[M,k]=A.useState(),[L,$]=A.useState(null),B=A.useRef(null),q=A.useRef({x:0,y:0}),G=A.useRef({x:0,y:0,scale:1}),W=A.useRef(void 0),J=A.useRef(0),re=A.useRef(!1),ee=A.useRef({x:0,y:0}),Y=A.useRef(!1),K=A.useMemo(()=>d.indexOf(r),[r,d]),X=A.useMemo(()=>d.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,d]),de=A.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((j,R)=>j+(R.height||0),0),[d,r]);J4({open:r.transitionStatus!=="ending",ref:B,onComplete(){r.transitionStatus==="ending"&&v(r.id)}});const H=Ye((j=!1)=>{const R=B.current;if(!R)return;const ne=R.style.height;R.style.height="auto";const ce=R.offsetHeight;R.style.height=ne;function xe(){g(ke=>ke.map(_e=>_e.id===r.id?{..._e,ref:B,height:ce,transitionStatus:void 0}:_e))}j?jn.flushSync(xe):xe()});St(H,[H]);function se(j,R){let ne=j,ce=R;return!c.includes("left")&&!c.includes("right")?ne=j>0?j**Rr:-(Math.abs(j)**Rr):(!c.includes("right")&&j>0&&(ne=j**Rr),!c.includes("left")&&j<0&&(ne=-(Math.abs(j)**Rr))),!c.includes("up")&&!c.includes("down")?ce=R>0?R**Rr:-(Math.abs(R)**Rr):(!c.includes("down")&&R>0&&(ce=R**Rr),!c.includes("up")&&R<0&&(ce=-(Math.abs(R)**Rr))),{x:ne,y:ce}}function ae(j){if(j.button!==0)return;j.pointerType==="touch"&&h();const R=pd(j.nativeEvent);if(!(R&&R.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(re.current=!1,W.current=void 0,J.current=0,q.current={x:j.clientX,y:j.clientY},ee.current=q.current,B.current){const ce=r3(B.current);G.current=ce,O(ce),V({x:ce.x,y:ce.y})}b(!0),I(!0),C(!1),$(null),Y.current=!0,B.current?.setPointerCapture(j.pointerId)}}function Q(j){if(!E)return;j.preventDefault(),Y.current&&(q.current={x:j.clientX,y:j.clientY},Y.current=!1);const{clientY:R,clientX:ne,movementX:ce,movementY:xe}=j;(xe<0&&R>ee.current.y||xe>0&&R<ee.current.y)&&(ee.current={x:ee.current.x,y:R}),(ce<0&&ne>ee.current.x||ce>0&&ne<ee.current.x)&&(ee.current={x:ne,y:ee.current.y});const ke=ne-q.current.x,_e=R-q.current.y,qe=R-ee.current.y,pt=ne-ee.current.x;if(!w&&Math.sqrt(ke*ke+_e*_e)>=n3&&(C(!0),L===null)){const Oe=c.includes("left")||c.includes("right"),Ge=c.includes("up")||c.includes("down");if(Oe&&Ge){const Ze=Math.abs(ke),Ne=Math.abs(_e);$(Ze>Ne?"horizontal":"vertical")}}let ht;if(!W.current)L==="vertical"?_e>0?ht="down":_e<0&&(ht="up"):L==="horizontal"?ke>0?ht="right":ke<0&&(ht="left"):Math.abs(ke)>=Math.abs(_e)?ht=ke>0?"right":"left":ht=_e>0?"down":"up",ht&&c.includes(ht)&&(W.current=ht,J.current=eE(ht,ke,_e),T(ht));else{const Z=W.current,Oe=eE(Z,pt,qe);Oe>Ua?(re.current=!1,T(Z)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&J.current-Oe>=t3&&(re.current=!0)}const $t=se(ke,_e);let $e=G.current.x,U=G.current.y;L==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=$t.x):(L==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=$t.x),(c.includes("up")||c.includes("down"))&&(U+=$t.y)),V({x:$e,y:U})}function le(j){if(!E)return;if(I(!1),C(!1),$(null),B.current?.releasePointerCapture(j.pointerId),re.current){V({x:N.x,y:N.y}),T(void 0);return}let R=!1;const ne=F.x-N.x,ce=F.y-N.y;let xe;for(const ke of c){switch(ke){case"right":ne>Ua&&(R=!0,xe="right");break;case"left":ne<-Ua&&(R=!0,xe="left");break;case"down":ce>Ua&&(R=!0,xe="down");break;case"up":ce<-Ua&&(R=!0,xe="up");break}if(R)break}R?(T(xe),_(!0),p(r.id)):(V({x:N.x,y:N.y}),T(void 0))}function te(j){if(j.key==="Escape"){if(!B.current||!Or(B.current,so(In(B.current))))return;p(r.id)}}A.useEffect(()=>{if(!u)return;const j=B.current;if(!j)return;function R(ne){Or(j,ne.target)&&ne.preventDefault()}return j.addEventListener("touchmove",R,{passive:!1}),()=>{j.removeEventListener("touchmove",R)}},[u]);function fe(){if(!E&&F.x===N.x&&F.y===N.y&&!P)return{[Co.swipeMovementX]:"0px",[Co.swipeMovementY]:"0px"};const j=F.x-N.x,R=F.y-N.y;return{transition:E?"none":void 0,transform:E?`translateX(${F.x}px) translateY(${F.y}px) scale(${N.scale})`:void 0,[Co.swipeMovementX]:`${j}px`,[Co.swipeMovementY]:`${R}px`}}const pe=r.priority==="high",ve={role:pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":M,"aria-hidden":pe&&!f?!0:void 0,onPointerDown:u?ae:void 0,onPointerMove:u?Q:void 0,onPointerUp:u?le:void 0,onKeyDown:te,inert:G4(r.limited),style:{...fe(),[Co.index]:r.transitionStatus==="ending"?K:X,[Co.offsetY]:`${de}px`,[Co.height]:r.height?`${r.height}px`:void 0}},Ae=A.useMemo(()=>({rootRef:B,toast:r,titleId:D,setTitleId:z,descriptionId:M,setDescriptionId:k,swiping:E,swipeDirection:x,recalculateHeight:H,index:K,visibleIndex:X,expanded:y}),[r,D,M,E,x,H,K,X,y]),me=A.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:Ae.swiping,swipeDirection:Ae.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,Ae.swiping,Ae.swipeDirection]),oe=an("div",t,{ref:[n,Ae.rootRef],state:me,stateAttributesMapping:e3,props:[ve,s]});return m.jsx(bh.Provider,{value:Ae,children:oe})});process.env.NODE_ENV!=="production"&&(tE.displayName="ToastRoot");const nE=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:s,recalculateHeight:l}=Ci(),c=A.useRef(null);St(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const v=new ResizeObserver(()=>l(!0)),g=new MutationObserver(()=>l(!0));return v.observe(p),g.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{v.disconnect(),g.disconnect()}},[l]);const u=a>0,d=A.useMemo(()=>({expanded:s,behind:u}),[s,u]);return an("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(nE.displayName="ToastContent");const rE=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ci(),c=a??l.description,u=!!c,d=qs(i),{setDescriptionId:f}=Ci();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("p",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(rE.displayName="ToastDescription");const oE=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ci(),c=a??l.title,u=!!c,d=qs(i),{setTitleId:f}=Ci();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("h2",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(oE.displayName="ToastTitle");let wh;process.env.NODE_ENV!=="production"&&(wh=new Set);function iE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");wh.has(t)||(wh.add(t),console.error(`Base UI: ${t}`))}}const aE=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(aE.displayName="CompositeRootContext");function o3(e=!1){const t=A.useContext(aE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Pr(16));return t}function i3(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,i,o])}}function a3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=o3(!0)!==void 0,s=Ye(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=i3({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||iE("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&iE("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=A.useCallback(()=>{const f=i.current;s3(f)&&a&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,a]);St(c,[c]);const u=A.useCallback((f={})=>{const{onClick:p,onMouseDown:v,onKeyUp:g,onKeyDown:h,onPointerDown:y,...b}=f;return cd({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}p?.(T)},onMouseDown(T){t||v?.(T)},onKeyDown(T){if(t||(dd(T),h?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!s()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&p?.(T))},onKeyUp(T){t||(dd(T),g?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&p?.(T)},onPointerDown(T){if(t){T.preventDefault();return}y?.(T)}},o?void 0:{role:"button"},l,b)},[t,l,o,s]),d=Ye(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function s3(e){return Ot(e)&&e.tagName==="BUTTON"}const sE=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...s}=t,{close:l,expanded:c}=vh(),{toast:u}=Ci(),[d,f]=A.useState(!1),{getButtonProps:p,buttonRef:v}=a3({disabled:i,native:a}),g=A.useMemo(()=>({type:u.type}),[u.type]);return an("button",t,{ref:[n,v],state:g,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!=="production"&&(sE.displayName="ToastClose");function l3(e){return`data-base-ui-${e}`}const Sh=A.createContext(null);process.env.NODE_ENV!=="production"&&(Sh.displayName="PortalContext");const c3=()=>A.useContext(Sh),u3=l3("portal");function lE(e={}){const{ref:t,container:n,componentProps:r=Pn,elementProps:o,elementState:i}=e,a=qs(),l=c3()?.portalNode,[c,u]=A.useState(null),[d,f]=A.useState(null),p=Ye(y=>{y!==null&&f(y)}),v=A.useRef(null);St(()=>{if(n===null){v.current&&(v.current=null,f(null),u(null));return}if(a==null)return;const y=(n&&(hs(n)?n:n.current))??l??document.body;if(y==null){v.current&&(v.current=null,f(null),u(null));return}v.current!==y&&(v.current=y,f(null),u(y))},[n,l,a]);const g=an("div",r,{ref:[t,p],state:i,props:[{id:a,[u3]:""},o]});return{portalNode:d,portalSubtree:c&&g?jn.createPortal(g,c):null}}const d3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=lE({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),v=A.useRef(null),[g,h]=A.useState(null),y=g?.modal,b=g?.open,x=typeof s=="boolean"?s:!!g&&!g.modal&&g.open&&!!c;A.useEffect(()=>{if(!c||y)return;function E(I){c&&I.relatedTarget&&yd(I)&&(I.type==="focusin"?Dy:LO)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,y]),A.useEffect(()=>{!c||b||Dy(c)},[b,c]);const T=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:v,portalNode:c,setFocusManagerState:h}),[c]);return m.jsxs(A.Fragment,{children:[u,m.jsxs(Sh.Provider,{value:T,children:[x&&c&&m.jsx(Ei,{"data-type":"outside",ref:d,onFocus:E=>{if(yd(E,c))p.current?.focus();else{const I=g?g.domReference:null;FO(I)?.focus()}}}),x&&c&&m.jsx("span",{"aria-owns":c.id,style:RP}),c&&jn.createPortal(r,c),x&&c&&m.jsx(Ei,{"data-type":"outside",ref:f,onFocus:E=>{if(yd(E,c))v.current?.focus();else{const I=g?g.domReference:null;NO(I)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Uo(WP,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(d3.displayName="FloatingPortal");const cE=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...s}=t,{portalNode:l,portalSubtree:c}=lE({container:o,ref:n,componentProps:t,elementProps:s});return!c&&!l?null:m.jsxs(A.Fragment,{children:[c,l&&jn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(cE.displayName="FloatingPortalLite");const f3=cE;function uE(){const e=A.useContext(cc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Pr(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return A.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const p3=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},h3=Ao("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),m3={default:br,info:br,warn:Tu,muted:br,danger:Tu,success:bu,secondary:br},dE=S.createContext(()=>{throw new Error("Not implemented")}),g3=()=>S.useContext(dE);function v3(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=h3({theme:r}),i=n?lI:m3[r]||br;return m.jsx(tE,{toast:e.toast,swipeDirection:"right",children:m.jsx(Be.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto list-none w-full",children:m.jsx(nE,{className:Pe(o,"shadow-lg"),children:m.jsxs("div",{className:"flex items-start gap-3 p-4",children:[m.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:m.jsx(i,{className:"size-4"})}),m.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?m.jsx(oE,{className:"truncate font-semibold leading-tight tracking-tight select-text"}):null,m.jsx(rE,{className:"text-xs font-medium opacity-90 select-text leading-relaxed line-clamp-2"})]}),t&&!n?m.jsx(sE,{className:"shrink-0 -mr-1 -mt-1 p-1.5 rounded-lg text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:m.jsx(Do,{className:"size-3.5"})}):null]})})})})}function y3({max:e=5}){const t=S.useRef(null),n=p3(t),r=uE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),a=o.length-i.length;return m.jsxs(JT,{ref:t,className:"fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 outline-none pointer-events-none overflow-visible",children:[m.jsx(fn,{mode:"popLayout",initial:!1,children:i.map(s=>m.jsx(v3,{toast:s},s.id))}),!n&&a>0&&m.jsxs(Be.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"self-center px-3 py-1 text-[10px] font-bold tracking-wider uppercase bg-card-background/80 backdrop-blur shadow-sm border border-card-border rounded-full text-foreground/50 pointer-events-auto cursor-default transition-all hover:bg-card-background hover:text-foreground/80",children:["+",a," more"]})]})}function b3({children:e,max:t=5}){const n=uE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,a)=>{const s={theme:a?.theme,closable:a?.closable,loading:a?.loading};if(a?.id&&n.toasts.find(u=>u.id===a.id))return n.update(a.id,{description:i,title:a.title,timeout:a.timeout,data:s}),{close:()=>n.close(a.id),clear:r};const l=n.add({description:i,id:a?.id,title:a?.title,timeout:a?.timeout,data:s});return{close:()=>n.close(l),clear:r}},[n,r]);return m.jsxs(dE.Provider,{value:o,children:[e,m.jsx(f3,{children:m.jsx(y3,{max:t})})]})}function x3({children:e,max:t=5,timeout:n=5e3}){return m.jsx(XT,{limit:t,timeout:n,children:m.jsx(b3,{max:t,children:e})})}const w3=/Mac|iPod|iPhone|iPad/,uc=()=>w3.test(navigator.userAgent),S3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?uc()?"Meta":"Control":n==="Hyper"?uc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),fE=e=>e.map(t=>t.trim()).join("+");class T3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=fE(S3(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=fE(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const E3=e=>(e=e.trim(),e==="Alt"?uc()?m.jsx(cI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?uc()?m.jsx(nI,{"aria-label":"Command",size:12}):"Ctrl":e),C3=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return m.jsxs(S.Fragment,{children:[m.jsx("kbd",{"aria-label":n,children:E3(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},k3=e=>m.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:fu(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),I3=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:m.jsx(k3,{text:e.text,item:o})}):o.type!=="shortcut"?m.jsx(S.Fragment,{}):m.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[m.jsxs("span",{className:"flex gap-2 items-center",children:[o.Icon?o.Icon:null,m.jsx("span",{children:fu(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx(C3,{value:o.shortcut}):null]})}),A3=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Re.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=gh(o,"title",n),a=r.filter(s=>Re.function(s.enabled)?s.enabled({text:t}):!1);return zn.unique(i.concat(a),s=>s.title)},P3=[0,0,0,0,0],pE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=pE(n.items);if(r)return r}return null},O3=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),a=Pt(),s=_r(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:to,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),p=A3(f,r),v=Ws(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=p[T];return E?E.type==="group":!1},onNavigate:T=>{Re.number(T)&&(pg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Re.number(T)?T:e.open?E??0:null)}}),{getItemProps:g,getReferenceProps:h,getFloatingProps:y}=Yn([v]),b=r===""?f:[{type:"group",title:"Results",items:[]},...p.filter(T=>T.type!=="group")];S.useEffect(()=>{const T=new T3;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,I=>E.action({event:I,setText:o,text:s.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,s]);const x=e.Icon??xu;return m.jsx(S.Fragment,{children:m.jsxs(Bp,{...y(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[m.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[m.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?m.jsx(x,{Default:xu,text:r,size:16}):m.jsx(xu,{size:16})}),m.jsx("input",{...h({ref:d.refs.setReference,onKeyDown:T=>{const E=Re.number(l)?b[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=pE(p);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[m.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:a.commandPaletteLoading}),P3.map((T,E)=>m.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Pp},`${t}-${E}-skeleton-index`))]}):m.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[b.map((T,E)=>S.createElement(I3,{...g({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),b.length===1?m.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:a.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(l)?m.jsx(e.Preview,{command:b[l],text:r}):null]}),e.footer?m.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border",children:e.footer}):null]})})},_3=["INPUT","SELECT"],hE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{_3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Th,mE;function Eh(){if(mE)return Th;mE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Th={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Th}var Ch,gE;function vE(){if(gE)return Ch;gE=1;var e=Eh(),t=qm(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var C=w.pop(),P=C.obj[C.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);C.obj[C.prop]=_}}},d=function(w,C){for(var P=C&&C.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function I(w,C,P){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w))w.push(C);else if(w&&typeof w=="object")if(a(w)){var _=s(w)+1;w[_]=C,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0);else return[w,C];return w}if(!w||typeof w!="object"){if(a(C)){for(var F=Object.keys(C),V=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},N=0;N<F.length;N++){var O=parseInt(F[N],10);V[O+1]=C[F[N]]}return i(V,s(C)+1)}return[w].concat(C)}var D=w;return r(w)&&!r(C)&&(D=d(w,P)),r(w)&&r(C)?(C.forEach(function(z,M){if(n.call(w,M)){var k=w[M];k&&typeof k=="object"&&z&&typeof z=="object"?w[M]=I(k,z,P):w.push(z)}else w[M]=z}),w):Object.keys(C).reduce(function(z,M){var k=C[M];return n.call(z,M)?z[M]=I(z[M],k,P):z[M]=k,z},D)},p=function(w,C){return Object.keys(C).reduce(function(P,_){return P[_]=C[_],P},w)},v=function(I,w,C){var P=I.replace(/\+/g," ");if(C==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},g=1024,h=function(w,C,P,_,F){if(w.length===0)return w;var V=w;if(typeof w=="symbol"?V=Symbol.prototype.toString.call(w):typeof w!="string"&&(V=String(w)),P==="iso-8859-1")return escape(V).replace(/%u[0-9a-f]{4}/gi,function(L){return"%26%23"+parseInt(L.slice(2),16)+"%3B"});for(var N="",O=0;O<V.length;O+=g){for(var D=V.length>=g?V.slice(O,O+g):V,z=[],M=0;M<D.length;++M){var k=D.charCodeAt(M);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||F===e.RFC1738&&(k===40||k===41)){z[z.length]=D.charAt(M);continue}if(k<128){z[z.length]=c[k];continue}if(k<2048){z[z.length]=c[192|k>>6]+c[128|k&63];continue}if(k<55296||k>=57344){z[z.length]=c[224|k>>12]+c[128|k>>6&63]+c[128|k&63];continue}M+=1,k=65536+((k&1023)<<10|D.charCodeAt(M)&1023),z[z.length]=c[240|k>>18]+c[128|k>>12&63]+c[128|k>>6&63]+c[128|k&63]}N+=z.join("")}return N},y=function(w){for(var C=[{obj:{o:w},prop:"o"}],P=[],_=0;_<C.length;++_)for(var F=C[_],V=F.obj[F.prop],N=Object.keys(V),O=0;O<N.length;++O){var D=N[O],z=V[D];typeof z=="object"&&z!==null&&P.indexOf(z)===-1&&(C.push({obj:V,prop:D}),P.push(z))}return u(C),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,C,P,_){if(a(w)){var F=s(w)+1;return w[F]=C,l(w,F),w}var V=[].concat(w,C);return V.length>P?i(d(V,{plainObjects:_}),V.length-1):V},E=function(w,C){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(C(w[_]));return P}return C(w)};return Ch={arrayToObject:d,assign:p,combine:T,compact:y,decode:v,encode:h,isBuffer:x,isOverflow:a,isRegExp:b,maybeMap:E,merge:f},Ch}var kh,yE;function M3(){if(yE)return kh;yE=1;var e=qm(),t=vE(),n=Eh(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},f={},p=function g(h,y,b,x,T,E,I,w,C,P,_,F,V,N,O,D,z,M){for(var k=h,L=M,$=0,B=!1;(L=L.get(f))!==void 0&&!B;){var q=L.get(h);if($+=1,typeof q<"u"){if(q===$)throw new RangeError("Cyclic object value");B=!0}typeof L.get(f)>"u"&&($=0)}if(typeof P=="function"?k=P(y,k):k instanceof Date?k=V(k):b==="comma"&&i(k)&&(k=t.maybeMap(k,function(Q){return Q instanceof Date?V(Q):Q})),k===null){if(E)return C&&!D?C(y,u.encoder,z,"key",N):y;k=""}if(d(k)||t.isBuffer(k)){if(C){var G=D?y:C(y,u.encoder,z,"key",N);return[O(G)+"="+O(C(k,u.encoder,z,"value",N))]}return[O(y)+"="+O(String(k))]}var W=[];if(typeof k>"u")return W;var J;if(b==="comma"&&i(k))D&&C&&(k=t.maybeMap(k,C)),J=[{value:k.length>0?k.join(",")||null:void 0}];else if(i(P))J=P;else{var re=Object.keys(k);J=_?re.sort(_):re}var ee=w?String(y).replace(/\./g,"%2E"):String(y),Y=x&&i(k)&&k.length===1?ee+"[]":ee;if(T&&i(k)&&k.length===0)return Y+"[]";for(var K=0;K<J.length;++K){var X=J[K],de=typeof X=="object"&&X&&typeof X.value<"u"?X.value:k[X];if(!(I&&de===null)){var H=F&&w?String(X).replace(/\./g,"%2E"):String(X),se=i(k)?typeof b=="function"?b(Y,H):Y:Y+(F?"."+H:"["+H+"]");M.set(h,$);var ae=e();ae.set(f,M),s(W,g(de,se,b,x,T,E,I,w,b==="comma"&&D&&i(k)?null:C,P,_,F,V,N,O,D,z,ae))}}return W},v=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var E;if(h.arrayFormat in o?E=h.arrayFormat:"indices"in h?E=h.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:b,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return kh=function(g,h){var y=g,b=v(h),x,T;typeof b.filter=="function"?(T=b.filter,y=T("",y)):i(b.filter)&&(T=b.filter,x=T);var E=[];if(typeof y!="object"||y===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(y)),b.sort&&x.sort(b.sort);for(var C=e(),P=0;P<x.length;++P){var _=x[P],F=y[_];b.skipNulls&&F===null||s(E,p(F,_,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,C))}var V=E.join(b.delimiter),N=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?N+="utf8=%26%2310003%3B&":N+="utf8=%E2%9C%93&"),V.length>0?N+V:""},kh}var Ih,bE;function D3(){if(bE)return Ih;bE=1;var e=vE(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(v,g){return String.fromCharCode(parseInt(g,10))})},i=function(p,v,g){if(p&&typeof p=="string"&&v.comma&&p.indexOf(",")>-1)return p.split(",");if(v.throwOnLimitExceeded&&g>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,g){var h={__proto__:null},y=g.ignoreQueryPrefix?v.replace(/^\?/,""):v;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=g.parameterLimit===1/0?void 0:g.parameterLimit,x=y.split(g.delimiter,g.throwOnLimitExceeded?b+1:b);if(g.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var T=-1,E,I=g.charset;if(g.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===s?I="utf-8":x[E]===a&&(I="iso-8859-1"),T=E,E=x.length);for(E=0;E<x.length;++E)if(E!==T){var w=x[E],C=w.indexOf("]="),P=C===-1?w.indexOf("="):C+1,_,F;if(P===-1?(_=g.decoder(w,r.decoder,I,"key"),F=g.strictNullHandling?null:""):(_=g.decoder(w.slice(0,P),r.decoder,I,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),g,n(h[_])?h[_].length:0),function(N){return g.decoder(N,r.decoder,I,"value")}))),F&&g.interpretNumericEntities&&I==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var V=t.call(h,_);V&&g.duplicates==="combine"?h[_]=e.combine(h[_],F,g.arrayLimit,g.plainObjects):(!V||g.duplicates==="last")&&(h[_]=F)}}return h},c=function(p,v,g,h){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");y=Array.isArray(v)&&v[b]?v[b].length:0}for(var x=h?v:i(v,g,y),T=p.length-1;T>=0;--T){var E,I=p[T];if(I==="[]"&&g.parseArrays)e.isOverflow(x)?E=x:E=g.allowEmptyArrays&&(x===""||g.strictNullHandling&&x===null)?[]:e.combine([],x,g.arrayLimit,g.plainObjects);else{E=g.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,C=g.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(C,10);!g.parseArrays&&C===""?E={0:x}:!isNaN(P)&&I!==C&&String(P)===C&&P>=0&&g.parseArrays&&P<=g.arrayLimit?(E=[],E[P]=x):C!=="__proto__"&&(E[C]=x)}x=E}return x},u=function(v,g){var h=g.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(g.depth<=0)return!g.plainObjects&&t.call(Object.prototype,h)&&!g.allowPrototypes?void 0:[h];var y=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=y.exec(h),T=x?h.slice(0,x.index):h,E=[];if(T){if(!g.plainObjects&&t.call(Object.prototype,T)&&!g.allowPrototypes)return;E.push(T)}for(var I=0;(x=b.exec(h))!==null&&I<g.depth;){I+=1;var w=x[1].slice(1,-1);if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(x[1])}if(x){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+h.slice(x.index)+"]")}return E},d=function(v,g,h,y){if(v){var b=u(v,h);if(b)return c(b,g,h,y)}},f=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var g=typeof v.charset>"u"?r.charset:v.charset,h=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:g,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:h,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return Ih=function(p,v){var g=f(v);if(p===""||p===null||typeof p>"u")return g.plainObjects?{__proto__:null}:{};for(var h=typeof p=="string"?l(p,g):p,y=g.plainObjects?{__proto__:null}:{},b=Object.keys(h),x=0;x<b.length;++x){var T=b[x],E=d(T,h[T],g,typeof p=="string");y=e.merge(y,E,g)}return g.allowSparse===!0?y:e.compact(y)},Ih}var Ah,xE;function N3(){if(xE)return Ah;xE=1;var e=M3(),t=D3(),n=Eh();return Ah={formats:n,parse:t,stringify:e},Ah}var F3=N3(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var wE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wE||(wE={}));const Ee=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Br=e=>{switch(typeof e){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return Number.isNaN(e)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(e)?Ee.array:e===null?Ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ee.promise:typeof Map<"u"&&e instanceof Map?Ee.map:typeof Set<"u"&&e instanceof Set?Ee.set:typeof Date<"u"&&e instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ge=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class vr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof vr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}vr.create=e=>new vr(e);const Ph=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let L3=Ph;function V3(){return L3}const $3=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ye(e,t){const n=V3(),r=$3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ph?void 0:Ph].filter(o=>!!o)});e.common.issues.push(r)}class mn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return mn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),Ga=e=>({status:"dirty",value:e}),En=e=>({status:"valid",value:e}),SE=e=>e.status==="aborted",TE=e=>e.status==="dirty",ki=e=>e.status==="valid",dc=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ce||(Ce={}));class Hr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const EE=(e,t)=>{if(ki(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new vr(e.common.issues);return this._error=n,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class Xe{get description(){return this._def.description}_getType(t){return Br(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new mn,ctx:{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)},o=this._parseSync({data:t,path:r.path,parent:r});return EE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ki(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>ki(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(dc(o)?o:Promise.resolve(o));return EE(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ge.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Oi({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return qr.create(this,this._def)}nullable(){return _i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this)}promise(){return mc.create(this,this._def)}or(t){return pc.create([this,t],this._def)}and(t){return hc.create(this,t,this._def)}transform(t){return new Oi({...Ue(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Mh({...Ue(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new sH({typeName:Ve.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dh({...Ue(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Nh.create(this,t)}readonly(){return Fh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const z3=/^c[^\s-]{8,}$/i,j3=/^[0-9a-z]+$/,R3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,B3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,H3=/^[a-z0-9_-]{21}$/i,W3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,q3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,U3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,G3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oh;const Y3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,K3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Z3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,X3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Q3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,CE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",eH=new RegExp(`^${CE}$`);function kE(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function tH(e){return new RegExp(`^${kE(e)}$`)}function nH(e){let t=`${CE}T${kE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function rH(e,t){return!!((t==="v4"||!t)&&Y3.test(e)||(t==="v6"||!t)&&Z3.test(e))}function oH(e,t){if(!W3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function iH(e,t){return!!((t==="v4"||!t)&&K3.test(e)||(t==="v6"||!t)&&X3.test(e))}class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ee.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.string,received:i.parsedType}),Le}const r=new mn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")U3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Oh||(Oh=new RegExp(G3,"u")),Oh.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")B3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")H3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")z3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")j3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")R3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:ge.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"regex",code:ge.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?nH(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?eH.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?tH(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?rH(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?oH(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?iH(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?J3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ko({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ce.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ce.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ce.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ce.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ko({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ko.create=e=>new ko({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ue(e)});function aH(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class Ii extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ee.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.number,received:i.parsedType}),Le}let r;const o=new mn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?aH(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,o){return new Ii({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(o)}]})}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ii.create=e=>new Ii({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class Ya extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ee.bigint)return this._getInvalidInput(t);let r;const o=new mn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,o){return new Ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(o)}]})}_addCheck(t){return new Ya({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ya.create=e=>new Ya({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class IE extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ee.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.boolean,received:r.parsedType}),Le}return En(t.data)}}IE.create=e=>new IE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class fc extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ee.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_date}),Le}const r=new mn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}fc.create=e=>new fc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ue(e)});class AE extends Xe{_parse(t){if(this._getType(t)!==Ee.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.symbol,received:r.parsedType}),Le}return En(t.data)}}AE.create=e=>new AE({typeName:Ve.ZodSymbol,...Ue(e)});class PE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.undefined,received:r.parsedType}),Le}return En(t.data)}}PE.create=e=>new PE({typeName:Ve.ZodUndefined,...Ue(e)});class OE extends Xe{_parse(t){if(this._getType(t)!==Ee.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.null,received:r.parsedType}),Le}return En(t.data)}}OE.create=e=>new OE({typeName:Ve.ZodNull,...Ue(e)});class _E extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return En(t.data)}}_E.create=e=>new _E({typeName:Ve.ZodAny,...Ue(e)});class ME extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return En(t.data)}}ME.create=e=>new ME({typeName:Ve.ZodUnknown,...Ue(e)});class Wr extends Xe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.never,received:n.parsedType}),Le}}Wr.create=e=>new Wr({typeName:Ve.ZodNever,...Ue(e)});class DE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.void,received:r.parsedType}),Le}return En(t.data)}}DE.create=e=>new DE({typeName:Ve.ZodVoid,...Ue(e)});class ir extends Xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ee.array)return ye(n,{code:ge.invalid_type,expected:Ee.array,received:n.parsedType}),Le;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ye(n,{code:a?ge.too_big:ge.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ye(n,{code:ge.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ye(n,{code:ge.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Hr(n,a,n.path,s)))).then(a=>mn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Hr(n,a,n.path,s)));return mn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ir({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new ir({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new ir({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}}ir.create=(e,t)=>new ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ue(t)});function Ai(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qr.create(Ai(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof ir?new ir({...e._def,type:Ai(e.element)}):e instanceof qr?qr.create(Ai(e.unwrap())):e instanceof _i?_i.create(Ai(e.unwrap())):e instanceof Io?Io.create(e.items.map(t=>Ai(t))):e}class Bt extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ee.object){const c=this._getOrReturnCtx(t);return ye(c,{code:ge.invalid_type,expected:Ee.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Wr&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Hr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Wr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ye(o,{code:ge.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Hr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>mn.mergeObjectSync(r,c)):mn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ce.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Ai(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof qr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return VE(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Wr.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Wr.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Wr.create(),typeName:Ve.ZodObject,...Ue(t)});class pc extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new vr(s.ctx.common.issues));return ye(n,{code:ge.invalid_union,unionErrors:a}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new vr(l));return ye(n,{code:ge.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}pc.create=(e,t)=>new pc({options:e,typeName:Ve.ZodUnion,...Ue(t)});function _h(e,t){const n=Br(e),r=Br(t);if(e===t)return{valid:!0,data:e};if(n===Ee.object&&r===Ee.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=_h(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ee.array&&r===Ee.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=_h(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ee.date&&r===Ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class hc extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(SE(i)||SE(a))return Le;const s=_h(i.value,a.value);return s.valid?((TE(i)||TE(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ge.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}hc.create=(e,t,n)=>new hc({left:e,right:t,typeName:Ve.ZodIntersection,...Ue(n)});class Io extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.array)return ye(r,{code:ge.invalid_type,expected:Ee.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ye(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Hr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>mn.mergeArray(n,a)):mn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Io({...this._def,rest:t})}}Io.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Io({items:e,typeName:Ve.ZodTuple,rest:null,...Ue(t)})};class NE extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.map)return ye(r,{code:ge.invalid_type,expected:Ee.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Hr(r,s,r.path,[c,"key"])),value:i._parse(new Hr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}NE.create=(e,t,n)=>new NE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ue(n)});class Ka extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.set)return ye(r,{code:ge.invalid_type,expected:Ee.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:ge.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ye(r,{code:ge.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Hr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ka({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new Ka({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ka.create=(e,t)=>new Ka({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ue(t)});class FE extends Xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}FE.create=(e,t)=>new FE({getter:e,typeName:Ve.ZodLazy,...Ue(t)});class LE extends Xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}LE.create=(e,t)=>new LE({value:e,typeName:Ve.ZodLiteral,...Ue(t)});function VE(e,t){return new Pi({values:e,typeName:Ve.ZodEnum,...Ue(t)})}class Pi extends Xe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:et.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Le}return En(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Pi.create(t,{...this._def,...n})}exclude(t,n=this._def){return Pi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Pi.create=VE;class $E extends Xe{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ee.string&&r.parsedType!==Ee.number){const o=et.objectValues(n);return ye(r,{expected:et.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return ye(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Le}return En(t.data)}get enum(){return this._def.values}}$E.create=(e,t)=>new $E({values:e,typeName:Ve.ZodNativeEnum,...Ue(t)});class mc extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ee.promise&&n.common.async===!1)return ye(n,{code:ge.invalid_type,expected:Ee.promise,received:n.parsedType}),Le;const r=n.parsedType===Ee.promise?n.data:Promise.resolve(n.data);return En(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mc.create=(e,t)=>new mc({type:e,typeName:Ve.ZodPromise,...Ue(t)});class Oi extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Ga(l.value):l});{if(n.value==="aborted")return Le;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Le:s.status==="dirty"||n.value==="dirty"?Ga(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ki(a))return Le;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ki(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Le);et.assertNever(o)}}Oi.create=(e,t,n)=>new Oi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ue(n)}),Oi.createWithPreprocess=(e,t,n)=>new Oi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ue(n)});class qr extends Xe{_parse(t){return this._getType(t)===Ee.undefined?En(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qr.create=(e,t)=>new qr({innerType:e,typeName:Ve.ZodOptional,...Ue(t)});class _i extends Xe{_parse(t){return this._getType(t)===Ee.null?En(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_i.create=(e,t)=>new _i({innerType:e,typeName:Ve.ZodNullable,...Ue(t)});class Mh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Mh.create=(e,t)=>new Mh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class Dh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dh.create=(e,t)=>new Dh({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class zE extends Xe{_parse(t){if(this._getType(t)!==Ee.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}zE.create=e=>new zE({typeName:Ve.ZodNaN,...Ue(e)});class sH extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Nh extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),Ga(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Nh({in:t,out:n,typeName:Ve.ZodPipeline})}}class Fh extends Xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ki(o)&&(o.value=Object.freeze(o.value)),o);return dc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Fh.create=(e,t)=>new Fh({innerType:e,typeName:Ve.ZodReadonly,...Ue(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={})),Wr.create,ir.create,pc.create,hc.create,Io.create,Pi.create,mc.create,qr.create,_i.create;const lH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},cH=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},jE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):jE(t),o=structuredClone(e);return cH(o,r,n),o},uH=(e,t)=>e.localeCompare(t),Mi={},RE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return BE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=RE(e._def.innerType);return t==="ZodArray"?n??[]:n}},BE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,RE(n)])),HE=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=HE(i,o):n[r]=o||i)}return n},dH={sort:uH,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},WE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return F3.parse(n.toString(),dH)},Ur=(e,t)=>jE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Gr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Lh=e=>{const t=e.dataset.target;if(!t)return Gr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Gr(n||e)},fH={state:{},loading:!1,useOnChange:!1},qE=e=>e.dataset.target||e.name,pH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ja.LocalStorage.get(t);return lH(n)?n:{}},clear:()=>{ja.LocalStorage.delete(t)},set:n=>ja.LocalStorage.set(t,n)}},hH=(e,t,n=fH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??BE(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=qE(T),C=Lh(T)||(E?Gr(E):""),P=Ur(w,e);if(T.setAttribute("data-initialized","true"),P){const _=P.safeParse(C),F=_.success?void 0:_.error.issues[0]?.message??"";o(V=>gn(V??{},w,F))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((C,P)=>{const _=P.element,F=P.schema.safeParse(Gr(_));if(_.dataset.ignore==="ignore"||F.success)return C;const V=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const N=_.dataset.name||_.name||"";return gn(C,N,V)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Mi)=>{const E=Ur(x,e),I=w=>{if(!Xl(w))return;s(P=>gn(P,x,w.toISOString())),o(P=>gn(P,x,void 0));const C=i.current[x].element;if(C){const P=C.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,date:Re.string(a[x])?new Date(a[x]):a[x],required:T.required??!E.isOptional(),error:Rn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Mi)=>{const E=Ur(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.value;s(P=>gn(P,x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),value:Rn(a,x,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,T=Mi)=>{const E=Ur(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.checked;s(P=>gn(P??{},x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},p=(x,T=Mi)=>{const E=Ur(x,e),I=w=>{w.persist?.();const C=w.target.value;T?.onChange?.(w),s(P=>gn(P,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(a,x,void 0)||T?.value||"",type:Re.instance(E,Ii)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},v=(x,T=Mi)=>{const E=Ur(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{s(C=>gn(C,x,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(a,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},g=(x,T=Mi)=>{const E=Ur(x,e),I=E._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const P=I?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(_=>gn(_,x,P))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Rn(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:E})}};S.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(Gr(I)),C=V=>{const N=qE(V.target);if(!N)return!1;const O=V.target,D=Lh(V.target)||(V.relatedTarget?Gr(V.relatedTarget):""),z=E.schema.safeParse(D);if(O.setAttribute("value",D),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const k=gn(M,N,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(k)?null:k}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(k=>{if(Re.null(k))return null;const L=gn(k,N,M||void 0);return Re.empty(L)?null:L})}return!1},P=new AbortController,_=I.getAttribute("data-trigger")||"blur";I.addEventListener(_,C,{signal:P.signal});const F=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:F,unsubscribe:()=>P.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const h=x=>T=>{T.preventDefault();const E=T.currentTarget;let I=WE(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(F=>{if(F.tagName==="SELECT"){const V=F;I=gn(I,V.name,V.value)}if(F.tagName==="INPUT"){const V=F,N=Lh(V)||(V?Gr(V):"");I=gn(I,V.dataset.target||V.name,N)}});const C=HE(I,a),P=e.safeParse(C),_=()=>{hE(E),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return E.setAttribute("data-json",F),n.interceptor?.clear(),x?.(T,{form:E,event:T,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),E.reportValidity(),x?.(T,{form:E,json:I,event:T,reset:_,setErrors:o,data:I,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(V=>String(V))}))})},y=x=>td(a,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:g,state:a,errors:r,select:d,checkbox:f,onSubmit:h,setState:s,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:v,disabled:r!==null}},mH=e=>e?JSON.parse(e.getAttribute("data-json")):{},gH=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},UE={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},GE={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},YE={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},vH={name:"dark",zIndex:YE,rounded:UE,spacing:GE,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",disabled:"hsla(240, 4%, 33%)",muted:{DEFAULT:"hsla(210, 10%, 28%)",foreground:"hsla(210, 12%, 46%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,40%,10%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},yH={rounded:UE,spacing:GE,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:YE,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:{DEFAULT:"hsla(210, 30%, 86%)",foreground:"hsla(210, 15%, 20%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},bH=vH,xH=yH,wH=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...fs,...e.tweaks},parser:e.parser||cs.hsla,map:{...ds,...e.map}}),[e]);return m.jsx(Xr.Provider,{value:t,children:m.jsx(xS,{children:e.children})})};ie.Alert=q$,ie.AnimatedList=P$,ie.AnimatedListItem=O$,ie.Autocomplete=M4,ie.Button=pr,ie.Calendar=KS,ie.Card=Wl,ie.Checkbox=jp,ie.ColType=vi,ie.Collapse=cS,ie.CommandPalette=O3,ie.ComponentsProvider=wH,ie.Context=Xr,ie.DatePicker=nB,ie.Description=yz,ie.Dict=zn,ie.Dropdown=gi,ie.Empty=K1,ie.Expand=Sz,ie.FileUpload=S4,ie.Form=Ik,ie.Info=bz,ie.Input=qo,ie.InputFeedback=cy,ie.InputField=Qi,ie.Loading=wz,ie.Menu=rz,ie.MenuItem=nz,ie.Modal=Bp,ie.ModalConfirmProvider=xS,ie.MultiSelect=z4,ie.Notifications=x3,ie.PageHeader=xz,ie.PageTitle=wS,ie.Paragraph=vz,ie.Polymorph=ln,ie.Progress=ZR,ie.Radiobox=oz,ie.RenderOnView=W4,ie.Select=io,ie.Slider=v_,ie.Spinner=SS,ie.Stats=U$,ie.StatsCard=I$,ie.Step=V$,ie.Steps=$$,ie.Switch=y_,ie.Tab=B$,ie.Table=k$,ie.Tabs=j$,ie.Tag=ns,ie.TaskList=gz,ie.Textarea=iz,ie.Timeline=XR,ie.TimelineItem=Jl,ie.Toolbar=QR,ie.Tooltip=rd,ie.TransferList=B4,ie.Wizard=Iz,ie.createColumns=KV,ie.createCssProperties=gI,ie.createDesignTokens=Mg,ie.createFormStorage=pH,ie.createOptionCols=Mp,ie.createStyles=pI,ie.createTheme=mI,ie.createTokenStyles=vI,ie.css=Pe,ie.defaultDarkTheme=bH,ie.defaultLightTheme=xH,ie.defaultTranslations=ds,ie.defaultTweaks=fs,ie.dispatchInput=dg,ie.formReset=hE,ie.formToJson=WE,ie.getCoords=Tk,ie.getJsonForm=mH,ie.getModalScrollerRef=e$,ie.getRemainingSize=zi,ie.getSchemaShape=Ur,ie.hasVerticalScroll=fg,ie.initializeInputDataset=$i,ie.isChildVisible=pg,ie.isMobile=ly,ie.isReactComponent=Sk,ie.isReactFC=fu,ie.isSsr=Ar,ie.mergeRefs=sr,ie.negate=DP,ie.noop=Wo,ie.parsers=cs,ie.path=td,ie.reduceTokens=xr,ie.safeRegex=nd,ie.splitInto=sy,ie.useColorParser=eS,ie.useConfirm=cz,ie.useForm=hH,ie.useLocale=ll,ie.useNotification=g3,ie.usePrevious=gH,ie.useReactive=rS,ie.useStableRef=_r,ie.useStepContext=nS,ie.useSwipe=HS,ie.useTablePreferences=QV,ie.useTranslations=Pt,ie.uuid=Ho,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
|
|
15
|
+
`),()=>{E.contains(T)&&E.removeChild(T)}},[t]),g.jsx(GN,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:P.cloneElement(e,{ref:d})})}const KN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=Zn(ZN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:h=>{u.set(h,!0);for(const y of u.values())if(!y)return;r&&r()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((h,y)=>u.set(y,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=g.jsx(YN,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),g.jsx(fl.Provider,{value:p,children:e})};function ZN(){return new Map}function W0(e=!0){const t=S.useContext(fl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Ml=e=>e.key||"";function q0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const mn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=W0(s),f=S.useMemo(()=>q0(e),[e]),p=s&&!u?[]:f.map(Ml),h=S.useRef(!0),y=S.useRef(f),m=Zn(()=>new Map),v=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);dl(()=>{h.current=!1,y.current=f;for(let k=0;k<T.length;k++){const A=Ml(T[k]);p.includes(A)?(m.delete(A),v.current.delete(A)):m.get(A)!==!0&&m.set(A,!1)}},[T,p.length,p.join("-")]);const I=[];if(f!==b){let k=[...f];for(let A=0;A<T.length;A++){const O=T[A],N=Ml(O);p.includes(N)||(k.splice(A,0,O),I.push(O))}return i==="wait"&&I.length&&(k=I),E(q0(k)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(ls);return g.jsx(g.Fragment,{children:T.map(k=>{const A=Ml(k),O=s&&!u?!1:f===T||p.includes(A),N=()=>{if(v.current.has(A))return;if(v.current.add(A),m.has(A))m.set(A,!0);else return;let M=!0;m.forEach($=>{$||(M=!1)}),M&&(w?.(),E(y.current),s&&d?.(),r&&r())};return g.jsx(KN,{isPresent:O,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:O?void 0:N,anchorX:a,anchorY:l,children:k},A)})})},XN=S.createContext(null);function QN(){const e=S.useRef(!1);return dl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function JN(){const e=QN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ht.postRender(r),[r]),t]}const U0=e=>e===!0,e2=e=>U0(e===!0)||e==="id",t2=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(ls),o=S.useContext(XN),[i,s]=JN(),a=S.useRef(null),l=r.id||o;a.current===null&&(e2(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:U0(n)&&r.group||R0()});const c=S.useMemo(()=>({...a.current,forceRender:i}),[s]);return g.jsx(ls.Provider,{value:c,children:e})},G0=S.createContext({strict:!1}),Y0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let K0=!1;function n2(){if(K0)return;const e={};for(const t in Y0)e[t]={isEnabled:n=>Y0[t].some(r=>!!n[r])};Vx(e),K0=!0}function Z0(){return n2(),$D()}function r2(e){const t=Z0();for(const n in e)t[n]={...t[n],...e[n]};Vx(t)}const o2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Dl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||o2.has(e)}let X0=e=>!Dl(e);function Q0(e){typeof e=="function"&&(X0=t=>t.startsWith("on")?!Dl(t):e(t))}try{Q0(require("@emotion/is-prop-valid").default)}catch{}function i2(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(X0(o)||n===!0&&Dl(o)||!t&&!Dl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Hf({children:e,isValidProp:t,...n}){t&&Q0(t);const r=S.useContext(yo);n={...r,...n},n.transition=hf(n.transition,r.transition),n.isStatic=Zn(()=>n.isStatic);const o=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return g.jsx(yo.Provider,{value:o,children:e})}const Nl=S.createContext({});function s2(e,t){if(kl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||bs(n)?n:void 0,animate:bs(r)?r:void 0}}return e.inherit!==!1?t:{}}function a2(e){const{initial:t,animate:n}=s2(e,S.useContext(Nl));return S.useMemo(()=>({initial:t,animate:n}),[J0(t),J0(n)])}function J0(e){return Array.isArray(e)?e.join(" "):e}const Wf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ew(e,t,n){for(const r in t)!zt(t[r])&&!Xx(r,n)&&(e[r]=t[r])}function l2({transformTemplate:e},t){return S.useMemo(()=>{const n=Wf();return Vf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function c2(e,t){const n=e.style||{},r={};return ew(r,n,e),Object.assign(r,l2(e,t)),r}function u2(e,t){const n={},r=c2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const tw=()=>({...Wf(),attrs:{}});function d2(e,t,n,r){const o=S.useMemo(()=>{const i=tw();return Jx(i,t,t0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};ew(i,e.style,e),o.style={...i,...o.style}}return o}const f2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qf(e){return typeof e!="string"||e.includes("-")?!1:!!(f2.indexOf(e)>-1||/[A-Z]/u.test(e))}function p2(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??qf(e)?d2:u2)(t,r,o,e),c=i2(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>zt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function h2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:m2(n,r,o,e),renderState:t()}}function m2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Ol(i[f]);let{initial:s,animate:a}=e;const l=kl(e),c=Nx(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!El(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const h=yf(e,f[p]);if(h){const{transitionEnd:y,transition:m,...v}=h;for(const b in v){let x=v[b];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[b]=x)}for(const b in y)o[b]=y[b]}}}return o}const nw=e=>(t,n)=>{const r=S.useContext(Nl),o=S.useContext(fl),i=()=>h2(e,t,r,o);return n?i():Zn(i)},g2=nw({scrapeMotionValuesFromProps:zf,createRenderState:Wf}),y2=nw({scrapeMotionValuesFromProps:n0,createRenderState:tw}),v2=Symbol.for("motionComponentSymbol");function b2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const rw=S.createContext({});function fi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function x2(e,t,n,r,o,i){const{visualElement:s}=S.useContext(Nl),a=S.useContext(G0),l=S.useContext(fl),c=S.useContext(yo),u=c.reducedMotion,d=c.skipAnimations,f=S.useRef(null),p=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const h=f.current,y=S.useContext(rw);h&&!h.projection&&o&&(h.type==="html"||h.type==="svg")&&w2(f.current,n,o,y);const m=S.useRef(!1);S.useInsertionEffect(()=>{h&&m.current&&h.update(n,l)});const v=n[hx],b=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return dl(()=>{p.current=!0,h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),b.current&&h.animationState&&h.animationState.animateChanges())}),S.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),h.enteringChildren=void 0)}),h}function w2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ow(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&fi(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function ow(e){if(e)return e.options.allowProjection!==!1?e.projection:ow(e.parent)}function Uf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&r2(r);const i=n?n==="svg":qf(e),s=i?y2:g2;function a(c,u){let d;const f={...S.useContext(yo),...c,layoutId:S2(c)},{isStatic:p}=f,h=a2(c),y=s(c,p);if(!p&&sb){T2(f,r);const m=E2(f);d=m.MeasureLayout,h.visualElement=x2(e,y,f,o,m.ProjectionNode,i)}return g.jsxs(Nl.Provider,{value:h,children:[d&&h.visualElement?g.jsx(d,{visualElement:h.visualElement,...f}):null,p2(e,c,b2(y,h.visualElement,u),y,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[v2]=e,l}function S2({layoutId:e}){const t=S.useContext(ls).id;return t&&e!==void 0?t+"-"+e:e}function T2(e,t){const n=S.useContext(G0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ei(!1,r,"lazy-strict-mode"):pn(!1,r,"lazy-strict-mode")}}function E2(e){const t=Z0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function k2(e,t){if(typeof Proxy>"u")return Uf;const n=new Map,r=(i,s)=>Uf(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&pl(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,Uf(s,void 0,e,t)),n.get(s))})}const C2=(e,t)=>t.isSVG??qf(e)?new r0(t):new Qx(t,{allowProjection:e!==S.Fragment});class I2 extends zr{constructor(t){super(t),t.animationState||(t.animationState=iN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();El(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let A2=0;class P2 extends zr{constructor(){super(...arguments),this.id=A2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const O2={animation:{Feature:I2},exit:{Feature:P2}};function Ts(e){return{point:{x:e.pageX,y:e.pageY}}}const _2=e=>t=>Pf(t)&&e(t,Ts(t));function Es(e,t,n,r){return Ss(e,t,_2(n),r)}const iw=({current:e})=>e?e.ownerDocument.defaultView:null,sw=(e,t)=>Math.abs(e-t);function M2(e,t){const n=sw(e.x,t.x),r=sw(e.y,t.y);return Math.sqrt(n**2+r**2)}const aw=new Set(["auto","scroll"]);class lw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Yf(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=M2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!y)return;const{point:m}=p,{timestamp:v}=Yt;this.history.push({...m,timestamp:v});const{onStart:b,onMove:x}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Gf(h,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Yf(p.type==="pointercancel"?this.lastMoveEventInfo:Gf(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,b),m&&m(p,b)},!Pf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Ts(t),c=Gf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Yf(c,this.history)),this.removeListeners=cs(Es(this.contextWindow,"pointermove",this.handlePointerMove),Es(this.contextWindow,"pointerup",this.handlePointerUp),Es(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(aw.has(r.overflowX)||aw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),br(this.updatePoint)}}function Gf(e,t){return t?{point:t(e.point)}:e}function cw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yf({point:e},t){return{point:e,delta:cw(e,uw(t)),offset:cw(e,D2(t)),velocity:N2(t,.1)}}function D2(e){return e[0]}function uw(e){return e[e.length-1]}function N2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=uw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>hn(t)*2&&(r=e[1]);const i=Sn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function F2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?vt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?vt(n,e,r.max):Math.min(e,n)),e}function dw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function L2(e,{top:t,left:n,bottom:r,right:o}){return{x:dw(e.x,n,o),y:dw(e.y,t,r)}}function fw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function V2(e,t){return{x:fw(e.x,t.x),y:fw(e.y,t.y)}}function $2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=ti(t.min,t.max-r,e.min):r>o&&(n=ti(e.min,e.max-o,t.min)),Xn(0,1,n)}function z2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kf=.35;function j2(e=Kf){return e===!1?e=0:e===!0&&(e=Kf),{x:pw(e,"left","right"),y:pw(e,"top","bottom")}}function pw(e,t,n){return{min:hw(e,t),max:hw(e,n)}}function hw(e,t){return typeof e=="number"?e:e[t]||0}const R2=new WeakMap;class B2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Ts(d).point),this.stopAnimation()},s=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jn(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Qn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[v];T&&(b=en(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&ht.update(()=>y(d,f),!1,!0),bf(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=W2(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&ht.update(()=>m(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new lw(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:iw(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ht.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Fl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=F2(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&fi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=L2(r.layoutBox,t):this.constraints=!1,this.elastic=j2(n),o!==this.constraints&&!fi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Jn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=z2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!fi(t))return!1;const r=t.current;pn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=BD(r,o.root,this.visualElement.getTransformPagePoint());let s=V2(o.layout.layoutBox,i);if(n){const a=n(zD(s));this.hasMutatedConstraints=!!a,a&&(s=jx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Jn(u=>{if(!Fl(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bf(this.visualElement,t),r.start(gf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Jn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Jn(n=>{const{drag:r}=this.getProps();if(!Fl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-vt(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!fi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Jn(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=$2({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Jn(s=>{if(!Fl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(vt(l,c,o[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;R2.set(this.visualElement,this);const t=this.visualElement.current,n=Es(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,p=f!==t&&xD(f);u&&d&&!p&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();fi(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=H2(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ht.read(o);const a=Ss(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Jn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Kf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function mw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function H2(e,t,n){const r=Ox(e,mw(n)),o=Ox(t,mw(n));return()=>{r(),o()}}function Fl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function W2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class q2 extends zr{constructor(t){super(t),this.removeGroupControls=wn,this.removeListeners=wn,this.controls=new B2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zf=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class U2 extends zr{constructor(){super(...arguments),this.removePointerDownListener=wn}onPointerDown(t){this.session=new lw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iw(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Zf(t),onStart:Zf(n),onMove:Zf(r),onEnd:(i,s)=>{delete this.session,o&&ht.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Es(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Xf=!1;class G2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Xf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),_l.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),Xf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ht.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Af.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Xf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function gw(e){const[t,n]=W0(),r=S.useContext(ls);return g.jsx(G2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(rw),isPresent:t,safeToRemove:n})}const Y2={pan:{Feature:U2},drag:{Feature:q2,ProjectionNode:B0,MeasureLayout:gw}};function yw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ht.postRender(()=>i(t,Ts(t)))}class K2 extends zr{mount(){const{current:t}=this.node;t&&(this.unmount=gD(t,(n,r)=>(yw(this.node,r,"Start"),o=>yw(this.node,o,"End"))))}unmount(){}}class Z2 extends zr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=cs(Ss(this.node.current,"focus",()=>this.onFocus()),Ss(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ht.postRender(()=>i(t,Ts(t)))}class X2 extends zr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=SD(t,(o,i)=>(vw(this.node,i,"Start"),(s,{success:a})=>vw(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const Qf=new WeakMap,Jf=new WeakMap,Q2=e=>{const t=Qf.get(e.target);t&&t(e)},J2=e=>{e.forEach(Q2)};function eF({root:e,...t}){const n=e||document;Jf.has(n)||Jf.set(n,{});const r=Jf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(J2,{root:e,...t})),r[o]}function tF(e,t,n){const r=eF(t);return Qf.set(e,n),r.observe(e),()=>{Qf.delete(e),r.unobserve(e)}}const nF={some:0,all:1};class rF extends zr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:nF[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return tF(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(oF(t,n))&&this.startObserver()}unmount(){}}function oF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const iF={...O2,...{inView:{Feature:rF},tap:{Feature:X2},focus:{Feature:Z2},hover:{Feature:K2}},...Y2,...{layout:{ProjectionNode:B0,MeasureLayout:gw}}},He=k2(iF,C2);function sF(e){return S.useEffect(()=>()=>e(),[])}function vo(e){const t=Zn(()=>$r(e)),{isStatic:n}=S.useContext(yo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function bw(e,t){const n=vo(t()),r=()=>n.set(t());return r(),dl(()=>{const o=()=>ht.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),br(r)}}),n}function aF(e){ys.current=[],e();const t=bw(ys.current,e);return ys.current=void 0,t}function lF(e,t,n,r){if(typeof e=="function")return aF(e);const i=typeof t=="function"?t:DD(t,n,r),s=Array.isArray(e)?xw(e,i):xw([e],([l])=>i(l)),a=Array.isArray(e)?void 0:e.accelerate;return a&&!a.isTransformed&&typeof t!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(s.accelerate={...a,times:t,keyframes:n,isTransformed:!0}),s}function xw(e,t){const n=Zn(()=>[]);return bw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function cF(){!Df.current&&Fx();const[e]=S.useState(Cl.current);return process.env.NODE_ENV!=="production"&&pl(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function uF(){const e=cF(),{reducedMotion:t}=S.useContext(yo);return t==="never"?!1:t==="always"?!0:e}function ep(e){return typeof e=="object"&&!Array.isArray(e)}function ww(e,t,n,r){return e==null?[]:typeof e=="string"&&ep(t)?Cf(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function dF(e,t,n){return e*(t+1)}function Sw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function fF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Jo(e,o),r--)}}function pF(e,t,n,r,o,i){fF(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:vt(o,i,r[s]),easing:Tb(n,s)})}function hF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function mF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const gF="easeInOut",yF=20;function vF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const h=e[p];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,Sw(d,h.at,u,c));continue}let[y,m,v={}]=h;v.at!==void 0&&(d=Sw(d,v.at,u,c));let b=0;const x=(T,E,I,w=0,k=0)=>{const A=bF(T),{delay:O=0,times:N=Gb(A),type:M=t.type||"keyframes",repeat:$,repeatType:_,repeatDelay:F=0,...z}=E;let{ease:D=t.ease||"easeOut",duration:C}=E;const V=typeof O=="function"?O(w,k):O,L=A.length,B=df(M)?M:o?.[M||"keyframes"];if(L<=2&&B){let ee=100;if(L===2&&SF(A)){const q=A[1]-A[0];ee=Math.abs(q)}const ie={...t,...z};C!==void 0&&(ie.duration=hn(C));const te=Bb(ie,ee,B);D=te.ease,C=te.duration}C??(C=i);const U=d+V;N.length===1&&N[0]===0&&(N[1]=1);const G=N.length-A.length;if(G>0&&Ub(N,G),A.length===1&&A.unshift(null),$){pn($<yF,"Repeat count too high, must be less than 20","repeat-count-high"),C=dF(C,$);const ee=[...A],ie=[...N];D=Array.isArray(D)?[...D]:[D];const te=[...D];for(let q=0;q<$;q++){A.push(...ee);for(let Y=0;Y<ee.length;Y++)N.push(ie[Y]+(q+1)),D.push(Y===0?"linear":Tb(te,Y-1))}hF(N,$)}const H=U+C;pF(I,A,D,N,U,H),b=Math.max(V+C,b),f=Math.max(H,f)};if(zt(y)){const T=Tw(y,a);x(m,v,Ew("default",T))}else{const T=ww(y,m,r,l),E=T.length;for(let I=0;I<E;I++){m=m,v=v;const w=T[I],k=Tw(w,a);for(const A in m)x(m[A],xF(v,A),Ew(A,k),I,E)}}u=d,d+=b}return a.forEach((p,h)=>{for(const y in p){const m=p[y];m.sort(mF);const v=[],b=[],x=[];for(let w=0;w<m.length;w++){const{at:k,value:A,easing:O}=m[w];v.push(A),b.push(ti(0,f,k)),x.push(O||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(gF)),b[b.length-1]!==1&&(b.push(1),v.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});const T=s.get(h);T.keyframes[y]=v;const{type:E,...I}=t;T.transition[y]={...I,duration:f,ease:x,times:b,...n}}}),s}function Tw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ew(e,t){return t[e]||(t[e]=[]),t[e]}function bF(e){return Array.isArray(e)?e:[e]}function xF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const wF=e=>typeof e=="number",SF=e=>e.every(wF);function TF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=xl(e)&&!_x(e)?new r0(t):new Qx(t);n.mount(e),vs.set(e,n)}function EF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new KD(t);n.mount(e),vs.set(e,n)}function kF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!ep(t)}function kw(e,t,n,r){const o=[];if(kF(e,t))o.push(P0(e,ep(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=ww(e,t,r),s=i.length;pn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?TF:EF;vs.has(l)||c(l);const u=vs.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...wf(u,{...t,transition:d},{}))}}return o}function CF(e,t,n){const r=[],o=e.map(s=>{if(Array.isArray(s)&&typeof s[0]=="function"){const a=s[0],l=$r(0);return l.on("change",a),s.length===1?[l,[0,1]]:s.length===2?[l,[0,1],s[1]]:[l,s[1],s[2]]}return s});return vF(o,t,n,{spring:ms}).forEach(({keyframes:s,transition:a},l)=>{r.push(...kw(l,s,a))}),r}function IF(e){return Array.isArray(e)&&e.some(Array.isArray)}function Cw(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,s){let a=[],l;if(IF(o))a=CF(o,n!==void 0?{reduceMotion:n,...i}:i,t);else{const{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=kw(o,i,n!==void 0?{reduceMotion:n,...d}:d,t)}const c=new LM(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{Jo(t.animations,c)})),c}return r}const Iw=Cw();function AF(){const e=Zn(()=>({current:null,animations:[]})),t=uF()??void 0,n=S.useMemo(()=>Cw({scope:e,reduceMotion:t}),[e,t]);return sF(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0}),[e,n]}class PF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const OF=()=>new PF;function _F(){return Zn(OF)}const Aw=S.createContext(null);function MF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=vt(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?m_(e,o,o+i):e}function DF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Zn(()=>He[t]),l=[],c=S.useRef(!1),u=S.useRef(null);pn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(h,y)=>{const m=l.findIndex(v=>h===v.value);m!==-1?l[m].layout=y[n]:l.push({value:h,layout:y[n]}),l.sort(FF)},updateOrder:(h,y,m)=>{if(c.current)return;const v=MF(l,h,y,m);l!==v&&(c.current=!0,r(v.map(NF).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=h=>{u.current=h,typeof s=="function"?s(h):s&&(s.current=h)},p={overflowAnchor:"none",...i.style};return g.jsx(a,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(Aw.Provider,{value:d,children:e})})}const Pw=S.forwardRef(DF);function NF(e){return e.value}function FF(e,t){return e.layout.min-t.layout.min}const Ll=50,Ow=25,LF=new Set(["auto","scroll"]),ks=new WeakMap,Cs=new WeakMap;let Is=null;function VF(){if(Is){const e=tp(Is,"y");e&&(Cs.delete(e),ks.delete(e));const t=tp(Is,"x");t&&t!==e&&(Cs.delete(t),ks.delete(t)),Is=null}}function $F(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,o=e===document.body||e===document.documentElement;return LF.has(r)||o}function tp(e,t){let n=e?.parentElement;for(;n;){if($F(n,t))return n;n=n.parentElement}return null}function zF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?Math.max(0,r.left):Math.max(0,r.top),i=n==="x"?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),s=e-o,a=i-e;if(s<Ll){const l=1-s/Ll;return{amount:-Ow*l*l,edge:"start"}}else if(a<Ll){const l=1-a/Ll;return{amount:Ow*l*l,edge:"end"}}return{amount:0,edge:null}}function jF(e,t,n,r){if(!e)return;Is=e;const o=tp(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=zF(i,o,n);if(a===null){Cs.delete(o),ks.delete(o);return}const l=Cs.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;Cs.set(o,a);const d=n==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);ks.set(o,d)}if(s>0){const u=ks.get(o);if((n==="x"?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=u)return}n==="x"?c?window.scrollBy({left:s}):o.scrollLeft+=s:c?window.scrollBy({top:s}):o.scrollTop+=s}function _w(e,t=0){return zt(e)?e:vo(t)}function RF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=Zn(()=>He[r]),u=S.useContext(Aw),d={x:_w(t.x),y:_w(t.y)},f=lF([d.x,d.y],([v,b])=>v||b?1:"unset");pn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:h,updateOrder:y,groupRef:m}=u;return g.jsx(c,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(v,b)=>{const{velocity:x,point:T}=b,E=d[p].get();y(n,E,x[p]),jF(m.current,T[p],p,x[p]),o&&o(v,b)},onDragEnd:(v,b)=>{VF(),i&&i(v,b)},onLayoutMeasure:v=>{h(n,v)},ref:l,ignoreStrict:!0,children:e})}const Mw=S.forwardRef(RF);var Vl={exports:{}},np={},$l={exports:{}},rp={};var Dw;function BF(){if(Dw)return rp;Dw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var p=f(),h=r({inst:{value:p,getSnapshot:f}}),y=h[0].inst,m=h[1];return i(function(){y.value=p,y.getSnapshot=f,l(y)&&m({inst:y})},[d,p,f]),o(function(){return l(y)&&m({inst:y}),d(function(){l(y)&&m({inst:y})})},[d]),s(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return rp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,rp}var op={};var Nw;function HF(){return Nw||(Nw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function t(p,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=h();if(!d){var m=h();i(y,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=s({inst:{value:y,getSnapshot:h}});var v=m[0].inst,b=m[1];return l(function(){v.value=y,v.getSnapshot=h,n(v)&&b({inst:v})},[p,y,h]),a(function(){return n(v)&&b({inst:v}),p(function(){n(v)&&b({inst:v})})},[p]),c(y),y}function n(p){var h=p.getSnapshot;p=p.value;try{var y=h();return!i(p,y)}catch{return!0}}function r(p,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;op.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),op}var Fw;function ip(){return Fw||(Fw=1,process.env.NODE_ENV==="production"?$l.exports=BF():$l.exports=HF()),$l.exports}var Lw;function WF(){if(Lw)return np;Lw=1;var e=S,t=ip();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return np.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&y.hasValue){var w=y.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,T=k)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,p]);var m=o(c,h[0],h[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},np}var sp={};var Vw;function qF(){return Vw||(Vw=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=ip(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;sp.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&y.hasValue){var w=y.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,T=k)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,p]);var m=o(c,h[0],h[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),sp}var $w;function UF(){return $w||($w=1,process.env.NODE_ENV==="production"?Vl.exports=WF():Vl.exports=qF()),Vl.exports}var GF=UF(),YF=ip(),pi=function(){return pi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pi.apply(this,arguments)};function As(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function zw(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var hi=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},KF=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},ZF=function(e){return Object.entries(e)},jw=function(e){return e instanceof Promise},Rw=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},pi(pi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},XF=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,zw([],As(s),!1)),u=function(d,f){return n(function(p){return Rw(d,p,i,f)})};return jw(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},QF=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,zw([],As(s),!1)),c=function(u){return n(function(d){return Rw(u,d,i,o.current)})};return jw(l)?l.then(function(u){return c(u)}):c(l)}},ap=function(e,t,n){var r,o,i,s=As(S.useState(function(){return e}),2),a=s[0],l=s[1],c=hi(a),u=hi((r=n?.props)!==null&&r!==void 0?r:{}),d=hi(t),f=hi((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=hi((i=n?.interceptor)!==null&&i!==void 0?i:[]),h=S.useRef(e),y=KF(a),m=hi(y),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;f.current.forEach(function(E){E(a,y,T)})}},[a,f,y]);var b=As(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return ZF(E).reduce(function(I,w){var k,A=As(w,2),O=A[0],N=A[1];return pi(pi({},I),(k={},k[O]=n?.debug?XF(O,N,l,T,v,p.current):QF(O,N,l,T,v,p.current),k))},{})}),1),x=b[0];return[a,x,u.current]},JF=Object.defineProperty,Bw=Object.getOwnPropertySymbols,eL=Object.prototype.hasOwnProperty,tL=Object.prototype.propertyIsEnumerable,Hw=(e,t,n)=>t in e?JF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nL=(e,t)=>{for(var n in t||(t={}))eL.call(t,n)&&Hw(e,n,t[n]);if(Bw)for(var n of Bw(t))tL.call(t,n)&&Hw(e,n,t[n]);return e},lp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},rL=(e,t,n,r)=>jl(lp,e,t,n,r),mi=e=>typeof e=="object",jr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!mi(e)&&!mi(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>jr(e[r],t[r]))},oL=(e,t)=>(mi(e)||Array.isArray(e))&&t?e[t]:e,iL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,zl=e=>/[0-9.]+/.test(e),Ww=e=>["string","number"].includes(typeof e),qw=e=>e==null||e?.length===0||e==="",Uw={eq:jr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:qw,notEmpty:e=>!qw(e),in:(e,t)=>lp(t,n=>jr(e,n)),notIn:(e,t)=>Gw(t,n=>!jr(e,n))},sL=e=>{if(e in Uw)return Uw[e];throw new Error("Linq - Symbol not found")},gi=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},jl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=sL(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},aL=(e,t,n,r)=>jl(gi,e,t,n,r),Gw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},lL=(e,t,n,r)=>jl(Gw,e,t,n,r),Yw=e=>{if(e===null)return null;const t=nL({},e);return Object.keys(t).forEach(n=>t[n]=mi(e[n])?Yw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Kw=(e,t)=>{if(mi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(jr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(jr(t,r))return!0}return!1},cL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},uL=e=>gi(e,(t,n,r)=>mi(t)?n===r.findIndex(o=>jr(o,t)):n===r.indexOf(t)),dL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Zw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},fL=(e,t)=>Zw(e,n=>n[t]),Xw=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},pL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},hL=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return zl(e)&&zl(t)?r.map(s=>Number.parseInt(s)):r},cp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&zl(e)&&zl(t)){const o=[],[i,s]=pL(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return hL(e,t,r)},mL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cp(r,o,1):cp(r,i,Number.parseInt(o,10))}return Ww(e)&&Ww(t)?cp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},up=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},Qw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},gL=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},yL=(e,t,n,r)=>jl(gL,e,t,n,r),Jw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(iL(t))},e1=(e=>(e.Asc="asc",e.Desc="desc",e))(e1||{}),vL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),bL=(e,t)=>e.sort(vL(t)),xL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:gi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},wL=class Jh{constructor(t=[]){this.array=t}static Range(...t){return mL(...t)}static New(t){return new Jh(t)}Where(t,n,r){return this.array=aL(this.array,t,n,r),this}Some(t,n,r){return rL(this.array,t,n,r)}All(t,n,r){return lL(this.array,t,n,r)}Reverse(){return this.array=Qw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=yL(this.array,t,n,r),this}Distinct(){return this.array=uL(this.array),this}First(t){return t===void 0?this.array[0]:dL(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?up((n,r)=>n+r,0,this.array):up((n,r)=>n+oL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return fL(this.array,t)}GroupWith(t){return Zw(this.array,t)}Except(t){return gi(this.array,n=>!Kw(t,n))}Intersect(t){return gi(this.array,n=>Kw(t,n))}OrderBy(t,n){let r;return r=t?Jw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Qw(r):r,this}Includes(t){return lp(this.array,n=>jr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return up(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Xw(this.array,n=>[t,n]))}Zip(t,n){return Xw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:gi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Jh(Yw(this.array))}ToObject(t){return cL(this.array,t)}Sort(t){return Array.isArray(t)?bL(this.array,t):Jw(this.array,t)}Unique(t){return xL(this.array,t)}},t1=wL;const Rl=0,Rr=1,yi=2,n1=4;function r1(e){return()=>e}function SL(e){e()}function Ps(e,t){return n=>e(t(n))}function o1(e,t){return()=>e(t)}function TL(e,t){return n=>e(t,n)}function dp(e){return e!==void 0}function EL(...e){return()=>{e.map(SL)}}function vi(){}function Bl(e,t){return t(e),e}function kL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Rr,t)}function ze(e,t){e(Rl,t)}function fp(e){e(yi)}function Tt(e){return e(n1)}function Ae(e,t){return st(e,TL(t,Rl))}function Fn(e,t){const n=e(Rr,r=>{n(),t(r)});return n}function i1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function s1(e,t){return e===t}function xt(e=s1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function _e(e){return t=>n=>{e(n)&&t(n)}}function we(e){return t=>Ps(t,e)}function er(e){return t=>()=>{t(e)}}function fe(e,...t){const n=CL(...t);return((r,o)=>{switch(r){case yi:fp(e);return;case Rr:return st(e,n(o))}})}function tr(e,t){return n=>r=>{n(t=e(t,r))}}function bo(e){return t=>n=>{e>0?e--:t(n)}}function xr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function We(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function CL(...e){return t=>e.reduceRight(kL,t)}function IL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Rr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),vi);case yi:r(),n=null;return}}}function ge(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Rl:t=o;break;case Rr:{o(t);break}case n1:return t}return n(r,o)})}function Xt(e,t){return Bl(ge(t),n=>Ae(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Rl:e.slice().forEach(r=>{r(n)});return;case yi:e.splice(0,e.length);return;case Rr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function gn(e){return Bl(Ke(),t=>Ae(e,t))}function Xe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:AL(),singleton:n}}const AL=()=>Symbol();function PL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{n[s]=l,r=r|a,r===o&&ze(t,n)})}),function(i,s){switch(i){case yi:{fp(t);return}case Rr:return r===o&&s(n),st(t,s)}}}function Me(e,t=s1){return fe(e,xt(t))}function pp(...e){return function(t,n){switch(t){case yi:return;case Rr:return EL(...e.map(r=>st(r,n)))}}}var ln=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(ln||{});const OL={0:"debug",3:"error",1:"log",2:"warn"},_L=()=>typeof globalThis>"u"?window:globalThis,Br=Xe(()=>{const e=ge(3);return{log:ge((t,n,r=1)=>{var o;const i=(o=_L().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[OL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function nr(e,t,n){return hp(e,t,n).callbackRef}function hp(e,t,n){const r=S.useRef(null);let o=s=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function a1(e,t,n,r,o,i,s,a,l){const c=S.useCallback(u=>{const d=ML(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let h;p&&(h=f.ownerDocument.defaultView);const y=s?a?s.scrollLeft:s.scrollTop:p?a?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,m=s?a?s.scrollWidth:s.scrollHeight:p?a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:p?a?h.innerWidth:h.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:v}),i?.(a?l1("column-gap",getComputedStyle(u).columnGap,o):l1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return hp(c,n,l)}function ML(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},ln.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function l1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ln.WARN),t==="normal"?0:parseInt(t??"0",10)}function mp(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),h=c.top-p.top;f=p.height-Math.max(0,h),d=h+t.scrollTop}else{const p=s.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=hp(o,!0,n),a=S.useCallback(()=>{o(s.current)},[o,s]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const tn=Xe(()=>{const e=Ke(),t=Ke(),n=ge(0),r=Ke(),o=ge(0),i=Ke(),s=Ke(),a=ge(0),l=ge(0),c=ge(0),u=ge(0),d=Ke(),f=Ke(),p=ge(!1),h=ge(!1),y=ge(!1);return Ae(fe(e,we(({scrollTop:m})=>m)),t),Ae(fe(e,we(({scrollHeight:m})=>m)),s),Ae(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:h,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Os={lvl:0};function c1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function mt(e){return e===Os}function _s(e,t){if(!mt(e))return t===e.k?e.v:t<e.k?_s(e.l,t):_s(e.r,t)}function Ln(e,t,n="k"){if(mt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function yn(e,t,n){return mt(e)?f1(t,n,1):t===e.k?jt(e,{k:t,v:n}):t<e.k?p1(jt(e,{l:yn(e.l,t,n)})):p1(jt(e,{r:yn(e.r,t,n)}))}function bi(){return Os}function xi(e,t,n){if(mt(e))return[];const r=Ln(e,t)[0];return DL(yp(e,r,n))}function gp(e,t){if(mt(e))return Os;const{k:n,l:r,r:o}=e;if(t===n){if(mt(r))return o;if(mt(o))return r;{const[i,s]=d1(r);return Hl(jt(e,{k:i,l:u1(r),v:s}))}}else return t<n?Hl(jt(e,{l:gp(r,t)})):Hl(jt(e,{r:gp(o,t)}))}function xo(e){return mt(e)?[]:[...xo(e.l),{k:e.k,v:e.v},...xo(e.r)]}function yp(e,t,n){if(mt(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(yp(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(yp(i,t,n))),a}function Hl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(vp(t))return h1(jt(e,{lvl:n-1}));if(!mt(t)&&!mt(t.r))return jt(t.r,{l:jt(t,{r:t.r.l}),lvl:n,r:jt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(vp(e))return bp(jt(e,{lvl:n-1}));if(!mt(r)&&!mt(r.l)){const o=r.l,i=vp(o)?r.lvl-1:r.lvl;return jt(o,{l:jt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:bp(jt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function jt(e,t){return f1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function u1(e){return mt(e.r)?e.l:Hl(jt(e,{r:u1(e.r)}))}function vp(e){return mt(e)||e.lvl>e.r.lvl}function d1(e){return mt(e.r)?[e.k,e.v]:d1(e.r)}function f1(e,t,n,r=Os,o=Os){return{k:e,l:r,lvl:n,r:o,v:t}}function p1(e){return bp(h1(e))}function h1(e){const{l:t}=e;return!mt(t)&&t.lvl===e.lvl?jt(t,{r:jt(e,{l:t.r})}):e}function bp(e){const{lvl:t,r:n}=e;return!mt(n)&&!mt(n.r)&&n.lvl===t&&n.r.lvl===t?jt(n,{l:jt(e,{r:n.l}),lvl:t+1}):e}function DL(e){return c1(e,({k:t,v:n})=>({index:t,value:n}))}function m1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ms(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const xp=Xe(()=>({recalcInProgress:ge(!1)}),[],{singleton:!0});function g1(e,t,n){return e[Wl(e,t,n)]}function Wl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function NL(e,t,n,r){const o=Wl(e,t,r),i=Wl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function ql(e){return!mt(e.groupOffsetTree)}function wp({index:e},t){return t===e?0:t<e?-1:1}function FL(){return{groupIndices:[],groupOffsetTree:bi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:bi()}}function LL(e,t){let n=mt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),mt(e)){e=yn(e,0,i);continue}const a=xi(e,s-1,o+1);if(a.some(HL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=gp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=yn(e,o+1,f));c&&(e=yn(e,s,i))}return[e,n]}function VL(e){return typeof e.groupIndex<"u"}function $L({offset:e},t){return t===e?0:t<e?-1:1}function Ds(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=g1(t,e,wp),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function y1(e,t){if(!ql(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function v1(e,t,n){if(VL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=y1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function zL(e,t,n,r=0){return r>0&&(t=Math.max(t,g1(e,r,wp).offset)),c1(NL(e,t,n,$L),BL)}function jL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,ln.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&mt(i)&&t.length===2){const f=t[0].size,p=t[1].size;s=n.reduce((h,y)=>yn(yn(h,y,f),y+1,p),s)}else[s,a]=LL(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Sp(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>yn(f,p,Ds(p,d,o)),bi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function RL(e){return xo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function b1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Sp(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Wl(o,t-1,wp),a=o[l].offset;const c=Ln(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of xi(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function BL(e){return{index:e.index,value:e}}function HL(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const WL={offsetHeight:"height",offsetWidth:"width"},rr=Xe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Xt(r,0),i=Ke(),s=Ke(),a=ge(0),l=ge([]),c=ge(void 0),u=ge(void 0),d=ge(void 0),f=ge(void 0),p=ge((w,k)=>Vn(w,WL[k])),h=ge(void 0),y=ge(0),m=FL(),v=Xt(fe(n,We(l,e,y),tr(jL,m),xt()),m),b=Xt(fe(l,xt(),tr((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),we(({prev:w})=>w)),[]);Ae(fe(l,_e(w=>w.length>0),We(v,y),we(([w,k,A])=>{const O=w.reduce((N,M,$)=>yn(N,M,Ds(M,k.offsetTree,A)||$),bi());return{...k,groupIndices:w,groupOffsetTree:O}})),v),Ae(fe(r,We(v),_e(([w,{lastIndex:k}])=>w<k),we(([w,{lastIndex:k,lastSize:A}])=>[{endIndex:k,size:A,startIndex:w}])),n),Ae(c,u);const x=Xt(fe(c,we(w=>w===void 0)),!0);Ae(fe(u,_e(w=>w!==void 0&&mt(Tt(v).sizeTree)),we(w=>{const k=Tt(d),A=Tt(l).length>0;return k?A?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ae(fe(f,_e(w=>w!==void 0&&w.length>0&&mt(Tt(v).sizeTree)),we(w=>{const k=[];let A=w[0],O=0;for(let N=1;N<w.length;N++){const M=w[N];M!==A&&(k.push({endIndex:N-1,size:A,startIndex:O}),A=M,O=N)}return k.push({endIndex:w.length-1,size:A,startIndex:O}),k})),n),Ae(fe(l,We(d,u),_e(([,w,k])=>w!==void 0&&k!==void 0),we(([w,k,A])=>{const O=[];for(let N=0;N<w.length;N++){const M=w[N],$=w[N+1];O.push({startIndex:M,endIndex:M,size:k}),$!==void 0&&O.push({startIndex:M+1,endIndex:$-1,size:A})}return O})),n);const T=gn(fe(n,We(v),tr(({sizes:w},[k,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:m}),we(w=>w.changed)));st(fe(a,tr((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),we(w=>w.diff)),w=>{const{groupIndices:k}=Tt(v);if(w>0)ze(t,!0),ze(i,w+b1(w,k));else if(w<0){const A=Tt(b);A.length>0&&(w-=b1(-w,A)),ze(s,w)}}),st(fe(a,We(e)),([w,k])=>{w<0&&k("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},ln.ERROR)});const E=gn(i);Ae(fe(i,We(v),we(([w,k])=>{const A=k.groupIndices.length>0,O=[],N=k.lastSize;if(A){const M=_s(k.sizeTree,0);let $=0,_=0;for(;$<w;){const z=k.groupIndices[_],D=k.groupIndices.length===_+1?1/0:k.groupIndices[_+1]-z-1;O.push({endIndex:z,size:M,startIndex:z}),O.push({endIndex:z+1+D-1,size:N,startIndex:z+1}),_++,$+=D+1}const F=xo(k.sizeTree);return $!==w&&F.shift(),F.reduce((z,{k:D,v:C})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:D+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:D+w,prevSize:C,ranges:V}},{prevIndex:w,prevSize:0,ranges:O}).ranges}return xo(k.sizeTree).reduce((M,{k:$,v:_})=>({prevIndex:$+w,prevSize:_,ranges:[...M.ranges,{endIndex:$+w-1,size:M.prevSize,startIndex:M.prevIndex}]}),{prevIndex:0,prevSize:N,ranges:[]}).ranges})),n);const I=gn(fe(s,We(v,y),we(([w,{offsetTree:k},A])=>{const O=-w;return Ds(O,k,A)})));return Ae(fe(s,We(v,y),we(([w,k,A])=>{if(k.groupIndices.length>0){if(mt(k.sizeTree))return k;let O=bi();const N=Tt(b);let M=0,$=0,_=0;for(;M<-w;){_=N[$];const F=N[$+1]-_-1;$++,M+=F+1}if(O=xo(k.sizeTree).reduce((F,{k:z,v:D})=>yn(F,Math.max(0,z+w),D),O),M!==-w){const F=_s(k.sizeTree,_);O=yn(O,0,F);const z=Ln(k.sizeTree,-w+1)[1];O=yn(O,1,z)}return{...k,sizeTree:O,...Sp(k.offsetTree,0,O,A)}}else{const O=xo(k.sizeTree).reduce((N,{k:M,v:$})=>yn(N,Math.max(0,M+w),$),bi());return{...k,sizeTree:O,...Sp(k.offsetTree,0,O,A)}}})),v),{beforeUnshiftWith:E,data:h,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:y,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:T,shiftWith:s,shiftWithOffset:I,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt(Br,xp),{singleton:!0});function qL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const x1=Xe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),s=Ke(),a=gn(fe(i,we(qL)));return Ae(fe(a,we(l=>l.totalCount)),n),Ae(fe(a,we(l=>l.groupIndices)),e),Ae(fe(Vt(o,t,r),_e(([l,c])=>ql(c)),we(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),we(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},bt(rr,tn)),Hr=Xe(([{log:e}])=>{const t=ge(!1),n=gn(fe(t,_e(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},ln.DEBUG)}),{didMount:n,propsReady:t}},bt(Br),{singleton:!0}),UL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function w1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!UL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ns=Xe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ke(),h=Ke(),y=ge(0);let m=null,v=null,b=null;function x(){m&&(m(),m=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),ze(l,!1)}return Ae(fe(p,We(n,d,r,y,a,s,f),We(e,i,o),we(([[T,E,I,w,k,A,O,N],M,$,_])=>{const F=w1(T),{align:z,behavior:D,offset:C}=F,V=w-1,L=v1(F,E,V);let B=Ds(L,E.offsetTree,M)+A;z==="end"?(B+=$+Ln(E.sizeTree,L)[1]-I+_,L===V&&(B+=O)):z==="center"?B+=($+Ln(E.sizeTree,L)[1]-I+_)/2:B-=k,C&&(B+=C);const U=G=>{x(),G?(N("retrying to scroll to",{location:T},ln.DEBUG),ze(p,T)):(ze(h,!0),N("list did not change, scroll successful",{},ln.DEBUG))};if(x(),D==="smooth"){let G=!1;b=st(t,H=>{G=G||H}),m=Fn(u,()=>{U(G)})}else m=Fn(fe(t,GL(150)),U);return v=setTimeout(()=>{x()},1200),ze(l,!0),N("scrolling from index to",{behavior:D,index:L,top:B},ln.DEBUG),{behavior:D,top:B}})),c),{scrollTargetReached:h,scrollToIndex:p,topListHeight:y}},bt(rr,tn,Br),{singleton:!0});function GL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Tp(e,t){e==0?t():requestAnimationFrame(()=>{Tp(e-1,t)})}function Ep(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Fs=Xe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=ge(!0),l=ge(0),c=ge(!0);return Ae(fe(s,We(l),_e(([u,d])=>!!d),er(!1)),a),Ae(fe(s,We(l),_e(([u,d])=>!!d),er(!1)),c),st(fe(Vt(t,s),We(a,n,e,c),_e(([[,u],d,{sizeTree:f},p,h])=>u&&(!mt(f)||dp(p))&&!d&&!h),We(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),Tp(4,()=>{Fn(r,()=>{ze(a,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},bt(rr,tn,Ns,Hr),{singleton:!0});function S1(e,t){return Math.abs(e-t)<1.01}const Ls="up",Vs="down",YL="none",KL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ZL=0,$s=Xe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=ge(!1),a=ge(!0),l=Ke(),c=Ke(),u=ge(4),d=ge(ZL),f=Xt(fe(pp(fe(Me(o),bo(1),er(!0)),fe(Me(o),bo(1),er(!1),i1(100))),xt()),!1),p=Xt(fe(pp(fe(n,er(!0)),fe(n,er(!1),i1(200))),xt()),!1);Ae(fe(Vt(Me(o),Me(d)),we(([b,x])=>b<=x),xt()),a),Ae(fe(a,xr(50)),c);const h=gn(fe(Vt(r,Me(i),Me(t),Me(e),Me(u)),tr((b,[{scrollHeight:x,scrollTop:T},E,I,w,k])=>{const A=T+E-x>-k,O={scrollHeight:x,scrollTop:T,viewportHeight:E};if(A){let M,$;return T>b.state.scrollTop?(M="SCROLLED_DOWN",$=b.state.scrollTop-T):(M="SIZE_DECREASED",$=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:M,scrollTopDelta:$,state:O}}let N;return O.scrollHeight>b.state.scrollHeight?N="SIZE_INCREASED":E<b.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:O}},KL),xt((b,x)=>b&&b.atBottom===x.atBottom))),y=Xt(fe(r,tr((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if(S1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const I=x-(T+E)<1;return b.scrollTop!==T&&I?{changed:!0,jump:b.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),_e(b=>b.changed),we(b=>b.jump)),0);Ae(fe(h,we(b=>b.atBottom)),s),Ae(fe(s,xr(50)),l);const m=ge(Vs);Ae(fe(r,we(({scrollTop:b})=>b),xt(),tr((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Ls:Vs,prevScrollTop:x},{direction:Vs,prevScrollTop:0}),we(b=>b.direction)),m),Ae(fe(r,xr(50),er(YL)),m);const v=ge(0);return Ae(fe(f,_e(b=>!b),er(0)),v),Ae(fe(o,xr(100),We(f),_e(([b,x])=>x),tr(([b,x],[T])=>[x,T],[0,0]),we(([b,x])=>x-b)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:y,scrollDirection:m,scrollVelocity:v}},bt(tn)),zs="top",js="bottom",T1="none";function E1(e,t,n){return typeof e=="number"?n===Ls&&t===zs||n===Vs&&t===js?e:0:n===Ls?t===zs?e.main:e.reverse:t===js?e.main:e.reverse}function k1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const kp=Xe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),s=ge(0),a=ge(0),l=ge(0),c=Xt(fe(Vt(Me(r),Me(o),Me(n),Me(i,Ms),Me(l),Me(s),Me(t),Me(e),Me(a)),we(([u,d,f,[p,h],y,m,v,b,x])=>{const T=u-b,E=m+v,I=Math.max(f-T,0);let w=T1;const k=k1(x,zs),A=k1(x,js);return p-=b,p+=f+v,h+=f+v,h-=b,p>u+E-k&&(w=Ls),h<u-I+d+A&&(w=Vs),w!==T1?[Math.max(T-f-E1(y,zs,w)-k,0),T-I-v+d+E1(y,js,w)+A]:null}),_e(u=>u!=null),xt(Ms)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},bt(tn),{singleton:!0});function XL(e,t,n){if(ql(t)){const r=y1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const Cp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ul(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const y=e[e.length-1];u=y.offset+y.size}const d=n-s,f=a+d*l+(d-1)*r,p=c,h=f-u;return{bottom:u,firstItemIndex:i,items:I1(e,o,i),offsetBottom:h,offsetTop:c,top:p,topItems:I1(t,o,i),topListHeight:t.reduce((y,m)=>m.size+y,0),totalCount:n}}function C1(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=Ep(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Ul(c,[],a,o,n,r)}function I1(e,t,n){if(e.length===0)return[];if(!ql(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=xi(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function A1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const wo=Xe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:h}])=>{const y=ge([]),m=ge(0),v=Ke(),b=ge(0);Ae(i.topItemsIndexes,y);const x=Xt(fe(Vt(p,h,Me(l,Ms),Me(o),Me(r),Me(c),u,Me(y),Me(t),Me(n),Me(b),e),_e(([w,k,,A,,,,,,,,O])=>{const N=O&&O.length!==A;return w&&!k&&!N}),we(([,,[w,k],A,O,N,M,$,_,F,z,D])=>{var C,V,L,B;const U=O,{offsetTree:G,sizeTree:H}=U,ee=Tt(m);if(A===0)return{...Cp,totalCount:A};if(w===0&&k===0)return ee===0?{...Cp,totalCount:A}:C1(ee,N,O,_,F,D||[]);if(mt(H))return ee>0?null:Ul(XL(Ep(N,A),U,D),[],A,F,U,_);const ie=[];if($.length>0){const ae=$[0],ce=$[$.length-1];let Q=0;for(const ue of xi(H,ae,ce)){const re=ue.value,he=Math.max(ue.start,ae),oe=Math.min(ue.end,ce);for(let le=he;le<=oe;le++)ie.push({data:D?.[le],index:le,offset:Q,size:re}),Q+=re}}if(!M)return Ul([],ie,A,F,U,_);const te=$.length>0?$[$.length-1]+1:0,q=zL(G,w,k,te);if(q.length===0)return null;const Y=A-1,Z=Bl([],ae=>{for(const ce of q){const Q=ce.value;let ue=Q.offset,re=ce.start;const he=Q.size;if(Q.offset<w){re+=Math.floor((w-Q.offset+F)/(he+F));const le=re-ce.start;ue+=le*he+le*F}re<te&&(ue+=(te-re)*he,re=te);const oe=Math.min(ce.end,Y);for(let le=re;le<=oe&&!(ue>=k);le++)ae.push({data:D?.[le],index:le,offset:ue,size:he}),ue+=he+F}}),pe=A1(z,zs),R=A1(z,js);if(Z.length>0&&(pe>0||R>0)){const ae=Z[0],ce=Z[Z.length-1];if(pe>0&&ae.index>te){const Q=Math.min(pe,ae.index-te),ue=[];let re=ae.offset;for(let he=ae.index-1;he>=ae.index-Q;he--){const oe=(V=(C=xi(H,he,he)[0])==null?void 0:C.value)!=null?V:ae.size;re-=oe+F,ue.unshift({data:D?.[he],index:he,offset:re,size:oe})}Z.unshift(...ue)}if(R>0&&ce.index<Y){const Q=Math.min(R,Y-ce.index);let ue=ce.offset+ce.size+F;for(let re=ce.index+1;re<=ce.index+Q;re++){const he=(B=(L=xi(H,re,re)[0])==null?void 0:L.value)!=null?B:ce.size;Z.push({data:D?.[re],index:re,offset:ue,size:he}),ue+=he+F}}}return Ul(Z,ie,A,F,U,_)}),_e(w=>w!==null),xt()),Cp);Ae(fe(e,_e(dp),we(w=>w?.length)),o),Ae(fe(x,we(w=>w.topListHeight)),d),Ae(d,a),Ae(fe(x,we(w=>[w.top,w.bottom])),s),Ae(fe(x,we(w=>w.items)),v);const T=gn(fe(x,_e(({items:w})=>w.length>0),We(o,e),_e(([{items:w},k])=>w[w.length-1].originalIndex===k-1),we(([,w,k])=>[w-1,k]),xt(Ms),we(([w])=>w))),E=gn(fe(x,xr(200),_e(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),we(({items:w})=>w[0].index),xt())),I=gn(fe(x,_e(({items:w})=>w.length>0),we(({items:w})=>{let k=0,A=w.length-1;for(;w[k].type==="group"&&k<A;)k++;for(;w[A].type==="group"&&A>k;)A--;return{endIndex:w[A].index,startIndex:w[k].index}}),xt(m1)));return{endReached:T,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:y,...f}},bt(rr,x1,kp,Fs,Ns,$s,Hr,xp),{singleton:!0}),P1=Xe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),s=Xt(fe(Vt(n,e,r,t,o),we(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return Ae(Me(s),i),{totalListHeight:s,totalListHeightChanged:i}},bt(tn,wo),{singleton:!0}),QL=Xe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ge(!1),r=Xt(fe(Vt(n,e,t),_e(([o])=>o),we(([,o,i])=>Math.max(0,o-i)),xr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,P1),{singleton:!0}),O1=Xe(()=>({context:ge(null)})),JL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,_1=Xe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ae(fe(u,We(t,l,n,i,o,r,a),We(e),we(([[d,f,p,h,y,m,v,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=JL,done:w,...k}=d,A=v1(d,f,h-1),O=Ds(A,f.offsetTree,x)+y+m,N=O+Ln(f.sizeTree,A)[1],M=b+m,$=b+p-v,_=I({itemBottom:N,itemTop:O,locationParams:{align:T,behavior:E,...k},viewportBottom:$,viewportTop:M});return _?w&&Fn(fe(s,_e(F=>!F),bo(Tt(s)?1:2)),w):w?.(),_}),_e(d=>d!==null)),c),{scrollIntoView:u}},bt(rr,tn,Ns,wo,Br),{singleton:!0});function M1(e){return e?e==="smooth"?"smooth":"auto":!1}const eV=(e,t)=>typeof e=="function"?M1(e(t)):t&&M1(e),tV=Xe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const h=ge(!1),y=Ke();let m=null;function v(E){ze(s,{align:"end",behavior:E,index:"LAST"})}st(fe(Vt(fe(Me(t),bo(1)),l),We(Me(h),i,a,d),we(([[E,I],w,k,A,O])=>{let N=I&&A,M="auto";return N&&(M=eV(w,k||O),N=N&&!!M),{followOutputBehavior:M,shouldFollow:N,totalCount:E}}),_e(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},ln.DEBUG),v(E)}):m=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},ln.DEBUG),v(E),m=null})});function b(E){const I=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Tt(u)("scrolling to bottom due to increased size",{},ln.DEBUG),v("auto"))});setTimeout(I,100)}st(fe(Vt(Me(h),t,c),_e(([E,,I])=>E&&I),tr(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),_e(({refreshed:E})=>E),We(h,t)),([,E])=>{Tt(a)&&b(E!==!1)}),st(y,()=>{b(Tt(h)!==!1)}),st(Vt(Me(h),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ge(null),T=Ke();return Ae(pp(fe(Me(r),we(E=>{var I;return(I=E?.length)!=null?I:0})),fe(Me(t))),T),st(fe(Vt(fe(T,bo(1)),l),We(Me(x),a,d,f),we(([[E,I],w,k,A,O])=>I&&k&&w?.({context:O,totalCount:E,scrollingInProgress:A})),_e(E=>!!E),xr(0)),E=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,E)}):m=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,E),m=null})}),{autoscrollToBottom:y,followOutput:h,scrollIntoViewOnChange:x}},bt(rr,$s,Ns,Fs,Hr,Br,tn,O1,_1)),nV=Xe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Ae(fe(a,We(i),_e(([,l])=>l!==0),We(o,r,t,n,e),we(([[,l],c,u,d,f,p=[]])=>C1(l,c,u,d,f,p))),s),{}),bt(rr,Fs,wo,Hr),{singleton:!0}),rV=Xe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ge(0);return st(fe(e,We(r),_e(([,o])=>o!==0),we(([,o])=>({top:o}))),o=>{Fn(fe(n,bo(1),_e(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Hr,tn,wo),{singleton:!0}),D1=Xe(([{scrollVelocity:e}])=>{const t=ge(!1),n=Ke(),r=ge(!1);return Ae(fe(e,We(r,t,n),_e(([o,i])=>!!i),we(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),xt()),t),st(fe(Vt(t,e,n),We(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt($s),{singleton:!0}),Ip=Xe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=ge(!1),s=ge(void 0);return Ae(fe(Vt(n,r),we(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ae(fe(t,We(r),we(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),oV=Xe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ke(),u=ge(void 0),d=ge(null),f=ge(null);return Ae(a,d),Ae(l,f),st(fe(c,We(t,r,s,d,f,n)),([p,h,y,m,v,b,x])=>{const T=RL(h.sizeTree);m&&v!==null&&b!==null&&(y=v.scrollTop-b.offsetTop),y-=x,p({ranges:T,scrollTop:y})}),Ae(fe(u,_e(dp),we(iV)),o),Ae(fe(i,We(u),_e(([,p])=>p!==void 0),xt(),we(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(rr,tn,Fs,Hr,Ip));function iV(e){return{align:"start",index:0,offset:e.scrollTop}}const sV=Xe(([{topItemsIndexes:e}])=>{const t=ge(0);return Ae(fe(t,_e(n=>n>=0),we(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(wo));function N1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const aV=N1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),lV=Xe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:h}])=>{const y=gn(fe(l,We(s),tr(([,v,b,x],[{bottom:T,items:E,offsetBottom:I,totalCount:w},k])=>{const A=T+I;let O=0;return b===w&&v.length>0&&E.length>0&&(E[0].originalIndex===0&&v[0].originalIndex===0||(O=A-x,O!==0&&(O+=k))),[O,E,w,A]},[0,[],0,0]),_e(([v])=>v!==0),We(r,a,n,o,p,h),_e(([,v,b,x,,,T])=>!T&&!x&&v!==0&&b===Ls),we(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},ln.DEBUG),v))));function m(v){v>0?(ze(t,{behavior:"auto",top:-v}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-v}))}return st(fe(y,We(e,i)),([v,b,x])=>{x&&aV()?ze(e,b-v):m(-v)}),st(fe(Vt(Xt(i,!1),e,h),_e(([v,b,x])=>!v&&!x&&b!==0),we(([v,b])=>b),xr(1)),m),Ae(fe(d,we(v=>({top:-v}))),t),st(fe(c,We(f,u),we(([v,{groupIndices:b,lastSize:x,sizeTree:T},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(v);{let w=0;const k=_s(T,0);let A=0,O=0;for(;A<v;){A++,w+=k;let N=b.length===O+1?1/0:b[O+1]-b[O]-1;A+N>v&&(w-=k,N=v-A+1),A+=N,w+=I(N),O++}return w}})),v=>{ze(e,v),requestAnimationFrame(()=>{ze(t,{top:v}),requestAnimationFrame(()=>{ze(e,0),ze(h,!1)})})}),{deviation:e}},bt(tn,$s,wo,rr,Br,xp)),cV=Xe(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),bt(kp,nV,Hr,D1,P1,rV,QL,Ip,_1,Br,O1)),F1=Xe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:h,initialTopMostItemIndex:y,scrolledToInitialItem:m},v,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:k},A])=>{const{listState:O,minOverscanItemCount:N,topItemsIndexes:M,rangeChanged:$,..._}=T;return Ae($,A.scrollSeekRangeChanged),Ae(fe(A.windowViewportRect,we(F=>F.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:a,initialItemFinalLocationReached:h,initialTopMostItemIndex:y,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:M,totalCount:f,...x,groupIndices:s,itemSize:l,listState:O,minOverscanItemCount:N,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:$,..._,...A,...v,sizes:u,...b}},bt(rr,Fs,tn,oV,tV,wo,Ns,lV,sV,x1,cV));function uV(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const Gl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Ap(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=S.createContext({});function l(m,v){m.propsReady&&ze(m.propsReady,!1);for(const b of r){const x=m[t.required[b]];ze(x,v[b])}for(const b of o)if(b in v){const x=m[t.optional[b]];ze(x,v[b])}m.propsReady&&ze(m.propsReady,!0)}function c(m){return i.reduce((v,b)=>(v[b]=x=>{const T=m[t.methods[b]];ze(T,x)},v),{})}function u(m){return s.reduce((v,b)=>(v[b]=IL(m[t.events[b]]),v),{})}const d=S.forwardRef((m,v)=>{const{children:b,...x}=m,[T]=S.useState(()=>Bl(PL(e),w=>{l(w,x)})),[E]=S.useState(o1(u,T));Gl(()=>{for(const w of s)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(fp)}},[x,E,T]),Gl(()=>{l(T,x)}),S.useImperativeHandle(v,r1(c(T)));const I=n;return g.jsx(a.Provider,{value:T,children:n?g.jsx(I,{...uV([...r,...o,...s],x),children:b}):b})}),f=m=>{const v=S.useContext(a);return S.useCallback(b=>{ze(v[m],b)},[v,m])},p=m=>{const v=S.useContext(a)[m],b=S.useCallback(x=>st(v,x),[v]);return S.useSyncExternalStore(b,()=>Tt(v),()=>Tt(v))},h=m=>{const v=S.useContext(a)[m],[b,x]=S.useState(o1(Tt,v));return Gl(()=>st(v,T=>{T!==b&&x(r1(T))}),[v,b]),b},y=S.version.startsWith("18")?p:h;return{Component:d,useEmitter:(m,v)=>{const b=S.useContext(a)[m];Gl(()=>st(b,v),[v,b])},useEmitterValue:y,usePublisher:f}}const Yl=S.createContext(void 0),L1=S.createContext(void 0),V1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Pp(e){return"self"in e}function dV(e){return"body"in e}function $1(e,t,n,r=vi,o,i){const s=S.useRef(null),a=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,h,y;const m=f.target;if(dV(m)||Pp(m)){const b=Pp(m)?m:m.defaultView;y=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,h=i?b.innerWidth:b.innerHeight}else y=i?m.scrollLeft:m.scrollTop,p=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:p,scrollTop:Math.max(y,0),viewportHeight:h})};f.suppressFlushSync?v():Ri.flushSync(v),a.current!==null&&(y===a.current||y<=0||y===p-h)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const p=s.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const h=f.behavior==="smooth";let y,m,v;Pp(p)?(m=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),y=i?p.innerWidth:p.innerHeight,v=i?window.scrollX:window.scrollY):(m=p[i?"scrollWidth":"scrollHeight"],y=Vn(p,i?"width":"height"),v=p[i?"scrollLeft":"scrollTop"]);const b=m-y;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),S1(y,m)||f.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:y}),h&&t(!0);return}h?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const Op="-webkit-sticky",z1="sticky",_p=N1(()=>{if(typeof document>"u")return z1;const e=document.createElement("div");return e.style.position=Op,e.style.position===Op?Op:z1});function Mp(e){return e}const fV=Xe(()=>{const e=ge(a=>`Item ${a}`),t=ge(a=>`Group ${a}`),n=ge({}),r=ge(Mp),o=ge("div"),i=ge(vi),s=(a,l=null)=>Xt(fe(n,we(c=>c[a]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),pV=Xe(([e,t])=>({...e,...t}),bt(F1,fV)),hV=({height:e})=>g.jsx("div",{style:{height:e}}),mV={overflowAnchor:"none",position:_p(),zIndex:1},j1={overflowAnchor:"none"},gV={...j1,display:"inline-block",height:"100%"},R1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Tn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=Tn("windowScrollContainerState"),s=Tn("scrollContainerState"),a=o||r?i:s,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),h=Tn("gap"),y=Fe("horizontalDirection"),{callbackRef:m}=a1(n,f,d,e?vi:a,p,h,o,y,Fe("skipAnimationFrameInResizeObserver")),[v,b]=S.useState(0);Fp("deviation",_=>{v!==_&&b(_)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||hV,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),A=Fe("isSeeking"),O=Fe("groupIndices").length>0,N=Fe("alignToBottom"),M=Fe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:N?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:N?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...M?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?g.jsx(x,{...wt(x,c)}):g.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:$,children:(e?t.topItems:t.items).map(_=>{const F=_.originalIndex,z=k(F+t.firstItemIndex,_.data,c);return A?S.createElement(T,{...wt(T,c),height:_.size,index:_.index,key:z,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?S.createElement(w,{...wt(w,c),"data-index":F,"data-item-index":_.index,"data-known-size":_.size,key:z,style:mV},u(_.index,c)):S.createElement(I,{...wt(I,c),...B1(I,_.data),"data-index":F,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:z,style:y?gV:j1},O?l(_.index,_.groupIndex,_.data,c):l(_.index,_.data,c))})})}),yV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},vV={outline:"none",overflowX:"auto",position:"relative"},wi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),bV={position:_p(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function B1(e,t){return{item:typeof e=="string"?void 0:t}}const xV=S.memo(function(){const e=Fe("HeaderComponent"),t=Tn("headerHeight"),n=Fe("HeaderFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),wV=S.memo(function(){const e=Fe("FooterComponent"),t=Tn("footerHeight"),n=Fe("HeaderFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function Dp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:h}=$1(a,c,l,u,void 0,d);return e("scrollTo",h),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?vV:yV,...o},tabIndex:0,...s,...wt(l,i),children:r})})}function Np({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),h=t("scrollerRef"),{scrollByCallback:y,scrollerRef:m,scrollToCallback:v}=$1(a,c,l,h,f);return V1(()=>{var b;return m.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{m.current=null}},[m,f]),e("windowScrollTo",v),e("scrollBy",y),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...wt(l,i),children:r})})}const SV=({children:e})=>{const t=S.useContext(Yl),n=Tn("viewportHeight"),r=Tn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),s=S.useMemo(()=>Ps(n,l=>Vn(l,i?"width":"height")),[n,i]),a=nr(s,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:a,style:wi(o),children:e})},TV=({children:e})=>{const t=S.useContext(Yl),n=Tn("windowViewportRect"),r=Tn("fixedItemHeight"),o=Fe("customScrollParent"),i=mp(n,o,Fe("skipAnimationFrameInResizeObserver")),s=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:wi(s),children:e})},EV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...bV,marginTop:`${n}px`},o=Fe("context");return g.jsx(t,{style:r,...wt(t,o),children:e})},kV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return g.jsxs(r||t?AV:IV,{...e,context:o,children:[n&&g.jsx(EV,{children:g.jsx(R1,{showTopList:!0})}),g.jsxs(r||t?TV:SV,{children:[g.jsx(xV,{}),g.jsx(R1,{}),g.jsx(wV,{})]})]})}),{Component:CV,useEmitter:Fp,useEmitterValue:Fe,usePublisher:Tn}=Ap(pV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},kV),IV=Dp({useEmitter:Fp,useEmitterValue:Fe,usePublisher:Tn}),AV=Np({useEmitter:Fp,useEmitterValue:Fe,usePublisher:Tn}),Lp=CV,PV=Xe(()=>{const e=ge(c=>g.jsxs("td",{children:["Item $",c]})),t=ge(null),n=ge(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ge(null),o=ge(null),i=ge({}),s=ge(Mp),a=ge(vi),l=(c,u=null)=>Xt(fe(i,we(d=>d[c]),xt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),OV=Xe(([e,t])=>({...e,...t}),bt(F1,PV)),_V=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),MV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),DV={overflowAnchor:"none"},H1={position:_p(),zIndex:2,overflowAnchor:"none"},W1=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),s=je("fixedHeaderHeight"),a=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||_V,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((y,m,v)=>(v===0?y.push(m.size):y.push(y[v-1]+m.size),y),[]),h=(e?t.topItems:t.items).map(y=>{const m=y.originalIndex,v=n(m+r,y.data,o),b=e?m===0?0:p[m-1]:0;return i?S.createElement(u,{...wt(u,o),height:y.size,index:y.index,key:v,type:y.type||"item"}):y.type==="group"?S.createElement(d,{...wt(d,o),"data-index":m,"data-item-index":y.index,"data-known-size":y.size,key:v,style:{...H1,top:s}},c(y.index,o)):S.createElement(f,{...wt(f,o),...B1(f,y.data),"data-index":m,"data-item-index":y.index,"data-known-size":y.size,"data-item-group-index":y.groupIndex,key:v,style:e?{...H1,top:s+b}:DV},a?l(y.index,y.groupIndex,y.data,o):l(y.index,y.data,o))});return g.jsx(g.Fragment,{children:h})}),NV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),s=$n("scrollContainerState"),a=o||r?i:s,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=a1(n,c,l,a,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,h]=S.useState(0);Vp("deviation",O=>{p!==O&&(f.current.style.marginTop=`${O}px`,h(O))});const y=je("EmptyPlaceholder"),m=je("FillerRow")||MV,v=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),T=je("context");if(x===0&&y)return g.jsx(y,{...wt(y,T)});const E=(t?e.topItems:[]).reduce((O,N)=>O+N.size,0),I=e.offsetTop+b+p-E,w=e.offsetBottom,k=I>0?g.jsx(m,{context:T,height:I},"padding-top"):null,A=w>0?g.jsx(m,{context:T,height:w},"padding-bottom"):null;return g.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...wt(v,T),children:[k,t&&g.jsx(W1,{showTopList:!0}),g.jsx(W1,{}),A]})}),FV=({children:e})=>{const t=S.useContext(Yl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=nr(S.useMemo(()=>Ps(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:wi(!1),children:e})},LV=({children:e})=>{const t=S.useContext(Yl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=mp(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:wi(!1),children:e})},VV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),s=je("fixedFooterContent"),a=je("context"),l=nr(S.useMemo(()=>Ps(r,v=>Vn(v,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=nr(S.useMemo(()=>Ps(o,v=>Vn(v,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?jV:zV,d=n||t?LV:FV,f=je("TableComponent"),p=je("TableHeadComponent"),h=je("TableFooterComponent"),y=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,a),children:i()},"TableHead"):null,m=s?g.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(h,a),children:s()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,a),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,a),children:[y,g.jsx(NV,{},"TableBody"),m]})})})}),{Component:$V,useEmitter:Vp,useEmitterValue:je,usePublisher:$n}=Ap(OV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},VV),zV=Dp({useEmitter:Vp,useEmitterValue:je,usePublisher:$n}),jV=Np({useEmitter:Vp,useEmitterValue:je,usePublisher:$n}),RV=$V,q1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},BV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:U1,floor:Kl,max:Rs,min:$p,round:G1}=Math;function Y1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function HV(e){return{...BV,items:e}}function Zl(e,t){return e&&e.width===t.width&&e.height===t.height}function WV(e,t){return e&&e.column===t.column&&e.row===t.row}const qV=Xe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:h,propsReady:y},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=ge(0),w=ge(0),k=ge(q1),A=ge({height:0,width:0}),O=ge({height:0,width:0}),N=Ke(),M=Ke(),$=ge(0),_=ge(null),F=ge({column:0,row:0}),z=Ke(),D=Ke(),C=ge(!1),V=ge(0),L=ge(!0),B=ge(!1),U=ge(!1);st(fe(h,We(V),_e(([q,Y])=>!!Y)),()=>{ze(L,!1)}),st(fe(Vt(h,L,O,A,V,B),_e(([q,Y,Z,pe,,R])=>q&&!Y&&Z.height!==0&&pe.height!==0&&!R)),([,,,,q])=>{ze(B,!0),Tp(1,()=>{ze(N,q)}),Fn(fe(c),()=>{ze(t,[0,0]),ze(L,!0)})}),Ae(fe(D,_e(q=>q!=null&&q.scrollTop>0),er(0)),w),st(fe(h,We(D),_e(([,q])=>q!=null)),([,q])=>{q&&(ze(A,q.viewport),ze(O,q.item),ze(F,q.gap),q.scrollTop>0&&(ze(C,!0),Fn(fe(c,bo(1)),Y=>{ze(C,!1)}),ze(l,{top:q.scrollTop})))}),Ae(fe(A,we(({height:q})=>q)),d),Ae(fe(Vt(Me(A,Zl),Me(O,Zl),Me(F,(q,Y)=>q&&q.column===Y.column&&q.row===Y.row),Me(c)),we(([q,Y,Z,pe])=>({gap:Z,item:Y,scrollTop:pe,viewport:q}))),z),Ae(fe(Vt(Me(I),r,Me(F,WV),Me(O,Zl),Me(A,Zl),Me(_),Me(w),Me(C),Me(L),Me(V)),_e(([,,,,,,,q])=>!q),we(([q,[Y,Z],pe,R,ae,ce,Q,,ue,re])=>{const{column:he,row:oe}=pe,{height:le,width:be}=R,{width:de}=ae;if(Q===0&&(q===0||de===0))return q1;if(be===0){const Ne=Ep(re,q),ct=Ne+Math.max(Q-1,0);return HV(Y1(Ne,ct,ce))}const ne=K1(de,be,he);let J,j;ue?Y===0&&Z===0&&Q>0?(J=0,j=Q-1):(J=ne*Kl((Y+oe)/(le+oe)),j=ne*U1((Z+oe)/(le+oe))-1,j=$p(q-1,Rs(j,ne-1)),J=$p(j,Rs(0,J))):(J=0,j=-1);const X=Y1(J,j,ce),{bottom:me,top:ve}=Z1(ae,pe,R,X),ke=U1(q/ne),De=ke*le+(ke-1)*oe-me;return{bottom:me,itemHeight:le,items:X,itemWidth:be,offsetBottom:De,offsetTop:ve,top:ve}})),k),Ae(fe(_,_e(q=>q!==null),we(q=>q.length)),I),Ae(fe(Vt(A,O,k,F),_e(([q,Y,{items:Z}])=>Z.length>0&&Y.height!==0&&q.height!==0),we(([q,Y,{items:Z},pe])=>{const{bottom:R,top:ae}=Z1(q,pe,Y,Z);return[ae,R]}),xt(Ms)),t);const G=ge(!1);Ae(fe(c,We(G),we(([q,Y])=>Y||q!==0)),G);const H=gn(fe(Vt(k,I),_e(([{items:q}])=>q.length>0),We(G),_e(([[q,Y],Z])=>{const pe=q.items[q.items.length-1].index===Y-1;return(Z||q.bottom>0&&q.itemHeight>0&&q.offsetBottom===0&&q.items.length===Y)&&pe}),we(([[,q]])=>q-1),xt())),ee=gn(fe(Me(k),_e(({items:q})=>q.length>0&&q[0].index===0),er(0),xt())),ie=gn(fe(Me(k),We(C),_e(([{items:q},Y])=>q.length>0&&!Y),we(([{items:q}])=>({endIndex:q[q.length-1].index,startIndex:q[0].index})),xt(m1),xr(0)));Ae(ie,p.scrollSeekRangeChanged),Ae(fe(N,We(A,O,I,F),we(([q,Y,Z,pe,R])=>{const ae=w1(q),{align:ce,behavior:Q,offset:ue}=ae;let re=ae.index;re==="LAST"&&(re=pe-1),re=Rs(0,re,$p(pe-1,re));let he=zp(Y,R,Z,re);return ce==="end"?he=G1(he-Y.height+Z.height):ce==="center"&&(he=G1(he-Y.height/2+Z.height/2)),ue&&(he+=ue),{behavior:Q,top:he}})),l);const te=Xt(fe(k,we(q=>q.offsetBottom+q.bottom)),0);return Ae(fe(T,we(q=>({height:q.visibleHeight,width:q.visibleWidth}))),A),{customScrollParent:m,data:_,deviation:$,footerHeight:o,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:O,overscan:n,restoreStateFrom:D,scrollBy:s,scrollContainerState:a,scrollHeight:M,scrollTo:l,scrollToIndex:N,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:v,viewportDimensions:A,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T,...p,gridState:k,horizontalDirection:U,initialTopMostItemIndex:V,totalListHeight:te,...f,endReached:H,propsReady:y,rangeChanged:ie,startReached:ee,stateChanged:z,stateRestoreInProgress:C,...E}},bt(kp,tn,$s,D1,Hr,Ip,Br));function K1(e,t,n){return Rs(1,Kl((e+n)/(Kl(t)+n)))}function Z1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=zp(e,t,n,r[0].index);return{bottom:zp(e,t,n,r[r.length-1].index)+o,top:i}}function zp(e,t,n,r){const o=K1(e.width,n.width,t.column),i=Kl(r/o),s=i*n.height+Rs(0,i-1)*t.row;return s>0?s+t.row:s}const UV=Xe(()=>{const e=ge(d=>`Item ${d}`),t=ge({}),n=ge(null),r=ge("virtuoso-grid-item"),o=ge("virtuoso-grid-list"),i=ge(Mp),s=ge("div"),a=ge(vi),l=(d,f=null)=>Xt(fe(t,we(p=>p[d]),xt()),f),c=ge(!1),u=ge(!1);return Ae(Me(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),GV=Xe(([e,t])=>({...e,...t}),bt(qV,UV)),YV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),s=En("scrollHeight"),a=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=En("itemDimensions"),f=En("gap"),p=Et("log"),h=Et("stateRestoreInProgress"),y=En("reportReadyState"),m=nr(S.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;s(b);const x=v.firstChild;if(x){const{height:T,width:E}=x.getBoundingClientRect();d({height:T,width:E})}f({column:Q1("column-gap",getComputedStyle(v).columnGap,p),row:Q1("row-gap",getComputedStyle(v).rowGap,p)})},[s,d,f,p]),!0,!1);return V1(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),h?null:g.jsx(l,{className:t,ref:m,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?g.jsx(c,{...wt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):S.createElement(a,{...wt(a,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),KV=S.memo(function(){const e=Et("HeaderComponent"),t=En("headerHeight"),n=Et("headerFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),ZV=S.memo(function(){const e=Et("FooterComponent"),t=En("footerHeight"),n=Et("headerFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),XV=({children:e})=>{const t=S.useContext(L1),n=En("itemDimensions"),r=En("viewportDimensions"),o=nr(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:o,style:wi(!1),children:e})},QV=({children:e})=>{const t=S.useContext(L1),n=En("windowViewportRect"),r=En("itemDimensions"),o=Et("customScrollParent"),i=mp(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:i,style:wi(!1),children:e})},JV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?t$:e$,o=n||t?QV:XV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(KV,{}),g.jsx(YV,{}),g.jsx(ZV,{})]})})}),{useEmitter:X1,useEmitterValue:Et,usePublisher:En}=Ap(GV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},JV),e$=Dp({useEmitter:X1,useEmitterValue:Et,usePublisher:En}),t$=Np({useEmitter:X1,useEmitterValue:Et,usePublisher:En});function Q1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ln.WARN),t==="normal"?0:parseInt(t??"0",10)}const J1=e=>{const t=e.Icon??Rg,n=At();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},jp=g.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),Bs=e=>g.jsx(cn,{...e,as:e.as||"span",className:Pe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function n$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const r$=e=>{const t=S.useId(),n=At(),r=S.useMemo(()=>n$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(cn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},o$=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),g.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},i$=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=fd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(o$,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?jp:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:Be.nil(l)?"":l})}))})})},Si=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Ho(10),za({fallbackAxisSideDirection:"end"}),$a(),ed({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:io,onOpenChange:(h,y)=>{const m=y?.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),e.onChange?.(h))}}),c=qo(l),u=Mr(l),d=gr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(mr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(lo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:s.setFloating,"aria-labelledby":t,style:a,...p(),children:[g.jsx(td,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Rp={},eS;function s$(){return eS||(eS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(b){window.console.log(b)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const b=v.getItem(m);try{return JSON.parse(b)}catch{return b??null}},i=m=>Object.keys(m).reduce((v,b)=>({...v,[b]:o(b,m)}),{}),s=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${s(m.expires??a)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${s(m.expires??a)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],f={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=f.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(m)}=${x}`]).join(";");document.cookie=T,u()}},p=m=>{const v=new Set,b=x=>{m().removeItem(x);const T=i(m());v.forEach(E=>E(T))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(m()):m(),has:x=>{const T=m().getItem(x);return!n(T)},deleteAll:()=>{t(m(),b),v.forEach(x=>x(m()))},get:x=>o(x,m()),set:(x,T)=>{m().setItem(x,JSON.stringify(T)),v.forEach(E=>E(m()))}}},h=p(()=>window.sessionStorage),y=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=y,e.SessionStorage=h,e.createStorage=p})(Rp)),Rp}var Hs=s$();const Bp=e=>e.headerLabel??e.thead??e.id,Hp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ti=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ti||{});const Wp=e=>e.type==="number"?e.valueAsNumber:e.value,a$=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},l$={},c$=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const s=r.get(o.id);return s===void 0?e[i]:s})},u$=(e,t,n=l$)=>{const r=Dr()?null:Hs.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ap({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:c$(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Dr()||Hs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},d$=e=>{const t=Fr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},f$=()=>Dr()?void 0:document.querySelector('[data-component="modal-body"]'),p$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),h$=(e,t)=>e.toSorted(p$(t)),tS=(e,t,n)=>({label:t,id:Go(),type:n,value:e.id}),m$=e=>{const t=At(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,tS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return g.jsx(S.Fragment,{children:g.jsx(Si,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx($g,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(co,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(co,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:g.jsx(ha,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(_u,{size:14})," ",t.tableSortAddButton]})})]})})})},g$=e=>{const t=At(),[n,r]=S.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=tS(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Bp(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?g.jsx(sI,{size:14}):null,n==="desc"?g.jsx(iI,{size:14}):null,n==="undefined"?g.jsx($g,{size:14}):null]})},nS=S.createContext({}),y$=nS.Provider,v$=()=>S.useContext(nS),qp=(e,t,n,r={})=>{const o=e.id,i=e.type??Ti.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Go(),operation:l,label:Bp(e),name:o,type:i,value:"",...r}},Up=()=>{const e=At(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[Ti.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ti.Boolean]:[t.is,t.isNot],[Ti.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},b$=e=>{const t=At(),n=Up(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,qp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(h=>u===h.id);return qp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=Wp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(Si,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(gI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(co,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(co,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Ko,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:g.jsx(ha,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(_u,{size:14})," ",t.tableFilterNewFilter]})})]})})})},x$=({filter:e,onDelete:t,set:n})=>{const r=At(),o=Up(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=Wp(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(co,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Ko,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ha,{className:"text-danger",size:14})})]})},w$={top:0,left:0,right:0,bottom:-1},S$=e=>{const t=Fu(),n=At(),r=e.filters.filter(y=>y.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=Up(),l=o?bI:xI,c=S.useRef(null),u=y=>{const m=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==m))},d=S.useCallback(y=>{if(y===null)return;c.current=y;const m=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),f=e.sorters.find(y=>e.header.id===y.value),p=f?.type?f.type===e1.Asc?"ascending":"descending":"none",h=Bp(e.header);return g.jsxs(Mw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&s?g.jsx(Si,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:h})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(y=>g.jsx("li",{className:"my-1",children:g.jsx(x$,{onDelete:u,filter:y,set:e.setFilters})},`thead-filter-${y.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(y=>y.concat(qp(e.header,a.options,a.operations))),children:[g.jsx(_u,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(g$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.jsx(He.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:w$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:y=>{y.currentTarget.focus()},onKeyDown:y=>{if(y.key==="ArrowLeft"||y.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,b=(y.shiftKey?50:10)*(y.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(y,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=m.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},T$=e=>{const[t,n]=d$(e.setCols);return g.jsx(Pw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(mn,{children:e.headers.map((r,o)=>g.jsx(S$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},E$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(mn,{children:n.children})})),k$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),C$=S.forwardRef(({context:e,...t},n)=>{const r=v$(),o={...t?.style,top:Be.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),I$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),A$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),P$={TableRow:I$,TableFoot:A$,TableHead:C$,Table:k$,TableBody:E$},O$=[0,0,0,0,0,0,0,0,0,0],_$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?jp:g.jsx(J1,{})}),M$=()=>g.jsx(S.Fragment,{}),D$=[],rS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Fr(s),h=Fr(u.loadingMore),y=S.useMemo(()=>{if(u.loading)return O$;if(c)return u.rows;const b=new t1(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():h$(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&h.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[h,p]);const m=y.length===0,v={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(RV,{components:P$,context:v,totalCount:y.length,itemContent:m?M$:i$,data:m?D$:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>g.jsx(T$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?g.jsx(_$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(r$,{...l}):null]})},N$=({item:e,onPointerDown:t})=>{const n=vo(0);return g.jsxs(Mw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(mI,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},F$=e=>{const t=At(),n=Hp(e.cols),r=_F(),[o,i]=S.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new t1(e.rows).GroupBy(u),h=e.cols.find(y=>y.id===u);e.setGroups(Bk(p).map((y,m)=>{const v=p[y];return{...h,groupId:Go(),groupKey:u,index:m,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(Si,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(wI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(co,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),g.jsx(yr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:g.jsx(ha,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(t2,{children:g.jsx(Pw,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>g.jsx(N$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},L$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(b$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(m$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(F$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Wp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),V$=(e,t)=>typeof t=="function"?t(e):t,Xl=(e,t,n)=>e===t?void 0:n?.(t),$$=e=>{const t=Fu(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Hp(e.cols),[e.cols]),[i,s]=ap({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:V$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),Xl(l?.filters??[],a.filters??[],e.setFilters),Xl(l?.sorters??[],a.sorters??[],e.setSorters),Xl(l?.groups??[],a.groups??[],e.setGroups),Xl(l?.cols??[],a.cols??[],e.setCols),a)]});return S.useEffect(()=>{s.cols(e.cols)},[e.cols]),g.jsx(y$,{value:n,children:g.jsxs(mn,{initial:!1,children:[r?g.jsx(L$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?g.jsx(rS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(rS,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},Ql=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>g.jsxs(cn,{...a,as:r||"div","data-component":"card",className:Pe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-3",i),children:[e?g.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",s),children:e}):o,g.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",a.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(Bs,{className:"w-full"}),g.jsx(Bs,{className:"w-8/12"}),g.jsx(Bs,{className:"w-10/12"}),g.jsx(Bs,{className:"w-1/2"})]}):n})]});Ql.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return g.jsxs(i,{...o,title:Be.string(o.title)?o.title:void 0,className:Pe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[g.jsx(s,{className:"font-semibold",children:o.title}),r?g.jsx(a,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const z$=e=>{const t=e.interactive??!0,n=e.Icon??Er;return g.jsx(Ql,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[g.jsx("div",{className:Pe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx(Bs,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},j$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(mr,{children:g.jsx(Hf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(mn,{presenceAffectsLayout:!0,children:[e?g.jsx(He.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?g.jsx(ld,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(lo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.jsxs(He.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(Lo,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),R$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=qo(o),a=gr(o,{role:"dialog"}),l=Mr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([s,a,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(j$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const h=f.props,y=`${r}-${p}`,m=()=>n({...h,id:y}),v=h.leading;return g.jsx(He.li,{layout:!0,layoutId:`item-${y}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(He.div,{layoutId:`toast-${y}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[h.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:h.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:h.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:h.description})]}),v?g.jsx(v,{open:m}):null]})})]})})})},y)})})]})},B$=e=>g.jsx(S.Fragment,{children:e.children}),oS=()=>{const e=S.useContext(to);return e?e.parser:ma.hsla},Gp=.3,Jl={duration:Gp,type:"tween",ease:"easeInOut"},iS=S.createContext(null),Yp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},Ei={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},H$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(He.path,{className:"currentColor",initial:Ei.initial,animate:Ei.animate,transition:Yp,d:"M18 6 6 18"}),g.jsx(He.path,{className:"currentColor",initial:Ei.initial,animate:Ei.animate,transition:Yp,d:"m6 6 12 12"})]}),W$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(He.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:Ei.animate,initial:Ei.initial,transition:Yp})}),q$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},U$={duration:.6,delay:.2,type:"tween",ease:"circOut"},G$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",Y$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,sS=()=>S.useContext(iS),K$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=oS(),a=sS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!a){c(t);return}const d=Y$(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=G$(e,l,n);return a?.steps&&100/a?.steps,g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(He.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(He.div,{variants:q$,transition:U$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(He.div,{initial:!1,animate:u,transition:Jl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:Jl,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:Jl,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:Jl,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(W$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(H$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},Z$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Gp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Gp,steps:S.Children.count(e.children)};return g.jsx(iS.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},aS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},lS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},cS=S.createContext(""),X$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Kp=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!X$(s))return s}return n==="backward"?Kp(e,e.length-1,"backward"):Kp(e,-1,"forward")},uS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Kp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},dS={[lS.ArrowLeft]:(e,t)=>uS(t,"backward"),[lS.ArrowRight]:(e,t)=>uS(t,"forward")},Q$=e=>{const[t,n]=aS(e.active),r=S.useRef(null),o=Fr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(Be.keyof(dS,c)){const u=dS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(cS.Provider,{value:t,children:g.jsx(Ql,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:a,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Pe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:g.jsx(cn,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},J$=()=>S.useContext(cS),ez=e=>{const t=J$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},fS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},tz={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},pS=e=>g.jsx(He.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fS,exit:fS.false,transition:tz,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),nz=_o("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),rz=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return g.jsx(mn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.jsx(He.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:g.jsx(pS,{"data-open":!!i,open:!!i,children:g.jsx(cn,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Pe(nz({theme:n}),t),children:g.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(Lo,{size:20})}):null,g.jsxs("div",{className:Pe("flex gap-2 items-center",s.title?"":"w-fit"),children:[!r&&n==="success"?g.jsx(Pu,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(Er,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(Du,{"aria-hidden":"true",size:20}):null,r]}),s.title?g.jsx("h4",{className:"col-start-2 text-lg font-semibold tracking-3 text-balance",children:s.title}):null,g.jsx("div",{className:"col-start-2 w-full",children:s.children})]})})})}):null})}),oz=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Pe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),iz=Symbol.for("react.lazy");function hS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sz(...e){return t=>{let n=!1;const r=e.map(o=>{const i=hS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():hS(e[o],null)}}}}const ec=P[" use ".trim().toString()];function az(e){return typeof e=="object"&&e!==null&&"then"in e}function mS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===iz&&"_payload"in e&&az(e._payload)}function lz(e){const t=cz(e),n=P.forwardRef((r,o)=>{let{children:i,...s}=r;mS(i)&&typeof ec=="function"&&(i=ec(i._payload));const a=P.Children.toArray(i),l=a.find(dz);if(l){const c=l.props.children,u=a.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return g.jsx(t,{...s,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return g.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const gS=lz("Slot");function cz(e){const t=P.forwardRef((n,r)=>{let{children:o,...i}=n;if(mS(o)&&typeof ec=="function"&&(o=ec(o._payload)),P.isValidElement(o)){const s=pz(o),a=fz(i,o.props);return o.type!==P.Fragment&&(a.ref=r?sz(r,s):s),P.cloneElement(o,a)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const uz=Symbol("radix.slottable");function dz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uz}function fz(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function pz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const yS=(e="")=>Pe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Zp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),vS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[h,y]=S.useState(null),m=S.useRef([]),v=S.useRef([]),b=S.useContext(Zp),x=Pr(),T=Or(),E=hP(),I=Ny(),w=x!==null,{floatingStyles:k,refs:A,context:O}=Gn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:io,placement:w?"right":"bottom-start",middleware:[Ho({mainAxis:w?0:4,alignmentAxis:w?-4:0}),za(),$a()]}),N=gr(O,{role:"menu"}),M=Mr(O,{bubbles:!0}),$=Wy(O,{move:!1,enabled:n,delay:{open:hv},handleClose:pv({blockPointerEvents:!0,requireIntent:!1})}),_=qo(O,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),F=Ya(O,{loop:!0,activeIndex:h,nested:w,listRef:m,onNavigate:y}),z=jP(O,{activeIndex:h,listRef:v,resetMs:BP,onMatch:u?y:void 0}),{getReferenceProps:D,getFloatingProps:C,getItemProps:V}=Yn([$,_,N,M,F,z]);S.useEffect(()=>{if(!T)return;const B=()=>d(!1),U=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",B),T.events.on("menuopen",U),()=>{T.events.off("click",B),T.events.off("menuopen",U)}},[T,E,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:E})},[T,u,E,x]);const L=o?l.className:Pe(yS(l.className));return g.jsxs(mP,{id:E,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(gS,{...D(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:a,className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:dr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):g.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:dr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...D(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[a,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(Au,{size:14})]})]})}),g.jsx(Zp.Provider,{value:{activeIndex:h,setActiveIndex:y,getItemProps:V,setHasFocusInside:p,isOpen:u},children:g.jsx(lP,{elementsRef:m,labelsRef:v,children:u&&g.jsx(mr,{children:g.jsx(lo,{context:O,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.jsx(t,{...C(),ref:A.setFloating,style:{...l.style,...k},className:Pe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",s),children:e})})})})})]})}),hz=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=S.useContext(Zp),a=Ny({label:n?null:e}),l=Or(),c=a.index===s.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:dr(a.ref,i),className:yS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?g.jsx(t,{size:16}):null]})}),mz=S.forwardRef((e,t)=>Pr()===null?g.jsx(gP,{children:g.jsx(vS,{...e,isParent:!0,ref:t})}):g.jsx(vS,{...e,isParent:!1,ref:t})),Xp=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return g.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Pe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[g.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Pe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,g.jsx("span",{"data-name":"checkbox-label",className:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),gz=({children:e,className:t="",size:n,...r})=>g.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[g.jsx("input",{...r,type:"radio",className:Pe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),yz=xv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
16
|
+
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),vz=(e,t)=>Dr()?t:window.matchMedia(e).matches,bz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(vz(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},xz=()=>S.useContext(to).floatingRef??void 0,bS=S.createContext(async()=>!1),wz=()=>S.useContext(bS),kn="500ms",Sz={exit:{x:["0%","-30%"],opacity:0,animationDuration:kn},enter:{x:["-30%","0%"],opacity:1,animationDuration:kn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:kn}},Tz={enter:{x:"0%",opacity:1,animationDuration:kn},exit:{x:["0%","30%"],opacity:0,animationDuration:kn},initial:{x:["30%","0%"],opacity:.8,animationDuration:kn}},Qp={drawer:e=>e==="left"?Sz:Tz,sheet:{enter:{opacity:1,y:"0%",animationDuration:kn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:kn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:kn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:kn},enter:{opacity:1,scale:[1.05,1],animationDuration:kn},initial:{opacity:.5,scale:.95,animationDuration:kn,transition:{duration:.5,ease:"easeInOut"}}}},Ez=_o("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),xS={top:0,left:0,right:0,bottom:0},wS=e=>e*.6,kz=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=wS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return g.jsx(He.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:xS,whileDrag:{cursor:"grabbing"},className:Pe("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?g.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},tc={drawer:"right",sheet:"none",dialog:"none"},Cz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??tc.drawer:tc[o]:t?tc[o]:tc.sheet},Iz=[],Ws=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:h=void 0,overlayClassName:y="",type:m="dialog",position:v,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=Iz,...E},I)=>{const w=xz(),k=S.useRef(null),A=S.useRef(null),O=S.useId(),N=S.useId(),M=bz("(min-width: 64rem)"),$=Cz(M,p,m,v),_=M||p?Qp[m]:Qp.sheet,F=typeof _=="function"?_($):_,z=M||p?m:"sheet",D=z!=="dialog",C=Gn({open:e,onOpenChange:s,strategy:"fixed"}),V=qo(C.context,{}),L=gr(C.context,{role:"dialog"}),B=Mr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:ce=>{const Q=ce.target;return b&&!!Q?.isConnected}}),U=Yn([V,B,L].concat(T)),G=o,H=vo(void 0),ee=vo(void 0),ie=S.useRef(!1),te=S.useRef(0);S.useEffect(()=>{H.set(void 0),ee.set(void 0)},[z,H,ee]);const q=()=>s(!1);S.useImperativeHandle(I,()=>({context:C.context,floating:A.current}),[C.context,A]);const Z=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:xS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ce,Q)=>{const re=C.refs.floating.current.getBoundingClientRect(),he=H.get()||re.height,oe=Math.abs(he-Q.delta.y),le=window.outerHeight,be=wS(le);return oe>=be?H.set(oe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},pe=vo(void 0),R=vo(void 0),ae=r?gS:He.button;return g.jsxs(S.Fragment,{children:[o?g.jsx(ae,{ref:C.refs.setReference,...U.getReferenceProps(),layoutId:h,type:"button",children:G}):null,g.jsx(Hf,{reducedMotion:d?"user":"always",children:g.jsx(mr,{preserveTabOrder:!0,root:w,children:g.jsx(mn,{mode:"wait",propagate:!0,children:e?g.jsx(ld,{lockScroll:!0,className:Pe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",y),children:g.jsx(lo,{guards:!0,modal:!0,closeOnFocusOut:x,context:C.context,children:g.jsx(mn,{propagate:!0,children:g.jsxs(He.div,{...E,...t?{"aria-labelledby":O,"aria-describedby":N}:{"aria-label":a},...U.getFloatingProps({"aria-modal":e,ref:dr(C.refs.setFloating,A),className:Pe(Ez({position:$,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:h,variants:F,"data-component":"modal",style:z==="drawer"?{width:H}:{height:H,y:ee},children:[D&&u?g.jsx(kz,{onChange:s,value:H,sheet:z==="sheet",position:$,parent:C.refs.floating}):null,t?g.jsx(He.header,{...Z,className:"relative w-full isolate",children:t?g.jsx("h2",{id:O,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,g.jsx(He.section,{ref:k,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(R.set(void 0),pe.set(void 0),ie.current){const ce=ee.get()||0,Q=window.innerHeight*.2;ce>Q?(await Iw(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,s(!1)):Iw(ee,0,{type:"spring",bounce:0,duration:.3}),ie.current=!1}},onTouchStart:ce=>{const Q=ce.changedTouches[0];pe.set(Q.pageY),R.set(Q.pageY),ie.current=!1},onTouchMove:ce=>{const ue=ce.changedTouches[0].pageY,re=R.get()||ue,he=k.current?.scrollTop||0;if(!ie.current&&he<=0&&ue>re&&z==="sheet"&&(ie.current=!0,te.current=ue),ie.current){const oe=ue-te.current;oe<0?ee.set(oe*.2):ee.set(oe)}R.set(ue)},children:i}),n?g.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?g.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:g.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:g.jsx(Lo,{})})}):null]})})})}):null})})})]})});let SS=async e=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);Ws.confirm=e=>SS(e);const TS=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,s]=S.useState(()=>{}),a=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{s(()=>d)})),[]);S.useEffect(()=>{SS=a},[a]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return g.jsxs(bS.Provider,{value:a,children:[e,g.jsx(Ws,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:g.jsxs("div",{className:"flex gap-2 justify-end",children:[g.jsx(yr,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),g.jsx(yr,{theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:g.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},Az=e=>{const[t,n]=AF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:MD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),g.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Pz=e=>g.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),Oz=e=>g.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),_z=e=>g.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:g.jsxs(S.Fragment,{children:[g.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),g.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"text-base w-fit":"w-full text-lg"),children:e.children})]})}),ES=e=>g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),g.jsx("p",{className:"text-secondary typography",children:e.children})]}),Mz=e=>g.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[g.jsx("div",{children:g.jsx(ES,{title:e.title,children:e.description})}),g.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),kS=e=>g.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),Dz=()=>g.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:g.jsx(kS,{})}),Nz=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=S.useState(e.open??!1);S.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=qo(a,{enabled:e.disabled??!0}),u=gr(a,{role:"tooltip"}),d=Mr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return g.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[g.jsx(yr,{...p(e),as:He.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:g.jsx(He.span,{layoutId:o,children:e.trigger})}),g.jsx(mn,{children:i?g.jsx(mr,{root:t,children:g.jsx(lo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:g.jsx(He.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Fz=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},Lz=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},Vz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),$z=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,zz=({steps:e,active:t=!1,onClose:n=Yo,onFinish:r=Yo,onChange:o=Yo,labels:i})=>{const s=At(),[a,l]=S.useState(0),c=e[a],[u,d]=S.useState(null),[f,p]=S.useState(Vz()),[h,y]=S.useState(!1),m=S.useRef(null),{width:v,height:b}=Lz(),x={next:i?.next??s.driverNext,previous:i?.previous??s.driverPrevious,finish:i?.finish??s.driverFinish,skip:i?.skip??s.driverSkip},{refs:T,floatingStyles:E,context:I}=Gn({open:t&&h,placement:c?.side||"bottom",whileElementsMounted:io,middleware:[Ho(10),za(),$a(),ed({element:m})]}),{getFloatingProps:w}=Yn([gr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{y(!1)},[a,t]),S.useEffect(()=>{if(!t||!c)return;const M=$z(c.element);M?(c.onEnter?.(),setTimeout(()=>{p(M.getBoundingClientRect()),T.setReference(M),d(M)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[a,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const M=()=>p(u.getBoundingClientRect());return M(),window.addEventListener("scroll",M,{capture:!0,passive:!0}),window.addEventListener("resize",M,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",M,{capture:!0}),window.removeEventListener("resize",M,{capture:!0})}},[u,v,b]),Fz(u,M=>{p(M.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{a<e.length-1?(l(M=>M+1),o(a+1)):(r(),n())},0)},A=()=>{c.onPrevious?.(),a>0&&(l(M=>M-1),o(a-1))};if(!t)return null;const O=a<e.length-1,N=a>0;return g.jsx(mr,{children:g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[g.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("mask",{id:"driver-mask",children:[g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),g.jsx(He.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>y(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),g.jsx(mn,{mode:"wait",children:c&&h&&g.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:g.jsxs(He.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-floating-background border-floating-border",children:[u&&g.jsx(td,{ref:m,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&g.jsx("h3",{children:c.title}),c.description&&g.jsx(S.Fragment,{children:c.description}),g.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[g.jsx(yr,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),g.jsxs("div",{className:"flex gap-2",children:[N&&g.jsx(yr,{size:"small",theme:"ghost-muted",onClick:A,children:x.previous}),g.jsx(yr,{size:"small",onClick:k,children:O?x.next:x.finish})]})]}),g.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[a+1," / ",e.length]})]})})})]})})},CS=6048e5,jz=864e5,Rz=6e4,Bz=36e5,Hz=1e3,IS=Symbol.for("constructDateFrom");function dt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&IS in e?e[IS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return dt(t||e,e)}function nc(e,t,n){const r=Qe(e,n?.in);return isNaN(t)?dt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function AS(e,t,n){const r=Qe(e,n?.in);if(isNaN(t))return dt(e,NaN);if(!t)return r;const o=r.getDate(),i=dt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ki(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=Qe(e,n?.in),d=o||r?AS(u,o+r*12):u,f=s||i?nc(d,s+i*7):d,p=l+a*60,y=(c+p*60)*1e3;return dt(e,+f+y)}let Wz={};function So(){return Wz}function or(e,t){const n=So(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qe(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Ci(e,t){return or(e,{...t,weekStartsOn:1})}function PS(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=dt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Ci(o),s=dt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Ci(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function rc(e){const t=Qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function oc(e,...t){const n=dt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function To(e,t){const n=Qe(e,t?.in);return n.setHours(0,0,0,0),n}function qz(e,t,n){const[r,o]=oc(n?.in,e,t),i=To(r),s=To(o),a=+i-rc(i),l=+s-rc(s);return Math.round((a-l)/jz)}function Uz(e,t){const n=PS(e,t),r=dt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ci(r)}function Gz(e){return dt(e,Date.now())}function Yz(e,t,n){const[r,o]=oc(n?.in,e,t);return+To(r)==+To(o)}function Kz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ic(e){return!(!Kz(e)&&typeof e!="number"||isNaN(+Qe(e)))}function Zz(e,t){const[n,r]=oc(e,t.start,t.end);return{start:n,end:r}}function OS(e,t){const{start:n,end:r}=Zz(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(dt(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function _S(e,t){const n=Qe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Xz(e,t){const n=Qe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Qz(e,t){const n=So(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qe(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Jz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ej=(e,t,n)=>{let r;const o=Jz[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Jp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oj={date:Jp({formats:tj,defaultWidth:"full"}),time:Jp({formats:nj,defaultWidth:"full"}),dateTime:Jp({formats:rj,defaultWidth:"full"})},ij={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sj=(e,t,n,r)=>ij[e];function qs(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const aj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cj={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uj={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pj={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:qs({values:aj,defaultWidth:"wide"}),quarter:qs({values:lj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qs({values:cj,defaultWidth:"wide"}),day:qs({values:uj,defaultWidth:"wide"}),dayPeriod:qs({values:dj,defaultWidth:"wide",formattingValues:fj,defaultFormattingWidth:"wide"})};function Us(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?mj(a,d=>d.test(s)):hj(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function hj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const yj=/^(\d+)(th|st|nd|rd)?/i,vj=/\d+/i,bj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xj={any:[/^b/i,/^(a|c)/i]},wj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sj={any:[/1/i,/2/i,/3/i,/4/i]},Tj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ej={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},kj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Cj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ij={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Aj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Pj={ordinalNumber:gj({matchPattern:yj,parsePattern:vj,valueCallback:e=>parseInt(e,10)}),era:Us({matchPatterns:bj,defaultMatchWidth:"wide",parsePatterns:xj,defaultParseWidth:"any"}),quarter:Us({matchPatterns:wj,defaultMatchWidth:"wide",parsePatterns:Sj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Us({matchPatterns:Tj,defaultMatchWidth:"wide",parsePatterns:Ej,defaultParseWidth:"any"}),day:Us({matchPatterns:kj,defaultMatchWidth:"wide",parsePatterns:Cj,defaultParseWidth:"any"}),dayPeriod:Us({matchPatterns:Ij,defaultMatchWidth:"any",parsePatterns:Aj,defaultParseWidth:"any"})},MS={code:"en-US",formatDistance:ej,formatLong:oj,formatRelative:sj,localize:pj,match:Pj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Oj(e,t){const n=Qe(e,t?.in);return qz(n,Xz(n))+1}function DS(e,t){const n=Qe(e,t?.in),r=+Ci(n)-+Uz(n);return Math.round(r/CS)+1}function eh(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=So(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=dt(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=or(s,t),l=dt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=or(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function _j(e,t){const n=So(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=eh(e,t),i=dt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),or(i,t)}function NS(e,t){const n=Qe(e,t?.in),r=+or(n,t)-+_j(n,t);return Math.round(r/CS)+1}function ft(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Wr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ft(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ft(n+1,2)},d(e,t){return ft(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ft(e.getHours()%12||12,t.length)},H(e,t){return ft(e.getHours(),t.length)},m(e,t){return ft(e.getMinutes(),t.length)},s(e,t){return ft(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ft(o,t.length)}},Ii={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},FS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Wr.y(e,t)},Y:function(e,t,n,r){const o=eh(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ft(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ft(i,t.length)},R:function(e,t){const n=PS(e);return ft(n,t.length)},u:function(e,t){const n=e.getFullYear();return ft(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ft(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ft(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Wr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ft(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=NS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ft(o,t.length)},I:function(e,t,n){const r=DS(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Wr.d(e,t)},D:function(e,t,n){const r=Oj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ft(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ft(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ft(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ft(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ii.noon:r===0?o=Ii.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ii.evening:r>=12?o=Ii.afternoon:r>=4?o=Ii.morning:o=Ii.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Wr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Wr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Wr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Wr.s(e,t)},S:function(e,t){return Wr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return VS(r);case"XXXX":case"XX":return Eo(r);default:return Eo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return VS(r);case"xxxx":case"xx":return Eo(r);default:return Eo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+LS(r,":");default:return"GMT"+Eo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+LS(r,":");default:return"GMT"+Eo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ft(r,t.length)},T:function(e,t,n){return ft(+e,t.length)}};function LS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ft(i,2)}function VS(e,t){return e%60===0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Eo(e,t)}function Eo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ft(Math.trunc(r/60),2),i=ft(r%60,2);return n+o+t+i}const $S=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},zS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},th={p:zS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $S(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",$S(r,t)).replace("{{time}}",zS(o,t))}},Mj=/^D+$/,Dj=/^Y+$/,Nj=["D","DD","YY","YYYY"];function jS(e){return Mj.test(e)}function RS(e){return Dj.test(e)}function nh(e,t,n){const r=Fj(e,t,n);if(console.warn(r),Nj.includes(e))throw new RangeError(r)}function Fj(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Lj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$j=/^'([^]*?)'?$/,zj=/''/g,jj=/[a-zA-Z]/;function rh(e,t,n){const r=So(),o=r.locale??MS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Qe(e,n?.in);if(!ic(a))throw new RangeError("Invalid time value");let l=t.match(Vj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=th[d];return f(u,o.formatLong)}return u}).join("").match(Lj).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Rj(u)};if(FS[d])return{isToken:!0,value:u};if(d.match(jj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(RS(d)||jS(d))&&nh(d,t,String(e));const f=FS[d[0]];return f(a,d,o.localize,c)}).join("")}function Rj(e){const t=e.match($j);return t?t[1].replace(zj,"'"):e}function Bj(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=dt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Hj(){return Object.assign({},So())}function Wj(e,t){const n=Qe(e,t?.in).getDay();return n===0?7:n}function qj(e,t){return+Qe(e)>+Qe(t)}function Uj(e,t){return+Qe(e)<+Qe(t)}function Gj(e,t){const n=Yj(t)?new t(0):dt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Yj(e){return typeof e=="function"&&e.prototype?.constructor===e}const Kj=10;class BS{subPriority=0;validate(t,n){return!0}}class Zj extends BS{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Xj extends BS{priority=Kj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>dt(n,r))}set(t,n){return n.timestampIsSet?t:dt(t,Gj(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Zj(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Qj extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Mt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ir={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Dt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function sr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*Bz+i*Rz+s*Hz),rest:t.slice(n[0].length)}}function HS(e){return It(Mt.anyDigitsSigned,e)}function Ot(e,t){switch(e){case 1:return It(Mt.singleDigit,t);case 2:return It(Mt.twoDigits,t);case 3:return It(Mt.threeDigits,t);case 4:return It(Mt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function sc(e,t){switch(e){case 1:return It(Mt.singleDigitSigned,t);case 2:return It(Mt.twoDigitsSigned,t);case 3:return It(Mt.threeDigitsSigned,t);case 4:return It(Mt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function oh(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function WS(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function qS(e){return e%400===0||e%4===0&&e%100!==0}class Jj extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Dt(Ot(4,t),o);case"yo":return Dt(r.ordinalNumber(t,{unit:"year"}),o);default:return Dt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=WS(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class eR extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Dt(Ot(4,t),o);case"Yo":return Dt(r.ordinalNumber(t,{unit:"year"}),o);default:return Dt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=eh(t,o);if(r.isTwoDigitYear){const a=WS(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),or(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),or(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class tR extends rt{priority=130;parse(t,n){return sc(n==="R"?4:n.length,t)}set(t,n,r){const o=dt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Ci(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class nR extends rt{priority=130;parse(t,n){return sc(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class rR extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Ot(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class oR extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Ot(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class iR extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Dt(It(Mt.month,t),o);case"MM":return Dt(Ot(2,t),o);case"Mo":return Dt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class sR extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Dt(It(Mt.month,t),o);case"LL":return Dt(Ot(2,t),o);case"Lo":return Dt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function aR(e,t,n){const r=Qe(e,n?.in),o=NS(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n?.in)}class lR extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Mt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return or(aR(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function cR(e,t,n){const r=Qe(e,n?.in),o=DS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class uR extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Mt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Ci(cR(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const dR=[31,28,31,30,31,30,31,31,30,31,30,31],fR=[31,29,31,30,31,30,31,31,30,31,30,31];class pR extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Mt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=qS(r),i=t.getMonth();return o?n>=1&&n<=fR[i]:n>=1&&n<=dR[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class hR extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Mt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear();return qS(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function ih(e,t,n){const r=So(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Qe(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return nc(i,u,n)}class mR extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=ih(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class gR extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Dt(Ot(n.length,t),i);case"eo":return Dt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=ih(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class yR extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Dt(Ot(n.length,t),i);case"co":return Dt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=ih(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function vR(e,t,n){const r=Qe(e,n?.in),o=Wj(r,n),i=t-o;return nc(r,i,n)}class bR extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Ot(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Dt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Dt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Dt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Dt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=vR(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class xR extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(oh(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class wR extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(oh(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class SR extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(oh(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class TR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Mt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class ER extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Mt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class kR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Mt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class CR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Mt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class IR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Mt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class AR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Mt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class PR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Dt(Ot(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class OR extends rt{priority=10;parse(t,n){switch(n){case"X":return sr(ir.basicOptionalMinutes,t);case"XX":return sr(ir.basic,t);case"XXXX":return sr(ir.basicOptionalSeconds,t);case"XXXXX":return sr(ir.extendedOptionalSeconds,t);default:return sr(ir.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-rc(t)-r)}incompatibleTokens=["t","T","x"]}class _R extends rt{priority=10;parse(t,n){switch(n){case"x":return sr(ir.basicOptionalMinutes,t);case"xx":return sr(ir.basic,t);case"xxxx":return sr(ir.basicOptionalSeconds,t);case"xxxxx":return sr(ir.extendedOptionalSeconds,t);default:return sr(ir.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-rc(t)-r)}incompatibleTokens=["t","T","X"]}class MR extends rt{priority=40;parse(t){return HS(t)}set(t,n,r){return[dt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class DR extends rt{priority=20;parse(t){return HS(t)}set(t,n,r){return[dt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const NR={G:new Qj,y:new Jj,Y:new eR,R:new tR,u:new nR,Q:new rR,q:new oR,M:new iR,L:new sR,w:new lR,I:new uR,d:new pR,D:new hR,E:new mR,e:new gR,c:new yR,i:new bR,a:new xR,b:new wR,B:new SR,h:new TR,H:new ER,K:new kR,k:new CR,m:new IR,s:new AR,S:new PR,X:new OR,x:new _R,t:new MR,T:new DR},FR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VR=/^'([^]*?)'?$/,$R=/''/g,zR=/\S/,jR=/[a-zA-Z]/;function RR(e,t,n,r){const o=()=>dt(n,NaN),i=Hj(),s=i.locale??MS,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Qe(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new Xj(r?.in,n)],d=t.match(LR).map(m=>{const v=m[0];if(v in th){const b=th[v];return b(m,s.formatLong)}return m}).join("").match(FR),f=[];for(let m of d){RS(m)&&nh(m,t,e),jS(m)&&nh(m,t,e);const v=m[0],b=NR[v];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===v);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);f.push({token:v,fullToken:m});const T=b.run(e,m,s.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(jR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(m==="''"?m="'":v==="'"&&(m=BR(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&zR.test(e))return o();const p=u.map(m=>m.priority).sort((m,v)=>v-m).filter((m,v,b)=>b.indexOf(m)===v).map(m=>u.filter(v=>v.priority===m).sort((v,b)=>b.subPriority-v.subPriority)).map(m=>m[0]);let h=Qe(n,r?.in);if(isNaN(+h))return o();const y={};for(const m of p){if(!m.validate(h,c))return o();const v=m.set(h,y,c);Array.isArray(v)?(h=v[0],Object.assign(y,v[1])):h=v}return h}function BR(e){return e.match(VR)[1].replace($R,"'")}function HR(e,t,n){const[r,o]=oc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function WR(e,t){return Yz(dt(e,e),Gz(e))}function qR(e,t,n){return nc(e,-t,n)}function UR(e,t,n){const r=Qe(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=dt(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=Bj(s);return r.setMonth(t,Math.min(i,a)),r}function GR(e,t,n){let r=Qe(e,n?.in);return isNaN(+r)?dt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=UR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function YR(e,t,n){const r=Qe(e,n?.in);return isNaN(+r)?dt(e,NaN):(r.setFullYear(t),r)}function KR(e,t,n){return AS(e,-t,n)}function Gs(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=KR(e,o+r*12,n),d=qR(u,s+i*7,n),f=l+a*60,h=(c+f*60)*1e3;return dt(e,+d-h)}const ZR=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function XR(e,t){return S.useRef(ZR(e,t)).current}function US(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const QR=/^(?<hour>\d\d):(?<min>\d\d)$/,JR={type:"spring",bounce:.3,duration:.6},GS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),YS={enter:GS(1),exit:GS(-1),middle:{x:"0%",opacity:1}},KS={exit:{visibility:"hidden"}},eB=e=>{const t=or(_S(e));return OS({start:t,end:ki(t,{days:41})})},ZS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),tB=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=_S(new Date(1970,o,1).setMonth(o)),s=ZS(i,n);return g.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),sh={ArrowLeft:(e,t)=>t==="days"?Gs(e,{days:1}):Gs(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ki(e,{days:1}):ki(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Gs(e,{weeks:1}):Gs(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ki(e,{weeks:1}):ki(e,{years:1})},XS=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},ko=e=>e.getFullYear().toString().padStart(4,"0"),nB=(e,t,n)=>e===void 0||n===void 0?!1:qj(t,e)&&Uj(t,n),rB=e=>{const t=At();return g.jsx(He.tbody,{layout:!0,variants:YS,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Be.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return g.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?To(e.date).toISOString():void 0),l=WR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=HR(i,e.stateDate),d=!u||c,f=e.rangeMode?nB(e.range?.from,i,e.range?.to):!1;return g.jsxs("td",{align:"center",className:Pe("relative",Be.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[g.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Pe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Be.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),a&&e.stateRange.from?.toISOString()===s?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?g.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},oB=()=>To(new Date),QS=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...h})=>{const y=S.useRef(Go()),m=At(),v=ul(o),b=S.useRef(null),{date:x,range:T}=h,E=x||new Date,I=S.useRef(null),[w,k]=ap({date:E,isAnimating:!1,year:ko(E),direction:void 0,range:{from:T?.from,to:T?.to},months:tB(y.current,E,v),selectMode:l?"from":void 0,week:OS({start:or(E),end:Qz(E)})},D=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(XS(I.current||null,b,D.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const V=C(D.state().date);return{date:V,year:ko(V)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const V=D.state();if(V.isAnimating)return V;const L=ki(V.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:ko(L)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const V=D.state();if(V.isAnimating)return V;const L=Gs(V.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:ko(L)}},onSelectDate:C=>{const V=D.state(),L=C.currentTarget.dataset.range==="true",B=C.currentTarget.dataset.date||"",U=new Date(B);return{date:U,year:ko(U),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:L?{from:V.selectMode==="from"?U:V.range.from,to:V.selectMode==="to"?U:V.range.to}:V.range}},onChangeMonth:C=>{const V=C.target.value,B=Array.from(C.target.options).find(G=>G.value===V),U=D.state();if(B){const G=B.dataset.index||"",H=new Date(D.state().date);return H.setMonth(+G),{...U,date:H,year:ko(H)}}return U},onKeyDown:C=>{const V=C.key,L=D.state();if(V in sh){(V==="ArrowUp"||V==="ArrowDown")&&C.preventDefault();const B=D.state().date,U=Be.keyof(sh,V)?sh[V](B,C.shiftKey?"month":"days"):null;if(U!==null)return XS(C.target,b,U),{...L,date:U,year:ko(U)}}return D.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(D,C,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(D.date),D),(D,C,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(D.date),D),(D,C,V)=>{const L=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&L&&t?(c?.(D.range),D):(L&&t&&c?.(D.date),D)}]}),A=eB(w.date),O=yv(A,7),N=w.date.toISOString(),M=ZS(w.date,v);S.useEffect(()=>{t||c?.(w.date)},[N,t]);const $=XR(D=>k.date(C=>YR(new Date(C),+D)),1200),_=D=>{const C=D.currentTarget.value;k.onChangeYear(C),a?.(new Date(C)),$(C)},F=US((D,C)=>(D.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const D=oB();k.date(()=>D),c?.(D)};return g.jsx(Hf,{transition:JR,children:g.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Pe("relative overflow-hidden",Be.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[g.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:g.jsx(mn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:g.jsxs(He.div,{initial:"enter",animate:"middle",exit:"exit",children:[g.jsxs("header",{className:"relative flex justify-between",children:[g.jsx(He.button,{layout:!0,type:"button","data-focustrap":"prev",variants:KS,onClick:k.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(cI,{className:"h-4 w-4"})}),g.jsx(He.span,{layout:!0,variants:YS,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:g.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[g.jsx("select",{value:M,onChange:k.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${M.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),g.jsx(Fg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:_,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),g.jsx(He.button,{layout:!0,type:"button","data-focustrap":"next",variants:KS,onClick:k.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(Au,{className:"h-4 w-4"})}),g.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),g.jsxs(He.table,{className:"mt-2 table min-w-full table-auto border-0",children:[g.jsx("thead",{children:g.jsx("tr",{children:w.week.map(D=>g.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Be.function(u?.weekDay)?u.weekDay(D):u?.weekDay),children:D.toLocaleDateString(v,{weekday:"short"})},D.toString()))})}),g.jsx(rB,{zip:O,range:T,styles:u,date:x||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},M)})}),f==="datetime"?g.jsx("section",{className:"grid items-center my-4",children:g.jsx(Ko,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?rh(x,"HH:mm"):void 0,title:p||m.calendarDatetimeTitle,onChange:D=>{const C=D.target.value,V=QR.exec(C);if(!V)return;const L=V.groups.hour,B=V.groups.min,U=GR(w.date,{hours:Number(L),minutes:Number(B),seconds:0});k.date(()=>U),c?.(U)}})}):null,g.jsx("footer",{className:"mt-2 text-center text-primary",children:g.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},ah=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(ah.displayName="ProgressRootContext");function iB(){const e=P.useContext(ah);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":On(51));return e}let lh=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const JS={status(e){return e==="progressing"?{[lh.progressing]:""}:e==="complete"?{[lh.complete]:""}:e==="indeterminate"?{[lh.indeterminate]:""}:null}};function sB(e,t){return t==null?"indeterminate progress":e||`${t}%`}const eT=P.forwardRef(function(t,n){const{format:r,getAriaValueText:o=sB,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,p]=P.useState(),h=gd(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const m=WO(l,i,h.current),v=P.useMemo(()=>({status:y}),[y]),b={"aria-labelledby":f,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(m,l),role:"progressbar"},x=P.useMemo(()=>({formattedValue:m,max:s,min:a,setLabelId:p,state:v,status:y,value:l}),[m,s,a,p,v,y,l]),T=an("div",t,{state:v,ref:n,props:[b,d],stateAttributesMapping:JS});return g.jsx(ah.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(eT.displayName="ProgressRoot");const tT=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:s,min:a,value:l,state:c}=iB(),u=Number.isFinite(l)&&l!==null?rl(l,a,s):null,d=P.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:JS})});process.env.NODE_ENV!=="production"&&(tT.displayName="ProgressIndicator");const aB=e=>g.jsxs(eT,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[g.jsx(tT,{style:{transform:Be.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Be.number(e.percent)?g.jsx("p",{className:Pe("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),ac=e=>g.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[g.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),g.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});ac.Icon=function(t){return g.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},ac.Body=function(t){return g.jsx(cn,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},ac.Right=function(t){return g.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:g.jsx(cn,{...t,type:"button"})})};const lB=e=>g.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),cB=e=>g.jsx(He.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),nT=new Date(1970,11,31),ch={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},rT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},uB={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},uh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},dB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},fB={day:"numeric",month:"numeric",year:"numeric"},pB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=ul(t),d=S.useId(),f=At(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?dB:fB),[u,a]),[h,y]=S.useState(e||void 0),[m,v]=S.useState(!1),b=uh(p,nT).flatMap(M=>Be.keyof(ch,M.type)?ch[M.type](M.value):[]),x=S.useMemo(()=>uh(p,nT).reduce((M,$)=>M+(Be.keyof(rT,$.type)?rT[$.type]($.value):""),""),[p]),T=e?.toISOString(),[E,I]=S.useState(h?uh(p,h).reduce((M,$)=>M+(Be.keyof(ch,$.type)?uB[$.type](h,$.value):""),""):""),w=M=>{const $=M.target.value;if(I($),b.length===$.length&&b.every((F,z)=>{const D=$.charAt(z);return typeof F=="string"?D===F:F.test(D)})){const F=RR($,x,new Date),z=a==="datetime"?F:To(F);return y(z),r?.(z)}return y(void 0),r?.(void 0)};S.useEffect(()=>{ic(e)&&(y(e),I(rh(e,x)))},[T,x]);const k=M=>(y(M),r?.(M),i&&v(!1),I(M?rh(M,x):"")),A=ic(h),O=A?h.toISOString():void 0,N=g.jsx(QS,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:A?h:void 0});return g.jsx(S.Fragment,{children:g.jsx(Ko,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":O,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:s?g.jsxs(S.Fragment,{children:[g.jsx("input",{"data-origin":l.name,defaultValue:O,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),g.jsx(Si,{open:m,onChange:v,buttonProps:{"aria-describedby":d},trigger:g.jsxs("span",{"aria-labelledby":d,children:[g.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),g.jsx(lI,{})]}),children:N})]}):null})})}),hB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],mB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],gB=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],yB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],oT=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},iT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},vB=e=>typeof e=="number"?Math.log(e):iT(e)*Math.log(10),bB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},sT=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},xB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function wB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?yB:gB:t.binary?mB:hB,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return sT(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=xB(t);let l;if(e<1){const c=oT(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?vB(e)/Math.log(1024):iT(e)/3),n.length-1);if(e=bB(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=oT(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return sT(l,t.fixedWidth)}var lc={exports:{}},cc={exports:{}},at={};var aT;function SB(){if(aT)return at;aT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case h:case p:case s:return E;default:return I}}case n:return I}}}function T(E){return x(E)===c}return at.AsyncMode=l,at.ConcurrentMode=c,at.ContextConsumer=a,at.ContextProvider=s,at.Element=t,at.ForwardRef=u,at.Fragment=r,at.Lazy=h,at.Memo=p,at.Portal=n,at.Profiler=i,at.StrictMode=o,at.Suspense=d,at.isAsyncMode=function(E){return T(E)||x(E)===l},at.isConcurrentMode=T,at.isContextConsumer=function(E){return x(E)===a},at.isContextProvider=function(E){return x(E)===s},at.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},at.isForwardRef=function(E){return x(E)===u},at.isFragment=function(E){return x(E)===r},at.isLazy=function(E){return x(E)===h},at.isMemo=function(E){return x(E)===p},at.isPortal=function(E){return x(E)===n},at.isProfiler=function(E){return x(E)===i},at.isStrictMode=function(E){return x(E)===o},at.isSuspense=function(E){return x(E)===d},at.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===p||E.$$typeof===s||E.$$typeof===a||E.$$typeof===u||E.$$typeof===m||E.$$typeof===v||E.$$typeof===b||E.$$typeof===y)},at.typeOf=x,at}var lt={};var lT;function TB(){return lT||(lT=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===h||R.$$typeof===p||R.$$typeof===s||R.$$typeof===a||R.$$typeof===u||R.$$typeof===m||R.$$typeof===v||R.$$typeof===b||R.$$typeof===y)}function T(R){if(typeof R=="object"&&R!==null){var ae=R.$$typeof;switch(ae){case t:var ce=R.type;switch(ce){case l:case c:case r:case i:case o:case d:return ce;default:var Q=ce&&ce.$$typeof;switch(Q){case a:case u:case h:case p:case s:return Q;default:return ae}}case n:return ae}}}var E=l,I=c,w=a,k=s,A=t,O=u,N=r,M=h,$=p,_=n,F=i,z=o,D=d,C=!1;function V(R){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(R)||T(R)===l}function L(R){return T(R)===c}function B(R){return T(R)===a}function U(R){return T(R)===s}function G(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function H(R){return T(R)===u}function ee(R){return T(R)===r}function ie(R){return T(R)===h}function te(R){return T(R)===p}function q(R){return T(R)===n}function Y(R){return T(R)===i}function Z(R){return T(R)===o}function pe(R){return T(R)===d}lt.AsyncMode=E,lt.ConcurrentMode=I,lt.ContextConsumer=w,lt.ContextProvider=k,lt.Element=A,lt.ForwardRef=O,lt.Fragment=N,lt.Lazy=M,lt.Memo=$,lt.Portal=_,lt.Profiler=F,lt.StrictMode=z,lt.Suspense=D,lt.isAsyncMode=V,lt.isConcurrentMode=L,lt.isContextConsumer=B,lt.isContextProvider=U,lt.isElement=G,lt.isForwardRef=H,lt.isFragment=ee,lt.isLazy=ie,lt.isMemo=te,lt.isPortal=q,lt.isProfiler=Y,lt.isStrictMode=Z,lt.isSuspense=pe,lt.isValidElementType=x,lt.typeOf=T})()),lt}var cT;function uT(){return cT||(cT=1,process.env.NODE_ENV==="production"?cc.exports=SB():cc.exports=TB()),cc.exports}var dh,dT;function EB(){if(dT)return dh;dT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return dh=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},dh}var fh,fT;function ph(){if(fT)return fh;fT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fh=e,fh}var hh,pT;function hT(){return pT||(pT=1,hh=Function.call.bind(Object.prototype.hasOwnProperty)),hh}var mh,mT;function kB(){if(mT)return mh;mT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ph(),n={},r=hT();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+a+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mh=o,mh}var gh,gT;function CB(){if(gT)return gh;gT=1;var e=uT(),t=EB(),n=ph(),r=hT(),o=kB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return gh=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var B=L&&(c&&L[c]||L[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:T(),elementType:E(),instanceOf:I,node:O(),objectOf:k,oneOf:w,oneOfType:A,shape:M,exact:$};function h(L,B){return L===B?L!==0||1/L===1/B:L!==L&&B!==B}function y(L,B){this.message=L,this.data=B&&typeof B=="object"?B:{},this.stack=""}y.prototype=Error.prototype;function m(L){if(process.env.NODE_ENV!=="production")var B={},U=0;function G(ee,ie,te,q,Y,Z,pe){if(q=q||f,Z=Z||te,pe!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+te;!B[ae]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[ae]=!0,U++)}}return ie[te]==null?ee?ie[te]===null?new y("The "+Y+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new y("The "+Y+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:L(ie,te,q,Y,Z)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function v(L){function B(U,G,H,ee,ie,te){var q=U[G],Y=z(q);if(Y!==L){var Z=D(q);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+Z+"` supplied to `"+H+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return m(B)}function b(){return m(s)}function x(L){function B(U,G,H,ee,ie){if(typeof L!="function")return new y("Property `"+ie+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var te=U[G];if(!Array.isArray(te)){var q=z(te);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Z=L(te,Y,H,ee,ie+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return m(B)}function T(){function L(B,U,G,H,ee){var ie=B[U];if(!a(ie)){var te=z(ie);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return m(L)}function E(){function L(B,U,G,H,ee){var ie=B[U];if(!e.isValidElementType(ie)){var te=z(ie);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return m(L)}function I(L){function B(U,G,H,ee,ie){if(!(U[G]instanceof L)){var te=L.name||f,q=V(U[G]);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return m(B)}function w(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function B(U,G,H,ee,ie){for(var te=U[G],q=0;q<L.length;q++)if(h(te,L[q]))return null;var Y=JSON.stringify(L,function(pe,R){var ae=D(R);return ae==="symbol"?String(R):R});return new y("Invalid "+ee+" `"+ie+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return m(B)}function k(L){function B(U,G,H,ee,ie){if(typeof L!="function")return new y("Property `"+ie+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an object."));for(var Y in te)if(r(te,Y)){var Z=L(te,Y,H,ee,ie+"."+Y,n);if(Z instanceof Error)return Z}return null}return m(B)}function A(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var B=0;B<L.length;B++){var U=L[B];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(U)+" at index "+B+"."),s}function G(H,ee,ie,te,q){for(var Y=[],Z=0;Z<L.length;Z++){var pe=L[Z],R=pe(H,ee,ie,te,q,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&Y.push(R.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new y("Invalid "+te+" `"+q+"` supplied to "+("`"+ie+"`"+ae+"."))}return m(G)}function O(){function L(B,U,G,H,ee){return _(B[U])?null:new y("Invalid "+H+" `"+ee+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m(L)}function N(L,B,U,G,H){return new y((L||"React class")+": "+B+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function M(L){function B(U,G,H,ee,ie){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in L){var Z=L[Y];if(typeof Z!="function")return N(H,ee,ie,Y,D(Z));var pe=Z(te,Y,H,ee,ie+"."+Y,n);if(pe)return pe}return null}return m(B)}function $(L){function B(U,G,H,ee,ie){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));var Y=t({},U[G],L);for(var Z in Y){var pe=L[Z];if(r(L,Z)&&typeof pe!="function")return N(H,ee,ie,Z,D(pe));if(!pe)return new y("Invalid "+ee+" `"+ie+"` key `"+Z+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[G],null," ")+`
|
|
17
|
+
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var R=pe(te,Z,H,ee,ie+"."+Z,n);if(R)return R}return null}return m(B)}function _(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(_);if(L===null||a(L))return!0;var B=d(L);if(B){var U=B.call(L),G;if(B!==L.entries){for(;!(G=U.next()).done;)if(!_(G.value))return!1}else for(;!(G=U.next()).done;){var H=G.value;if(H&&!_(H[1]))return!1}}else return!1;return!0;default:return!1}}function F(L,B){return L==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z(L){var B=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":F(B,L)?"symbol":B}function D(L){if(typeof L>"u"||L===null)return""+L;var B=z(L);if(B==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return B}function C(L){var B=D(L);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function V(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},gh}var yh,yT;function IB(){if(yT)return yh;yT=1;var e=ph();function t(){}function n(){}return n.resetWarningCache=t,yh=function(){function r(s,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yh}var vT;function AB(){if(vT)return lc.exports;if(vT=1,process.env.NODE_ENV!=="production"){var e=uT(),t=!0;lc.exports=CB()(e.isElement,t)}else lc.exports=IB()();return lc.exports}var PB=AB();const yt=sm(PB);function Co(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const OB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ai(e,t,n){const r=_B(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&bT(r,"path",i),bT(r,"relativePath",i),r}function _B(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=OB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function bT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const MB=[".DS_Store","Thumbs.db"];function DB(e){return Co(this,void 0,void 0,function*(){return uc(e)&&NB(e.dataTransfer)?$B(e.dataTransfer,e.type):FB(e)?LB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?VB(e):[]})}function NB(e){return uc(e)}function FB(e){return uc(e)&&uc(e.target)}function uc(e){return typeof e=="object"&&e!==null}function LB(e){return vh(e.target.files).map(t=>Ai(t))}function VB(e){return Co(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Ai(n))})}function $B(e,t){return Co(this,void 0,void 0,function*(){if(e.items){const n=vh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(zB));return xT(wT(r))}return xT(vh(e.files).map(n=>Ai(n)))})}function xT(e){return e.filter(t=>MB.indexOf(t.name)===-1)}function vh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function zB(e){if(typeof e.webkitGetAsEntry!="function")return ST(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?TT(t):ST(e,t)}function wT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?wT(n):[n]],[])}function ST(e,t){return Co(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const s=yield i.getFile();return s.handle=i,Ai(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Ai(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function jB(e){return Co(this,void 0,void 0,function*(){return e.isDirectory?TT(e):RB(e)})}function TT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>Co(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(jB));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function RB(e){return Co(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Ai(r,e.fullPath);t(o)},r=>{n(r)})})})}var dc={},ET;function BB(){return ET||(ET=1,dc.__esModule=!0,dc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),dc}var HB=BB();const bh=sm(HB);function kT(e){return UB(e)||qB(e)||PT(e)||WB()}function WB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UB(e){if(Array.isArray(e))return xh(e)}function CT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function IT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(n),!0).forEach(function(r){AT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ys(e,t){return KB(e)||YB(e,t)||PT(e,t)||GB()}function GB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PT(e,t){if(e){if(typeof e=="string")return xh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xh(e,t)}}function xh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function KB(e){if(Array.isArray(e))return e}var ZB=typeof bh=="function"?bh:bh.default,XB="file-invalid-type",QB="file-too-large",JB="file-too-small",e4="too-many-files",t4=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:XB,message:"File type must be ".concat(r)}},OT=function(t){return{code:QB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_T=function(t){return{code:JB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},n4={code:e4,message:"Too many files"};function r4(e){return e.type===""&&typeof e.getAsFile=="function"}function MT(e,t){var n=e.type==="application/x-moz-file"||ZB(e,t)||r4(e);return[n,n?null:t4(t)]}function DT(e,t,n){if(Io(e.size))if(Io(t)&&Io(n)){if(e.size>n)return[!1,OT(n)];if(e.size<t)return[!1,_T(t)]}else{if(Io(t)&&e.size<t)return[!1,_T(t)];if(Io(n)&&e.size>n)return[!1,OT(n)]}return[!0,null]}function Io(e){return e!=null}function o4(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=MT(l,n),u=Ys(c,1),d=u[0],f=DT(l,r,o),p=Ys(f,1),h=p[0],y=a?a(l):null;return d&&h&&!y})}function fc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ks(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function NT(e){e.preventDefault()}function i4(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function s4(e){return e.indexOf("Edge/")!==-1}function a4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return i4(e)||s4(e)}function ar(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!fc(r)&&a&&a.apply(void 0,[r].concat(i)),fc(r)})}}function l4(){return"showOpenFilePicker"in window}function c4(e){if(Io(e)){var t=Object.entries(e).filter(function(n){var r=Ys(n,2),o=r[0],i=r[1],s=!0;return FT(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(LT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Ys(r,2),i=o[0],s=o[1];return IT(IT({},n),{},AT({},i,s))},{});return[{description:"Files",accept:t}]}return e}function u4(e){if(Io(e))return Object.entries(e).reduce(function(t,n){var r=Ys(n,2),o=r[0],i=r[1];return[].concat(kT(t),[o],kT(i))},[]).filter(function(t){return FT(t)||LT(t)}).join(",")}function d4(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function f4(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function FT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function LT(e){return/^.*\.[\w]+$/.test(e)}var p4=["children"],h4=["open"],m4=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],g4=["refKey","onChange","onClick"];function VT(e){return b4(e)||v4(e)||$T(e)||y4()}function y4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
20
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b4(e){if(Array.isArray(e))return Sh(e)}function wh(e,t){return S4(e)||w4(e,t)||$T(e,t)||x4()}function x4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $T(e,t){if(e){if(typeof e=="string")return Sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sh(e,t)}}function Sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function S4(e){if(Array.isArray(e))return e}function zT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zT(Object(n),!0).forEach(function(r){Th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(e,t){if(e==null)return{};var n=T4(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T4(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Eh=S.forwardRef(function(e,t){var n=e.children,r=pc(e,p4),o=RT(r),i=o.open,s=pc(o,h4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(St(St({},s),{},{open:i})))});Eh.displayName="Dropzone";var jT={disabled:!1,getFilesFromEvent:DB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Eh.defaultProps=jT,Eh.propTypes={children:yt.func,accept:yt.objectOf(yt.arrayOf(yt.string)),multiple:yt.bool,preventDropOnDocument:yt.bool,noClick:yt.bool,noKeyboard:yt.bool,noDrag:yt.bool,noDragEventsBubbling:yt.bool,minSize:yt.number,maxSize:yt.number,maxFiles:yt.number,disabled:yt.bool,getFilesFromEvent:yt.func,onFileDialogCancel:yt.func,onFileDialogOpen:yt.func,useFsAccessApi:yt.bool,autoFocus:yt.bool,onDragEnter:yt.func,onDragLeave:yt.func,onDragOver:yt.func,onDrop:yt.func,onDropAccepted:yt.func,onDropRejected:yt.func,onError:yt.func,validator:yt.func};var kh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function RT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=St(St({},jT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,A=t.validator,O=S.useMemo(function(){return u4(n)},[n]),N=S.useMemo(function(){return c4(n)},[n]),M=S.useMemo(function(){return typeof m=="function"?m:BT},[m]),$=S.useMemo(function(){return typeof y=="function"?y:BT},[y]),_=S.useRef(null),F=S.useRef(null),z=S.useReducer(E4,kh),D=wh(z,2),C=D[0],V=D[1],L=C.isFocused,B=C.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&l4()),G=function(){!U.current&&B&&setTimeout(function(){if(F.current){var X=F.current.files;X.length||(V({type:"closeDialog"}),$())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[F,B,$,U]);var H=S.useRef([]),ee=S.useRef([]),ie=function(X){_.current&&_.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",NT,!1),document.addEventListener("drop",ie,!1)),function(){x&&(document.removeEventListener("dragover",NT),document.removeEventListener("drop",ie))}},[_,x]),S.useEffect(function(){var j=function(De){ee.current=[].concat(VT(ee.current),[De.target]),Ks(De)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(De){ee.current=ee.current.filter(function(Ne){return Ne!==De.target&&Ne!==null}),!(ee.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},ve=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",j,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ve,!1),function(){document.removeEventListener("dragenter",j),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ve)}},[_]),S.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var te=S.useCallback(function(j){k?k(j):console.error(j)},[k]),q=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[].concat(VT(H.current),[j.target]),Ks(j)&&Promise.resolve(o(j)).then(function(X){if(!(fc(j)&&!w)){var me=X.length,ve=me>0&&o4({files:X,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),ke=me>0&&!ve;V({isDragAccept:ve,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(X){return te(X)})},[o,c,te,w,O,s,i,a,l,A]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=Ks(j);if(X&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(j),!1},[d,w]),Z=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=H.current.filter(function(ve){return _.current&&_.current.contains(ve)}),me=X.indexOf(j.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ks(j)&&u&&u(j))},[_,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(ke){var De=MT(ke,O),Ne=wh(De,2),ct=Ne[0],Nt=Ne[1],Qt=DT(ke,s,i),Re=wh(Qt,2),W=Re[0],K=Re[1],Oe=A?A(ke):null;if(ct&&W&&!Oe)me.push(ke);else{var Ue=[Nt,K];Oe&&(Ue=Ue.concat(Oe)),ve.push({file:ke,errors:Ue.filter(function(Ye){return Ye})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(ke){ve.push({file:ke,errors:[n4]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&h&&h(ve,X),me.length>0&&p&&p(me,X)},[V,a,O,s,i,l,f,p,h,A]),R=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],Ks(j)&&Promise.resolve(o(j)).then(function(X){fc(j)&&!w||pe(X,j)}).catch(function(X){return te(X)}),V({type:"reset"})},[o,pe,te,w]),ae=S.useCallback(function(){if(U.current){V({type:"openDialog"}),M();var j={multiple:a,types:N};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){d4(X)?($(X),V({type:"closeDialog"})):f4(X)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):te(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):te(X)});return}F.current&&(V({type:"openDialog"}),M(),F.current.value=null,F.current.click())},[V,M,$,v,pe,te,N,a]),ce=S.useCallback(function(j){!_.current||!_.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[_,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),re=S.useCallback(function(){T||(a4()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},oe=function(X){return E?null:he(X)},le=function(X){return I?null:he(X)},be=function(X){w&&X.stopPropagation()},de=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.role,ke=j.onKeyDown,De=j.onFocus,Ne=j.onBlur,ct=j.onClick,Nt=j.onDragEnter,Qt=j.onDragOver,Re=j.onDragLeave,W=j.onDrop,K=pc(j,m4);return St(St(Th({onKeyDown:oe(ar(ke,ce)),onFocus:oe(ar(De,Q)),onBlur:oe(ar(Ne,ue)),onClick:he(ar(ct,re)),onDragEnter:le(ar(Nt,q)),onDragOver:le(ar(Qt,Y)),onDragLeave:le(ar(Re,Z)),onDrop:le(ar(W,R)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,_),!r&&!E?{tabIndex:0}:{}),K)}},[_,ce,Q,ue,re,q,Y,Z,R,E,I,r]),ne=S.useCallback(function(j){j.stopPropagation()},[]),J=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.onChange,ke=j.onClick,De=pc(j,g4),Ne=Th({accept:O,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:he(ar(ve,R)),onClick:he(ar(ke,ne)),tabIndex:-1},me,F);return St(St({},Ne),De)}},[F,n,a,R,r]);return St(St({},C),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:_,inputRef:F,open:he(ae)})}function E4(e,t){switch(t.type){case"focus":return St(St({},e),{},{isFocused:!0});case"blur":return St(St({},e),{},{isFocused:!1});case"openDialog":return St(St({},kh),{},{isFileDialogActive:!0});case"closeDialog":return St(St({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return St(St({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return St(St({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return St(St({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return St({},kh);default:return e}}function BT(){}const HT=S.createContext([null,()=>{}]),k4=()=>S.useContext(HT),C4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,I4={csv:Mu,xls:Mu,mov:jg,mp4:jg,xlsx:Mu,pdf:zg,txt:zg,json:fI,mp3:aI},A4=e=>{const[,t]=k4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:C4(l),size:wB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=I4[e.file.name.split(".").at(-1)]??Rg,a=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:a}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Lo,{size:16})})})]})},P4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(A4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),WT=e=>{const t=At(),n=e.dragging?pI:hI;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},O4=e=>e.isDragActive?g.jsx(WT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(P4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),_4=g.jsx(WT,{dragging:!1}),M4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},D4=({idle:e=_4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=At(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(m=>m.concat(y))},{getRootProps:f,getInputProps:p,isDragActive:h}=RT({onDrop:d});return g.jsxs(HT.Provider,{value:s,children:[g.jsx(Ws,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?g.jsx(M4,{item:s[0]}):null}),g.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(O4,{File:n,onDeleteFile:t,isDragActive:h,idle:e,files:c})]})]})},qT=()=>window.matchMedia("@media (pointer: coarse)"),N4=()=>{const e=S.useRef(Dr()?null:qT()),[t,n]=S.useState(Dr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?qT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},UT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=N4(),o=S.useRef(Dr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||vv())return;document.documentElement.style.padding=Sg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(Hk(c.style.height)):null,f=Be.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},F4=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},GT=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},YT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},KT=(e,t)=>{const n=GT(t,YT.basic,e);return n!==void 0&&n!==e?n:GT(t,YT.extend,e)},ZT=e=>e.replace(/[^0-9]/g,""),hc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),XT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?ZT(e).includes(ZT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?F4(e,t)!==null:!1,L4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>XT(e,o,n,r)):XT(e,t,n,r),Ch=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Be.array(i.value)?i.value.map(hc):hc(`${i.value}`)}));return e.forEach(i=>{const s=KT(i,t);o.forEach(a=>{const l=KT(i,a.key);if(!l)return;const c=hc(`${a.value}`.toLocaleLowerCase()).trim(),u=hc(`${l}`.toLocaleLowerCase()).trim();if(L4(u,c,a.score,a.match))return void r.set(s,i);Be.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},V4=e=>g.jsx(S.Fragment,{children:e.children}),$4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},z4=[],j4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:g.jsx(mn,{children:t.children})})}),R4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),B4={List:j4,Item:R4},Pi=40,H4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,...y},m)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=At(),[I,w]=S.useState(()=>Math.min(320,Pi*o.length)),[k,A]=S.useState(!1),[O,N]=S.useState(""),[M,$]=S.useState(T),[_,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,D]=S.useState(null),C=S.useRef(z4),V=UT(k,"block-only"),L=h&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,B=()=>Ri.flushSync(()=>A(!0)),U=O?Ch(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=h?void 0:`^(${o.map(j=>`${pd(j.value)}${j.label?"|"+pd(j.label):""}`).join("|")})$`,{x:ie,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Gn({open:k,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:io,middleware:[Ho(4),My({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),_y({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Wi(Y.reference.current,window.innerHeight),ke=Math.min(me<Pi?ve:me,ve,j.availableHeight),De=H.length===0?Pi:Math.min(ke,ve,me),Ne=`${b.current.getBoundingClientRect().width}px`;Object.assign(j.elements.floating.style,{width:Ne,maxWidth:Ne,height:De})}})]}),R=uv(Z,$4),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(Z,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const j=o.find(X=>X.value===y.value);j&&(F(j.label??j.value),$(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const j=Y.reference;if(j.current===null)return;const X=Wi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Pi)),100)},[O,k,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Hi(j)},[]);const ue=(j,X)=>{$(j.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",j.value),me.value=j.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ve),y.onChange&&y.onChange(ve),F(j.label??""),G(),N(""),D(X)},re=j=>{const X=j.target.value;return N(X),!k&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{B(),N(""),Y.reference.current?.focus()},oe=()=>{D(j=>j===null?0:j),B(),N("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),N(""),$(""),F(""),wg(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,ne=H.length===0,J=pe==="top"||pe==="top-start";return g.jsxs(rs,{...y,left:e,error:t,ref:b,form:y.form,loading:r,name:y.name,feedback:k&&J?y.title:d,hideLeft:f,required:p,title:y.title,container:i,rightLabel:s,interactive:a,id:de,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:he,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),M?g.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:oe,pattern:ee,onChange:re,id:de,name:de,ref:Y.setReference,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),G();if(k){if(j.key==="ArrowDown"){let X=Be.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="ArrowUp"){let X=Be.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="Enter"){if(z!==null&&H[z])return j.preventDefault(),ue(H[z],z);if(H.length===1)return j.preventDefault(),ue(H[0],0)}}}}),"data-value":M,"data-error":!!t,"data-name":be,"data-target":be,required:p,value:k?O:o.length===0?"":_||M,"aria-autocomplete":"list",autoComplete:"off",className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",y.className)}),g.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:m,required:p,defaultValue:y.value||M||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:k?g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(He.div,{...ce({ref:dr(V,Y.setFloating),style:{...R.styles,left:ie,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ne?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Pi)*H.length;return Ri.flushSync(()=>w(me+2))},children:[ne?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,g.jsx(Lp,{overscan:40,ref:x,hidden:ne,data:H,style:{height:I},defaultItemHeight:Pi,components:B4,scrollerRef:j=>{v.current=j},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(j,X)=>{const me=X.Render??V4,ve=M===X.value||M===X.label,ke=z===j,De=X.label??X.value;return g.jsx("button",{"data-value":X.value,...Q({ref:Ne=>{C.current[j]=Ne},role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":X.disabled,onClick:()=>ue(X,j),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${ke?"bg-floating-hover text-floating-foreground":""}`}),children:g.jsx(me,{...y,label:X.label,value:X.value,children:De})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const QT=40,W4=e=>g.jsx(S.Fragment,{children:e.children}),q4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},JT=[],U4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(mn,{children:t.children})})}),G4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Y4={List:U4,Item:G4},K4=e=>{const t=At(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(la,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},Z4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:h=!1,onChangeOptions:y,...m},v)=>{const b=S.useMemo(()=>new zn(r.map(ne=>[ne.value,ne])),[r]),x=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??JT,I=At(),[w,k]=S.useState(0),[A,O]=S.useState(!1),[N,M]=S.useState(""),[$,_]=S.useState(()=>{const ne=new zn;return E.forEach(J=>{const j=b.get(J);return j?ne.set(J,j):void 0}),ne}),F=S.useMemo(()=>Array.from($.keys()),[$]),[z,D]=S.useState(()=>{const ne=new Set(E);return r.reduce((J,j)=>ne.has(j.value)?[...J,j.label??j.value]:J,[])??E}),[C,V]=S.useState(null),L=S.useRef(JT),B=h&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,U=N.length===0?B:Ch(B,"value",[{key:"value",value:N},{key:"label",value:N}]),G=UT(A,"block-only"),H=U.filter(ne=>ne.hidden!==!0),ee=H.length===0,{x:ie,y:te,strategy:q,refs:Y,context:Z}=Gn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:io,middleware:[Ho(4),_y({padding:10,elementContext:"reference",apply(ne){const j=ne.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Wi(Y.reference.current,window.innerHeight),me=Math.min(j<QT?X:j,X,ne.availableHeight),ve=H.length===0?QT:Math.min(me,X,j),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(ne.elements.floating.style,{width:ke,maxWidth:ke,height:ve})}})]}),pe=uv(Z,q4),{getReferenceProps:R,getFloatingProps:ae,getItemProps:ce}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(Z,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ne=>V(J=>ne??J)})]);S.useEffect(()=>{if(!A)return k(0);const ne=Y.reference;if(ne.current===null)return;const J=Wi(ne.current,window.innerHeight);setTimeout(()=>k(Math.min(J,H.length*40)),100)},[N,A,Y.reference]),S.useEffect(()=>{m.value&&_(new zn(m.value.map(ne=>[ne,b.get(ne)])))},[m.value,b]),S.useEffect(()=>{const ne=Y.reference.current;if(ne)return Hi(ne)},[]);const Q=(ne,J)=>{const j=$.clone(ve=>ve.has(ne.value)?ve.remove(ne.value):ve.set(ne.value,ne));_(j);const X=Y.reference.current;if(!X)return;const me=j.map(ve=>ve.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),D(ve=>ve.concat(ne.label??"")),M(""),V(J)},ue=ne=>{const J=ne.target.value;return M(J),!A&&J===""?O(!0):(ne.target.name=m.name||"",J?O(!0):void 0)},re=()=>{O(!0),M(""),Y.reference.current?.focus()},he=()=>{O(!0),M("")},oe=()=>{Y.reference.current?.setAttribute("data-value","[]"),M(""),O(!1),_(new zn),y?.([])},le=m.id||m.name,be=$.map((ne,J)=>g.jsx(la,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(ne,J)},children:g.jsx(Lo,{size:14})}),children:ne.label??ne.value},`MultiSelect-${ne.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return g.jsxs(rs,{...m,left:e,error:t,ref:x,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:s,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:re,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?g.jsx("button",{type:"button",onClick:oe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsxs("ul",{...R({...m,onFocus:he,id:`${le}-shadow`,name:`${le}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":le,"data-target":le,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Pe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[F.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(K4,{label:c,children:be})]}),g.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:p,defaultValue:m.value||F||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:A?g.jsx(ld,{lockScroll:!0,children:g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:ie,height:w-(F.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:N,onChange:ue,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:ne=>{if(ne.key==="ArrowDown"){let J=C+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="ArrowUp"){let J=C-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="Escape")return ne.currentTarget.blur(),O(!1);if(ne.key==="Enter"){if(C!==null&&H[C])return ne.preventDefault(),Q(H[C],C);if(H.length===1)return ne.preventDefault(),Q(H[0],0)}}}),ee?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:g.jsx(He.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!A)return k(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return Ri.flushSync(()=>k(j+2))},children:g.jsx(Lp,{ref:T,hidden:ee,data:H,components:Y4,style:de,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(ne,J)=>{const j=J.Render??W4,X=$.has(J.value)||$.has(J.label??""),me=C===ne,ve=J.label??J.value;return g.jsxs("button",{"data-value":J.value,...ce({ref:ke=>{L.current[ne]=ke},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,ne)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[g.jsx(Xp,{onChange:Yo,checked:X,"aria-checked":X,onClick:ke=>{ke.stopPropagation(),Q(J,ne)}}),g.jsx(j,{...m,label:J.label,value:J.value,children:ve})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:$.size===0?g.jsx(la,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),X4=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},Q4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},J4=e=>{const t=S.useRef(null),n=X4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Ko,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Lp,{height:n,useWindowScroll:!0,data:e.source,components:Q4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx(Xp,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(yr,{children:g.jsx(Au,{})})}),g.jsx("div",{})]})};function e3(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const t3=({children:e,...t})=>{const n=Fr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:e3(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})},mc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(mc.displayName="ToastContext");function Ih(){const e=P.useContext(mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":On(73));return e}var n3=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
22
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
23
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
24
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},r3=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
25
|
+
This means your output selector will likely run more frequently than intended.
|
|
26
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
27
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},o3={inputStabilityCheck:"once",identityFunctionCheck:"once"},gc=Symbol("NOT_FOUND");function i3(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function s3(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function a3(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var eE=e=>Array.isArray(e)?e:[e];function l3(e){const t=Array.isArray(e[0])?e[0]:e;return a3(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var c3=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...o3,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:n3},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:r3}}};function u3(e){let t;return{get(n){return t&&e(t.key,n)?t.value:gc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function d3(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return gc}function o(a,l){r(a)===gc&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var f3=(e,t)=>e===t;function p3(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function h3(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=f3,maxSize:o=1,resultEqualityCheck:i}=n,s=p3(r);let a=0;const l=o<=1?u3(s):d3(o,s);function c(){let u=l.get(arguments);if(u===gc){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(p=>i(p.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var m3=class{constructor(e){this.value=e}deref(){return this.value}},g3=typeof WeakRef<"u"?WeakRef:m3,y3=0,nE=1;function yc(){return{s:y3,v:void 0,o:null,p:null}}function rE(e,t={}){let n=yc();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const p=arguments[d];if(typeof p=="function"||typeof p=="object"&&p!==null){let h=a.o;h===null&&(a.o=h=new WeakMap);const y=h.get(p);y===void 0?(a=yc(),h.set(p,a)):a=y}else{let h=a.p;h===null&&(a.p=h=new Map);const y=h.get(p);y===void 0?(a=yc(),h.set(p,a)):a=y}}const c=a;let u;if(a.s===nE)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new g3(u):u}return c.s=nE,c.v=u,u}return s.clearCache=()=>{n=yc(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function oE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),i3(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=rE,argsMemoizeOptions:h=[],devModeChecks:y={}}=u,m=eE(f),v=eE(h),b=l3(o),x=d(function(){return i++,c.apply(null,arguments)},...m);let T=!0;const E=p(function(){s++;const w=tE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:A}=c3(T,y);if(k.shouldRun&&k.run(c,w,a),A.shouldRun){const O=tE(b,arguments);A.run({inputSelectorResults:w,inputSelectorResultsCopy:O},{memoize:d,memoizeOptions:m},arguments)}T&&(T=!1)}return a},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var v3=oE(rE),b3=Object.assign((e,t=v3)=>{s3(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>b3});const x3=oE({memoize:h3,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),jn=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":On(1));let a;if(e&&t)a=(l,c,u,d)=>{const f=e(l,c,u,d);return t(f,c,u,d)};else if(e)a=e;else throw new Error("Missing arguments");return a},w3=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],o=e.length-1||1,i=r.length-o;if(i>3)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":On(2));return(a,l,c,u)=>{let d=a.__cacheKey__;d||(d={id:n},a.__cacheKey__=d,n+=1);let f=t.get(d);if(!f){let p=e;const h=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{p=[...e.slice(0,-1),()=>h[0],r];break}case 2:{p=[...e.slice(0,-1),()=>h[0],()=>h[1],r];break}case 3:{p=[...e.slice(0,-1),()=>h[0],()=>h[1],()=>h[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":On(2))}f=x3(...p),f.selectorArgs=h,t.set(d,f)}switch(f.selectorArgs[0]=l,f.selectorArgs[1]=c,f.selectorArgs[2]=u,i){case 0:return f(a);case 1:return f(a,l);case 2:return f(a,l,c);case 3:return f(a,l,c,u);default:throw new Error("unreachable")}}},S3=xd(19)?E3:k3;function iE(e,t,n,r,o){return S3(e,t,n,r,o)}function T3(e,t,n,r,o){const i=P.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return YF.useSyncExternalStore(e.subscribe,i,i)}function E3(e,t,n,r,o){return T3(e,t,n,r,o)}function k3(e,t,n,r,o){return GF.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class C3{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return iE(this,t,n,r,o)}}class I3 extends C3{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){P.useDebugValue(t),pt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;pt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){P.useDebugValue(t,s=>Object.keys(s));const o=P.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);pt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){P.useDebugValue(t);const r=n!==void 0;if(pt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return P.useDebugValue(t),iE(this,this.selectors[t],n,r,o)}useContextCallback(t,n){P.useDebugValue(t);const r=ut(n??fn);this.context[t]=r}useStateSetter(t){const n=P.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const Zs=0;class Xs{static create(){return new Xs}currentId=Zs;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zs,n()},t)}isStarted(){return this.currentId!==Zs}clear=()=>{this.currentId!==Zs&&(clearTimeout(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.clear}function A3(){const e=Kn(Xs.create).current;return as(e.disposeEffect),e}let sE=0;function P3(e){return sE+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${sE}`}function Ah(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const vc=w3(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((o,i)=>{const s=o.transitionStatus==="ending";t.set(o.id,{value:o,domIndex:i,visibleIndex:s?-1:n,offsetY:r}),r+=o.height||0,s||(n+=1)}),t}),wr={toasts:jn(e=>e.toasts),isEmpty:jn(e=>e.toasts.length===0),toast:jn(vc,(e,t)=>e.get(t)?.value),toastIndex:jn(vc,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:jn(vc,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:jn(vc,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:jn(e=>e.hovering),focused:jn(e=>e.focused),expanded:jn(e=>e.hovering||e.focused),expandedOrOutOfFocus:jn(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:jn(e=>e.prevFocusElement)};class O3 extends I3{timers=new Map;areTimersPaused=!1;constructor(t){super(t,{},wr)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t){const n=wr.toastIndex(this.state,t);if(n===-1)return;this.state.toasts[n]?.onRemove?.();const o=[...this.state.toasts];o.splice(n,1),this.setToasts(o)}addToast=t=>{const{toasts:n,timeout:r,limit:o}=this.state,i=t.id||P3("toast"),s={...t,id:i,transitionStatus:"starting"},a=[s,...n],l=a.filter(u=>u.transitionStatus!=="ending");if(l.length>o){const u=l.length-o,d=l.slice(-u),f=new Set(d.map(p=>p.id));this.setToasts(a.map(p=>{const h=f.has(p.id);return p.limited!==h?{...p,limited:h}:p}))}else this.setToasts(a.map(u=>u.limited?{...u,limited:!1}:u));const c=s.timeout??r;return s.type!=="loading"&&c>0&&this.scheduleTimer(i,c,()=>this.closeToast(i)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n)};updateToastInternal=(t,n)=>{const{timeout:r,toasts:o}=this.state,i=wr.toast(this.state,t)??null;if(!i||i.transitionStatus==="ending")return;const s={...i,...n};this.setToasts(o.map(h=>h.id===t?{...h,...n}:h));const a=s.timeout??r,l=i?.timeout??r,c=Object.hasOwn(n,"timeout"),u=s.transitionStatus!=="ending"&&s.type!=="loading"&&a>0,d=this.timers.has(t),f=l!==a,p=i?.type==="loading";if(!u&&d){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(u&&(!d||f||c||p)){const h=this.timers.get(t);h&&(h.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,a,()=>this.closeToast(t)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{wr.toast(this.state,t)?.onClose?.();const{limit:r,toasts:o}=this.state;let i=0;const s=o.map(l=>{if(l.id===t)return{...l,transitionStatus:"ending",height:0};if(l.transitionStatus==="ending")return l;const c=i>=r;return i+=1,l.limited!==c?{...l,limited:c}:l}),a=this.timers.get(t);a&&a.timeout&&(a.timeout.clear(),this.timers.delete(t)),this.handleFocusManagement(t),this.setToasts(s)};promiseToast=(t,n)=>{const r=Ah(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=Ah(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=Ah(n.error,s);return this.updateToast(o,{...a,type:"error",timeout:a.timeout}),Promise.reject(s)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,r=t.delay-n;t.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Xs.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=Cd(t);Nr(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,r){const o=Date.now(),i=!wr.expandedOrOutOfFocus(this.state),s=i?Xs.create():void 0;s?.start(n,()=>{this.timers.delete(t),r()}),this.timers.set(t,{timeout:s,start:i?o:0,delay:n,remaining:n,callback:r})}setToasts(t){const n={toasts:t};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=uo(sn(this.state.viewport));if(!this.state.viewport||!Nr(this.state.viewport,n)||!Id(n))return;const r=wr.toasts(this.state),o=wr.toastIndex(this.state,t);let i=null,s=o+1;for(;s<r.length;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s+=1}if(!i)for(s=o-1;s>=0;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s-=1}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}const aE=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=Kn(()=>new O3({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return as(s.disposeEffect),P.useEffect(function(){return i?i[" subscribe"](({action:c,options:u})=>{const d=u.id;c==="promise"&&u.promise?s.promiseToast(u.promise,u):c==="update"&&d?s.updateToast(d,u):c==="close"&&d?s.closeToast(d):s.addToast(u)}):void 0},[s,r,i]),s.useSyncedValues({timeout:r,limit:o}),g.jsx(mc.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(aE.displayName="ToastProvider");const Oi=P.forwardRef(function(t,n){const[r,o]=P.useState();pt(()=>{TO&&o("button")},[]);const i={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:nl,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Oi.displayName="FocusGuard");let _3=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const lE=P.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,a=Ih(),l=A3(),c=P.useRef(!1),u=P.useRef(!1),d=a.useState("isEmpty"),f=a.useState("toasts"),p=a.useState("focused"),h=a.useState("expanded"),y=a.useState("prevFocusElement"),m=f[0]?.height??0,v=P.useMemo(()=>f.some(M=>M.transitionStatus==="ending"),[f]);P.useEffect(()=>{const M=a.state.viewport;if(!M)return;function $(F){d||F.key==="F6"&&F.target!==M&&(F.preventDefault(),a.setPrevFocusElement(uo(sn(M))),M?.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const _=Wt(M);return _.addEventListener("keydown",$),()=>{_.removeEventListener("keydown",$)}},[a,d]),P.useEffect(()=>{const M=a.state.viewport;if(!M||d)return;const $=Wt(M);function _(z){z.target===$&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(z){if(z.relatedTarget||z.target===$)return;const D=Cd(z),C=uo(sn(M));(!Nr(M,D)||!Id(C))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return $.addEventListener("blur",_,!0),$.addEventListener("focus",F,!0),()=>{$.removeEventListener("blur",_,!0),$.removeEventListener("focus",F,!0)}},[a,l,d]),P.useEffect(()=>{const M=a.state.viewport;if(!M||d)return;const $=sn(M);return $.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{$.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[d,a]);function b(M){const $=a.state.viewport;$&&(c.current=!0,M.relatedTarget===$?f[0]?.ref?.current?.focus():a.restoreFocusToPrevElement())}function x(M){M.key==="Tab"&&M.shiftKey&&M.target===a.state.viewport&&(M.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}P.useEffect(()=>{!a.state.isWindowFocused||v||!u.current||(a.resumeTimers(),a.setHovering(!1),u.current=!1)},[v,a]);function T(){a.pauseTimers(),a.setHovering(!0),u.current=!1}function E(){v?u.current=!0:(a.resumeTimers(),a.setHovering(!1))}function I(){if(c.current){c.current=!1;return}p||Id(sn(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function w(M){!p||Nr(a.state.viewport,M.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const k={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:E,onFocus:I,onBlur:w,onKeyDown:x,onClick:I},A={expanded:h},O=an("div",t,{ref:[n,a.setViewport],state:A,props:[k,{style:{[_3.frontmostHeight]:m?`${m}px`:void 0}},s,{children:g.jsxs(P.Fragment,{children:[!d&&y&&g.jsx(Oi,{onFocus:b}),i,!d&&y&&g.jsx(Oi,{onFocus:b})]})}]}),N=P.useMemo(()=>f.filter(M=>M.priority==="high"),[f]);return g.jsxs(P.Fragment,{children:[!d&&y&&g.jsx(Oi,{onFocus:b}),O,!p&&N.length>0&&g.jsx("div",{style:nl,children:N.map(M=>g.jsxs("div",{role:"alert","aria-atomic":!0,children:[g.jsx("div",{children:M.title}),g.jsx("div",{children:M.description})]},M.id))})]})});process.env.NODE_ENV!=="production"&&(lE.displayName="ToastViewport");function M3(e){return xd(19)?e:e?"true":void 0}const Ph=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ph.displayName="ToastRootContext");function bc(){const e=P.useContext(Ph);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":On(66));return e}let Oh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const D3={[Oh.startingStyle]:""},N3={[Oh.endingStyle]:""},F3={transitionStatus(e){return e==="starting"?D3:e==="ending"?N3:null}};function L3(e){return e==null?e:"current"in e?e.current:e}function V3(e,t=!1,n=!0){const r=Gv();return ut((o,i=null)=>{r.cancel();function s(){cr.flushSync(o)}const a=L3(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=Oh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function $3(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ut(o),s=V3(r,n,!1);P.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}let Ao=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const z3={...F3,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Qs=40,j3=10,qr=.5,R3=1;function cE(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function B3(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const uE=P.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],...a}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(s)?s:[s]);const u=c.length>0,d=Ih(),[f,p]=P.useState(void 0),[h,y]=P.useState(!1),[m,v]=P.useState(!1),[b,x]=P.useState(!1),[T,E]=P.useState({x:0,y:0}),[I,w]=P.useState({x:0,y:0,scale:1}),[k,A]=P.useState(),[O,N]=P.useState(),[M,$]=P.useState(null),_=P.useRef(null),F=P.useRef({x:0,y:0}),z=P.useRef({x:0,y:0,scale:1}),D=P.useRef(void 0),C=P.useRef(0),V=P.useRef(!1),L=P.useRef({x:0,y:0}),B=P.useRef(!1),U=d.useState("toastIndex",r.id),G=d.useState("toastVisibleIndex",r.id),H=d.useState("toastOffsetY",r.id),ee=d.useState("focused"),ie=d.useState("expanded");$3({open:r.transitionStatus!=="ending",ref:_,onComplete(){r.transitionStatus==="ending"&&d.removeToast(r.id)}});const te=ut((oe=!1)=>{const le=_.current;if(!le)return;const be=le.style.height;le.style.height="auto";const de=le.offsetHeight;le.style.height=be;function ne(){d.updateToastInternal(r.id,{ref:_,height:de,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}oe?cr.flushSync(ne):ne()});pt(te,[te]);function q(oe,le){let be=oe,de=le;return!c.includes("left")&&!c.includes("right")?be=oe>0?oe**qr:-(Math.abs(oe)**qr):(!c.includes("right")&&oe>0&&(be=oe**qr),!c.includes("left")&&oe<0&&(be=-(Math.abs(oe)**qr))),!c.includes("up")&&!c.includes("down")?de=le>0?le**qr:-(Math.abs(le)**qr):(!c.includes("down")&&le>0&&(de=le**qr),!c.includes("up")&&le<0&&(de=-(Math.abs(le)**qr))),{x:be,y:de}}function Y(oe){if(oe.button!==0)return;oe.pointerType==="touch"&&d.pauseTimers();const le=Cd(oe.nativeEvent);if(!(le&&le.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,D.current=void 0,C.current=0,F.current={x:oe.clientX,y:oe.clientY},L.current=F.current,_.current){const de=B3(_.current);z.current=de,w(de),E({x:de.x,y:de.y})}d.setHovering(!0),y(!0),v(!1),$(null),B.current=!0,_.current?.setPointerCapture(oe.pointerId)}}function Z(oe){if(!h)return;oe.preventDefault(),B.current&&(F.current={x:oe.clientX,y:oe.clientY},B.current=!1);const{clientY:le,clientX:be,movementX:de,movementY:ne}=oe;(ne<0&&le>L.current.y||ne>0&&le<L.current.y)&&(L.current={x:L.current.x,y:le}),(de<0&&be>L.current.x||de>0&&be<L.current.x)&&(L.current={x:be,y:L.current.y});const J=be-F.current.x,j=le-F.current.y,X=le-L.current.y,me=be-L.current.x;if(!m&&Math.sqrt(J*J+j*j)>=R3&&(v(!0),M===null)){const Nt=c.includes("left")||c.includes("right"),Qt=c.includes("up")||c.includes("down");if(Nt&&Qt){const Re=Math.abs(J),W=Math.abs(j);$(Re>W?"horizontal":"vertical")}}let ve;if(!D.current)M==="vertical"?j>0?ve="down":j<0&&(ve="up"):M==="horizontal"?J>0?ve="right":J<0&&(ve="left"):Math.abs(J)>=Math.abs(j)?ve=J>0?"right":"left":ve=j>0?"down":"up",ve&&c.includes(ve)&&(D.current=ve,C.current=cE(ve,J,j),p(ve));else{const ct=D.current,Nt=cE(ct,me,X);Nt>Qs?(V.current=!1,p(ct)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&C.current-Nt>=j3&&(V.current=!0)}const ke=q(J,j);let De=z.current.x,Ne=z.current.y;M==="horizontal"?(c.includes("left")||c.includes("right"))&&(De+=ke.x):(M==="vertical"||(c.includes("left")||c.includes("right"))&&(De+=ke.x),(c.includes("up")||c.includes("down"))&&(Ne+=ke.y)),E({x:De,y:Ne})}function pe(oe){if(!h)return;if(y(!1),v(!1),$(null),_.current?.releasePointerCapture(oe.pointerId),V.current){E({x:I.x,y:I.y}),p(void 0);return}let le=!1;const be=T.x-I.x,de=T.y-I.y;let ne;for(const J of c){switch(J){case"right":be>Qs&&(le=!0,ne="right");break;case"left":be<-Qs&&(le=!0,ne="left");break;case"down":de>Qs&&(le=!0,ne="down");break;case"up":de<-Qs&&(le=!0,ne="up");break}if(le)break}le?(p(ne),x(!0),d.closeToast(r.id)):(E({x:I.x,y:I.y}),p(void 0))}function R(oe){if(oe.key==="Escape"){if(!_.current||!Nr(_.current,uo(sn(_.current))))return;d.closeToast(r.id)}}P.useEffect(()=>{if(!u)return;const oe=_.current;if(!oe)return;function le(be){Nr(oe,be.target)&&be.preventDefault()}return oe.addEventListener("touchmove",le,{passive:!1}),()=>{oe.removeEventListener("touchmove",le)}},[u]);function ae(){if(!h&&T.x===I.x&&T.y===I.y&&!b)return{[Ao.swipeMovementX]:"0px",[Ao.swipeMovementY]:"0px"};const oe=T.x-I.x,le=T.y-I.y;return{transition:h?"none":void 0,transform:h?`translateX(${T.x}px) translateY(${T.y}px) scale(${I.scale})`:void 0,[Ao.swipeMovementX]:`${oe}px`,[Ao.swipeMovementY]:`${le}px`}}const ce=r.priority==="high",Q={role:ce?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":k,"aria-describedby":O,"aria-hidden":ce&&!ee?!0:void 0,onPointerDown:u?Y:void 0,onPointerMove:u?Z:void 0,onPointerUp:u?pe:void 0,onKeyDown:R,inert:M3(r.limited),style:{...ae(),[Ao.index]:r.transitionStatus==="ending"?U:G,[Ao.offsetY]:`${H}px`,[Ao.height]:r.height?`${r.height}px`:void 0}},ue=P.useMemo(()=>({rootRef:_,toast:r,titleId:k,setTitleId:A,descriptionId:O,setDescriptionId:N,swiping:h,swipeDirection:f,recalculateHeight:te,index:U,visibleIndex:G,expanded:ie}),[r,k,O,h,f,te,U,G,ie]),re={transitionStatus:r.transitionStatus,expanded:ie,limited:r.limited||!1,type:r.type,swiping:ue.swiping,swipeDirection:ue.swipeDirection},he=an("div",t,{ref:[n,ue.rootRef],state:re,stateAttributesMapping:z3,props:[Q,a]});return g.jsx(Ph.Provider,{value:ue,children:he})});process.env.NODE_ENV!=="production"&&(uE.displayName="ToastRoot");const dE=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=bc(),c=P.useRef(null);pt(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const h=new ResizeObserver(()=>l(!0)),y=new MutationObserver(()=>l(!0));return h.observe(p),y.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{h.disconnect(),y.disconnect()}},[l]);const u=s>0;return an("div",t,{ref:[n,c],state:{expanded:a,behind:u},props:i})});process.env.NODE_ENV!=="production"&&(dE.displayName="ToastContent");const fE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setDescriptionId:c}=bc(),u=s??l.description,d=!!u,f=Ka(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const p={type:l.type},h=an("p",t,{ref:n,state:p,props:{...a,id:f,children:u}});return d?h:null});process.env.NODE_ENV!=="production"&&(fE.displayName="ToastDescription");const pE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setTitleId:c}=bc(),u=s??l.title,d=!!u,f=Ka(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const p={type:l.type},h=an("h2",t,{ref:n,state:p,props:{...a,id:f,children:u}});return d?h:null});process.env.NODE_ENV!=="production"&&(pE.displayName="ToastTitle");let _h;process.env.NODE_ENV!=="production"&&(_h=new Set);function hE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");_h.has(t)||(_h.add(t),console.error(`Base UI: ${t}`))}}const mE=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(mE.displayName="CompositeRootContext");function H3(e=!1){const t=P.useContext(mE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":On(16));return t}function W3(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:P.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function q3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=P.useRef(null),s=H3(!0)!==void 0,a=ut(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=W3({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";if(o){if(!f){const p=vd.captureOwnerStack?.()||"";hE(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${p}`)}}else if(f){const p=vd.captureOwnerStack?.()||"";hE(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${p}`)}},[o]);const c=P.useCallback(()=>{const f=i.current;U3(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);pt(c,[c]);const u=P.useCallback((f={})=>{const{onClick:p,onMouseDown:h,onKeyUp:y,onKeyDown:m,onPointerDown:v,...b}=f;return Sd({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}p?.(T)},onMouseDown(T){t||h?.(T)},onKeyDown(T){if(t||(Ed(T),m?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!a()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&p?.(T))},onKeyUp(T){t||(Ed(T),y?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&p?.(T)},onPointerDown(T){if(t){T.preventDefault();return}v?.(T)}},o?void 0:{role:"button"},l,b)},[t,l,o,a]),d=ut(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function U3(e){return Pt(e)&&e.tagName==="BUTTON"}const gE=P.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,l=Ih(),{toast:c}=bc(),u=l.useState("expanded"),[d,f]=P.useState(!1),{getButtonProps:p,buttonRef:h}=q3({disabled:i,native:s}),y={type:c.type};return an("button",t,{ref:[n,h],state:y,props:[{"aria-hidden":!u&&!d,onClick(){l.closeToast(c.id)},onFocus(){f(!0)},onBlur(){f(!1)}},a,p]})});process.env.NODE_ENV!=="production"&&(gE.displayName="ToastClose");function G3(e){return`data-base-ui-${e}`}const Mh=P.createContext(null);process.env.NODE_ENV!=="production"&&(Mh.displayName="PortalContext");const Y3=()=>P.useContext(Mh),K3=G3("portal");function yE(e={}){const{ref:t,container:n,componentProps:r=Pn,elementProps:o}=e,i=Ka(),a=Y3()?.portalNode,[l,c]=P.useState(null),[u,d]=P.useState(null),f=ut(m=>{m!==null&&d(m)}),p=P.useRef(null);pt(()=>{if(n===null){p.current&&(p.current=null,d(null),c(null));return}if(i==null)return;const m=(n&&(xa(n)?n:n.current))??a??document.body;if(m==null){p.current&&(p.current=null,d(null),c(null));return}p.current!==m&&(p.current=m,d(null),c(m))},[n,a,i]);const h=an("div",r,{ref:[t,f],props:[{id:i,[K3]:""},o]});return{portalNode:u,portalSubtree:l&&h?cr.createPortal(h,l):null}}const Z3=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=yE({container:o,ref:n,componentProps:t,elementProps:l}),d=P.useRef(null),f=P.useRef(null),p=P.useRef(null),h=P.useRef(null),[y,m]=P.useState(null),v=y?.modal,b=y?.open,x=typeof a=="boolean"?a:!!y&&!y.modal&&y.open&&!!c;P.useEffect(()=>{if(!c||v)return;function E(I){c&&I.relatedTarget&&Ad(I)&&(I.type==="focusin"?Nv:OO)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,v]),P.useEffect(()=>{!c||b||Nv(c)},[b,c]);const T=P.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:c,setFocusManagerState:m}),[c]);return g.jsxs(P.Fragment,{children:[u,g.jsxs(Mh.Provider,{value:T,children:[x&&c&&g.jsx(Oi,{"data-type":"outside",ref:d,onFocus:E=>{if(Ad(E,c))p.current?.focus();else{const I=y?y.domReference:null;PO(I)?.focus()}}}),x&&c&&g.jsx("span",{"aria-owns":c.id,style:XP}),c&&cr.createPortal(r,c),x&&c&&g.jsx(Oi,{"data-type":"outside",ref:f,onFocus:E=>{if(Ad(E,c))h.current?.focus();else{const I=y?y.domReference:null;AO(I)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,Zo(eO,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(Z3.displayName="FloatingPortal");const vE=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=yE({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:g.jsxs(P.Fragment,{children:[c,l&&cr.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(vE.displayName="FloatingPortalLite");const X3=vE;function bE(){const e=P.useContext(mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":On(73));const t=e.useState("toasts");return P.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const Q3=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},J3=_o("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),eH={default:Er,info:Er,warn:Du,muted:Er,danger:Du,success:Pu,secondary:Er},xE=S.createContext(()=>{throw new Error("Not implemented")}),tH=()=>S.useContext(xE);function nH(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=J3({theme:r}),i=n?yI:eH[r]||Er;return g.jsx(uE,{toast:e.toast,swipeDirection:"right",children:g.jsx(He.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto list-none w-full",children:g.jsx(dE,{className:Pe(o,"shadow-lg"),children:g.jsxs("div",{className:"flex items-start gap-3 p-4",children:[g.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:g.jsx(i,{className:"size-4"})}),g.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?g.jsx(pE,{className:"truncate font-semibold leading-tight tracking-tight select-text"}):null,g.jsx(fE,{className:"text-xs font-medium opacity-90 select-text leading-relaxed line-clamp-2"})]}),t&&!n?g.jsx(gE,{className:"shrink-0 -mr-1 -mt-1 p-1.5 rounded-lg text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:g.jsx(Lo,{className:"size-3.5"})}):null]})})})})}function rH({max:e=5}){const t=S.useRef(null),n=Q3(t),r=bE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),s=o.length-i.length;return g.jsxs(lE,{ref:t,className:"fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 outline-none pointer-events-none overflow-visible",children:[g.jsx(mn,{mode:"popLayout",initial:!1,children:i.map(a=>g.jsx(nH,{toast:a},a.id))}),!n&&s>0&&g.jsxs(He.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"self-center px-3 py-1 text-[10px] font-bold tracking-wider uppercase bg-card-background/80 backdrop-blur shadow-sm border border-card-border rounded-full text-foreground/50 pointer-events-auto cursor-default transition-all hover:bg-card-background hover:text-foreground/80",children:["+",s," more"]})]})}function oH({children:e,max:t=5}){const n=bE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,s)=>{const a={theme:s?.theme,closable:s?.closable,loading:s?.loading};if(s?.id&&n.toasts.find(u=>u.id===s.id))return n.update(s.id,{description:i,title:s.title,timeout:s.timeout,data:a}),{close:()=>n.close(s.id),clear:r};const l=n.add({description:i,id:s?.id,title:s?.title,timeout:s?.timeout,data:a});return{close:()=>n.close(l),clear:r}},[n,r]);return g.jsxs(xE.Provider,{value:o,children:[e,g.jsx(X3,{children:g.jsx(rH,{max:t})})]})}function iH({children:e,max:t=5,timeout:n=5e3}){return g.jsx(aE,{limit:t,timeout:n,children:g.jsx(oH,{max:t,children:e})})}const sH=/Mac|iPod|iPhone|iPad/,xc=()=>sH.test(navigator.userAgent),aH=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?xc()?"Meta":"Control":n==="Hyper"?xc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),wE=e=>e.map(t=>t.trim()).join("+");class lH{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=wE(aH(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=wE(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const cH=e=>(e=e.trim(),e==="Alt"?xc()?g.jsx(vI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?xc()?g.jsx(dI,{"aria-label":"Command",size:12}):"Ctrl":e),uH=e=>{const t=e.value.trim().split("+");return g.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return g.jsxs(S.Fragment,{children:[g.jsx("kbd",{"aria-label":n,children:cH(n)}),o?null:g.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},dH=e=>g.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:Su(e.item.title)?g.jsx(e.item.title,{text:e.text}):e.item.title}),fH=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?g.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:g.jsx(dH,{text:e.text,item:o})}):o.type!=="shortcut"?g.jsx(S.Fragment,{}):g.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[g.jsxs("span",{className:"flex gap-2 items-center",children:[o.Icon?o.Icon:null,g.jsx("span",{children:Su(o.title)?g.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?g.jsx(uH,{value:o.shortcut}):null]})}),pH=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(a=>({...a,title:Be.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=Be.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=Ch(o,"title",n),s=r.filter(a=>Be.function(a.enabled)?a.enabled({text:t}):!1);return zn.unique(i.concat(s),a=>a.title)},hH=[0,0,0,0,0],SE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=SE(n.items);if(r)return r}return null},mH=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),s=At(),a=Fr(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:io,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),p=pH(f,r),h=Ya(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=p[T];return E?E.type==="group":!1},onNavigate:T=>{Be.number(T)&&(Tg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Be.number(T)?T:e.open?E??0:null)}}),{getItemProps:y,getReferenceProps:m,getFloatingProps:v}=Yn([h]),b=r===""?f:[{type:"group",title:"Results",items:[]},...p.filter(T=>T.type!=="group")];S.useEffect(()=>{const T=new lH;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,I=>E.action({event:I,setText:o,text:a.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,a]);const x=e.Icon??Ou;return g.jsx(S.Fragment,{children:g.jsxs(Ws,{...v(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[g.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[g.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?g.jsx(x,{Default:Ou,text:r,size:16}):g.jsx(Ou,{size:16})}),g.jsx("input",{...m({ref:d.refs.setReference,onKeyDown:T=>{const E=Be.number(l)?b[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=SE(p);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[g.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:s.commandPaletteLoading}),hH.map((T,E)=>g.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:jp},`${t}-${E}-skeleton-index`))]}):g.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[g.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[b.map((T,E)=>S.createElement(fH,{...y({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),b.length===1?g.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:s.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Be.number(l)?g.jsx(e.Preview,{command:b[l],text:r}):null]}),e.footer?g.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border",children:e.footer}):null]})})},gH=["INPUT","SELECT"],TE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{gH.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Dh,EE;function Nh(){if(EE)return Dh;EE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Dh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Dh}var Fh,kE;function CE(){if(kE)return Fh;kE=1;var e=Nh(),t=tg(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,k){return o.set(w,k),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,k){o.set(w,k)},c=(function(){for(var I=[],w=0;w<256;++w)I[I.length]="%"+((w<16?"0":"")+w.toString(16)).toUpperCase();return I})(),u=function(w){for(;w.length>1;){var k=w.pop(),A=k.obj[k.prop];if(r(A)){for(var O=[],N=0;N<A.length;++N)typeof A[N]<"u"&&(O[O.length]=A[N]);k.obj[k.prop]=O}}},d=function(w,k){for(var A=k&&k.plainObjects?{__proto__:null}:{},O=0;O<w.length;++O)typeof w[O]<"u"&&(A[O]=w[O]);return A},f=function I(w,k,A){if(!k)return w;if(typeof k!="object"&&typeof k!="function"){if(r(w)){var O=w.length;if(A&&typeof A.arrayLimit=="number"&&O>A.arrayLimit)return i(d(w.concat(k),A),O);w[O]=k}else if(w&&typeof w=="object")if(s(w)){var N=a(w)+1;w[N]=k,l(w,N)}else{if(A&&A.strictMerge)return[w,k];(A&&(A.plainObjects||A.allowPrototypes)||!n.call(Object.prototype,k))&&(w[k]=!0)}else return[w,k];return w}if(!w||typeof w!="object"){if(s(k)){for(var M=Object.keys(k),$=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},_=0;_<M.length;_++){var F=parseInt(M[_],10);$[F+1]=k[M[_]]}return i($,a(k)+1)}var z=[w].concat(k);return A&&typeof A.arrayLimit=="number"&&z.length>A.arrayLimit?i(d(z,A),z.length-1):z}var D=w;return r(w)&&!r(k)&&(D=d(w,A)),r(w)&&r(k)?(k.forEach(function(C,V){if(n.call(w,V)){var L=w[V];L&&typeof L=="object"&&C&&typeof C=="object"?w[V]=I(L,C,A):w[w.length]=C}else w[V]=C}),w):Object.keys(k).reduce(function(C,V){var L=k[V];if(n.call(C,V)?C[V]=I(C[V],L,A):C[V]=L,s(k)&&!s(C)&&i(C,a(k)),s(C)){var B=parseInt(V,10);String(B)===V&&B>=0&&B>a(C)&&l(C,B)}return C},D)},p=function(w,k){return Object.keys(k).reduce(function(A,O){return A[O]=k[O],A},w)},h=function(I,w,k){var A=I.replace(/\+/g," ");if(k==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},y=1024,m=function(w,k,A,O,N){if(w.length===0)return w;var M=w;if(typeof w=="symbol"?M=Symbol.prototype.toString.call(w):typeof w!="string"&&(M=String(w)),A==="iso-8859-1")return escape(M).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var $="",_=0;_<M.length;_+=y){for(var F=M.length>=y?M.slice(_,_+y):M,z=[],D=0;D<F.length;++D){var C=F.charCodeAt(D);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||N===e.RFC1738&&(C===40||C===41)){z[z.length]=F.charAt(D);continue}if(C<128){z[z.length]=c[C];continue}if(C<2048){z[z.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){z[z.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}D+=1,C=65536+((C&1023)<<10|F.charCodeAt(D)&1023),z[z.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}$+=z.join("")}return $},v=function(w){for(var k=[{obj:{o:w},prop:"o"}],A=[],O=0;O<k.length;++O)for(var N=k[O],M=N.obj[N.prop],$=Object.keys(M),_=0;_<$.length;++_){var F=$[_],z=M[F];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(k[k.length]={obj:M,prop:F},A[A.length]=z)}return u(k),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,k,A,O){if(s(w)){var N=a(w)+1;return w[N]=k,l(w,N),w}var M=[].concat(w,k);return M.length>A?i(d(M,{plainObjects:O}),M.length-1):M},E=function(w,k){if(r(w)){for(var A=[],O=0;O<w.length;O+=1)A[A.length]=k(w[O]);return A}return k(w)};return Fh={arrayToObject:d,assign:p,combine:T,compact:v,decode:h,encode:m,isBuffer:x,isOverflow:s,isRegExp:b,markOverflow:i,maybeMap:E,merge:f},Fh}var Lh,IE;function yH(){if(IE)return Lh;IE=1;var e=tg(),t=CE(),n=Nh(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,s=Array.prototype.push,a=function(y,m){s.apply(y,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},f={},p=function y(m,v,b,x,T,E,I,w,k,A,O,N,M,$,_,F,z,D){for(var C=m,V=D,L=0,B=!1;(V=V.get(f))!==void 0&&!B;){var U=V.get(m);if(L+=1,typeof U<"u"){if(U===L)throw new RangeError("Cyclic object value");B=!0}typeof V.get(f)>"u"&&(L=0)}if(typeof A=="function"?C=A(v,C):C instanceof Date?C=M(C):b==="comma"&&i(C)&&(C=t.maybeMap(C,function(Q){return Q instanceof Date?M(Q):Q})),C===null){if(E)return k&&!F?k(v,u.encoder,z,"key",$):v;C=""}if(d(C)||t.isBuffer(C)){if(k){var G=F?v:k(v,u.encoder,z,"key",$);return[_(G)+"="+_(k(C,u.encoder,z,"value",$))]}return[_(v)+"="+_(String(C))]}var H=[];if(typeof C>"u")return H;var ee;if(b==="comma"&&i(C))F&&k&&(C=t.maybeMap(C,k)),ee=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(A))ee=A;else{var ie=Object.keys(C);ee=O?ie.sort(O):ie}var te=w?String(v).replace(/\./g,"%2E"):String(v),q=x&&i(C)&&C.length===1?te+"[]":te;if(T&&i(C)&&C.length===0)return q+"[]";for(var Y=0;Y<ee.length;++Y){var Z=ee[Y],pe=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:C[Z];if(!(I&&pe===null)){var R=N&&w?String(Z).replace(/\./g,"%2E"):String(Z),ae=i(C)?typeof b=="function"?b(q,R):q:q+(N?"."+R:"["+R+"]");D.set(m,L);var ce=e();ce.set(f,D),a(H,y(pe,ae,b,x,T,E,I,w,b==="comma"&&F&&i(C)?null:k,A,O,N,M,$,_,F,z,ce))}}return H},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");b=m.format}var x=n.formatters[b],T=u.filter;(typeof m.filter=="function"||i(m.filter))&&(T=m.filter);var E;if(m.arrayFormat in o?E=m.arrayFormat:"indices"in m?E=m.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:b,formatter:x,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Lh=function(y,m){var v=y,b=h(m),x,T;typeof b.filter=="function"?(T=b.filter,v=T("",v)):i(b.filter)&&(T=b.filter,x=T);var E=[];if(typeof v!="object"||v===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var k=e(),A=0;A<x.length;++A){var O=x[A],N=v[O];b.skipNulls&&N===null||a(E,p(N,O,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,k))}var M=E.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),M.length>0?$+M:""},Lh}var Vh,AE;function vH(){if(AE)return Vh;AE=1;var e=CE(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(h,y){return String.fromCharCode(parseInt(y,10))})},i=function(p,h,y){if(p&&typeof p=="string"&&h.comma&&p.indexOf(",")>-1)return p.split(",");if(h.throwOnLimitExceeded&&y>=h.arrayLimit)throw new RangeError("Array limit exceeded. Only "+h.arrayLimit+" element"+(h.arrayLimit===1?"":"s")+" allowed in an array.");return p},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(h,y){var m={__proto__:null},v=y.ignoreQueryPrefix?h.replace(/^\?/,""):h;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=y.parameterLimit===1/0?void 0:y.parameterLimit,x=v.split(y.delimiter,y.throwOnLimitExceeded?b+1:b);if(y.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var T=-1,E,I=y.charset;if(y.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===a?I="utf-8":x[E]===s&&(I="iso-8859-1"),T=E,E=x.length);for(E=0;E<x.length;++E)if(E!==T){var w=x[E],k=w.indexOf("]="),A=k===-1?w.indexOf("="):k+1,O,N;if(A===-1?(O=y.decoder(w,r.decoder,I,"key"),N=y.strictNullHandling?null:""):(O=y.decoder(w.slice(0,A),r.decoder,I,"key"),O!==null&&(N=e.maybeMap(i(w.slice(A+1),y,n(m[O])?m[O].length:0),function($){return y.decoder($,r.decoder,I,"value")}))),N&&y.interpretNumericEntities&&I==="iso-8859-1"&&(N=o(String(N))),w.indexOf("[]=")>-1&&(N=n(N)?[N]:N),y.comma&&n(N)&&N.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");N=e.combine([],N,y.arrayLimit,y.plainObjects)}if(O!==null){var M=t.call(m,O);M&&(y.duplicates==="combine"||w.indexOf("[]=")>-1)?m[O]=e.combine(m[O],N,y.arrayLimit,y.plainObjects):(!M||y.duplicates==="last")&&(m[O]=N)}}return m},c=function(p,h,y,m){var v=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");v=Array.isArray(h)&&h[b]?h[b].length:0}for(var x=m?h:i(h,y,v),T=p.length-1;T>=0;--T){var E,I=p[T];if(I==="[]"&&y.parseArrays)e.isOverflow(x)?E=x:E=y.allowEmptyArrays&&(x===""||y.strictNullHandling&&x===null)?[]:e.combine([],x,y.arrayLimit,y.plainObjects);else{E=y.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,k=y.decodeDotInKeys?w.replace(/%2E/g,"."):w,A=parseInt(k,10),O=!isNaN(A)&&I!==k&&String(A)===k&&A>=0&&y.parseArrays;if(!y.parseArrays&&k==="")E={0:x};else if(O&&A<y.arrayLimit)E=[],E[A]=x;else{if(O&&y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");O?(E[A]=x,e.markOverflow(E,A)):k!=="__proto__"&&(E[k]=x)}}x=E}return x},u=function(h,y){var m=y.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h;if(y.depth<=0)return!y.plainObjects&&t.call(Object.prototype,m)&&!y.allowPrototypes?void 0:[m];var v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=v.exec(m),T=x?m.slice(0,x.index):m,E=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;E[E.length]=T}for(var I=0;(x=b.exec(m))!==null&&I<y.depth;){I+=1;var w=x[1].slice(1,-1);if(!y.plainObjects&&t.call(Object.prototype,w)&&!y.allowPrototypes)return;E[E.length]=x[1]}if(x){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");E[E.length]="["+m.slice(x.index)+"]"}return E},d=function(h,y,m,v){if(h){var b=u(h,m);if(b)return c(b,y,m,v)}},f=function(h){if(!h)return r;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.decodeDotInKeys<"u"&&typeof h.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(h.decoder!==null&&typeof h.decoder<"u"&&typeof h.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof h.throwOnLimitExceeded<"u"&&typeof h.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof h.charset>"u"?r.charset:h.charset,m=typeof h.duplicates>"u"?r.duplicates:h.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof h.allowDots>"u"?h.decodeDotInKeys===!0?!0:r.allowDots:!!h.allowDots;return{allowDots:v,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof h.allowPrototypes=="boolean"?h.allowPrototypes:r.allowPrototypes,allowSparse:typeof h.allowSparse=="boolean"?h.allowSparse:r.allowSparse,arrayLimit:typeof h.arrayLimit=="number"?h.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:r.charsetSentinel,comma:typeof h.comma=="boolean"?h.comma:r.comma,decodeDotInKeys:typeof h.decodeDotInKeys=="boolean"?h.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof h.decoder=="function"?h.decoder:r.decoder,delimiter:typeof h.delimiter=="string"||e.isRegExp(h.delimiter)?h.delimiter:r.delimiter,depth:typeof h.depth=="number"||h.depth===!1?+h.depth:r.depth,duplicates:m,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities=="boolean"?h.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof h.parameterLimit=="number"?h.parameterLimit:r.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects=="boolean"?h.plainObjects:r.plainObjects,strictDepth:typeof h.strictDepth=="boolean"?!!h.strictDepth:r.strictDepth,strictMerge:typeof h.strictMerge=="boolean"?!!h.strictMerge:r.strictMerge,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof h.throwOnLimitExceeded=="boolean"?h.throwOnLimitExceeded:!1}};return Vh=function(p,h){var y=f(h);if(p===""||p===null||typeof p>"u")return y.plainObjects?{__proto__:null}:{};for(var m=typeof p=="string"?l(p,y):p,v=y.plainObjects?{__proto__:null}:{},b=Object.keys(m),x=0;x<b.length;++x){var T=b[x],E=d(T,m[T],y,typeof p=="string");v=e.merge(v,E,y)}return y.allowSparse===!0?v:e.compact(v)},Vh}var $h,PE;function bH(){if(PE)return $h;PE=1;var e=yH(),t=vH(),n=Nh();return $h={formats:n,parse:t,stringify:e},$h}var xH=bH(),Je;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Je||(Je={}));var OE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(OE||(OE={}));const Ce=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ur=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ye=Je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Sr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof Sr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Sr.create=e=>new Sr(e);const zh=(e,t)=>{let n;switch(e.code){case ye.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Je.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${Je.joinValues(e.keys,", ")}`;break;case ye.invalid_union:n="Invalid input";break;case ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Je.joinValues(e.options)}`;break;case ye.invalid_enum_value:n=`Invalid enum value. Expected ${Je.joinValues(e.options)}, received '${e.received}'`;break;case ye.invalid_arguments:n="Invalid function arguments";break;case ye.invalid_return_type:n="Invalid function return type";break;case ye.invalid_date:n="Invalid date";break;case ye.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Je.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ye.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ye.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ye.custom:n="Invalid input";break;case ye.invalid_intersection_types:n="Intersection results could not be merged";break;case ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,Je.assertNever(e)}return{message:n}};let wH=zh;function SH(){return wH}const TH=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function xe(e,t){const n=SH(),r=TH({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===zh?void 0:zh].filter(o=>!!o)});e.common.issues.push(r)}class vn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return vn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),Js=e=>({status:"dirty",value:e}),Cn=e=>({status:"valid",value:e}),_E=e=>e.status==="aborted",ME=e=>e.status==="dirty",_i=e=>e.status==="valid",wc=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));class Gr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const DE=(e,t)=>{if(_i(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Sr(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Ze{get description(){return this._def.description}_getType(t){return Ur(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vn,ctx:{common:t.parent.common,data:t.data,parsedType:Ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(wc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ur(t)},o=this._parseSync({data:t,path:r.path,parent:r});return DE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ur(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return _i(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>_i(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ur(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(wc(o)?o:Promise.resolve(o));return DE(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:ye.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Fi({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Kr.create(this,this._def)}nullable(){return Li.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lr.create(this)}promise(){return kc.create(this,this._def)}or(t){return Tc.create([this,t],this._def)}and(t){return Ec.create(this,t,this._def)}transform(t){return new Fi({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bh({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new UH({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Hh({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Wh.create(this,t)}readonly(){return qh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const EH=/^c[^\s-]{8,}$/i,kH=/^[0-9a-z]+$/,CH=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IH=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,AH=/^[a-z0-9_-]{21}$/i,PH=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,OH=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_H=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,MH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jh;const DH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,FH=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,LH=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,VH=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$H=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,NE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",zH=new RegExp(`^${NE}$`);function FE(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function jH(e){return new RegExp(`^${FE(e)}$`)}function RH(e){let t=`${NE}T${FE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function BH(e,t){return!!((t==="v4"||!t)&&DH.test(e)||(t==="v6"||!t)&&FH.test(e))}function HH(e,t){if(!PH.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function WH(e,t){return!!((t==="v4"||!t)&&NH.test(e)||(t==="v6"||!t)&&LH.test(e))}class Po extends Ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:Ce.string,received:i.parsedType}),Le}const r=new vn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&xe(o,{code:ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")_H.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")jh||(jh=new RegExp(MH,"u")),jh.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")IH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")AH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")EH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")kH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")CH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:ye.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:ye.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?RH(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?zH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?jH(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?OH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?BH(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?HH(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?WH(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?VH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?$H.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ye.invalid_string,message:i.message}),r.dirty()):Je.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ye.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new Po({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ie.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new Po({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Po({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Po({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Po.create=e=>new Po({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ge(e)});function qH(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class Mi extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:Ce.number,received:i.parsedType}),Le}let r;const o=new vn;for(const i of this._def.checks)i.kind==="int"?Je.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?qH(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_finite,message:i.message}),o.dirty()):Je.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new Mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new Mi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Je.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Mi.create=e=>new Mi({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ge(e)});class ea extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let r;const o=new vn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Je.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:Ce.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new ea({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new ea({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ea.create=e=>new ea({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ge(e)});class LE extends Ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.boolean,received:r.parsedType}),Le}return Cn(t.data)}}LE.create=e=>new LE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ge(e)});class Sc extends Ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:Ce.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_date}),Le}const r=new vn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Je.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Sc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Sc.create=e=>new Sc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ge(e)});class VE extends Ze{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.symbol,received:r.parsedType}),Le}return Cn(t.data)}}VE.create=e=>new VE({typeName:Ve.ZodSymbol,...Ge(e)});class $E extends Ze{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.undefined,received:r.parsedType}),Le}return Cn(t.data)}}$E.create=e=>new $E({typeName:Ve.ZodUndefined,...Ge(e)});class zE extends Ze{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.null,received:r.parsedType}),Le}return Cn(t.data)}}zE.create=e=>new zE({typeName:Ve.ZodNull,...Ge(e)});class jE extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return Cn(t.data)}}jE.create=e=>new jE({typeName:Ve.ZodAny,...Ge(e)});class RE extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Cn(t.data)}}RE.create=e=>new RE({typeName:Ve.ZodUnknown,...Ge(e)});class Yr extends Ze{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:Ce.never,received:n.parsedType}),Le}}Yr.create=e=>new Yr({typeName:Ve.ZodNever,...Ge(e)});class BE extends Ze{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.void,received:r.parsedType}),Le}return Cn(t.data)}}BE.create=e=>new BE({typeName:Ve.ZodVoid,...Ge(e)});class lr extends Ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ce.array)return xe(n,{code:ye.invalid_type,expected:Ce.array,received:n.parsedType}),Le;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(xe(n,{code:s?ye.too_big:ye.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:ye.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:ye.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Gr(n,s,n.path,a)))).then(s=>vn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Gr(n,s,n.path,a)));return vn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new lr({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new lr({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new lr({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}lr.create=(e,t)=>new lr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function Di(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Kr.create(Di(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof lr?new lr({...e._def,type:Di(e.element)}):e instanceof Kr?Kr.create(Di(e.unwrap())):e instanceof Li?Li.create(Di(e.unwrap())):e instanceof Oo?Oo.create(e.items.map(t=>Di(t))):e}class Rt extends Ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Je.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const c=this._getOrReturnCtx(t);return xe(c,{code:ye.invalid_type,expected:Ce.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Yr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Gr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Yr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(xe(o,{code:ye.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Gr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>vn.mergeObjectSync(r,c)):vn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ie.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};for(const r of Je.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Rt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Je.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Rt({...this._def,shape:()=>n})}deepPartial(){return Di(this)}partial(t){const n={};for(const r of Je.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Rt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Je.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Kr;)i=i._def.innerType;n[r]=i}return new Rt({...this._def,shape:()=>n})}keyof(){return UE(Je.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Yr.create(),typeName:Ve.ZodObject,...Ge(t)}),Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Yr.create(),typeName:Ve.ZodObject,...Ge(t)}),Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Yr.create(),typeName:Ve.ZodObject,...Ge(t)});class Tc extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Sr(a.ctx.common.issues));return xe(n,{code:ye.invalid_union,unionErrors:s}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Sr(l));return xe(n,{code:ye.invalid_union,unionErrors:a}),Le}}get options(){return this._def.options}}Tc.create=(e,t)=>new Tc({options:e,typeName:Ve.ZodUnion,...Ge(t)});function Rh(e,t){const n=Ur(e),r=Ur(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const o=Je.objectKeys(t),i=Je.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Rh(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Rh(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ec extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(_E(i)||_E(s))return Le;const a=Rh(i.value,s.value);return a.valid?((ME(i)||ME(s))&&n.dirty(),{status:n.value,value:a.data}):(xe(r,{code:ye.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ec.create=(e,t,n)=>new Ec({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Oo extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return xe(r,{code:ye.invalid_type,expected:Ce.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Gr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>vn.mergeArray(n,s)):vn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Oo({...this._def,rest:t})}}Oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Oo({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class HE extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return xe(r,{code:ye.invalid_type,expected:Ce.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Gr(r,a,r.path,[c,"key"])),value:i._parse(new Gr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}HE.create=(e,t,n)=>new HE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class ta extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return xe(r,{code:ye.invalid_type,expected:Ce.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(xe(r,{code:ye.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(xe(r,{code:ye.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Gr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new ta({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new ta({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ta.create=(e,t)=>new ta({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class WE extends Ze{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}WE.create=(e,t)=>new WE({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class qE extends Ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:ye.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}qE.create=(e,t)=>new qE({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function UE(e,t){return new Ni({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class Ni extends Ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:Je.joinValues(r),received:n.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:ye.invalid_enum_value,options:r}),Le}return Cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ni.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ni.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ni.create=UE;class GE extends Ze{_parse(t){const n=Je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const o=Je.objectValues(n);return xe(r,{expected:Je.joinValues(o),received:r.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(Je.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Je.objectValues(n);return xe(r,{received:r.data,code:ye.invalid_enum_value,options:o}),Le}return Cn(t.data)}get enum(){return this._def.values}}GE.create=(e,t)=>new GE({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class kc extends Ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return xe(n,{code:ye.invalid_type,expected:Ce.promise,received:n.parsedType}),Le;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Cn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}kc.create=(e,t)=>new kc({type:e,typeName:Ve.ZodPromise,...Ge(t)});class Fi extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{xe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Js(l.value):l});{if(n.value==="aborted")return Le;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"||n.value==="dirty"?Js(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!_i(s))return Le;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>_i(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Le);Je.assertNever(o)}}Fi.create=(e,t,n)=>new Fi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)}),Fi.createWithPreprocess=(e,t,n)=>new Fi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Kr extends Ze{_parse(t){return this._getType(t)===Ce.undefined?Cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kr.create=(e,t)=>new Kr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class Li extends Ze{_parse(t){return this._getType(t)===Ce.null?Cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Li.create=(e,t)=>new Li({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class Bh extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Bh.create=(e,t)=>new Bh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class Hh extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return wc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Hh.create=(e,t)=>new Hh({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class YE extends Ze{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}YE.create=e=>new YE({typeName:Ve.ZodNaN,...Ge(e)});class UH extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Wh extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),Js(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Wh({in:t,out:n,typeName:Ve.ZodPipeline})}}class qh extends Ze{_parse(t){const n=this._def.innerType._parse(t),r=o=>(_i(o)&&(o.value=Object.freeze(o.value)),o);return wc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}qh.create=(e,t)=>new qh({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={})),Yr.create,lr.create,Tc.create,Ec.create,Oo.create,Ni.create,kc.create,Kr.create,Li.create;const GH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},YH=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},KE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),bn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):KE(t),o=structuredClone(e);return YH(o,r,n),o},KH=(e,t)=>e.localeCompare(t),Vi={},ZE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return XE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=ZE(e._def.innerType);return t==="ZodArray"?n??[]:n}},XE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,ZE(n)])),QE=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=QE(i,o):n[r]=o||i)}return n},ZH={sort:KH,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},JE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return xH.parse(n.toString(),ZH)},Zr=(e,t)=>KE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Xr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Uh=e=>{const t=e.dataset.target;if(!t)return Xr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Xr(n||e)},XH={state:{},loading:!1,useOnChange:!1},ek=e=>e.dataset.target||e.name,QH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Hs.LocalStorage.get(t);return GH(n)?n:{}},clear:()=>{Hs.LocalStorage.delete(t)},set:n=>Hs.LocalStorage.set(t,n)}},JH=(e,t,n=XH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[s,a]=S.useState(()=>Be.function(n?.state)?n.state():n?.state??XE(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=ek(T),k=Uh(T)||(E?Xr(E):""),A=Zr(w,e);if(T.setAttribute("data-initialized","true"),A){const O=A.safeParse(k),N=O.success?void 0:O.error.issues[0]?.message??"";o(M=>bn(M??{},w,N))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((k,A)=>{const O=A.element,N=A.schema.safeParse(Xr(O));if(O.dataset.ignore==="ignore"||N.success)return k;const M=N.error.issues[0]?.message;O.setAttribute("data-initialized","true");const $=O.dataset.name||O.name||"";return bn(k,$,M)},{}),w=Be.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Vi)=>{const E=Zr(x,e),I=w=>{if(!ic(w))return;a(A=>bn(A,x,w.toISOString())),o(A=>bn(A,x,void 0));const k=i.current[x].element;if(k){const A=k.getAttribute("data-origin"),O=document.querySelector(`input[data-target="${A}"]`);O&&O.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,date:Be.string(s[x])?new Date(s[x]):s[x],required:T.required??!E.isOptional(),error:Rn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Vi)=>{const E=Zr(x,e);return{...T,name:x,id:x,onChange:w=>{const k=w.target.value;a(A=>bn(A,x,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),value:Rn(s,x,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,T=Vi)=>{const E=Zr(x,e);return{...T,name:x,id:x,onChange:w=>{const k=w.target.checked;a(A=>bn(A??{},x,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},p=(x,T=Vi)=>{const E=Zr(x,e),I=w=>{w.persist?.();const k=w.target.value;T?.onChange?.(w),a(A=>bn(A,x,k))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(s,x,void 0)||T?.value||"",type:Be.instance(E,Mi)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},h=(x,T=Vi)=>{const E=Zr(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{a(k=>bn(k,x,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(s,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},y=(x,T=Vi)=>{const E=Zr(x,e),I=E._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:k=>{k.persist?.();const A=I?k.target.valueAsNumber:k.target.value;T?.onChange?.(k),a(O=>bn(O,x,A))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Rn(s,x,void 0)||T?.value||"",ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:E})}};S.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(Xr(I)),k=M=>{const $=ek(M.target);if(!$)return!1;const _=M.target,F=Uh(M.target)||(M.relatedTarget?Xr(M.relatedTarget):""),z=E.schema.safeParse(F);if(_.setAttribute("value",F),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(D=>{if(Be.null(D))return null;const C=bn(D,$,void 0);return Be.empty(D)||Be.nil(D)||Be.empty(C)?null:C}),!1;if(I.required){const D=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(D),o(C=>{if(Be.null(C))return null;const V=bn(C,$,D||void 0);return Be.empty(V)?null:V})}return!1},A=new AbortController,O=I.getAttribute("data-trigger")||"blur";I.addEventListener(O,k,{signal:A.signal});const N=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:N,unsubscribe:()=>A.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const m=x=>T=>{T.preventDefault();const E=T.currentTarget;let I=JE(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(N=>{if(N.tagName==="SELECT"){const M=N;I=bn(I,M.name,M.value)}if(N.tagName==="INPUT"){const M=N,$=Uh(M)||(M?Xr(M):"");I=bn(I,M.dataset.target||M.name,$)}});const k=QE(I,s),A=e.safeParse(k),O=()=>{TE(E),n.interceptor?.clear()};if(A.success){const N=JSON.stringify(A.data);return E.setAttribute("data-json",N),n.interceptor?.clear(),x?.(T,{form:E,event:T,reset:O,setErrors:o,errors:[],success:!0,data:A.data,json:A.data})}return console.group("useForm error"),console.info(A),console.info(A.error.issues),console.error(A.error),console.groupEnd(),E.reportValidity(),x?.(T,{form:E,json:I,event:T,reset:O,setErrors:o,data:I,success:!1,errors:A.error.issues.map(N=>({message:N.message,path:N.path.map(M=>String(M))}))})},v=x=>fd(s,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:v,input:y,state:s,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:h,disabled:r!==null}},eW=e=>e?JSON.parse(e.getAttribute("data-json")):{},tW=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},tk={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},nk={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},rk={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},nW={name:"dark",zIndex:rk,rounded:tk,spacing:nk,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",disabled:"hsla(240, 4%, 33%)",muted:{DEFAULT:"hsla(210, 10%, 28%)",foreground:"hsla(210, 12%, 46%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,40%,10%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},rW={rounded:tk,spacing:nk,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:rk,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:{DEFAULT:"hsla(210, 30%, 86%)",foreground:"hsla(210, 15%, 20%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},oW=nW,iW=rW,sW=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...va,...e.tweaks},parser:e.parser||ma.hsla,map:{...ya,...e.map}}),[e]);return g.jsx(to.Provider,{value:t,children:g.jsx(TS,{children:e.children})})};se.Alert=rz,se.AnimatedList=R$,se.AnimatedListItem=B$,se.Autocomplete=H4,se.Button=yr,se.Calendar=QS,se.Card=Ql,se.Checkbox=Xp,se.ColType=Ti,se.Collapse=pS,se.CommandPalette=mH,se.ComponentsProvider=sW,se.Context=to,se.DatePicker=pB,se.Description=Oz,se.Dict=zn,se.Dropdown=Si,se.Empty=J1,se.Expand=Nz,se.FileUpload=D4,se.Form=LC,se.Info=_z,se.Input=Ko,se.InputFeedback=bv,se.InputField=rs,se.Loading=Dz,se.Menu=mz,se.MenuItem=hz,se.Modal=Ws,se.ModalConfirmProvider=TS,se.MultiSelect=Z4,se.Notifications=iH,se.PageHeader=Mz,se.PageTitle=ES,se.Paragraph=Pz,se.Polymorph=cn,se.Progress=aB,se.Radiobox=gz,se.RenderOnView=t3,se.Select=co,se.Slider=p_,se.Spinner=kS,se.Stats=oz,se.StatsCard=z$,se.Step=K$,se.Steps=Z$,se.Switch=h_,se.Tab=ez,se.Table=$$,se.Tabs=Q$,se.Tag=la,se.TaskList=Az,se.Textarea=yz,se.Timeline=lB,se.TimelineItem=ac,se.Toolbar=cB,se.Tooltip=hd,se.TransferList=J4,se.Wizard=zz,se.createColumns=a$,se.createCssProperties=kI,se.createDesignTokens=Bg,se.createFormStorage=QH,se.createOptionCols=Hp,se.createStyles=SI,se.createTheme=EI,se.createTokenStyles=CI,se.css=Pe,se.defaultDarkTheme=oW,se.defaultLightTheme=iW,se.defaultTranslations=ya,se.defaultTweaks=va,se.dispatchInput=wg,se.formReset=TE,se.formToJson=JE,se.getCoords=MC,se.getJsonForm=eW,se.getModalScrollerRef=f$,se.getRemainingSize=Wi,se.getSchemaShape=Zr,se.hasVerticalScroll=Sg,se.initializeInputDataset=Hi,se.isChildVisible=Tg,se.isMobile=vv,se.isReactComponent=_C,se.isReactFC=Su,se.isSsr=Dr,se.mergeRefs=dr,se.negate=HP,se.noop=Yo,se.parsers=ma,se.path=fd,se.reduceTokens=kr,se.safeRegex=pd,se.splitInto=yv,se.useColorParser=oS,se.useConfirm=wz,se.useForm=JH,se.useLocale=ul,se.useNotification=tH,se.usePrevious=tW,se.useReactive=aS,se.useStableRef=Fr,se.useStepContext=sS,se.useSwipe=US,se.useTablePreferences=u$,se.useTranslations=At,se.uuid=Go,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})}));
|
|
21
28
|
//# sourceMappingURL=index.umd.js.map
|