@g4rcez/components 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(re,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):(re=typeof globalThis<"u"?globalThis:re||self,S(re.components={},re.React,re["react/jsx-runtime"],re.ReactDOM))})(this,function(re,S,m,hi){"use strict";function Op(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=Op(S),mi=Op(hi);function Mp(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=Mp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Dp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Mp(e))&&(r&&(r+=" "),r+=t);return r}const Np=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fp=Dp,ao=(e,t)=>n=>{var r;if(t?.variants==null)return Fp(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 h=Np(u)||Np(d);return o[c][h]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(b=>{let[g,p]=b;return Array.isArray(p)?p.includes({...i,...s}[g]):{...i,...s}[g]===p})?[...c,d,h]:c},[]);return Fp(e,a,l,n?.class,n?.className)};var Lp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function WS(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 Tl,$p;function so(){return $p||($p=1,Tl=TypeError),Tl}const qS=WS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var El,jp;function wa(){if(jp)return El;jp=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,h=typeof WeakRef=="function"&&WeakRef.prototype,f=h?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,p=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,E=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,M=Array.prototype.slice,O=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,V=Object.prototype.propertyIsEnumerable,N=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(q){return q.__proto__}:null);function P(q,U){if(q===1/0||q===-1/0||q!==q||q&&q>-1e3&&q<1e3||T.call(/e/,U))return U;var Ne=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof q=="number"){var Xe=q<0?-O(-q):O(q);if(Xe!==q){var rt=String(Xe),Me=y.call(U,rt.length+1);return x.call(rt,Ne,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(U,Ne,"$&_")}var $=qS,D=$.custom,W=Q(D)?D:null,R={__proto__:null,double:'"',single:"'"},Z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};El=function q(U,Ne,Xe,rt){var Me=Ne||{};if(xe(Me,"quoteStyle")&&!xe(R,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xe(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Mr=xe(Me,"customInspect")?Me.customInspect:!0;if(typeof Mr!="boolean"&&Mr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(xe(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(xe(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var io=Me.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return Se(U,Me);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var cn=String(U);return io?P(U,cn):cn}if(typeof U=="bigint"){var Dr=String(U)+"n";return io?P(U,Dr):Dr}var Tp=typeof Me.depth>"u"?5:Me.depth;if(typeof Xe>"u"&&(Xe=0),Xe>=Tp&&Tp>0&&typeof U=="object")return ee(U)?"[Array]":"[Object]";var fi=qn(Me,Xe);if(typeof rt>"u")rt=[];else if(Te(rt,U)>=0)return"[Circular]";function Pn(pi,Sl,_R){if(Sl&&(rt=M.call(rt),rt.push(Sl)),_R){var HS={depth:Me.depth};return xe(Me,"quoteStyle")&&(HS.quoteStyle=Me.quoteStyle),q(pi,HS,Xe+1,rt)}return q(pi,Me,Xe+1,rt)}if(typeof U=="function"&&!K(U)){var LS=we(U),VS=An(U,Pn);return"[Function"+(LS?": "+LS:" (anonymous)")+"]"+(VS.length>0?" { "+C.call(VS,", ")+" }":"")}if(Q(U)){var $S=I?x.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):H.call(U);return typeof U=="object"&&!I?lt($S):$S}if(me(U)){for(var xa="<"+w.call(String(U.nodeName)),Ep=U.attributes||[],wl=0;wl<Ep.length;wl++)xa+=" "+Ep[wl].name+"="+X(oe(Ep[wl].value),"double",Me);return xa+=">",U.childNodes&&U.childNodes.length&&(xa+="..."),xa+="</"+w.call(String(U.nodeName))+">",xa}if(ee(U)){if(U.length===0)return"[]";var kp=An(U,Pn);return fi&&!Yt(kp)?"["+Cn(kp,fi)+"]":"[ "+C.call(kp,", ")+" ]"}if(G(U)){var Cp=An(U,Pn);return!("cause"in Error.prototype)&&"cause"in U&&!V.call(U,"cause")?"{ ["+String(U)+"] "+C.call(k.call("[cause]: "+Pn(U.cause),Cp),", ")+" }":Cp.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+C.call(Cp,", ")+" }"}if(typeof U=="object"&&Mr){if(W&&typeof U[W]=="function"&&$)return $(U,{depth:Tp-Xe});if(Mr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(We(U)){var jS=[];return r&&r.call(U,function(pi,Sl){jS.push(Pn(Sl,U,!0)+" => "+Pn(pi,U))}),xt("Map",n.call(U),jS,fi)}if(z(U)){var zS=[];return s&&s.call(U,function(pi){zS.push(Pn(pi,U))}),xt("Set",a.call(U),zS,fi)}if(fe(U))return Lt("WeakMap");if(ne(U))return Lt("WeakSet");if(ae(U))return Lt("WeakRef");if(j(U))return lt(Pn(Number(U)));if(ue(U))return lt(Pn(F.call(U)));if(Y(U))return lt(b.call(U));if(J(U))return lt(Pn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Lp<"u"&&U===Lp)return"{ [object globalThis] }";if(!B(U)&&!K(U)){var Ap=An(U,Pn),RS=N?N(U)===Object.prototype:U instanceof Object||U.constructor===Object,Pp=U instanceof Object?"":"null prototype",BS=!RS&&_&&Object(U)===U&&_ in U?y.call(Ee(U),8,-1):Pp?"Object":"",IR=RS||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Ip=IR+(BS||Pp?"["+C.call(k.call([],BS||[],Pp||[]),": ")+"] ":"");return Ap.length===0?Ip+"{}":fi?Ip+"{"+Cn(Ap,fi)+"}":Ip+"{ "+C.call(Ap,", ")+" }"}return String(U)};function X(q,U,Ne){var Xe=Ne.quoteStyle||U,rt=R[Xe];return rt+q+rt}function oe(q){return x.call(String(q),/"/g,"&quot;")}function te(q){return!_||!(typeof q=="object"&&(_ in q||typeof q[_]<"u"))}function ee(q){return Ee(q)==="[object Array]"&&te(q)}function B(q){return Ee(q)==="[object Date]"&&te(q)}function K(q){return Ee(q)==="[object RegExp]"&&te(q)}function G(q){return Ee(q)==="[object Error]"&&te(q)}function J(q){return Ee(q)==="[object String]"&&te(q)}function j(q){return Ee(q)==="[object Number]"&&te(q)}function Y(q){return Ee(q)==="[object Boolean]"&&te(q)}function Q(q){if(I)return q&&typeof q=="object"&&q instanceof Symbol;if(typeof q=="symbol")return!0;if(!q||typeof q!="object"||!H)return!1;try{return H.call(q),!0}catch{}return!1}function ue(q){if(!q||typeof q!="object"||!F)return!1;try{return F.call(q),!0}catch{}return!1}var ve=Object.prototype.hasOwnProperty||function(q){return q in this};function xe(q,U){return ve.call(q,U)}function Ee(q){return g.call(q)}function we(q){if(q.name)return q.name;var U=v.call(p.call(q),/^function\s*([\w$]+)/);return U?U[1]:null}function Te(q,U){if(q.indexOf)return q.indexOf(U);for(var Ne=0,Xe=q.length;Ne<Xe;Ne++)if(q[Ne]===U)return Ne;return-1}function We(q){if(!n||!q||typeof q!="object")return!1;try{n.call(q);try{a.call(q)}catch{return!0}return q instanceof Map}catch{}return!1}function fe(q){if(!c||!q||typeof q!="object")return!1;try{c.call(q,c);try{d.call(q,d)}catch{return!0}return q instanceof WeakMap}catch{}return!1}function ae(q){if(!f||!q||typeof q!="object")return!1;try{return f.call(q),!0}catch{}return!1}function z(q){if(!a||!q||typeof q!="object")return!1;try{a.call(q);try{n.call(q)}catch{return!0}return q instanceof Set}catch{}return!1}function ne(q){if(!d||!q||typeof q!="object")return!1;try{d.call(q,d);try{c.call(q,c)}catch{return!0}return q instanceof WeakSet}catch{}return!1}function me(q){return!q||typeof q!="object"?!1:typeof HTMLElement<"u"&&q instanceof HTMLElement?!0:typeof q.nodeName=="string"&&typeof q.getAttribute=="function"}function Se(q,U){if(q.length>U.maxStringLength){var Ne=q.length-U.maxStringLength,Xe="... "+Ne+" more character"+(Ne>1?"s":"");return Se(y.call(q,0,U.maxStringLength),U)+Xe}var rt=Z[U.quoteStyle||"single"];rt.lastIndex=0;var Me=x.call(x.call(q,rt,"\\$1"),/[\x00-\x1f]/g,ze);return X(Me,"single",U)}function ze(q){var U=q.charCodeAt(0),Ne={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Ne?"\\"+Ne:"\\x"+(U<16?"0":"")+E.call(U.toString(16))}function lt(q){return"Object("+q+")"}function Lt(q){return q+" { ? }"}function xt(q,U,Ne,Xe){var rt=Xe?Cn(Ne,Xe):C.call(Ne,", ");return q+" ("+U+") {"+rt+"}"}function Yt(q){for(var U=0;U<q.length;U++)if(Te(q[U],`
2
- `)>=0)return!1;return!0}function qn(q,U){var Ne;if(q.indent===" ")Ne=" ";else if(typeof q.indent=="number"&&q.indent>0)Ne=C.call(Array(q.indent+1)," ");else return null;return{base:Ne,prev:C.call(Array(U+1),Ne)}}function Cn(q,U){if(q.length===0)return"";var Ne=`
3
- `+U.prev+U.base;return Ne+C.call(q,","+Ne)+`
4
- `+U.prev}function An(q,U){var Ne=ee(q),Xe=[];if(Ne){Xe.length=q.length;for(var rt=0;rt<q.length;rt++)Xe[rt]=xe(q,rt)?U(q[rt],q):""}var Me=typeof L=="function"?L(q):[],Mr;if(I){Mr={};for(var io=0;io<Me.length;io++)Mr["$"+Me[io]]=Me[io]}for(var cn in q)xe(q,cn)&&(Ne&&String(Number(cn))===cn&&cn<q.length||I&&Mr["$"+cn]instanceof Symbol||(T.call(/[^\w$]/,cn)?Xe.push(U(cn,q)+": "+U(q[cn],q)):Xe.push(cn+": "+U(q[cn],q))));if(typeof L=="function")for(var Dr=0;Dr<Me.length;Dr++)V.call(q,Me[Dr])&&Xe.push("["+U(Me[Dr])+"]: "+U(q[Me[Dr]],q));return Xe}return El}var kl,zp;function US(){if(zp)return kl;zp=1;var e=wa(),t=so(),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 kl=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,h=a(l,u);return h&&d&&d===h&&(l=void 0),!!h},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},kl}var Cl,Rp;function Bp(){return Rp||(Rp=1,Cl=Object),Cl}var Al,Hp;function KS(){return Hp||(Hp=1,Al=Error),Al}var Pl,Wp;function YS(){return Wp||(Wp=1,Pl=EvalError),Pl}var Il,qp;function GS(){return qp||(qp=1,Il=RangeError),Il}var _l,Up;function ZS(){return Up||(Up=1,_l=ReferenceError),_l}var Ol,Kp;function XS(){return Kp||(Kp=1,Ol=SyntaxError),Ol}var Ml,Yp;function QS(){return Yp||(Yp=1,Ml=URIError),Ml}var Dl,Gp;function JS(){return Gp||(Gp=1,Dl=Math.abs),Dl}var Nl,Zp;function eT(){return Zp||(Zp=1,Nl=Math.floor),Nl}var Fl,Xp;function tT(){return Xp||(Xp=1,Fl=Math.max),Fl}var Ll,Qp;function nT(){return Qp||(Qp=1,Ll=Math.min),Ll}var Vl,Jp;function rT(){return Jp||(Jp=1,Vl=Math.pow),Vl}var $l,eh;function oT(){return eh||(eh=1,$l=Math.round),$l}var jl,th;function iT(){return th||(th=1,jl=Number.isNaN||function(t){return t!==t}),jl}var zl,nh;function aT(){if(nh)return zl;nh=1;var e=iT();return zl=function(n){return e(n)||n===0?n:n<0?-1:1},zl}var Rl,rh;function sT(){return rh||(rh=1,Rl=Object.getOwnPropertyDescriptor),Rl}var Bl,oh;function ih(){if(oh)return Bl;oh=1;var e=sT();if(e)try{e([],"length")}catch{e=null}return Bl=e,Bl}var Hl,ah;function lT(){if(ah)return Hl;ah=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Hl=e,Hl}var Wl,sh;function cT(){return sh||(sh=1,Wl=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}),Wl}var ql,lh;function uT(){if(lh)return ql;lh=1;var e=typeof Symbol<"u"&&Symbol,t=cT();return ql=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ql}var Ul,ch;function uh(){return ch||(ch=1,Ul=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ul}var Kl,dh;function fh(){if(dh)return Kl;dh=1;var e=Bp();return Kl=e.getPrototypeOf||null,Kl}var Yl,ph;function dT(){if(ph)return Yl;ph=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 h=0;h<c.length;h+=1)u[h+l.length]=c[h];return u},i=function(l,c){for(var u=[],d=c,h=0;d<l.length;d+=1,h+=1)u[h]=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 Yl=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,h=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))},f=n(0,c.length-u.length),b=[],g=0;g<f;g++)b[g]="$"+g;if(d=Function("binder","return function ("+a(b,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var p=function(){};p.prototype=c.prototype,d.prototype=new p,p.prototype=null}return d},Yl}var Gl,hh;function Sa(){if(hh)return Gl;hh=1;var e=dT();return Gl=Function.prototype.bind||e,Gl}var Zl,mh;function Xl(){return mh||(mh=1,Zl=Function.prototype.call),Zl}var Ql,gh;function vh(){return gh||(gh=1,Ql=Function.prototype.apply),Ql}var Jl,yh;function fT(){return yh||(yh=1,Jl=typeof Reflect<"u"&&Reflect&&Reflect.apply),Jl}var ec,bh;function pT(){if(bh)return ec;bh=1;var e=Sa(),t=vh(),n=Xl(),r=fT();return ec=r||e.call(n,t),ec}var tc,xh;function wh(){if(xh)return tc;xh=1;var e=Sa(),t=so(),n=Xl(),r=pT();return tc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},tc}var nc,Sh;function hT(){if(Sh)return nc;Sh=1;var e=wh(),t=ih(),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 nc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,nc}var rc,Th;function mT(){if(Th)return rc;Th=1;var e=uh(),t=fh(),n=hT();return rc=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,rc}var oc,Eh;function gT(){if(Eh)return oc;Eh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Sa();return oc=n.call(e,t),oc}var ic,kh;function ac(){if(kh)return ic;kh=1;var e,t=Bp(),n=KS(),r=YS(),o=GS(),i=ZS(),a=XS(),s=so(),l=QS(),c=JS(),u=eT(),d=tT(),h=nT(),f=rT(),b=oT(),g=aT(),p=Function,v=function(K){try{return p('"use strict"; return ('+K+").constructor;")()}catch{}},y=ih(),x=lT(),E=function(){throw new s},w=y?function(){try{return arguments.callee,E}catch{try{return y(arguments,"callee").get}catch{return E}}}():E,T=uT()(),k=mT(),C=fh(),M=uh(),O=vh(),F=Xl(),L={},H=typeof Uint8Array>"u"||!k?e:k(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%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%":p,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%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"||!T||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&k?k(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":H,"%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%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":M};if(k)try{null.error}catch(K){var _=k(k(K));I["%Error.prototype%"]=_}var V=function K(G){var J;if(G==="%AsyncFunction%")J=v("async function () {}");else if(G==="%GeneratorFunction%")J=v("function* () {}");else if(G==="%AsyncGeneratorFunction%")J=v("async function* () {}");else if(G==="%AsyncGenerator%"){var j=K("%AsyncGeneratorFunction%");j&&(J=j.prototype)}else if(G==="%AsyncIteratorPrototype%"){var Y=K("%AsyncGenerator%");Y&&k&&(J=k(Y.prototype))}return I[G]=J,J},N={__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"]},P=Sa(),$=gT(),D=P.call(F,Array.prototype.concat),W=P.call(O,Array.prototype.splice),R=P.call(F,String.prototype.replace),Z=P.call(F,String.prototype.slice),X=P.call(F,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,te=/\\(\\)?/g,ee=function(G){var J=Z(G,0,1),j=Z(G,-1);if(J==="%"&&j!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&J!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Y=[];return R(G,oe,function(Q,ue,ve,xe){Y[Y.length]=ve?R(xe,te,"$1"):ue||Q}),Y},B=function(G,J){var j=G,Y;if($(N,j)&&(Y=N[j],j="%"+Y[0]+"%"),$(I,j)){var Q=I[j];if(Q===L&&(Q=V(j)),typeof Q>"u"&&!J)throw new s("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:Y,name:j,value:Q}}throw new a("intrinsic "+G+" does not exist!")};return ic=function(G,J){if(typeof G!="string"||G.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof J!="boolean")throw new s('"allowMissing" argument must be a boolean');if(X(/^%?[^%]*%?$/,G)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=ee(G),Y=j.length>0?j[0]:"",Q=B("%"+Y+"%",J),ue=Q.name,ve=Q.value,xe=!1,Ee=Q.alias;Ee&&(Y=Ee[0],W(j,D([0,1],Ee)));for(var we=1,Te=!0;we<j.length;we+=1){var We=j[we],fe=Z(We,0,1),ae=Z(We,-1);if((fe==='"'||fe==="'"||fe==="`"||ae==='"'||ae==="'"||ae==="`")&&fe!==ae)throw new a("property names with quotes must have matching quotes");if((We==="constructor"||!Te)&&(xe=!0),Y+="."+We,ue="%"+Y+"%",$(I,ue))ve=I[ue];else if(ve!=null){if(!(We in ve)){if(!J)throw new s("base intrinsic for "+G+" exists, but the property is not available.");return}if(y&&we+1>=j.length){var z=y(ve,We);Te=!!z,Te&&"get"in z&&!("originalValue"in z.get)?ve=z.get:ve=ve[We]}else Te=$(ve,We),ve=ve[We];Te&&!xe&&(I[ue]=ve)}}return ve},ic}var sc,Ch;function Ah(){if(Ch)return sc;Ch=1;var e=ac(),t=wh(),n=t([e("%String.prototype.indexOf%")]);return sc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},sc}var lc,Ph;function Ih(){if(Ph)return lc;Ph=1;var e=ac(),t=Ah(),n=wa(),r=so(),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 lc=!!o&&function(){var d,h={assert:function(f){if(!h.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var b=l(d,f);return c(d)===0&&(d=void 0),b}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,b){d||(d=new o),a(d,f,b)}};return h},lc}var cc,_h;function vT(){if(_h)return cc;_h=1;var e=ac(),t=Ah(),n=wa(),r=Ih(),o=so(),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 cc=i?function(){var d,h,f={assert:function(b){if(!f.has(b))throw new o("Side channel does not contain "+n(b))},delete:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(d)return c(d,b)}else if(r&&h)return h.delete(b);return!1},get:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?a(d,b):h&&h.get(b)},has:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?l(d,b):!!h&&h.has(b)},set:function(b,g){i&&b&&(typeof b=="object"||typeof b=="function")?(d||(d=new i),s(d,b,g)):r&&(h||(h=r()),h.set(b,g))}};return f}:r,cc}var uc,Oh;function yT(){if(Oh)return uc;Oh=1;var e=so(),t=wa(),n=US(),r=Ih(),o=vT(),i=o||r||n;return uc=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},uc}var Mh=e=>Array.isArray(e),dc=e=>e===void 0,fc=e=>e===null,bT=Function.bind.call(Function.call,Object.prototype.toString),xT=e=>!!e&&bT(e)==="[object Error]"||e instanceof Error,Dh=(e,t)=>e instanceof t,wT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},ST=e=>Object.prototype.toString.call(e)==="[object Date]"&&Dh(e,Date),Ve={array:Mh,date:ST,empty:e=>fc(e)||dc(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:Dh,isError:xT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>fc(e)||dc(e),null:fc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Mh(e)&&typeof e=="object",primitive:wT,string:e=>typeof e=="string",undefined:dc},TT=e=>Object.keys(e),In=(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},ET=e=>e.replace(/[^0-9]/g,"");const pc="-",kT=e=>{const t=AT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(pc);return s[0]===""&&s.length!==1&&s.shift(),Nh(s,t)||CT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Nh=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Nh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(pc);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Fh=/^\[(.+)\]$/,CT=e=>{if(Fh.test(e)){const t=Fh.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},AT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)hc(n[o],r,o,t);return r},hc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Lh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(PT(o)){hc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{hc(a,Lh(t,i),n,r)})})},Lh=(e,t)=>{let n=e;return t.split(pc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PT=e=>e.isThemeGetter,IT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},mc="!",gc=":",_T=gc.length,OT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&s===0){if(g===gc){i.push(o.slice(l,b)),l=b+_T;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=MT(u),h=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+gc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},MT=e=>e.endsWith(mc)?e.substring(0,e.length-1):e.startsWith(mc)?e.substring(1):e,DT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},NT=e=>({cache:IT(e.cacheSize),parseClassName:OT(e),sortModifiers:DT(e),...kT(e)}),FT=/\s+/,LT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(FT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:h,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let p=!!g,v=r(p?b.substring(0,g):b);if(!v){if(!p){l=u+(l.length>0?" "+l:l);continue}if(v=r(b),!v){l=u+(l.length>0?" "+l:l);continue}p=!1}const y=i(h).join(":"),x=f?y+mc:y,E=x+v;if(a.includes(E))continue;a.push(E);const w=o(v,p);for(let T=0;T<w.length;++T){const k=w[T];a.push(x+k)}l=u+(l.length>0?" "+l:l)}return l};function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Vh(t))&&(r&&(r+=" "),r+=n);return r}const Vh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Vh(e[r]))&&(n&&(n+=" "),n+=t);return n};function $T(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=NT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=LT(l,n);return o(l,u),u}return function(){return i(VT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$h=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jT=/^\d+\/\d+$/,zT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RT=/\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$/,BT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lo=e=>jT.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),or=e=>!!e&&Number.isInteger(Number(e)),vc=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Un=e=>zT.test(e),qT=()=>!0,UT=e=>RT.test(e)&&!BT.test(e),zh=()=>!1,KT=e=>HT.test(e),YT=e=>WT.test(e),GT=e=>!pe(e)&&!he(e),ZT=e=>co(e,qh,zh),pe=e=>$h.test(e),Nr=e=>co(e,Uh,UT),yc=e=>co(e,tE,Fe),Rh=e=>co(e,Hh,zh),XT=e=>co(e,Wh,YT),Ta=e=>co(e,Kh,KT),he=e=>jh.test(e),gi=e=>uo(e,Uh),QT=e=>uo(e,nE),Bh=e=>uo(e,Hh),JT=e=>uo(e,qh),eE=e=>uo(e,Wh),Ea=e=>uo(e,Kh,!0),co=(e,t,n)=>{const r=$h.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},uo=(e,t,n=!1)=>{const r=jh.exec(e);return r?r[1]?t(r[1]):n:!1},Hh=e=>e==="position"||e==="percentage",Wh=e=>e==="image"||e==="url",qh=e=>e==="length"||e==="size"||e==="bg-size",Uh=e=>e==="length",tE=e=>e==="number",nE=e=>e==="family-name",Kh=e=>e==="shadow",rE=$T(()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),h=At("text-shadow"),f=At("drop-shadow"),b=At("blur"),g=At("perspective"),p=At("aspect"),v=At("ease"),y=At("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...E(),he,pe],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[he,pe,l],M=()=>[lo,"full","auto",...C()],O=()=>[or,"none","subgrid",he,pe],F=()=>["auto",{span:["full",or,he,pe]},or,he,pe],L=()=>[or,"auto",he,pe],H=()=>["auto","min","max","fr",he,pe],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],N=()=>[lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,he,pe],$=()=>[...E(),Bh,Rh,{position:[he,pe]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",JT,ZT,{size:[he,pe]}],R=()=>[vc,gi,Nr],Z=()=>["","none","full",c,he,pe],X=()=>["",Fe,gi,Nr],oe=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Fe,vc,Bh,Rh],B=()=>["","none",b,he,pe],K=()=>["none",Fe,he,pe],G=()=>["none",Fe,he,pe],J=()=>[Fe,he,pe],j=()=>[lo,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[qT],container:[Un],"drop-shadow":[Un],ease:["in","out","in-out"],font:[GT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Un],shadow:[Un],spacing:["px",Fe],text:[Un],"text-shadow":[Un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lo,pe,he,p]}],container:["container"],columns:[{columns:[Fe,pe,he,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:w()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",he,pe]}],basis:[{basis:[lo,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,lo,"auto","initial","none",pe]}],grow:[{grow:["",Fe,he,pe]}],shrink:[{shrink:["",Fe,he,pe]}],order:[{order:[or,"first","last","none",he,pe]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],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:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",n,gi,Nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,he,yc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vc,pe]}],"font-family":[{font:[QT,pe,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,he,pe]}],"line-clamp":[{"line-clamp":[Fe,"none",he,yc]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",he,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",he,Nr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Fe,"auto",he,pe]}],"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",he,pe]}],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",he,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,he,pe],radial:["",he,pe],conic:[or,he,pe]},eE,XT]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,he,pe]}],"outline-w":[{outline:["",Fe,gi,Nr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,Ea,Ta]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,Ea,Ta]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Fe,Nr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",h,Ea,Ta]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Fe,he,pe]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[Fe]}],"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":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"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":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"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":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"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":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"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":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"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":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"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":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[he,pe]}],"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":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"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":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,pe]}],filter:[{filter:["","none",he,pe]}],blur:[{blur:B()}],brightness:[{brightness:[Fe,he,pe]}],contrast:[{contrast:[Fe,he,pe]}],"drop-shadow":[{"drop-shadow":["","none",f,Ea,Ta]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Fe,he,pe]}],"hue-rotate":[{"hue-rotate":[Fe,he,pe]}],invert:[{invert:["",Fe,he,pe]}],saturate:[{saturate:[Fe,he,pe]}],sepia:[{sepia:["",Fe,he,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",he,pe]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,he,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,he,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,he,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,he,pe]}],"backdrop-invert":[{"backdrop-invert":["",Fe,he,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,he,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,he,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,he,pe]}],"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",he,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",he,pe]}],ease:[{ease:["linear","initial",v,he,pe]}],delay:[{delay:[Fe,he,pe]}],animate:[{animate:["none",y,he,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,he,pe]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[he,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:j()}],"translate-x":[{"translate-x":j()}],"translate-y":[{"translate-y":j()}],"translate-z":[{"translate-z":j()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",he,pe]}],"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",he,pe]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Fe,gi,Nr,yc]}],stroke:[{stroke:["none",...P()]}],"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"]}}),Kn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},oE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),bc=e=>Ve.function(e),Ce=(...e)=>rE(Dp(e)),Yh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},vi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Gh=e=>e.scrollHeight>e.clientHeight,yi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},iE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},aE="span",un=S.forwardRef(function(t,n){const r=t.as||aE;return m.jsx(r,{ref:n,...t,as:void 0})}),sE=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-2 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 border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ka=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(un,{...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:Ce(sE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),ir=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t};function lE(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 cE=({children:e,...t})=>{const n=ir(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:lE(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})},uE={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"},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"}},dE=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"}}}),fE=ao("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:uE,defaultVariants:{theme:"primary",size:"default"}}),Ca=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(un,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ce(fE({size:a,theme:i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:dE({theme:n})}):null,r,s.children]})}),bi=S.createContext({});function bn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const xc=typeof window<"u",Aa=xc?S.useLayoutEffect:S.useEffect,Pa=S.createContext(null);function wc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ia(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function pE([...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 Yn=(e,t,n)=>n>t?t:n<e?e:n;let fo=()=>{},en=()=>{};process.env.NODE_ENV!=="production"&&(fo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},en=(e,t)=>{if(!e)throw new Error(t)});const Gn={},Zh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xh(e){return typeof e=="object"&&e!==null}const Qh=e=>/^0[^.\s]+$/u.test(e);function Sc(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,hE=(e,t)=>n=>t(e(n)),xi=(...e)=>e.reduce(hE),po=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Tc{constructor(){this.subscriptions=[]}add(t){return wc(this.subscriptions,t),()=>Ia(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 fn=e=>e*1e3,_n=e=>e/1e3;function Jh(e,t){return t?e*(1e3/t):0}const em=new Set;function Ec(e,t,n){e||em.has(t)||(console.warn(t),em.add(t))}const mE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},tm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gE=1e-7,vE=12;function yE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=tm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>gE&&++s<vE);return a}function wi(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>yE(i,0,1,e,n);return i=>i===0||i===1?i:tm(o(i),t,r)}const nm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rm=e=>t=>1-e(1-t),om=wi(.33,1.53,.69,.99),kc=rm(om),im=nm(kc),am=e=>(e*=2)<1?.5*kc(e):.5*(2-Math.pow(2,-10*(e-1))),Cc=e=>1-Math.sin(Math.acos(e)),sm=rm(Cc),lm=nm(Cc),bE=wi(.42,0,1,1),xE=wi(0,0,.58,1),cm=wi(.42,0,.58,1),um=e=>Array.isArray(e)&&typeof e[0]!="number";function dm(e,t){return um(e)?e[mE(0,e.length,t)]:e}const fm=e=>Array.isArray(e)&&typeof e[0]=="number",pm={linear:dn,easeIn:bE,easeInOut:cm,easeOut:xE,circIn:Cc,circInOut:lm,circOut:sm,backIn:kc,backInOut:im,backOut:om,anticipate:am},wE=e=>typeof e=="string",Ac=e=>{if(fm(e)){en(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return wi(t,n,r,o)}else if(wE(e))return en(pm[e]!==void 0,`Invalid easing type '${e}'`),pm[e];return e},_a=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function SE(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,h=!1)=>{const b=h&&o?n:r;return d&&a.add(u),b.has(u)||b.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 TE=40;function hm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=_a.reduce((x,E)=>(x[E]=SE(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:b}=a,g=()=>{const x=Gn.useManualTiming?o.timestamp:performance.now();n=!1,Gn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,TE),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),f.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},p=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:_a.reduce((x,E)=>{const w=a[E];return x[E]=(T,k=!1,C=!1)=>(n||p(),w.schedule(T,k,C)),x},{}),cancel:x=>{for(let E=0;E<_a.length;E++)a[_a[E]].cancel(x)},state:o,steps:a}}const{schedule:ct,cancel:Zn,state:Vt,steps:Pc}=hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Oa;function EE(){Oa=void 0}const Gt={now:()=>(Oa===void 0&&Gt.set(Vt.isProcessing||Gn.useManualTiming?Vt.timestamp:performance.now()),Oa),set:e=>{Oa=e,queueMicrotask(EE)}},mm=e=>t=>typeof t=="string"&&t.startsWith(e),Ic=mm("--"),kE=mm("var(--"),_c=e=>kE(e)?CE.test(e.split("/*")[0].trim()):!1,CE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ho={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Si={...ho,transform:e=>Yn(0,1,e)},Ma={...ho,default:1},Ti=e=>Math.round(e*1e5)/1e5,Oc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AE(e){return e==null}const PE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mc=(e,t)=>n=>!!(typeof n=="string"&&PE.test(n)&&n.startsWith(e)||t&&!AE(n)&&Object.prototype.hasOwnProperty.call(n,t)),gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Oc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},IE=e=>Yn(0,255,e),Dc={...ho,transform:e=>Math.round(IE(e))},Fr={test:Mc("rgb","red"),parse:gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Dc.transform(e)+", "+Dc.transform(t)+", "+Dc.transform(n)+", "+Ti(Si.transform(r))+")"};function _E(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 Nc={test:Mc("#"),parse:_E,transform:Fr.transform},Ei=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ar=Ei("deg"),On=Ei("%"),ke=Ei("px"),OE=Ei("vh"),ME=Ei("vw"),vm={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},mo={test:Mc("hsl","hue"),parse:gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Ti(t))+", "+On.transform(Ti(n))+", "+Ti(Si.transform(r))+")"},Ct={test:e=>Fr.test(e)||Nc.test(e)||mo.test(e),parse:e=>Fr.test(e)?Fr.parse(e):mo.test(e)?mo.parse(e):Nc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):mo.transform(e),getAnimatableNone:e=>{const t=Ct.parse(e);return t.alpha=0,Ct.transform(t)}},DE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function NE(e){return isNaN(e)&&typeof e=="string"&&(e.match(Oc)?.length||0)+(e.match(DE)?.length||0)>0}const ym="number",bm="color",FE="var",LE="var(",xm="${}",VE=/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 ki(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(VE,l=>(Ct.test(l)?(r.color.push(i),o.push(bm),n.push(Ct.parse(l))):l.startsWith(LE)?(r.var.push(i),o.push(FE),n.push(l)):(r.number.push(i),o.push(ym),n.push(parseFloat(l))),++i,xm)).split(xm);return{values:n,split:s,indexes:r,types:o}}function wm(e){return ki(e).values}function Sm(e){const{split:t,types:n}=ki(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===ym?i+=Ti(o[a]):s===bm?i+=Ct.transform(o[a]):i+=o[a]}return i}}const $E=e=>typeof e=="number"?0:Ct.test(e)?Ct.getAnimatableNone(e):e;function jE(e){const t=wm(e);return Sm(e)(t.map($E))}const sr={test:NE,parse:wm,createTransformer:Sm,getAnimatableNone:jE};function Fc(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 zE({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=Fc(l,s,e+1/3),i=Fc(l,s,e),a=Fc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Da(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,Lc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},RE=[Nc,Fr,mo],BE=e=>RE.find(t=>t.test(e));function Tm(e){const t=BE(e);if(fo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===mo&&(n=zE(n)),n}const Em=(e,t)=>{const n=Tm(e),r=Tm(t);if(!n||!r)return Da(e,t);const o={...n};return i=>(o.red=Lc(n.red,r.red,i),o.green=Lc(n.green,r.green,i),o.blue=Lc(n.blue,r.blue,i),o.alpha=ut(n.alpha,r.alpha,i),Fr.transform(o))},Vc=new Set(["none","hidden"]);function HE(e,t){return Vc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function WE(e,t){return n=>ut(e,t,n)}function $c(e){return typeof e=="number"?WE:typeof e=="string"?_c(e)?Da:Ct.test(e)?Em:KE:Array.isArray(e)?km:typeof e=="object"?Ct.test(e)?Em:qE:Da}function km(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>$c(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function qE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=$c(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function UE(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 KE=(e,t)=>{const n=sr.createTransformer(t),r=ki(e),o=ki(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?Vc.has(e)&&!o.values.length||Vc.has(t)&&!r.values.length?HE(e,t):xi(km(UE(r,o),o.values),n):(fo(!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.`),Da(e,t))};function Cm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):$c(e)(e,t)}const YE=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ct.update(t,n),stop:()=>Zn(t),now:()=>Vt.isProcessing?Vt.timestamp:Gt.now()}},Am=(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)})`},Na=2e4;function jc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Na;)t+=n,r=e.next(t);return t>=Na?1/0:t}function Pm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jc(r),Na);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:_n(o)}}const GE=5;function Im(e,t,n){const r=Math.max(t-GE,0);return Jh(n-e(r),t-r)}const ht={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},zc=.001;function ZE({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;fo(e<=fn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Yn(ht.minDamping,ht.maxDamping,a),e=Yn(ht.minDuration,ht.maxDuration,_n(e)),a<1?(o=c=>{const u=c*a,d=u*e,h=u-n,f=Rc(c,a),b=Math.exp(-d);return zc-h/f*b},i=c=>{const d=c*a*e,h=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-d),g=Rc(Math.pow(c,2),a);return(-o(c)+zc>0?-1:1)*((h-f)*b)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-zc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=QE(o,i,s);if(e=fn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const XE=12;function QE(e,t,n){let r=n;for(let o=1;o<XE;o++)r=r-e(r)/t(r);return r}function Rc(e,t){return e*Math.sqrt(1-t*t)}const JE=["duration","bounce"],ek=["stiffness","damping","mass"];function _m(e,t){return t.some(n=>e[n]!==void 0)}function tk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!_m(e,ek)&&_m(e,JE))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Yn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=ZE(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Ci(e=ht.visualDuration,t=ht.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:h,isResolvedFromDuration:f}=tk({...n,velocity:-_n(n.velocity||0)}),b=h||0,g=c/(2*Math.sqrt(l*u)),p=a-i,v=_n(Math.sqrt(l/u)),y=Math.abs(p)<5;r||(r=y?ht.restSpeed.granular:ht.restSpeed.default),o||(o=y?ht.restDelta.granular:ht.restDelta.default);let x;if(g<1){const w=Rc(v,g);x=T=>{const k=Math.exp(-g*v*T);return a-k*((b+g*v*p)/w*Math.sin(w*T)+p*Math.cos(w*T))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(p+(b+v*p)*w);else{const w=v*Math.sqrt(g*g-1);x=T=>{const k=Math.exp(-g*v*T),C=Math.min(w*T,300);return a-k*((b+g*v*p)*Math.sinh(C)+w*p*Math.cosh(C))/w}}const E={calculatedDuration:f&&d||null,next:w=>{const T=x(w);if(f)s.done=w>=d;else{let k=w===0?b:0;g<1&&(k=w===0?fn(b):Im(x,w,T));const C=Math.abs(k)<=r,M=Math.abs(a-T)<=o;s.done=C&&M}return s.value=s.done?a:T,s},toString:()=>{const w=Math.min(jc(E),Na),T=Am(k=>E.next(w*k).value,w,30);return w+"ms "+T},toTransition:()=>{}};return E}Ci.applyToOptions=e=>{const t=Pm(e,100,Ci);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};function Bc({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],h={done:!1,value:d},f=C=>s!==void 0&&C<s||l!==void 0&&C>l,b=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const p=d+g,v=a===void 0?p:a(p);v!==p&&(g=v-d);const y=C=>-g*Math.exp(-C/r),x=C=>v+y(C),E=C=>{const M=y(C),O=x(C);h.done=Math.abs(M)<=c,h.value=h.done?v:O};let w,T;const k=C=>{f(h.value)&&(w=C,T=Ci({keyframes:[h.value,b(h.value)],velocity:Im(x,C,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let M=!1;return!T&&w===void 0&&(M=!0,E(C),k(C)),w!==void 0&&C>=w?T.next(C-w):(!M&&E(C),h)}}}function nk(e,t,n){const r=[],o=n||Gn.mix||Cm,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]||dn:t;s=xi(l,s)}r.push(s)}return r}function Om(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(en(i===t.length,"Both input and output ranges must be the same 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=nk(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 h=po(e[d],e[d+1],u);return s[d](h)};return n?u=>c(Yn(e[0],e[i-1],u)):c}function Mm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=po(0,t,r);e.push(ut(n,1,o))}}function Dm(e){const t=[0];return Mm(t,e.length-1),t}function rk(e,t){return e.map(n=>n*t)}function ok(e,t){return e.map(()=>t||cm).splice(0,e.length-1)}function go({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=um(r)?r.map(Ac):Ac(r),i={done:!1,value:t[0]},a=rk(n&&n.length===t.length?n:Dm(t),e),s=Om(a,t,{ease:Array.isArray(o)?o:ok(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const ik=e=>e!==null;function Hc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(ik),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const ak={decay:Bc,inertia:Bc,tween:go,keyframes:go,spring:Ci};function Nm(e){typeof e.type=="string"&&(e.type=ak[e.type])}class Wc{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 sk=e=>e/100;class qc extends Wc{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!==Gt.now()&&this.tick(Gt.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;Nm(t);const{type:n=go,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||go;process.env.NODE_ENV!=="production"&&l!==go&&en(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==go&&typeof s[0]!="number"&&(this.mixKeyframes=xi(sk,Cm(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=jc(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:h,repeatDelay:f,type:b,onUpdate:g,finalKeyframe:p}=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),y=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,E=r;if(d){const C=Math.min(this.currentTime,o)/s;let M=Math.floor(C),O=C%1;!O&&C>=1&&(O=1),O===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(h==="reverse"?(O=1-O,f&&(O-=f/s)):h==="mirror"&&(E=a)),x=Yn(0,1,O)*s}const w=y?{done:!1,value:u[0]}:E.next(x);i&&(w.value=i(w.value));let{done:T}=w;!y&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return k&&b!==Bc&&(w.value=Hc(u,this.options,p,this.speed)),g&&g(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return _n(this.calculatedDuration)}get time(){return _n(this.currentTime)}set time(t){t=fn(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(Gt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_n(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=YE,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(Gt.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 lk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Lr=e=>e*180/Math.PI,Uc=e=>{const t=Lr(Math.atan2(e[1],e[0]));return Kc(t)},ck={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Uc,rotateZ:Uc,skewX:e=>Lr(Math.atan(e[1])),skewY:e=>Lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kc=e=>(e=e%360,e<0&&(e+=360),e),Fm=Uc,Lm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lm,scaleY:Vm,scale:e=>(Lm(e)+Vm(e))/2,rotateX:e=>Kc(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>Kc(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Fm,rotate:Fm,skewX:e=>Lr(Math.atan(e[4])),skewY:e=>Lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Yc(e){return e.includes("scale")?1:0}function Gc(e,t){if(!e||e==="none")return Yc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=uk,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ck,o=s}if(!o)return Yc(t);const i=r[t],a=o[1].split(",").map(fk);return typeof i=="function"?i(a):a[i]}const dk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gc(n,t)};function fk(e){return parseFloat(e.trim())}const vo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=new Set(vo),$m=e=>e===ho||e===ke,pk=new Set(["x","y","z"]),hk=vo.filter(e=>!pk.has(e));function mk(e){const t=[];return hk.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})=>Gc(t,"x"),y:(e,{transform:t})=>Gc(t,"y")};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const $r=new Set;let Zc=!1,Xc=!1,Qc=!1;function jm(){if(Xc){const e=Array.from($r).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=mk(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)})}Xc=!1,Zc=!1,$r.forEach(e=>e.complete(Qc)),$r.clear()}function zm(){$r.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xc=!0)})}function gk(){Qc=!0,zm(),jm(),Qc=!1}class Jc{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?($r.add(this),Zc||(Zc=!0,ct.read(zm),ct.resolveKeyframes(jm))):(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])}lk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$r.delete(this)}cancel(){this.state==="scheduled"&&($r.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vk=e=>e.startsWith("--");function yk(e,t,n){vk(t)?e.style.setProperty(t,n):e.style[t]=n}const bk=Sc(()=>window.ScrollTimeline!==void 0),xk={};function wk(e,t){const n=Sc(e);return()=>xk[t]??n()}const Rm=wk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ai=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ai([0,.65,.55,1]),circOut:Ai([.55,0,1,.45]),backIn:Ai([.31,.01,.66,-.59]),backOut:Ai([.33,1.53,.69,.99])};function Hm(e,t){if(e)return typeof e=="function"?Rm()?Am(e,t):"ease-out":fm(e)?Ai(e):Array.isArray(e)?e.map(n=>Hm(n,t)||Bm.easeOut):Bm[e]}function Sk(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=Hm(s,o);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function eu(e){return typeof e=="function"&&"applyToOptions"in e}function Tk({type:e,...t}){return eu(e)&&Rm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ek extends Wc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!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,en(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=Tk(t);this.animation=Sk(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Hc(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):yk(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(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 _n(Number(t))}get time(){return _n(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fn(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&bk()?(this.animation.timeline=t,dn):n(this)}}const Wm={anticipate:am,backInOut:im,circInOut:lm};function kk(e){return e in Wm}function Ck(e){typeof e.ease=="string"&&kk(e.ease)&&(e.ease=Wm[e.ease])}const qm=10;class Ak extends Ek{constructor(t){Ck(t),Nm(t),super(t),t.startTime&&(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 qc({...a,autoplay:!1}),l=fn(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-qm).value,s.sample(l).value,qm),s.stop()}}const Um=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function Pk(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 Ik(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=Um(o,t),s=Um(i,t);return fo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:Pk(e)||(n==="spring"||eu(n))&&r}function tu(e){return Xh(e)&&"offsetHeight"in e}const _k=new Set(["opacity","clipPath","filter","transform"]),Ok=Sc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Mk(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!tu(t?.owner?.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return Ok()&&n&&_k.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const Dk=40;class Nk extends Wc{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=Gt.now();const h={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||Jc;this.keyframeResolver=new f(s,(b,g,p)=>this.onKeyframesResolved(b,g,h,!p),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=Gt.now(),Ik(t,i,a,s)||((Gn.instantAnimations||!l)&&u?.(Hc(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const h={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Dk?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&Mk(h)?new Ak({...h,element:h.motionValue.owner.current}):new qc(h);f.finished.then(()=>this.notifyFinished()).catch(dn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),gk()),this._animation}get duration(){return this.animation.duration}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 Fk{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(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Lk extends Fk{then(t,n){return this.finished.finally(t).then(()=>{})}}const Vk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $k(e){const t=Vk.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const jk=4;function Km(e,t,n=1){en(n<=jk,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=$k(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Zh(a)?parseFloat(a):a}return _c(o)?Km(o,t,n+1):o}function nu(e,t){return e?.[t]??e?.default??e}const Ym=new Set(["width","height","top","left","right","bottom",...vo]),zk={test:e=>e==="auto",parse:e=>e},Gm=e=>t=>t.test(e),Zm=[ho,ke,On,ar,ME,OE,zk],Xm=e=>Zm.find(Gm(e));function Rk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qh(e):!0}const Bk=new Set(["brightness","contrast","saturate","opacity"]);function Hk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Oc)||[];if(!r)return e;const o=n.replace(r,"");let i=Bk.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Wk=/\b([a-z-]*)\(.*?\)/gu,ru={...sr,getAnimatableNone:e=>{const t=e.match(Wk);return t?t.map(Hk).join(" "):e}},Qm={...ho,transform:Math.round},ou={borderWidth:ke,borderTopWidth:ke,borderRightWidth:ke,borderBottomWidth:ke,borderLeftWidth:ke,borderRadius:ke,radius:ke,borderTopLeftRadius:ke,borderTopRightRadius:ke,borderBottomRightRadius:ke,borderBottomLeftRadius:ke,width:ke,maxWidth:ke,height:ke,maxHeight:ke,top:ke,right:ke,bottom:ke,left:ke,padding:ke,paddingTop:ke,paddingRight:ke,paddingBottom:ke,paddingLeft:ke,margin:ke,marginTop:ke,marginRight:ke,marginBottom:ke,marginLeft:ke,backgroundPositionX:ke,backgroundPositionY:ke,...{rotate:ar,rotateX:ar,rotateY:ar,rotateZ:ar,scale:Ma,scaleX:Ma,scaleY:Ma,scaleZ:Ma,skew:ar,skewX:ar,skewY:ar,distance:ke,translateX:ke,translateY:ke,translateZ:ke,x:ke,y:ke,z:ke,perspective:ke,transformPerspective:ke,opacity:Si,originX:vm,originY:vm,originZ:ke},zIndex:Qm,fillOpacity:Si,strokeOpacity:Si,numOctaves:Qm},qk={...ou,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:ru,WebkitFilter:ru},Jm=e=>qk[e];function eg(e,t){let n=Jm(e);return n!==ru&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Uk=new Set(["auto","none","0"]);function Kk(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!Uk.has(i)&&ki(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=eg(n,o)}class Yk extends Jc{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 l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),_c(c))){const u=Km(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ym.has(r)||t.length!==2)return;const[o,i]=t,a=Xm(o),s=Xm(i);if(a!==s)if($m(a)&&$m(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}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||Rk(t[o]))&&r.push(o);r.length&&Kk(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,a=r[i];r[i]=Vr[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 tg(e,t,n){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)}const ng=(e,t)=>t&&typeof e=="number"?t.transform(e):e,rg=30,Gk=e=>!isNaN(parseFloat(e)),Pi={current:void 0};class Zk{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Gt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();o&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Gk(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ec(!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 Tc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ct.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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 Pi.current&&Pi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rg);return Jh(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 jr(e,t){return new Zk(e,t)}const{schedule:iu}=hm(queueMicrotask,!1),xn={x:!1,y:!1};function og(){return xn.x||xn.y}function Xk(e){return e==="x"||e==="y"?xn[e]?null:(xn[e]=!0,()=>{xn[e]=!1}):xn.x||xn.y?null:(xn.x=xn.y=!0,()=>{xn.x=xn.y=!1})}function ig(e,t){const n=tg(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ag(e){return!(e.pointerType==="touch"||og())}function Qk(e,t,n={}){const[r,o,i]=ig(e,n),a=s=>{if(!ag(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{ag(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const sg=(e,t)=>t?e===t?!0:sg(e,t.parentElement):!1,au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Jk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eC(e){return Jk.has(e.tagName)||e.tabIndex!==-1}const Fa=new WeakSet;function lg(e){return t=>{t.key==="Enter"&&e(t)}}function su(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=lg(()=>{if(Fa.has(n))return;su(n,"down");const o=lg(()=>{su(n,"up")}),i=()=>su(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 cg(e){return au(e)&&!og()}function nC(e,t,n={}){const[r,o,i]=ig(e,n),a=s=>{const l=s.currentTarget;if(!cg(s))return;Fa.add(l);const c=t(l,s),u=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Fa.has(l)&&Fa.delete(l),cg(f)&&typeof c=="function"&&c(f,{success:b})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||sg(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",h,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),tu(s)&&(s.addEventListener("focus",c=>tC(c,o)),!eC(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function lu(e){return Xh(e)&&"ownerSVGElement"in e}function ug(e){return lu(e)&&e.tagName==="svg"}function rC(...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=Om(o,i,a);return t?s(r):s}const Pt=e=>!!(e&&e.getVelocity),oC=[...Zm,Ct,sr],iC=e=>oC.find(Gm(e)),bo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class aC extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=tu(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sC({children:e,isPresent:t,anchorX:n}){const r=S.useId(),o=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(bo);return S.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const h=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
1
+ (function(ne,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):(ne=typeof globalThis<"u"?globalThis:ne||self,S(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,function(ne,S,m,ao){"use strict";function Op(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=Op(S),mi=Op(ao);function Mp(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=Mp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Dp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Mp(e))&&(r&&(r+=" "),r+=t);return r}const Np=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fp=Dp,so=(e,t)=>n=>{var r;if(t?.variants==null)return Fp(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 h=Np(u)||Np(d);return o[c][h]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(b=>{let[g,p]=b;return Array.isArray(p)?p.includes({...i,...s}[g]):{...i,...s}[g]===p})?[...c,d,h]:c},[]);return Fp(e,a,l,n?.class,n?.className)};var Lp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function WS(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 Sl,$p;function lo(){return $p||($p=1,Sl=TypeError),Sl}const qS=WS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Tl,jp;function wa(){if(jp)return Tl;jp=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,h=typeof WeakRef=="function"&&WeakRef.prototype,f=h?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,g=Object.prototype.toString,p=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,M=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function P(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||E.call(/e/,K))return K;var Fe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Qe=W<0?-_(-W):_(W);if(Qe!==W){var ot=String(Qe),Me=y.call(K,ot.length+1);return x.call(ot,Fe,"$&_")+"."+x.call(x.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Fe,"$&_")}var j=qS,N=j.custom,U=le(N)?N:null,R={__proto__:null,double:'"',single:"'"},Z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Tl=function W(K,Fe,Qe,ot){var Me=Fe||{};if(Se(Me,"quoteStyle")&&!Se(R,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Mr=Se(Me,"customInspect")?Me.customInspect:!0;if(typeof Mr!="boolean"&&Mr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var io=Me.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 xe(K,Me);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var cn=String(K);return io?P(K,cn):cn}if(typeof K=="bigint"){var Dr=String(K)+"n";return io?P(K,Dr):Dr}var Tp=typeof Me.depth>"u"?5:Me.depth;if(typeof Qe>"u"&&(Qe=0),Qe>=Tp&&Tp>0&&typeof K=="object")return ee(K)?"[Array]":"[Object]";var pi=qn(Me,Qe);if(typeof ot>"u")ot=[];else if(ve(ot,K)>=0)return"[Circular]";function Pn(hi,wl,_R){if(wl&&(ot=M.call(ot),ot.push(wl)),_R){var HS={depth:Me.depth};return Se(Me,"quoteStyle")&&(HS.quoteStyle=Me.quoteStyle),W(hi,HS,Qe+1,ot)}return W(hi,Me,Qe+1,ot)}if(typeof K=="function"&&!q(K)){var LS=Te(K),VS=An(K,Pn);return"[Function"+(LS?": "+LS:" (anonymous)")+"]"+(VS.length>0?" { "+C.call(VS,", ")+" }":"")}if(le(K)){var $S=I?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):H.call(K);return typeof K=="object"&&!I?Ye($S):$S}if(ce(K)){for(var xa="<"+w.call(String(K.nodeName)),Ep=K.attributes||[],xl=0;xl<Ep.length;xl++)xa+=" "+Ep[xl].name+"="+G(re(Ep[xl].value),"double",Me);return xa+=">",K.childNodes&&K.childNodes.length&&(xa+="..."),xa+="</"+w.call(String(K.nodeName))+">",xa}if(ee(K)){if(K.length===0)return"[]";var kp=An(K,Pn);return pi&&!Yt(kp)?"["+Cn(kp,pi)+"]":"[ "+C.call(kp,", ")+" ]"}if(X(K)){var Cp=An(K,Pn);return!("cause"in Error.prototype)&&"cause"in K&&!$.call(K,"cause")?"{ ["+String(K)+"] "+C.call(k.call("[cause]: "+Pn(K.cause),Cp),", ")+" }":Cp.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call(Cp,", ")+" }"}if(typeof K=="object"&&Mr){if(U&&typeof K[U]=="function"&&j)return j(K,{depth:Tp-Qe});if(Mr!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(Re(K)){var jS=[];return r&&r.call(K,function(hi,wl){jS.push(Pn(wl,K,!0)+" => "+Pn(hi,K))}),xt("Map",n.call(K),jS,pi)}if(L(K)){var zS=[];return s&&s.call(K,function(hi){zS.push(Pn(hi,K))}),xt("Set",a.call(K),zS,pi)}if(de(K))return Lt("WeakMap");if(J(K))return Lt("WeakSet");if(Y(K))return Lt("WeakRef");if(z(K))return Ye(Pn(Number(K)));if(be(K))return Ye(Pn(F.call(K)));if(ae(K))return Ye(b.call(K));if(Q(K))return Ye(Pn(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof Lp<"u"&&K===Lp)return"{ [object globalThis] }";if(!B(K)&&!q(K)){var Ap=An(K,Pn),RS=D?D(K)===Object.prototype:K instanceof Object||K.constructor===Object,Pp=K instanceof Object?"":"null prototype",BS=!RS&&O&&Object(K)===K&&O in K?y.call(Pe(K),8,-1):Pp?"Object":"",IR=RS||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Ip=IR+(BS||Pp?"["+C.call(k.call([],BS||[],Pp||[]),": ")+"] ":"");return Ap.length===0?Ip+"{}":pi?Ip+"{"+Cn(Ap,pi)+"}":Ip+"{ "+C.call(Ap,", ")+" }"}return String(K)};function G(W,K,Fe){var Qe=Fe.quoteStyle||K,ot=R[Qe];return ot+W+ot}function re(W){return x.call(String(W),/"/g,"&quot;")}function te(W){return!O||!(typeof W=="object"&&(O in W||typeof W[O]<"u"))}function ee(W){return Pe(W)==="[object Array]"&&te(W)}function B(W){return Pe(W)==="[object Date]"&&te(W)}function q(W){return Pe(W)==="[object RegExp]"&&te(W)}function X(W){return Pe(W)==="[object Error]"&&te(W)}function Q(W){return Pe(W)==="[object String]"&&te(W)}function z(W){return Pe(W)==="[object Number]"&&te(W)}function ae(W){return Pe(W)==="[object Boolean]"&&te(W)}function le(W){if(I)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!H)return!1;try{return H.call(W),!0}catch{}return!1}function be(W){if(!W||typeof W!="object"||!F)return!1;try{return F.call(W),!0}catch{}return!1}var we=Object.prototype.hasOwnProperty||function(W){return W in this};function Se(W,K){return we.call(W,K)}function Pe(W){return g.call(W)}function Te(W){if(W.name)return W.name;var K=v.call(p.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function ve(W,K){if(W.indexOf)return W.indexOf(K);for(var Fe=0,Qe=W.length;Fe<Qe;Fe++)if(W[Fe]===K)return Fe;return-1}function Re(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.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 Y(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function L(W){if(!a||!W||typeof W!="object")return!1;try{a.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 ce(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function xe(W,K){if(W.length>K.maxStringLength){var Fe=W.length-K.maxStringLength,Qe="... "+Fe+" more character"+(Fe>1?"s":"");return xe(y.call(W,0,K.maxStringLength),K)+Qe}var ot=Z[K.quoteStyle||"single"];ot.lastIndex=0;var Me=x.call(x.call(W,ot,"\\$1"),/[\x00-\x1f]/g,Ne);return G(Me,"single",K)}function Ne(W){var K=W.charCodeAt(0),Fe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Fe?"\\"+Fe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ye(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function xt(W,K,Fe,Qe){var ot=Qe?Cn(Fe,Qe):C.call(Fe,", ");return W+" ("+K+") {"+ot+"}"}function Yt(W){for(var K=0;K<W.length;K++)if(ve(W[K],`
2
+ `)>=0)return!1;return!0}function qn(W,K){var Fe;if(W.indent===" ")Fe=" ";else if(typeof W.indent=="number"&&W.indent>0)Fe=C.call(Array(W.indent+1)," ");else return null;return{base:Fe,prev:C.call(Array(K+1),Fe)}}function Cn(W,K){if(W.length===0)return"";var Fe=`
3
+ `+K.prev+K.base;return Fe+C.call(W,","+Fe)+`
4
+ `+K.prev}function An(W,K){var Fe=ee(W),Qe=[];if(Fe){Qe.length=W.length;for(var ot=0;ot<W.length;ot++)Qe[ot]=Se(W,ot)?K(W[ot],W):""}var Me=typeof V=="function"?V(W):[],Mr;if(I){Mr={};for(var io=0;io<Me.length;io++)Mr["$"+Me[io]]=Me[io]}for(var cn in W)Se(W,cn)&&(Fe&&String(Number(cn))===cn&&cn<W.length||I&&Mr["$"+cn]instanceof Symbol||(E.call(/[^\w$]/,cn)?Qe.push(K(cn,W)+": "+K(W[cn],W)):Qe.push(cn+": "+K(W[cn],W))));if(typeof V=="function")for(var Dr=0;Dr<Me.length;Dr++)$.call(W,Me[Dr])&&Qe.push("["+K(Me[Dr])+"]: "+K(W[Me[Dr]],W));return Qe}return Tl}var El,zp;function US(){if(zp)return El;zp=1;var e=wa(),t=lo(),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 El=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,h=a(l,u);return h&&d&&d===h&&(l=void 0),!!h},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},El}var kl,Rp;function Bp(){return Rp||(Rp=1,kl=Object),kl}var Cl,Hp;function KS(){return Hp||(Hp=1,Cl=Error),Cl}var Al,Wp;function YS(){return Wp||(Wp=1,Al=EvalError),Al}var Pl,qp;function GS(){return qp||(qp=1,Pl=RangeError),Pl}var Il,Up;function ZS(){return Up||(Up=1,Il=ReferenceError),Il}var _l,Kp;function XS(){return Kp||(Kp=1,_l=SyntaxError),_l}var Ol,Yp;function QS(){return Yp||(Yp=1,Ol=URIError),Ol}var Ml,Gp;function JS(){return Gp||(Gp=1,Ml=Math.abs),Ml}var Dl,Zp;function eT(){return Zp||(Zp=1,Dl=Math.floor),Dl}var Nl,Xp;function tT(){return Xp||(Xp=1,Nl=Math.max),Nl}var Fl,Qp;function nT(){return Qp||(Qp=1,Fl=Math.min),Fl}var Ll,Jp;function rT(){return Jp||(Jp=1,Ll=Math.pow),Ll}var Vl,eh;function oT(){return eh||(eh=1,Vl=Math.round),Vl}var $l,th;function iT(){return th||(th=1,$l=Number.isNaN||function(t){return t!==t}),$l}var jl,nh;function aT(){if(nh)return jl;nh=1;var e=iT();return jl=function(n){return e(n)||n===0?n:n<0?-1:1},jl}var zl,rh;function sT(){return rh||(rh=1,zl=Object.getOwnPropertyDescriptor),zl}var Rl,oh;function ih(){if(oh)return Rl;oh=1;var e=sT();if(e)try{e([],"length")}catch{e=null}return Rl=e,Rl}var Bl,ah;function lT(){if(ah)return Bl;ah=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Bl=e,Bl}var Hl,sh;function cT(){return sh||(sh=1,Hl=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}),Hl}var Wl,lh;function uT(){if(lh)return Wl;lh=1;var e=typeof Symbol<"u"&&Symbol,t=cT();return Wl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Wl}var ql,ch;function uh(){return ch||(ch=1,ql=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ql}var Ul,dh;function fh(){if(dh)return Ul;dh=1;var e=Bp();return Ul=e.getPrototypeOf||null,Ul}var Kl,ph;function dT(){if(ph)return Kl;ph=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 h=0;h<c.length;h+=1)u[h+l.length]=c[h];return u},i=function(l,c){for(var u=[],d=c,h=0;d<l.length;d+=1,h+=1)u[h]=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 Kl=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,h=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))},f=n(0,c.length-u.length),b=[],g=0;g<f;g++)b[g]="$"+g;if(d=Function("binder","return function ("+a(b,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var p=function(){};p.prototype=c.prototype,d.prototype=new p,p.prototype=null}return d},Kl}var Yl,hh;function Sa(){if(hh)return Yl;hh=1;var e=dT();return Yl=Function.prototype.bind||e,Yl}var Gl,mh;function Zl(){return mh||(mh=1,Gl=Function.prototype.call),Gl}var Xl,gh;function vh(){return gh||(gh=1,Xl=Function.prototype.apply),Xl}var Ql,yh;function fT(){return yh||(yh=1,Ql=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ql}var Jl,bh;function pT(){if(bh)return Jl;bh=1;var e=Sa(),t=vh(),n=Zl(),r=fT();return Jl=r||e.call(n,t),Jl}var ec,xh;function wh(){if(xh)return ec;xh=1;var e=Sa(),t=lo(),n=Zl(),r=pT();return ec=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},ec}var tc,Sh;function hT(){if(Sh)return tc;Sh=1;var e=wh(),t=ih(),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 tc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,tc}var nc,Th;function mT(){if(Th)return nc;Th=1;var e=uh(),t=fh(),n=hT();return nc=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,nc}var rc,Eh;function gT(){if(Eh)return rc;Eh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Sa();return rc=n.call(e,t),rc}var oc,kh;function ic(){if(kh)return oc;kh=1;var e,t=Bp(),n=KS(),r=YS(),o=GS(),i=ZS(),a=XS(),s=lo(),l=QS(),c=JS(),u=eT(),d=tT(),h=nT(),f=rT(),b=oT(),g=aT(),p=Function,v=function(q){try{return p('"use strict"; return ('+q+").constructor;")()}catch{}},y=ih(),x=lT(),T=function(){throw new s},w=y?function(){try{return arguments.callee,T}catch{try{return y(arguments,"callee").get}catch{return T}}}():T,E=uT()(),k=mT(),C=fh(),M=uh(),_=vh(),F=Zl(),V={},H=typeof Uint8Array>"u"||!k?e:k(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&k?k([][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%":p,"%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%":E&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":y,"%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"||!E||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&k?k(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":H,"%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%":h,"%Math.pow%":f,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":M};if(k)try{null.error}catch(q){var O=k(k(q));I["%Error.prototype%"]=O}var $=function q(X){var Q;if(X==="%AsyncFunction%")Q=v("async function () {}");else if(X==="%GeneratorFunction%")Q=v("function* () {}");else if(X==="%AsyncGeneratorFunction%")Q=v("async function* () {}");else if(X==="%AsyncGenerator%"){var z=q("%AsyncGeneratorFunction%");z&&(Q=z.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ae=q("%AsyncGenerator%");ae&&k&&(Q=k(ae.prototype))}return I[X]=Q,Q},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"]},P=Sa(),j=gT(),N=P.call(F,Array.prototype.concat),U=P.call(_,Array.prototype.splice),R=P.call(F,String.prototype.replace),Z=P.call(F,String.prototype.slice),G=P.call(F,RegExp.prototype.exec),re=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,te=/\\(\\)?/g,ee=function(X){var Q=Z(X,0,1),z=Z(X,-1);if(Q==="%"&&z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&Q!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ae=[];return R(X,re,function(le,be,we,Se){ae[ae.length]=we?R(Se,te,"$1"):be||le}),ae},B=function(X,Q){var z=X,ae;if(j(D,z)&&(ae=D[z],z="%"+ae[0]+"%"),j(I,z)){var le=I[z];if(le===V&&(le=$(z)),typeof le>"u"&&!Q)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ae,name:z,value:le}}throw new a("intrinsic "+X+" does not exist!")};return oc=function(X,Q){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!="boolean")throw new s('"allowMissing" argument must be a boolean');if(G(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=ee(X),ae=z.length>0?z[0]:"",le=B("%"+ae+"%",Q),be=le.name,we=le.value,Se=!1,Pe=le.alias;Pe&&(ae=Pe[0],U(z,N([0,1],Pe)));for(var Te=1,ve=!0;Te<z.length;Te+=1){var Re=z[Te],de=Z(Re,0,1),Y=Z(Re,-1);if((de==='"'||de==="'"||de==="`"||Y==='"'||Y==="'"||Y==="`")&&de!==Y)throw new a("property names with quotes must have matching quotes");if((Re==="constructor"||!ve)&&(Se=!0),ae+="."+Re,be="%"+ae+"%",j(I,be))we=I[be];else if(we!=null){if(!(Re in we)){if(!Q)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(y&&Te+1>=z.length){var L=y(we,Re);ve=!!L,ve&&"get"in L&&!("originalValue"in L.get)?we=L.get:we=we[Re]}else ve=j(we,Re),we=we[Re];ve&&!Se&&(I[be]=we)}}return we},oc}var ac,Ch;function Ah(){if(Ch)return ac;Ch=1;var e=ic(),t=wh(),n=t([e("%String.prototype.indexOf%")]);return ac=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},ac}var sc,Ph;function Ih(){if(Ph)return sc;Ph=1;var e=ic(),t=Ah(),n=wa(),r=lo(),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 sc=!!o&&function(){var d,h={assert:function(f){if(!h.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var b=l(d,f);return c(d)===0&&(d=void 0),b}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,b){d||(d=new o),a(d,f,b)}};return h},sc}var lc,_h;function vT(){if(_h)return lc;_h=1;var e=ic(),t=Ah(),n=wa(),r=Ih(),o=lo(),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 lc=i?function(){var d,h,f={assert:function(b){if(!f.has(b))throw new o("Side channel does not contain "+n(b))},delete:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(d)return c(d,b)}else if(r&&h)return h.delete(b);return!1},get:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?a(d,b):h&&h.get(b)},has:function(b){return i&&b&&(typeof b=="object"||typeof b=="function")&&d?l(d,b):!!h&&h.has(b)},set:function(b,g){i&&b&&(typeof b=="object"||typeof b=="function")?(d||(d=new i),s(d,b,g)):r&&(h||(h=r()),h.set(b,g))}};return f}:r,lc}var cc,Oh;function yT(){if(Oh)return cc;Oh=1;var e=lo(),t=wa(),n=US(),r=Ih(),o=vT(),i=o||r||n;return cc=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},cc}var Mh=e=>Array.isArray(e),uc=e=>e===void 0,dc=e=>e===null,bT=Function.bind.call(Function.call,Object.prototype.toString),xT=e=>!!e&&bT(e)==="[object Error]"||e instanceof Error,Dh=(e,t)=>e instanceof t,wT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},ST=e=>Object.prototype.toString.call(e)==="[object Date]"&&Dh(e,Date),$e={array:Mh,date:ST,empty:e=>dc(e)||uc(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:Dh,isError:xT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>dc(e)||uc(e),null:dc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Mh(e)&&typeof e=="object",primitive:wT,string:e=>typeof e=="string",undefined:uc},TT=e=>Object.keys(e),In=(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},ET=e=>e.replace(/[^0-9]/g,"");const fc="-",kT=e=>{const t=AT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(fc);return s[0]===""&&s.length!==1&&s.shift(),Nh(s,t)||CT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Nh=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Nh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(fc);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Fh=/^\[(.+)\]$/,CT=e=>{if(Fh.test(e)){const t=Fh.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},AT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)pc(n[o],r,o,t);return r},pc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Lh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(PT(o)){pc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{pc(a,Lh(t,i),n,r)})})},Lh=(e,t)=>{let n=e;return t.split(fc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PT=e=>e.isThemeGetter,IT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},hc="!",mc=":",_T=mc.length,OT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&s===0){if(g===mc){i.push(o.slice(l,b)),l=b+_T;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=MT(u),h=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+mc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},MT=e=>e.endsWith(hc)?e.substring(0,e.length-1):e.startsWith(hc)?e.substring(1):e,DT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},NT=e=>({cache:IT(e.cacheSize),parseClassName:OT(e),sortModifiers:DT(e),...kT(e)}),FT=/\s+/,LT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(FT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:h,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let p=!!g,v=r(p?b.substring(0,g):b);if(!v){if(!p){l=u+(l.length>0?" "+l:l);continue}if(v=r(b),!v){l=u+(l.length>0?" "+l:l);continue}p=!1}const y=i(h).join(":"),x=f?y+hc:y,T=x+v;if(a.includes(T))continue;a.push(T);const w=o(v,p);for(let E=0;E<w.length;++E){const k=w[E];a.push(x+k)}l=u+(l.length>0?" "+l:l)}return l};function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Vh(t))&&(r&&(r+=" "),r+=n);return r}const Vh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Vh(e[r]))&&(n&&(n+=" "),n+=t);return n};function $T(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=NT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=LT(l,n);return o(l,u),u}return function(){return i(VT.apply(null,arguments))}}const At=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$h=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jT=/^\d+\/\d+$/,zT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RT=/\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$/,BT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,co=e=>jT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),or=e=>!!e&&Number.isInteger(Number(e)),gc=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Un=e=>zT.test(e),qT=()=>!0,UT=e=>RT.test(e)&&!BT.test(e),zh=()=>!1,KT=e=>HT.test(e),YT=e=>WT.test(e),GT=e=>!pe(e)&&!he(e),ZT=e=>uo(e,qh,zh),pe=e=>$h.test(e),Nr=e=>uo(e,Uh,UT),vc=e=>uo(e,tE,Le),Rh=e=>uo(e,Hh,zh),XT=e=>uo(e,Wh,YT),Ta=e=>uo(e,Kh,KT),he=e=>jh.test(e),gi=e=>fo(e,Uh),QT=e=>fo(e,nE),Bh=e=>fo(e,Hh),JT=e=>fo(e,qh),eE=e=>fo(e,Wh),Ea=e=>fo(e,Kh,!0),uo=(e,t,n)=>{const r=$h.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fo=(e,t,n=!1)=>{const r=jh.exec(e);return r?r[1]?t(r[1]):n:!1},Hh=e=>e==="position"||e==="percentage",Wh=e=>e==="image"||e==="url",qh=e=>e==="length"||e==="size"||e==="bg-size",Uh=e=>e==="length",tE=e=>e==="number",nE=e=>e==="family-name",Kh=e=>e==="shadow",rE=$T(()=>{const e=At("color"),t=At("font"),n=At("text"),r=At("font-weight"),o=At("tracking"),i=At("leading"),a=At("breakpoint"),s=At("container"),l=At("spacing"),c=At("radius"),u=At("shadow"),d=At("inset-shadow"),h=At("text-shadow"),f=At("drop-shadow"),b=At("blur"),g=At("perspective"),p=At("aspect"),v=At("ease"),y=At("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"],w=()=>[...T(),he,pe],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[he,pe,l],M=()=>[co,"full","auto",...C()],_=()=>[or,"none","subgrid",he,pe],F=()=>["auto",{span:["full",or,he,pe]},or,he,pe],V=()=>[or,"auto",he,pe],H=()=>["auto","min","max","fr",he,pe],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...C()],D=()=>[co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],P=()=>[e,he,pe],j=()=>[...T(),Bh,Rh,{position:[he,pe]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",JT,ZT,{size:[he,pe]}],R=()=>[gc,gi,Nr],Z=()=>["","none","full",c,he,pe],G=()=>["",Le,gi,Nr],re=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Le,gc,Bh,Rh],B=()=>["","none",b,he,pe],q=()=>["none",Le,he,pe],X=()=>["none",Le,he,pe],Q=()=>[Le,he,pe],z=()=>[co,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[qT],container:[Un],"drop-shadow":[Un],ease:["in","out","in-out"],font:[GT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Un],shadow:[Un],spacing:["px",Le],text:[Un],"text-shadow":[Un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",co,pe,he,p]}],container:["container"],columns:[{columns:[Le,pe,he,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:w()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",he,pe]}],basis:[{basis:[co,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,co,"auto","initial","none",pe]}],grow:[{grow:["",Le,he,pe]}],shrink:[{shrink:["",Le,he,pe]}],order:[{order:[or,"first","last","none",he,pe]}],"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":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],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:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...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,gi,Nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,he,vc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gc,pe]}],"font-family":[{font:[QT,pe,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,he,pe]}],"line-clamp":[{"line-clamp":[Le,"none",he,vc]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",he,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",he,Nr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Le,"auto",he,pe]}],"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",he,pe]}],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",he,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,he,pe],radial:["",he,pe],conic:[or,he,pe]},eE,XT]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,he,pe]}],"outline-w":[{outline:["",Le,gi,Nr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,Ea,Ta]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,Ea,Ta]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Le,Nr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",h,Ea,Ta]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Le,he,pe]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[Le]}],"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":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"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":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"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":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"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":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"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":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"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":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"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":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[he,pe]}],"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":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":[Le]}],"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":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,pe]}],filter:[{filter:["","none",he,pe]}],blur:[{blur:B()}],brightness:[{brightness:[Le,he,pe]}],contrast:[{contrast:[Le,he,pe]}],"drop-shadow":[{"drop-shadow":["","none",f,Ea,Ta]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Le,he,pe]}],"hue-rotate":[{"hue-rotate":[Le,he,pe]}],invert:[{invert:["",Le,he,pe]}],saturate:[{saturate:[Le,he,pe]}],sepia:[{sepia:["",Le,he,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",he,pe]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[Le,he,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,he,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,he,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,he,pe]}],"backdrop-invert":[{"backdrop-invert":["",Le,he,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,he,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,he,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,he,pe]}],"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",he,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",he,pe]}],ease:[{ease:["linear","initial",v,he,pe]}],delay:[{delay:[Le,he,pe]}],animate:[{animate:["none",y,he,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,he,pe]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[he,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",he,pe]}],"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",he,pe]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Le,gi,Nr,vc]}],stroke:[{stroke:["none",...P()]}],"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"]}}),Kn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},oE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),yc=e=>$e.function(e),ke=(...e)=>rE(Dp(e)),Yh=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},vi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Gh=e=>e.scrollHeight>e.clientHeight,yi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},iE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},aE="span",un=S.forwardRef(function(t,n){const r=t.as||aE;return m.jsx(r,{ref:n,...t,as:void 0})}),sE=so("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-2 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 border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ka=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(un,{...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:ke(sE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),ir=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t};function lE(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 cE=({children:e,...t})=>{const n=ir(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:lE(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})},uE={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"},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"}},dE=so("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"}}}),fE=so("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:uE,defaultVariants:{theme:"primary",size:"default"}}),Ca=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return m.jsxs(un,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:ke(fE({size:a,theme:i}),t),children:[n?m.jsx("span",{"aria-hidden":"true",className:dE({theme:n})}):null,r,s.children]})}),bi=S.createContext({});function bn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const bc=typeof window<"u",Aa=bc?S.useLayoutEffect:S.useEffect,Pa=S.createContext(null);function xc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ia(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function pE([...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 Yn=(e,t,n)=>n>t?t:n<e?e:n;let po=()=>{},en=()=>{};process.env.NODE_ENV!=="production"&&(po=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},en=(e,t)=>{if(!e)throw new Error(t)});const Gn={},Zh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xh(e){return typeof e=="object"&&e!==null}const Qh=e=>/^0[^.\s]+$/u.test(e);function wc(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,hE=(e,t)=>n=>t(e(n)),xi=(...e)=>e.reduce(hE),ho=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Sc{constructor(){this.subscriptions=[]}add(t){return xc(this.subscriptions,t),()=>Ia(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 fn=e=>e*1e3,_n=e=>e/1e3;function Jh(e,t){return t?e*(1e3/t):0}const em=new Set;function Tc(e,t,n){e||em.has(t)||(console.warn(t),em.add(t))}const mE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},tm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gE=1e-7,vE=12;function yE(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=tm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>gE&&++s<vE);return a}function wi(e,t,n,r){if(e===t&&n===r)return dn;const o=i=>yE(i,0,1,e,n);return i=>i===0||i===1?i:tm(o(i),t,r)}const nm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rm=e=>t=>1-e(1-t),om=wi(.33,1.53,.69,.99),Ec=rm(om),im=nm(Ec),am=e=>(e*=2)<1?.5*Ec(e):.5*(2-Math.pow(2,-10*(e-1))),kc=e=>1-Math.sin(Math.acos(e)),sm=rm(kc),lm=nm(kc),bE=wi(.42,0,1,1),xE=wi(0,0,.58,1),cm=wi(.42,0,.58,1),um=e=>Array.isArray(e)&&typeof e[0]!="number";function dm(e,t){return um(e)?e[mE(0,e.length,t)]:e}const fm=e=>Array.isArray(e)&&typeof e[0]=="number",pm={linear:dn,easeIn:bE,easeInOut:cm,easeOut:xE,circIn:kc,circInOut:lm,circOut:sm,backIn:Ec,backInOut:im,backOut:om,anticipate:am},wE=e=>typeof e=="string",Cc=e=>{if(fm(e)){en(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return wi(t,n,r,o)}else if(wE(e))return en(pm[e]!==void 0,`Invalid easing type '${e}'`),pm[e];return e},_a=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function SE(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,h=!1)=>{const b=h&&o?n:r;return d&&a.add(u),b.has(u)||b.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 TE=40;function hm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=_a.reduce((x,T)=>(x[T]=SE(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:b}=a,g=()=>{const x=Gn.useManualTiming?o.timestamp:performance.now();n=!1,Gn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,TE),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),f.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},p=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:_a.reduce((x,T)=>{const w=a[T];return x[T]=(E,k=!1,C=!1)=>(n||p(),w.schedule(E,k,C)),x},{}),cancel:x=>{for(let T=0;T<_a.length;T++)a[_a[T]].cancel(x)},state:o,steps:a}}const{schedule:ct,cancel:Zn,state:Vt,steps:Ac}=hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let Oa;function EE(){Oa=void 0}const Gt={now:()=>(Oa===void 0&&Gt.set(Vt.isProcessing||Gn.useManualTiming?Vt.timestamp:performance.now()),Oa),set:e=>{Oa=e,queueMicrotask(EE)}},mm=e=>t=>typeof t=="string"&&t.startsWith(e),Pc=mm("--"),kE=mm("var(--"),Ic=e=>kE(e)?CE.test(e.split("/*")[0].trim()):!1,CE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Si={...mo,transform:e=>Yn(0,1,e)},Ma={...mo,default:1},Ti=e=>Math.round(e*1e5)/1e5,_c=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AE(e){return e==null}const PE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Oc=(e,t)=>n=>!!(typeof n=="string"&&PE.test(n)&&n.startsWith(e)||t&&!AE(n)&&Object.prototype.hasOwnProperty.call(n,t)),gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(_c);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},IE=e=>Yn(0,255,e),Mc={...mo,transform:e=>Math.round(IE(e))},Fr={test:Oc("rgb","red"),parse:gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mc.transform(e)+", "+Mc.transform(t)+", "+Mc.transform(n)+", "+Ti(Si.transform(r))+")"};function _E(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 Dc={test:Oc("#"),parse:_E,transform:Fr.transform},Ei=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ar=Ei("deg"),On=Ei("%"),Ee=Ei("px"),OE=Ei("vh"),ME=Ei("vw"),vm={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},go={test:Oc("hsl","hue"),parse:gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Ti(t))+", "+On.transform(Ti(n))+", "+Ti(Si.transform(r))+")"},Ct={test:e=>Fr.test(e)||Dc.test(e)||go.test(e),parse:e=>Fr.test(e)?Fr.parse(e):go.test(e)?go.parse(e):Dc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):go.transform(e),getAnimatableNone:e=>{const t=Ct.parse(e);return t.alpha=0,Ct.transform(t)}},DE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function NE(e){return isNaN(e)&&typeof e=="string"&&(e.match(_c)?.length||0)+(e.match(DE)?.length||0)>0}const ym="number",bm="color",FE="var",LE="var(",xm="${}",VE=/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 ki(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(VE,l=>(Ct.test(l)?(r.color.push(i),o.push(bm),n.push(Ct.parse(l))):l.startsWith(LE)?(r.var.push(i),o.push(FE),n.push(l)):(r.number.push(i),o.push(ym),n.push(parseFloat(l))),++i,xm)).split(xm);return{values:n,split:s,indexes:r,types:o}}function wm(e){return ki(e).values}function Sm(e){const{split:t,types:n}=ki(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===ym?i+=Ti(o[a]):s===bm?i+=Ct.transform(o[a]):i+=o[a]}return i}}const $E=e=>typeof e=="number"?0:Ct.test(e)?Ct.getAnimatableNone(e):e;function jE(e){const t=wm(e);return Sm(e)(t.map($E))}const sr={test:NE,parse:wm,createTransformer:Sm,getAnimatableNone:jE};function Nc(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 zE({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=Nc(l,s,e+1/3),i=Nc(l,s,e),a=Nc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Da(e,t){return n=>n>0?t:e}const ut=(e,t,n)=>e+(t-e)*n,Fc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},RE=[Dc,Fr,go],BE=e=>RE.find(t=>t.test(e));function Tm(e){const t=BE(e);if(po(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===go&&(n=zE(n)),n}const Em=(e,t)=>{const n=Tm(e),r=Tm(t);if(!n||!r)return Da(e,t);const o={...n};return i=>(o.red=Fc(n.red,r.red,i),o.green=Fc(n.green,r.green,i),o.blue=Fc(n.blue,r.blue,i),o.alpha=ut(n.alpha,r.alpha,i),Fr.transform(o))},Lc=new Set(["none","hidden"]);function HE(e,t){return Lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function WE(e,t){return n=>ut(e,t,n)}function Vc(e){return typeof e=="number"?WE:typeof e=="string"?Ic(e)?Da:Ct.test(e)?Em:KE:Array.isArray(e)?km:typeof e=="object"?Ct.test(e)?Em:qE:Da}function km(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Vc(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function qE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Vc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function UE(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 KE=(e,t)=>{const n=sr.createTransformer(t),r=ki(e),o=ki(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?Lc.has(e)&&!o.values.length||Lc.has(t)&&!r.values.length?HE(e,t):xi(km(UE(r,o),o.values),n):(po(!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.`),Da(e,t))};function Cm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ut(e,t,n):Vc(e)(e,t)}const YE=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ct.update(t,n),stop:()=>Zn(t),now:()=>Vt.isProcessing?Vt.timestamp:Gt.now()}},Am=(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)})`},Na=2e4;function $c(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Na;)t+=n,r=e.next(t);return t>=Na?1/0:t}function Pm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min($c(r),Na);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:_n(o)}}const GE=5;function Im(e,t,n){const r=Math.max(t-GE,0);return Jh(n-e(r),t-r)}const ht={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},jc=.001;function ZE({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;po(e<=fn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Yn(ht.minDamping,ht.maxDamping,a),e=Yn(ht.minDuration,ht.maxDuration,_n(e)),a<1?(o=c=>{const u=c*a,d=u*e,h=u-n,f=zc(c,a),b=Math.exp(-d);return jc-h/f*b},i=c=>{const d=c*a*e,h=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,b=Math.exp(-d),g=zc(Math.pow(c,2),a);return(-o(c)+jc>0?-1:1)*((h-f)*b)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-jc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=QE(o,i,s);if(e=fn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const XE=12;function QE(e,t,n){let r=n;for(let o=1;o<XE;o++)r=r-e(r)/t(r);return r}function zc(e,t){return e*Math.sqrt(1-t*t)}const JE=["duration","bounce"],ek=["stiffness","damping","mass"];function _m(e,t){return t.some(n=>e[n]!==void 0)}function tk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!_m(e,ek)&&_m(e,JE))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Yn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=ZE(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Ci(e=ht.visualDuration,t=ht.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:h,isResolvedFromDuration:f}=tk({...n,velocity:-_n(n.velocity||0)}),b=h||0,g=c/(2*Math.sqrt(l*u)),p=a-i,v=_n(Math.sqrt(l/u)),y=Math.abs(p)<5;r||(r=y?ht.restSpeed.granular:ht.restSpeed.default),o||(o=y?ht.restDelta.granular:ht.restDelta.default);let x;if(g<1){const w=zc(v,g);x=E=>{const k=Math.exp(-g*v*E);return a-k*((b+g*v*p)/w*Math.sin(w*E)+p*Math.cos(w*E))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(p+(b+v*p)*w);else{const w=v*Math.sqrt(g*g-1);x=E=>{const k=Math.exp(-g*v*E),C=Math.min(w*E,300);return a-k*((b+g*v*p)*Math.sinh(C)+w*p*Math.cosh(C))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const E=x(w);if(f)s.done=w>=d;else{let k=w===0?b:0;g<1&&(k=w===0?fn(b):Im(x,w,E));const C=Math.abs(k)<=r,M=Math.abs(a-E)<=o;s.done=C&&M}return s.value=s.done?a:E,s},toString:()=>{const w=Math.min($c(T),Na),E=Am(k=>T.next(w*k).value,w,30);return w+"ms "+E},toTransition:()=>{}};return T}Ci.applyToOptions=e=>{const t=Pm(e,100,Ci);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};function Rc({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],h={done:!1,value:d},f=C=>s!==void 0&&C<s||l!==void 0&&C>l,b=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const p=d+g,v=a===void 0?p:a(p);v!==p&&(g=v-d);const y=C=>-g*Math.exp(-C/r),x=C=>v+y(C),T=C=>{const M=y(C),_=x(C);h.done=Math.abs(M)<=c,h.value=h.done?v:_};let w,E;const k=C=>{f(h.value)&&(w=C,E=Ci({keyframes:[h.value,b(h.value)],velocity:Im(x,C,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let M=!1;return!E&&w===void 0&&(M=!0,T(C),k(C)),w!==void 0&&C>=w?E.next(C-w):(!M&&T(C),h)}}}function nk(e,t,n){const r=[],o=n||Gn.mix||Cm,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]||dn:t;s=xi(l,s)}r.push(s)}return r}function Om(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(en(i===t.length,"Both input and output ranges must be the same 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=nk(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 h=ho(e[d],e[d+1],u);return s[d](h)};return n?u=>c(Yn(e[0],e[i-1],u)):c}function Mm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ho(0,t,r);e.push(ut(n,1,o))}}function Dm(e){const t=[0];return Mm(t,e.length-1),t}function rk(e,t){return e.map(n=>n*t)}function ok(e,t){return e.map(()=>t||cm).splice(0,e.length-1)}function vo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=um(r)?r.map(Cc):Cc(r),i={done:!1,value:t[0]},a=rk(n&&n.length===t.length?n:Dm(t),e),s=Om(a,t,{ease:Array.isArray(o)?o:ok(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const ik=e=>e!==null;function Bc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(ik),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const ak={decay:Rc,inertia:Rc,tween:vo,keyframes:vo,spring:Ci};function Nm(e){typeof e.type=="string"&&(e.type=ak[e.type])}class Hc{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 sk=e=>e/100;class Wc extends Hc{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!==Gt.now()&&this.tick(Gt.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;Nm(t);const{type:n=vo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||vo;process.env.NODE_ENV!=="production"&&l!==vo&&en(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==vo&&typeof s[0]!="number"&&(this.mixKeyframes=xi(sk,Cm(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=$c(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:h,repeatDelay:f,type:b,onUpdate:g,finalKeyframe:p}=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),y=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 C=Math.min(this.currentTime,o)/s;let M=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(h==="reverse"?(_=1-_,f&&(_-=f/s)):h==="mirror"&&(T=a)),x=Yn(0,1,_)*s}const w=y?{done:!1,value:u[0]}:T.next(x);i&&(w.value=i(w.value));let{done:E}=w;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&b!==Rc&&(w.value=Bc(u,this.options,p,this.speed)),g&&g(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return _n(this.calculatedDuration)}get time(){return _n(this.currentTime)}set time(t){t=fn(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(Gt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_n(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=YE,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(Gt.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 lk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Lr=e=>e*180/Math.PI,qc=e=>{const t=Lr(Math.atan2(e[1],e[0]));return Uc(t)},ck={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qc,rotateZ:qc,skewX:e=>Lr(Math.atan(e[1])),skewY:e=>Lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uc=e=>(e=e%360,e<0&&(e+=360),e),Fm=qc,Lm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lm,scaleY:Vm,scale:e=>(Lm(e)+Vm(e))/2,rotateX:e=>Uc(Lr(Math.atan2(e[6],e[5]))),rotateY:e=>Uc(Lr(Math.atan2(-e[2],e[0]))),rotateZ:Fm,rotate:Fm,skewX:e=>Lr(Math.atan(e[4])),skewY:e=>Lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Kc(e){return e.includes("scale")?1:0}function Yc(e,t){if(!e||e==="none")return Kc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=uk,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ck,o=s}if(!o)return Kc(t);const i=r[t],a=o[1].split(",").map(fk);return typeof i=="function"?i(a):a[i]}const dk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Yc(n,t)};function fk(e){return parseFloat(e.trim())}const yo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bo=new Set(yo),$m=e=>e===mo||e===Ee,pk=new Set(["x","y","z"]),hk=yo.filter(e=>!pk.has(e));function mk(e){const t=[];return hk.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})=>Yc(t,"x"),y:(e,{transform:t})=>Yc(t,"y")};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const $r=new Set;let Gc=!1,Zc=!1,Xc=!1;function jm(){if(Zc){const e=Array.from($r).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=mk(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)})}Zc=!1,Gc=!1,$r.forEach(e=>e.complete(Xc)),$r.clear()}function zm(){$r.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zc=!0)})}function gk(){Xc=!0,zm(),jm(),Xc=!1}class Qc{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?($r.add(this),Gc||(Gc=!0,ct.read(zm),ct.resolveKeyframes(jm))):(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])}lk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$r.delete(this)}cancel(){this.state==="scheduled"&&($r.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vk=e=>e.startsWith("--");function yk(e,t,n){vk(t)?e.style.setProperty(t,n):e.style[t]=n}const bk=wc(()=>window.ScrollTimeline!==void 0),xk={};function wk(e,t){const n=wc(e);return()=>xk[t]??n()}const Rm=wk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ai=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ai([0,.65,.55,1]),circOut:Ai([.55,0,1,.45]),backIn:Ai([.31,.01,.66,-.59]),backOut:Ai([.33,1.53,.69,.99])};function Hm(e,t){if(e)return typeof e=="function"?Rm()?Am(e,t):"ease-out":fm(e)?Ai(e):Array.isArray(e)?e.map(n=>Hm(n,t)||Bm.easeOut):Bm[e]}function Sk(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=Hm(s,o);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function Jc(e){return typeof e=="function"&&"applyToOptions"in e}function Tk({type:e,...t}){return Jc(e)&&Rm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ek extends Hc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!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,en(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=Tk(t);this.animation=Sk(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Bc(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):yk(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(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 _n(Number(t))}get time(){return _n(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fn(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&bk()?(this.animation.timeline=t,dn):n(this)}}const Wm={anticipate:am,backInOut:im,circInOut:lm};function kk(e){return e in Wm}function Ck(e){typeof e.ease=="string"&&kk(e.ease)&&(e.ease=Wm[e.ease])}const qm=10;class Ak extends Ek{constructor(t){Ck(t),Nm(t),super(t),t.startTime&&(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 Wc({...a,autoplay:!1}),l=fn(this.finishedTime??this.time);n.setWithVelocity(s.sample(l-qm).value,s.sample(l).value,qm),s.stop()}}const Um=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function Pk(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 Ik(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=Um(o,t),s=Um(i,t);return po(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:Pk(e)||(n==="spring"||Jc(n))&&r}function eu(e){return Xh(e)&&"offsetHeight"in e}const _k=new Set(["opacity","clipPath","filter","transform"]),Ok=wc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Mk(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!eu(t?.owner?.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return Ok()&&n&&_k.has(n)&&(n!=="transform"||!l)&&!s&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const Dk=40;class Nk extends Hc{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=Gt.now();const h={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=u?.KeyframeResolver||Qc;this.keyframeResolver=new f(s,(b,g,p)=>this.onKeyframesResolved(b,g,h,!p),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=Gt.now(),Ik(t,i,a,s)||((Gn.instantAnimations||!l)&&u?.(Bc(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const h={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Dk?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},f=!c&&Mk(h)?new Ak({...h,element:h.motionValue.owner.current}):new Wc(h);f.finished.then(()=>this.notifyFinished()).catch(dn),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),gk()),this._animation}get duration(){return this.animation.duration}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 Fk{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(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Lk extends Fk{then(t,n){return this.finished.finally(t).then(()=>{})}}const Vk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $k(e){const t=Vk.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const jk=4;function Km(e,t,n=1){en(n<=jk,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=$k(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return Zh(a)?parseFloat(a):a}return Ic(o)?Km(o,t,n+1):o}function tu(e,t){return e?.[t]??e?.default??e}const Ym=new Set(["width","height","top","left","right","bottom",...yo]),zk={test:e=>e==="auto",parse:e=>e},Gm=e=>t=>t.test(e),Zm=[mo,Ee,On,ar,ME,OE,zk],Xm=e=>Zm.find(Gm(e));function Rk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qh(e):!0}const Bk=new Set(["brightness","contrast","saturate","opacity"]);function Hk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_c)||[];if(!r)return e;const o=n.replace(r,"");let i=Bk.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Wk=/\b([a-z-]*)\(.*?\)/gu,nu={...sr,getAnimatableNone:e=>{const t=e.match(Wk);return t?t.map(Hk).join(" "):e}},Qm={...mo,transform:Math.round},ru={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius: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,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:ar,rotateX:ar,rotateY:ar,rotateZ:ar,scale:Ma,scaleX:Ma,scaleY:Ma,scaleZ:Ma,skew:ar,skewX:ar,skewY:ar,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:Si,originX:vm,originY:vm,originZ:Ee},zIndex:Qm,fillOpacity:Si,strokeOpacity:Si,numOctaves:Qm},qk={...ru,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:nu,WebkitFilter:nu},Jm=e=>qk[e];function eg(e,t){let n=Jm(e);return n!==nu&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Uk=new Set(["auto","none","0"]);function Kk(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!Uk.has(i)&&ki(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=eg(n,o)}class Yk extends Qc{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 l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ic(c))){const u=Km(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ym.has(r)||t.length!==2)return;const[o,i]=t,a=Xm(o),s=Xm(i);if(a!==s)if($m(a)&&$m(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}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||Rk(t[o]))&&r.push(o);r.length&&Kk(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,a=r[i];r[i]=Vr[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 tg(e,t,n){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)}const ng=(e,t)=>t&&typeof e=="number"?t.transform(e):e,rg=30,Gk=e=>!isNaN(parseFloat(e)),Pi={current:void 0};class Zk{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Gt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();o&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Gk(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Tc(!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 Sc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ct.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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 Pi.current&&Pi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rg);return Jh(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 jr(e,t){return new Zk(e,t)}const{schedule:ou}=hm(queueMicrotask,!1),xn={x:!1,y:!1};function og(){return xn.x||xn.y}function Xk(e){return e==="x"||e==="y"?xn[e]?null:(xn[e]=!0,()=>{xn[e]=!1}):xn.x||xn.y?null:(xn.x=xn.y=!0,()=>{xn.x=xn.y=!1})}function ig(e,t){const n=tg(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ag(e){return!(e.pointerType==="touch"||og())}function Qk(e,t,n={}){const[r,o,i]=ig(e,n),a=s=>{if(!ag(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{ag(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const sg=(e,t)=>t?e===t?!0:sg(e,t.parentElement):!1,iu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Jk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eC(e){return Jk.has(e.tagName)||e.tabIndex!==-1}const Fa=new WeakSet;function lg(e){return t=>{t.key==="Enter"&&e(t)}}function au(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=lg(()=>{if(Fa.has(n))return;au(n,"down");const o=lg(()=>{au(n,"up")}),i=()=>au(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 cg(e){return iu(e)&&!og()}function nC(e,t,n={}){const[r,o,i]=ig(e,n),a=s=>{const l=s.currentTarget;if(!cg(s))return;Fa.add(l);const c=t(l,s),u=(f,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Fa.has(l)&&Fa.delete(l),cg(f)&&typeof c=="function"&&c(f,{success:b})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||sg(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",h,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),eu(s)&&(s.addEventListener("focus",c=>tC(c,o)),!eC(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function su(e){return Xh(e)&&"ownerSVGElement"in e}function ug(e){return su(e)&&e.tagName==="svg"}function rC(...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=Om(o,i,a);return t?s(r):s}const Pt=e=>!!(e&&e.getVelocity),oC=[...Zm,Ct,sr],iC=e=>oC.find(Gm(e)),xo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class aC extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=eu(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sC({children:e,isPresent:t,anchorX:n}){const r=S.useId(),o=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(xo);return S.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const h=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
5
5
  [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
@@ -9,7 +9,7 @@
9
9
  ${h}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),m.jsx(aC,{isPresent:t,childRef:o,sizeRef:i,children:A.cloneElement(e,{ref:o})})}const lC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(cC),c=S.useId();let u=!0,d=S.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:h=>{l.set(h,!0);for(const f of l.values())if(!f)return;r&&r()},register:h=>(l.set(h,!1),()=>l.delete(h))}),[n,l,r]);return i&&u&&(d={...d}),S.useMemo(()=>{l.forEach((h,f)=>l.set(f,!1))},[n]),A.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(sC,{isPresent:n,anchorX:s,children:e})),m.jsx(Pa.Provider,{value:d,children:e})};function cC(){return new Map}function dg(e=!0){const t=S.useContext(Pa);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 La=e=>e.key||"";function fg(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Xn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=dg(a),u=S.useMemo(()=>fg(e),[e]),d=a&&!l?[]:u.map(La),h=S.useRef(!0),f=S.useRef(u),b=bn(()=>new Map),[g,p]=S.useState(u),[v,y]=S.useState(u);Aa(()=>{h.current=!1,f.current=u;for(let w=0;w<v.length;w++){const T=La(v[w]);d.includes(T)?b.delete(T):b.get(T)!==!0&&b.set(T,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let T=0;T<v.length;T++){const k=v[T],C=La(k);d.includes(C)||(w.splice(T,0,k),x.push(k))}return i==="wait"&&x.length&&(w=x),y(fg(w)),p(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.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:E}=S.useContext(bi);return m.jsx(m.Fragment,{children:v.map(w=>{const T=La(w),k=a&&!l?!1:u===v||d.includes(T),C=()=>{if(b.has(T))b.set(T,!0);else return;let M=!0;b.forEach(O=>{O||(M=!1)}),M&&(E?.(),y(f.current),a&&c?.(),r&&r())};return m.jsx(lC,{isPresent:k,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:k?void 0:C,anchorX:s,children:w},T)})})},uC=S.createContext(null);function dC(){const e=S.useRef(!1);return Aa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fC(){const e=dC(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ct.postRender(r),[r]),t]}const pC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function pg(){const e=new Set,t=new WeakMap,n=()=>e.forEach(pC);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 hg=e=>e===!0,hC=e=>hg(e===!0)||e==="id",mC=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(bi),o=S.useContext(uC),[i,a]=fC(),s=S.useRef(null),l=r.id||o;s.current===null&&(hC(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:hg(n)&&r.group||pg()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(bi.Provider,{value:c,children:e})},mg=S.createContext({strict:!1}),gg={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"]},xo={};for(const e in gg)xo[e]={isEnabled:t=>gg[e].some(n=>!!t[n])};function gC(e){for(const t in e)xo[t]={...xo[t],...e[t]}}const vC=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 Va(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vC.has(e)}let vg=e=>!Va(e);function yg(e){typeof e=="function"&&(vg=t=>t.startsWith("on")?!Va(t):e(t))}try{yg(require("@emotion/is-prop-valid").default)}catch{}function yC(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(vg(o)||n===!0&&Va(o)||!t&&!Va(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function bg({children:e,isValidProp:t,...n}){t&&yg(t),n={...S.useContext(bo),...n},n.isStatic=bn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(bo.Provider,{value:r,children:e})}function bC(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ec(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const $a=S.createContext({});function ja(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ii(e){return typeof e=="string"||Array.isArray(e)}const cu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uu=["initial",...cu];function za(e){return ja(e.animate)||uu.some(t=>Ii(e[t]))}function xg(e){return!!(za(e)||e.variants)}function xC(e,t){if(za(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ii(n)?n:void 0,animate:Ii(r)?r:void 0}}return e.inherit!==!1?t:{}}function wC(e){const{initial:t,animate:n}=xC(e,S.useContext($a));return S.useMemo(()=>({initial:t,animate:n}),[wg(t),wg(n)])}function wg(e){return Array.isArray(e)?e.join(" "):e}const SC=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TC(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):wo(n)&&(n.current=r))},[t])}const du=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sg="data-"+du("framerAppearId"),Tg=S.createContext({});function EC(e,t,n,r,o){const{visualElement:i}=S.useContext($a),a=S.useContext(mg),s=S.useContext(Pa),l=S.useContext(bo).reducedMotion,c=S.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=S.useContext(Tg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&kC(c.current,n,o,d);const h=S.useRef(!1);S.useInsertionEffect(()=>{u&&h.current&&u.update(n,s)});const f=n[Sg],b=S.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Aa(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),iu.render(u.render),b.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!b.current&&u.animationState&&u.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1))}),u}function kC(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:Eg(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&wo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Eg(e){if(e)return e.options.allowProjection!==!1?e.projection:Eg(e.parent)}function CC({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&gC(e);function i(s,l){let c;const u={...S.useContext(bo),...s,layoutId:AC(s)},{isStatic:d}=u,h=wC(s),f=r(s,d);if(!d&&xc){PC(u,e);const b=IC(u);c=b.MeasureLayout,h.visualElement=EC(o,f,u,t,b.ProjectionNode)}return m.jsxs($a.Provider,{value:h,children:[c&&h.visualElement?m.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,s,TC(f,h.visualElement,l),f,d,h.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=S.forwardRef(i);return a[SC]=o,a}function AC({layoutId:e}){const t=S.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function PC(e,t){const n=S.useContext(mg).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?fo(!1,r):en(!1,r)}}function IC(e){const{drag:t,layout:n}=xo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const _i={};function _C(e){for(const t in e)_i[t]=e[t],Ic(t)&&(_i[t].isCSSVariable=!0)}function kg(e,{layout:t,layoutId:n}){return yo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_i[e]||e==="opacity")}const OC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MC=vo.length;function DC(e,t,n){let r="",o=!0;for(let i=0;i<MC;i++){const a=vo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=ng(s,ou[a]);if(!l){o=!1;const u=OC[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function fu(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(yo.has(l)){a=!0;continue}else if(Ic(l)){o[l]=c;continue}else{const u=ng(c,ou[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=DC(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}`}}const pu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cg(e,t,n){for(const r in t)!Pt(t[r])&&!kg(r,n)&&(e[r]=t[r])}function NC({transformTemplate:e},t){return S.useMemo(()=>{const n=pu();return fu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FC(e,t){const n=e.style||{},r={};return Cg(r,n,e),Object.assign(r,NC(e,t)),r}function LC(e,t){const n={},r=FC(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 VC={offset:"stroke-dashoffset",array:"stroke-dasharray"},$C={offset:"strokeDashoffset",array:"strokeDasharray"};function jC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?VC:$C;e[i.offset]=ke.transform(-r);const a=ke.transform(t),s=ke.transform(n);e[i.array]=`${a} ${s}`}function Ag(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(fu(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&jC(d,o,i,a,!1)}const Pg=()=>({...pu(),attrs:{}}),Ig=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zC(e,t,n,r){const o=S.useMemo(()=>{const i=Pg();return Ag(i,t,Ig(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cg(i,e.style,e),o.style={...i,...o.style}}return o}const RC=["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 hu(e){return typeof e!="string"||e.includes("-")?!1:!!(RC.indexOf(e)>-1||/[A-Z]/u.test(e))}function BC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(hu(n)?zC:LC)(r,i,a,n),c=yC(r,typeof n=="string",e),u=n!==S.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=S.useMemo(()=>Pt(d)?d.get():d,[d]);return S.createElement(n,{...u,children:h})}}function _g(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function mu(e,t,n,r){if(typeof t=="function"){const[o,i]=_g(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]=_g(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ra(e){return Pt(e)?e.get():e}function HC({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:WC(n,r,o,e),renderState:t()}}const Og=e=>(t,n)=>{const r=S.useContext($a),o=S.useContext(Pa),i=()=>HC(e,t,r,o);return n?i():bn(i)};function WC(e,t,n,r){const o={},i=r(e,{});for(const h in i)o[h]=Ra(i[h]);let{initial:a,animate:s}=e;const l=za(e),c=xg(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"&&!ja(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const b=mu(e,h[f]);if(b){const{transitionEnd:g,transition:p,...v}=b;for(const y in v){let x=v[y];if(Array.isArray(x)){const E=u?x.length-1:0;x=x[E]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}}}return o}function gu(e,t,n){const{style:r}=e,o={};for(const i in r)(Pt(r[i])||t.style&&Pt(t.style[i])||kg(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const qC={useVisualState:Og({scrapeMotionValuesFromProps:gu,createRenderState:pu})};function Mg(e,t,n){const r=gu(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=vo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const UC={useVisualState:Og({scrapeMotionValuesFromProps:Mg,createRenderState:Pg})};function KC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...hu(r)?UC:qC,preloadedFeatures:e,useRender:BC(o),createVisualElement:t,Component:r};return CC(a)}}function Oi(e,t,n){const r=e.getProps();return mu(r,t,n!==void 0?n:r.custom,e)}const vu=e=>Array.isArray(e);function YC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,jr(n))}function GC(e){return vu(e)?e[e.length-1]||0:e}function ZC(e,t){const n=Oi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=GC(i[a]);YC(e,a,s)}}function XC(e){return!!(Pt(e)&&e.add)}function yu(e,t){const n=e.getValue("willChange");if(XC(n))return n.add(t);if(!n&&Gn.WillChange){const r=new Gn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Dg(e){return e.props[Sg]}const QC=e=>e!==null;function JC(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(QC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const eA={type:"spring",stiffness:500,damping:25,restSpeed:10},tA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nA={type:"keyframes",duration:.8},rA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oA=(e,{keyframes:t})=>t.length>2?nA:yo.has(e)?e.startsWith("scale")?tA(t[1]):eA:rA;function iA({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 bu=(e,t,n,r={},o,i)=>a=>{const s=nu(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};iA(s)||Object.assign(u,oA(e,u)),u.duration&&(u.duration=fn(u.duration)),u.repeatDelay&&(u.repeatDelay=fn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Gn.instantAnimations||Gn.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const h=JC(u.keyframes,s);if(h!==void 0){ct.update(()=>{u.onUpdate(h),u.onComplete()});return}}return s.isSync?new qc(u):new Nk(u)};function aA({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function xu(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),h=s[u];if(h===void 0||c&&aA(c,u))continue;const f={delay:n,...nu(i||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===b&&!f.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=Dg(e);if(v){const y=window.MotionHandoffAnimation(v,u,ct);y!==null&&(f.startTime=y,g=!0)}}yu(e,u),d.start(bu(u,d,h,e.shouldReduceMotion&&Ym.has(u)?{type:!1}:f,e,g));const p=d.animation;p&&l.push(p)}return a&&Promise.all(l).then(()=>{ct.update(()=>{a&&ZC(e,a)})}),l}function wu(e,t,n={}){const r=Oi(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(xu(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return sA(e,t,c+l,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 sA(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(lA).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(wu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function lA(e,t){return e.sortNodePosition(t)}function cA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>wu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=wu(e,t,n);else{const o=typeof t=="function"?Oi(e,t,n.custom):t;r=Promise.all(xu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Ng(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 uA=uu.length;function Fg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Fg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uA;n++){const r=uu[n],o=e.props[r];(Ii(o)||o===!1)&&(t[r]=o)}return t}const dA=[...cu].reverse(),fA=cu.length;function pA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>cA(e,n,r)))}function hA(e){let t=pA(e),n=Lg(),r=!0;const o=l=>(c,u)=>{const d=Oi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Fg(e.parent)||{},d=[],h=new Set;let f={},b=1/0;for(let p=0;p<fA;p++){const v=dA[p],y=n[v],x=c[v]!==void 0?c[v]:u[v],E=Ii(x),w=v===l?y.isActive:null;w===!1&&(b=p);let T=x===u[v]&&x!==c[v]&&E;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||ja(x)||typeof x=="boolean")continue;const k=mA(y.prevProp,x);let C=k||v===l&&y.isActive&&!T&&E||p>b&&E,M=!1;const O=Array.isArray(x)?x:[x];let F=O.reduce(o(v),{});w===!1&&(F={});const{prevResolvedValues:L={}}=y,H={...L,...F},I=N=>{C=!0,h.has(N)&&(M=!0,h.delete(N)),y.needsAnimating[N]=!0;const P=e.getValue(N);P&&(P.liveStyle=!1)};for(const N in H){const P=F[N],$=L[N];if(f.hasOwnProperty(N))continue;let D=!1;vu(P)&&vu($)?D=!Ng(P,$):D=P!==$,D?P!=null?I(N):h.add(N):P!==void 0&&h.has(N)?I(N):y.protectedKeys[N]=!0}y.prevProp=x,y.prevResolvedValues=F,y.isActive&&(f={...f,...F}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(T&&k)||M)&&d.push(...O.map(N=>({animation:N,options:{type:v}})))}if(h.size){const p={};if(typeof c.initial!="boolean"){const v=Oi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(p.transition=v.transition)}h.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),p[v]=y??null}),d.push({animation:p})}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=Lg(),r=!0}}}function mA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ng(t,e):!1}function zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lg(){return{animate:zr(!0),whileInView:zr(),whileHover:zr(),whileTap:zr(),whileDrag:zr(),whileFocus:zr(),exit:zr()}}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gA extends lr{constructor(t){super(t),t.animationState||(t.animationState=hA(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ja(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 vA=0;class yA extends lr{constructor(){super(...arguments),this.id=vA++}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 bA={animation:{Feature:gA},exit:{Feature:yA}};function Mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Di(e){return{point:{x:e.pageX,y:e.pageY}}}const xA=e=>t=>au(t)&&e(t,Di(t));function Ni(e,t,n,r){return Mi(e,t,xA(n),r)}function Vg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SA(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}}const $g=1e-4,TA=1-$g,EA=1+$g,jg=.01,kA=0-jg,CA=0+jg;function qt(e){return e.max-e.min}function AA(e,t,n){return Math.abs(e-t)<=n}function zg(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=qt(n)/qt(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=TA&&e.scale<=EA||isNaN(e.scale))&&(e.scale=1),(e.translate>=kA&&e.translate<=CA||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){zg(e.x,t.x,n.x,r?r.originX:void 0),zg(e.y,t.y,n.y,r?r.originY:void 0)}function Rg(e,t,n){e.min=n.min+t.min,e.max=e.min+qt(t)}function PA(e,t,n){Rg(e.x,t.x,n.x),Rg(e.y,t.y,n.y)}function Bg(e,t,n){e.min=t.min-n.min,e.max=e.min+qt(t)}function Li(e,t,n){Bg(e.x,t.x,n.x),Bg(e.y,t.y,n.y)}const Hg=()=>({translate:0,scale:1,origin:0,originPoint:0}),So=()=>({x:Hg(),y:Hg()}),Wg=()=>({min:0,max:0}),yt=()=>({x:Wg(),y:Wg()});function pn(e){return[e("x"),e("y")]}function Su(e){return e===void 0||e===1}function Tu({scale:e,scaleX:t,scaleY:n}){return!Su(e)||!Su(t)||!Su(n)}function Rr(e){return Tu(e)||qg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qg(e){return Ug(e.x)||Ug(e.y)}function Ug(e){return e&&e!=="0%"}function Ba(e,t,n){const r=e-n,o=t*r;return n+o}function Kg(e,t,n,r,o){return o!==void 0&&(e=Ba(e,o,r)),Ba(e,n,r)+t}function Eu(e,t=0,n=1,r,o){e.min=Kg(e.min,t,n,r,o),e.max=Kg(e.max,t,n,r,o)}function Yg(e,{x:t,y:n}){Eu(e.x,t.translate,t.scale,t.originPoint),Eu(e.y,n.translate,n.scale,n.originPoint)}const Gg=.999999999999,Zg=1.0000000000001;function IA(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&&Eo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Yg(e,a)),r&&Rr(i.latestValues)&&Eo(e,i.latestValues))}t.x<Zg&&t.x>Gg&&(t.x=1),t.y<Zg&&t.y>Gg&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function Xg(e,t,n,r,o=.5){const i=ut(e.min,e.max,o);Eu(e,t,n,i,r)}function Eo(e,t){Xg(e.x,t.x,t.scaleX,t.scale,t.originX),Xg(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qg(e,t){return Vg(SA(e.getBoundingClientRect(),t))}function _A(e,t,n){const r=Qg(e,n),{scroll:o}=t;return o&&(To(r.x,o.offset.x),To(r.y,o.offset.y)),r}const Jg=({current:e})=>e?e.ownerDocument.defaultView:null,ev=(e,t)=>Math.abs(e-t);function OA(e,t){const n=ev(e.x,t.x),r=ev(e.y,t.y);return Math.sqrt(n**2+r**2)}class tv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Cu(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=OA(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:b}=d,{timestamp:g}=Vt;this.history.push({...b,timestamp:g});const{onStart:p,onMove:v}=this.handlers;h||(p&&p(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ku(h,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:b,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Cu(d.type==="pointercancel"?this.lastMoveEventInfo:ku(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,p),b&&b(d,p)},!au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Di(t),s=ku(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Vt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Cu(s,this.history)),this.removeListeners=xi(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zn(this.updatePoint)}}function ku(e,t){return t?{point:t(e.point)}:e}function nv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cu({point:e},t){return{point:e,delta:nv(e,rv(t)),offset:nv(e,MA(t)),velocity:DA(t,.1)}}function MA(e){return e[0]}function rv(e){return e[e.length-1]}function DA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=rv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const i=_n(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 NA(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function ov(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 FA(e,{top:t,left:n,bottom:r,right:o}){return{x:ov(e.x,n,o),y:ov(e.y,t,r)}}function iv(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 LA(e,t){return{x:iv(e.x,t.x),y:iv(e.y,t.y)}}function VA(e,t){let n=.5;const r=qt(e),o=qt(t);return o>r?n=po(t.min,t.max-r,e.min):r>o&&(n=po(e.min,e.max-o,t.min)),Yn(0,1,n)}function $A(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 Au=.35;function jA(e=Au){return e===!1?e=0:e===!0&&(e=Au),{x:av(e,"left","right"),y:av(e,"top","bottom")}}function av(e,t,n){return{min:sv(e,t),max:sv(e,n)}}function sv(e,t){return typeof e=="number"?e:e[t]||0}const zA=new WeakMap;class RA{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=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Di(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:b}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xk(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(p=>{let v=this.getAxisMotionValue(p).get()||0;if(On.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[p];x&&(v=qt(x)*(parseFloat(v)/100))}}this.originPoint[p]=v}),b&&ct.postRender(()=>b(u,d)),yu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:b,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=d;if(f&&this.currentDirection===null){this.currentDirection=BA(p),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",d.point,p),this.updateAxis("y",d.point,p),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>pn(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new tv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ha(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=NA(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&&wo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=FA(r.layoutBox,t):this.constraints=!1,this.elastic=jA(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=$A(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;en(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=_A(r,o.root,this.visualElement.getTransformPagePoint());let a=LA(o.layout.layoutBox,i);if(n){const s=n(wA(a));this.hasMutatedConstraints=!!s,s&&(a=Vg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!Ha(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return yu(this.visualElement,t),r.start(bu(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(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){pn(n=>{const{drag:r}=this.getProps();if(!Ha(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];i.set(t[n]-ut(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=VA({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(),pn(a=>{if(!Ha(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ut(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;zA.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wo(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()),ct.read(r);const a=Mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(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=Au,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Ha(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BA(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HA extends lr{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new RA(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const lv=e=>(t,n)=>{e&&ct.postRender(()=>e(t,n))};class WA extends lr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new tv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:lv(t),onStart:lv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Wa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ke.test(e))e=parseFloat(e);else return e;const n=cv(e,t.target.x),r=cv(e,t.target.y);return`${n}% ${r}%`}},qA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=sr.parse(e);if(o.length>5)return r;const i=sr.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=ut(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class UA extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;_C(KA),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Wa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||ct.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),iu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;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 uv(e){const[t,n]=dg(),r=S.useContext(bi);return m.jsx(UA,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Tg),isPresent:t,safeToRemove:n})}const KA={borderRadius:{...Vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vi,borderTopRightRadius:Vi,borderBottomLeftRadius:Vi,borderBottomRightRadius:Vi,boxShadow:qA};function dv(e,t,n){const r=Pt(e)?e:jr(e);return r.start(bu("",r,t,n)),r.animation}const YA=(e,t)=>e.depth-t.depth;class GA{constructor(){this.children=[],this.isDirty=!1}add(t){wc(this.children,t),this.isDirty=!0}remove(t){Ia(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YA),this.isDirty=!1,this.children.forEach(t)}}function ZA(e,t){const n=Gt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Zn(r),e(i-t))};return ct.setup(r,!0),()=>Zn(r)}const fv=["TopLeft","TopRight","BottomLeft","BottomRight"],XA=fv.length,pv=e=>typeof e=="string"?parseFloat(e):e,hv=e=>typeof e=="number"||ke.test(e);function QA(e,t,n,r,o,i){o?(e.opacity=ut(0,n.opacity??1,JA(r)),e.opacityExit=ut(t.opacity??1,0,eP(r))):i&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let a=0;a<XA;a++){const s=`border${fv[a]}Radius`;let l=mv(t,s),c=mv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||hv(l)===hv(c)?(e[s]=Math.max(ut(pv(l),pv(c),r),0),(On.test(c)||On.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function mv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JA=gv(0,.5,sm),eP=gv(.5,.95,dn);function gv(e,t,n){return r=>r<e?0:r>t?1:n(po(e,t,r))}function vv(e,t){e.min=t.min,e.max=t.max}function hn(e,t){vv(e.x,t.x),vv(e.y,t.y)}function yv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bv(e,t,n,r,o){return e-=t,e=Ba(e,1/n,r),o!==void 0&&(e=Ba(e,1/o,r)),e}function tP(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=ut(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ut(i.min,i.max,r);e===i&&(s-=t),e.min=bv(e.min,t,n,s,o),e.max=bv(e.max,t,n,s,o)}function xv(e,t,[n,r,o],i,a){tP(e,t[n],t[r],t[o],t.scale,i,a)}const nP=["x","scaleX","originX"],rP=["y","scaleY","originY"];function wv(e,t,n,r){xv(e.x,t,nP,n?n.x:void 0,r?r.x:void 0),xv(e.y,t,rP,n?n.y:void 0,r?r.y:void 0)}function Sv(e){return e.translate===0&&e.scale===1}function Tv(e){return Sv(e.x)&&Sv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function oP(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function kv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cv(e,t){return kv(e.x,t.x)&&kv(e.y,t.y)}function Av(e){return qt(e.x)/qt(e.y)}function Pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iP{constructor(){this.members=[]}add(t){wc(this.members,t),t.scheduleRender()}remove(t){if(Ia(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)}}function aP(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:h,skewX:f,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}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 Pu=["","X","Y","Z"],sP={visibility:"hidden"},lP=1e3;let cP=0;function Iu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Iv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Dg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Iv(r)}function _v({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=cP++,this.animationId=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.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(fP),this.nodes.forEach(vP),this.nodes.forEach(yP),this.nodes.forEach(pP)},this.resolvedRelativeTargetAt=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 GA)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Tc),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=lu(a)&&!ug(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;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=ZA(d,250),Wa.hasAnimatedSinceResize&&(Wa.hasAnimatedSinceResize=!1,this.nodes.forEach(Mv))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||TP,{onLayoutAnimationStart:g,onLayoutAnimationComplete:p}=c.getProps(),v=!this.targetLayout||!Cv(this.targetLayout,f),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...nu(b,"layout"),onPlay:g,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||Mv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}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(),Zn(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(bP),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&&Iv(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(Ov);return}this.isUpdating||this.nodes.forEach(mP),this.isUpdating=!1,this.nodes.forEach(gP),this.nodes.forEach(uP),this.nodes.forEach(dP),this.clearAllSnapshots();const s=Gt.now();Vt.delta=Yn(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Pc.update.process(Vt),Pc.preRender.process(Vt),Pc.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,iu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hP),this.sharedNodes.forEach(xP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qt(this.snapshot.measuredBox.x)&&!qt(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.layoutCorrected=yt(),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&&!Tv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||Rr(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)),EP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(kP))){const{scroll:c}=this.root;c&&(To(s.x,c.offset.x),To(s.y,c.offset.y))}return s}removeElementScroll(a){const s=yt();if(hn(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&&hn(s,a),To(s.x,u.offset.x),To(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=yt();hn(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&&Eo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Rr(u.latestValues)&&Eo(l,u.latestValues)}return Rr(this.latestValues)&&Eo(l,this.latestValues),l}removeTransform(a){const s=yt();hn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Rr(c.latestValues))continue;Tu(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();hn(u,d),wv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Rr(this.latestValues)&&wv(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!==Vt.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))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Yg(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Li(this.relativeTargetOrigin,this.target,h.target),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Tu(this.parent.latestValues)||qg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}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===Vt.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;hn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;IA(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=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yv(this.prevProjectionDelta.x,this.projectionDelta.x),yv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Pv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}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=So(),this.projectionDelta=So(),this.projectionDeltaWithTransform=So()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=So();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=yt(),f=l?l.source:void 0,b=this.layout?this.layout.source:void 0,g=f!==b,p=this.getStack(),v=!p||p.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(SP));this.animationProgress=0;let x;this.mixTargetDelta=E=>{const w=E/1e3;Dv(d.x,a.x,w),Dv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wP(this.relativeTarget,this.relativeTargetOrigin,h,w),x&&oP(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),hn(x,this.relativeTarget)),g&&(this.animationValues=u,QA(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Zn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{Wa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=jr(0)),this.currentAnimation=dv(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(lP),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&&$v(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=qt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const h=qt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}hn(s,l),Eo(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new iP),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&&Iu("z",a,c,this.animationValues);for(let u=0;u<Pu.length;u++)Iu(`rotate${Pu[u]}`,a,c,this.animationValues),Iu(`skew${Pu[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()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return sP;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ra(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Ra(a?.pointerEvents)||""),this.hasProjected&&!Rr(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=aP(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:h}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${h.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 f in _i){if(u[f]===void 0)continue;const{correct:b,applyTo:g,isCSSVariable:p}=_i[f],v=s.transform==="none"?u[f]:b(u[f],c);if(g){const y=g.length;for(let x=0;x<y;x++)s[g[x]]=v}else p?this.options.visualElement.renderState.vars[f]=v:s[f]=v}return this.options.layoutId&&(s.pointerEvents=c===this?Ra(a?.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Ov),this.root.sharedNodes.clear()}}}function uP(e){e.updateLayout()}function dP(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"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=qt(d);d.min=n[u].min,d.max=d.min+h}):$v(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=qt(n[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=So();Fi(a,n,t.layoutBox);const s=So();i?Fi(s,e.applyTransform(r,!0),t.measuredBox):Fi(s,n,t.layoutBox);const l=!Tv(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const f=yt();Li(f,t.layoutBox,d.layoutBox);const b=yt();Li(b,n,h.layoutBox),Cv(f,b)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,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 fP(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 pP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hP(e){e.clearSnapshot()}function Ov(e){e.clearMeasurements()}function mP(e){e.isLayoutDirty=!1}function gP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vP(e){e.resolveTargetDelta()}function yP(e){e.calcProjection()}function bP(e){e.resetSkewAndRotation()}function xP(e){e.removeLeadSnapshot()}function Dv(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nv(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function wP(e,t,n,r){Nv(e.x,t.x,n.x,r),Nv(e.y,t.y,n.y,r)}function SP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TP={duration:.45,ease:[.4,0,.1,1]},Fv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lv=Fv("applewebkit/")&&!Fv("chrome/")?Math.round:dn;function Vv(e){e.min=Lv(e.min),e.max=Lv(e.max)}function EP(e){Vv(e.x),Vv(e.y)}function $v(e,t,n){return e==="position"||e==="preserve-aspect"&&!AA(Av(t),Av(n),.2)}function kP(e){return e!==e.root&&e.scroll?.wasRoot}const CP=_v({attachResizeListener:(e,t)=>Mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_u={current:void 0},jv=_v({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_u.current){const e=new CP({});e.mount(window),e.setOptions({layoutScroll:!0}),_u.current=e}return _u.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),AP={pan:{Feature:WA},drag:{Feature:HA,ProjectionNode:jv,MeasureLayout:uv}};function zv(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&&ct.postRender(()=>i(t,Di(t)))}class PP extends lr{mount(){const{current:t}=this.node;t&&(this.unmount=Qk(t,(n,r)=>(zv(this.node,r,"Start"),o=>zv(this.node,o,"End"))))}unmount(){}}class IP extends lr{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=xi(Mi(this.node.current,"focus",()=>this.onFocus()),Mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rv(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&&ct.postRender(()=>i(t,Di(t)))}class _P extends lr{mount(){const{current:t}=this.node;t&&(this.unmount=nC(t,(n,r)=>(Rv(this.node,r,"Start"),(o,{success:i})=>Rv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ou=new WeakMap,Mu=new WeakMap,OP=e=>{const t=Ou.get(e.target);t&&t(e)},MP=e=>{e.forEach(OP)};function DP({root:e,...t}){const n=e||document;Mu.has(n)||Mu.set(n,{});const r=Mu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(MP,{root:e,...t})),r[o]}function NP(e,t,n){const r=DP(t);return Ou.set(e,n),r.observe(e),()=>{Ou.delete(e),r.unobserve(e)}}const FP={some:0,all:1};class LP extends lr{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:FP[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(),h=c?u:d;h&&h(l)};return NP(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(VP(t,n))&&this.startObserver()}unmount(){}}function VP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $P={inView:{Feature:LP},tap:{Feature:_P},focus:{Feature:IP},hover:{Feature:PP}},jP={layout:{ProjectionNode:jv,MeasureLayout:uv}},Du={current:null},Bv={current:!1};function zP(){if(Bv.current=!0,!!xc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Du.current=e.matches;e.addListener(t),t()}else Du.current=!1}const $i=new WeakMap;function RP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o);else if(Pt(i))e.addValue(r,jr(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,jr(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Hv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Wv{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=Jc,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 h=Gt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ct.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=za(n),this.isVariantNode=xg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&Pt(f)&&f.set(l[h],!1)}}mount(t){this.current=t,$i.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)),Bv.current||zP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Du.current,process.env.NODE_ENV!=="production"&&Ec(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Zn(this.notifyUpdate),Zn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),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 xo){const n=xo[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):yt()}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<Hv.length;r++){const o=Hv[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=RP(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=jr(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"&&(Zh(r)||Qh(r))?r=parseFloat(r):!iC(r)&&sr.test(n)&&(r=eg(t,n)),this.setBaseTarget(t,Pt(r)?r.get():r)),Pt(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=mu(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&&!Pt(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 Tc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class qv extends Wv{constructor(){super(...arguments),this.KeyframeResolver=Yk}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[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;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Uv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function BP(e){return window.getComputedStyle(e)}class Kv extends qv{constructor(){super(...arguments),this.type="html",this.renderInstance=Uv}readValueFromInstance(t,n){if(yo.has(n))return this.projection?.isProjecting?Yc(n):dk(t,n);{const r=BP(t),o=(Ic(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qg(t,n)}build(t,n,r){fu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return gu(t,n,r)}}const Yv=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"]);function HP(e,t,n,r){Uv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Yv.has(o)?o:du(o),t.attrs[o])}class Gv extends qv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yo.has(n)){const r=Jm(n);return r&&r.default||0}return n=Yv.has(n)?n:du(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Mg(t,n,r)}build(t,n,r){Ag(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){HP(t,n,r,o)}mount(t){this.isSVGTag=Ig(t.tagName),super.mount(t)}}const WP=(e,t)=>hu(e)?new Gv(t):new Kv(t,{allowProjection:e!==S.Fragment}),qP=KC({...bA,...$P,...AP,...jP},WP),Qe=bC(qP);function UP(e){return S.useEffect(()=>()=>e(),[])}function qa(e){const t=bn(()=>jr(e)),{isStatic:n}=S.useContext(bo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Zv(e,t){const n=qa(t()),r=()=>n.set(t());return r(),Aa(()=>{const o=()=>ct.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Zn(r)}}),n}function KP(e){Pi.current=[],e();const t=Zv(Pi.current,e);return Pi.current=void 0,t}function YP(e,t,n,r){if(typeof e=="function")return KP(e);const o=typeof t=="function"?t:rC(t,n,r);return Array.isArray(e)?Xv(e,o):Xv([e],([i])=>o(i))}function Xv(e,t){const n=bn(()=>[]);return Zv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Nu(e){return typeof e=="object"&&!Array.isArray(e)}function Qv(e,t,n,r){return typeof e=="string"&&Nu(t)?tg(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function GP(e,t,n){return e*(t+1)}function Jv(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 ZP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ia(e,o),r--)}}function XP(e,t,n,r,o,i){ZP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ut(o,i,r[a]),easing:dm(n,a)})}function QP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function JP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eI="easeInOut",tI=20;function nI(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,h=0;for(let f=0;f<e.length;f++){const b=e[f];if(typeof b=="string"){c.set(b,d);continue}else if(!Array.isArray(b)){c.set(b.name,Jv(d,b.at,u,c));continue}let[g,p,v={}]=b;v.at!==void 0&&(d=Jv(d,v.at,u,c));let y=0;const x=(E,w,T,k=0,C=0)=>{const M=rI(E),{delay:O=0,times:F=Dm(M),type:L="keyframes",repeat:H,repeatType:I,repeatDelay:_=0,...V}=w;let{ease:N=t.ease||"easeOut",duration:P}=w;const $=typeof O=="function"?O(k,C):O,D=M.length,W=eu(L)?L:o?.[L||"keyframes"];if(D<=2&&W){let oe=100;if(D===2&&aI(M)){const B=M[1]-M[0];oe=Math.abs(B)}const te={...V};P!==void 0&&(te.duration=fn(P));const ee=Pm(te,oe,W);N=ee.ease,P=ee.duration}P??(P=i);const R=d+$;F.length===1&&F[0]===0&&(F[1]=1);const Z=F.length-M.length;if(Z>0&&Mm(F,Z),M.length===1&&M.unshift(null),H){en(H<tI,"Repeat count too high, must be less than 20"),P=GP(P,H);const oe=[...M],te=[...F];N=Array.isArray(N)?[...N]:[N];const ee=[...N];for(let B=0;B<H;B++){M.push(...oe);for(let K=0;K<oe.length;K++)F.push(te[K]+(B+1)),N.push(K===0?"linear":dm(ee,K-1))}QP(F,H)}const X=R+P;XP(T,M,N,F,R,X),y=Math.max($+P,y),h=Math.max(X,h)};if(Pt(g)){const E=ey(g,s);x(p,v,ty("default",E))}else{const E=Qv(g,p,r,l),w=E.length;for(let T=0;T<w;T++){p=p,v=v;const k=E[T],C=ey(k,s);for(const M in p)x(p[M],oI(v,M),ty(M,C),T,w)}}u=d,d+=y}return s.forEach((f,b)=>{for(const g in f){const p=f[g];p.sort(JP);const v=[],y=[],x=[];for(let w=0;w<p.length;w++){const{at:T,value:k,easing:C}=p[w];v.push(k),y.push(po(0,h,T)),x.push(C||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(eI)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(b)||a.set(b,{keyframes:{},transition:{}});const E=a.get(b);E.keyframes[g]=v,E.transition[g]={...t,duration:h,ease:x,times:y,...n}}}),a}function ey(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ty(e,t){return t[e]||(t[e]=[]),t[e]}function rI(e){return Array.isArray(e)?e:[e]}function oI(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iI=e=>typeof e=="number",aI=e=>e.every(iI);function sI(e,t){return e in t}class lI extends Wv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(sI(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 yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function cI(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=lu(e)&&!ug(e)?new Gv(t):new Kv(t);n.mount(e),$i.set(e,n)}function uI(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new lI(t);n.mount(e),$i.set(e,n)}function dI(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Nu(t)}function ny(e,t,n,r){const o=[];if(dI(e,t))o.push(dv(e,Nu(t)&&t.default||t,n&&(n.default||n)));else{const i=Qv(e,t,r),a=i.length;en(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?cI:uI;$i.has(l)||c(l);const u=$i.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...xu(u,{...t,transition:d},{}))}}return o}function fI(e,t,n){const r=[];return nI(e,t,n,{spring:Ci}).forEach(({keyframes:i,transition:a},s)=>{r.push(...ny(s,i,a))}),r}function pI(e){return Array.isArray(e)&&e.some(Array.isArray)}function hI(e){function t(n,r,o){let i=[];pI(n)?i=fI(n,r,e):i=ny(n,r,o,e);const a=new Lk(i);return e&&e.animations.push(a),a}return t}function mI(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>hI(e));return UP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class gI{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)})}}const vI=()=>new gI;function yI(){return bn(vI)}const ry=S.createContext(null);function bI(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=ut(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?pE(e,o,o+i):e}function xI({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>Qe[t]),l=[],c=S.useRef(!1);en(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(b=>d===b.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(SI)},updateOrder:(d,h,f)=>{if(c.current)return;const b=bI(l,d,h,f);l!==b&&(c.current=!0,r(b.map(wI).filter(g=>o.indexOf(g)!==-1)))}};return S.useEffect(()=>{c.current=!1}),m.jsx(s,{...i,ref:a,ignoreStrict:!0,children:m.jsx(ry.Provider,{value:u,children:e})})}const oy=S.forwardRef(xI);function wI(e){return e.value}function SI(e,t){return e.layout.min-t.layout.min}function iy(e,t=0){return Pt(e)?e:qa(t)}function TI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>Qe[r]),c=S.useContext(ry),u={x:iy(t.x),y:iy(t.y)},d=YP([u.x,u.y],([g,p])=>g||p?1:"unset");en(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:b}=c;return m.jsx(l,{drag:h,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,p)=>{const{velocity:v}=p;v[h]&&b(n,u[h].get(),v[h]),o&&o(g,p)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const ay=S.forwardRef(TI);function EI(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function kI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:EI(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Ac(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),m.jsx(aC,{isPresent:t,childRef:o,sizeRef:i,children:A.cloneElement(e,{ref:o})})}const lC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=bn(cC),c=S.useId();let u=!0,d=S.useMemo(()=>(u=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:h=>{l.set(h,!0);for(const f of l.values())if(!f)return;r&&r()},register:h=>(l.set(h,!1),()=>l.delete(h))}),[n,l,r]);return i&&u&&(d={...d}),S.useMemo(()=>{l.forEach((h,f)=>l.set(f,!1))},[n]),A.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=m.jsx(sC,{isPresent:n,anchorX:s,children:e})),m.jsx(Pa.Provider,{value:d,children:e})};function cC(){return new Map}function dg(e=!0){const t=S.useContext(Pa);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 La=e=>e.key||"";function fg(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Xn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=dg(a),u=S.useMemo(()=>fg(e),[e]),d=a&&!l?[]:u.map(La),h=S.useRef(!0),f=S.useRef(u),b=bn(()=>new Map),[g,p]=S.useState(u),[v,y]=S.useState(u);Aa(()=>{h.current=!1,f.current=u;for(let w=0;w<v.length;w++){const E=La(v[w]);d.includes(E)?b.delete(E):b.get(E)!==!0&&b.set(E,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let E=0;E<v.length;E++){const k=v[E],C=La(k);d.includes(C)||(w.splice(E,0,k),x.push(k))}return i==="wait"&&x.length&&(w=x),y(fg(w)),p(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.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:T}=S.useContext(bi);return m.jsx(m.Fragment,{children:v.map(w=>{const E=La(w),k=a&&!l?!1:u===v||d.includes(E),C=()=>{if(b.has(E))b.set(E,!0);else return;let M=!0;b.forEach(_=>{_||(M=!1)}),M&&(T?.(),y(f.current),a&&c?.(),r&&r())};return m.jsx(lC,{isPresent:k,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:k?void 0:C,anchorX:s,children:w},E)})})},uC=S.createContext(null);function dC(){const e=S.useRef(!1);return Aa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fC(){const e=dC(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ct.postRender(r),[r]),t]}const pC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function pg(){const e=new Set,t=new WeakMap,n=()=>e.forEach(pC);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 hg=e=>e===!0,hC=e=>hg(e===!0)||e==="id",mC=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(bi),o=S.useContext(uC),[i,a]=fC(),s=S.useRef(null),l=r.id||o;s.current===null&&(hC(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:hg(n)&&r.group||pg()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return m.jsx(bi.Provider,{value:c,children:e})},mg=S.createContext({strict:!1}),gg={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"]},wo={};for(const e in gg)wo[e]={isEnabled:t=>gg[e].some(n=>!!t[n])};function gC(e){for(const t in e)wo[t]={...wo[t],...e[t]}}const vC=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 Va(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vC.has(e)}let vg=e=>!Va(e);function yg(e){typeof e=="function"&&(vg=t=>t.startsWith("on")?!Va(t):e(t))}try{yg(require("@emotion/is-prop-valid").default)}catch{}function yC(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(vg(o)||n===!0&&Va(o)||!t&&!Va(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function bg({children:e,isValidProp:t,...n}){t&&yg(t),n={...S.useContext(xo),...n},n.isStatic=bn(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.jsx(xo.Provider,{value:r,children:e})}function bC(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Tc(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const $a=S.createContext({});function ja(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ii(e){return typeof e=="string"||Array.isArray(e)}const lu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cu=["initial",...lu];function za(e){return ja(e.animate)||cu.some(t=>Ii(e[t]))}function xg(e){return!!(za(e)||e.variants)}function xC(e,t){if(za(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ii(n)?n:void 0,animate:Ii(r)?r:void 0}}return e.inherit!==!1?t:{}}function wC(e){const{initial:t,animate:n}=xC(e,S.useContext($a));return S.useMemo(()=>({initial:t,animate:n}),[wg(t),wg(n)])}function wg(e){return Array.isArray(e)?e.join(" "):e}const SC=Symbol.for("motionComponentSymbol");function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TC(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):So(n)&&(n.current=r))},[t])}const uu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sg="data-"+uu("framerAppearId"),Tg=S.createContext({});function EC(e,t,n,r,o){const{visualElement:i}=S.useContext($a),a=S.useContext(mg),s=S.useContext(Pa),l=S.useContext(xo).reducedMotion,c=S.useRef(null);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=S.useContext(Tg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&kC(c.current,n,o,d);const h=S.useRef(!1);S.useInsertionEffect(()=>{u&&h.current&&u.update(n,s)});const f=n[Sg],b=S.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Aa(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),ou.render(u.render),b.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!b.current&&u.animationState&&u.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),b.current=!1))}),u}function kC(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:Eg(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&So(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Eg(e){if(e)return e.options.allowProjection!==!1?e.projection:Eg(e.parent)}function CC({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&gC(e);function i(s,l){let c;const u={...S.useContext(xo),...s,layoutId:AC(s)},{isStatic:d}=u,h=wC(s),f=r(s,d);if(!d&&bc){PC(u,e);const b=IC(u);c=b.MeasureLayout,h.visualElement=EC(o,f,u,t,b.ProjectionNode)}return m.jsxs($a.Provider,{value:h,children:[c&&h.visualElement?m.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,s,TC(f,h.visualElement,l),f,d,h.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=S.forwardRef(i);return a[SC]=o,a}function AC({layoutId:e}){const t=S.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function PC(e,t){const n=S.useContext(mg).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?po(!1,r):en(!1,r)}}function IC(e){const{drag:t,layout:n}=wo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const _i={};function _C(e){for(const t in e)_i[t]=e[t],Pc(t)&&(_i[t].isCSSVariable=!0)}function kg(e,{layout:t,layoutId:n}){return bo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_i[e]||e==="opacity")}const OC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MC=yo.length;function DC(e,t,n){let r="",o=!0;for(let i=0;i<MC;i++){const a=yo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=ng(s,ru[a]);if(!l){o=!1;const u=OC[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function du(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(bo.has(l)){a=!0;continue}else if(Pc(l)){o[l]=c;continue}else{const u=ng(c,ru[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=DC(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}`}}const fu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cg(e,t,n){for(const r in t)!Pt(t[r])&&!kg(r,n)&&(e[r]=t[r])}function NC({transformTemplate:e},t){return S.useMemo(()=>{const n=fu();return du(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FC(e,t){const n=e.style||{},r={};return Cg(r,n,e),Object.assign(r,NC(e,t)),r}function LC(e,t){const n={},r=FC(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 VC={offset:"stroke-dashoffset",array:"stroke-dasharray"},$C={offset:"strokeDashoffset",array:"strokeDasharray"};function jC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?VC:$C;e[i.offset]=Ee.transform(-r);const a=Ee.transform(t),s=Ee.transform(n);e[i.array]=`${a} ${s}`}function Ag(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(du(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&jC(d,o,i,a,!1)}const Pg=()=>({...fu(),attrs:{}}),Ig=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zC(e,t,n,r){const o=S.useMemo(()=>{const i=Pg();return Ag(i,t,Ig(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cg(i,e.style,e),o.style={...i,...o.style}}return o}const RC=["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 pu(e){return typeof e!="string"||e.includes("-")?!1:!!(RC.indexOf(e)>-1||/[A-Z]/u.test(e))}function BC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(pu(n)?zC:LC)(r,i,a,n),c=yC(r,typeof n=="string",e),u=n!==S.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=S.useMemo(()=>Pt(d)?d.get():d,[d]);return S.createElement(n,{...u,children:h})}}function _g(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function hu(e,t,n,r){if(typeof t=="function"){const[o,i]=_g(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]=_g(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Ra(e){return Pt(e)?e.get():e}function HC({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:WC(n,r,o,e),renderState:t()}}const Og=e=>(t,n)=>{const r=S.useContext($a),o=S.useContext(Pa),i=()=>HC(e,t,r,o);return n?i():bn(i)};function WC(e,t,n,r){const o={},i=r(e,{});for(const h in i)o[h]=Ra(i[h]);let{initial:a,animate:s}=e;const l=za(e),c=xg(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"&&!ja(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const b=hu(e,h[f]);if(b){const{transitionEnd:g,transition:p,...v}=b;for(const y in v){let x=v[y];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}}}return o}function mu(e,t,n){const{style:r}=e,o={};for(const i in r)(Pt(r[i])||t.style&&Pt(t.style[i])||kg(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(o[i]=r[i]);return o}const qC={useVisualState:Og({scrapeMotionValuesFromProps:mu,createRenderState:fu})};function Mg(e,t,n){const r=mu(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=yo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const UC={useVisualState:Og({scrapeMotionValuesFromProps:Mg,createRenderState:Pg})};function KC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...pu(r)?UC:qC,preloadedFeatures:e,useRender:BC(o),createVisualElement:t,Component:r};return CC(a)}}function Oi(e,t,n){const r=e.getProps();return hu(r,t,n!==void 0?n:r.custom,e)}const gu=e=>Array.isArray(e);function YC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,jr(n))}function GC(e){return gu(e)?e[e.length-1]||0:e}function ZC(e,t){const n=Oi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=GC(i[a]);YC(e,a,s)}}function XC(e){return!!(Pt(e)&&e.add)}function vu(e,t){const n=e.getValue("willChange");if(XC(n))return n.add(t);if(!n&&Gn.WillChange){const r=new Gn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Dg(e){return e.props[Sg]}const QC=e=>e!==null;function JC(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(QC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}const eA={type:"spring",stiffness:500,damping:25,restSpeed:10},tA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nA={type:"keyframes",duration:.8},rA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oA=(e,{keyframes:t})=>t.length>2?nA:bo.has(e)?e.startsWith("scale")?tA(t[1]):eA:rA;function iA({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 yu=(e,t,n,r={},o,i)=>a=>{const s=tu(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};iA(s)||Object.assign(u,oA(e,u)),u.duration&&(u.duration=fn(u.duration)),u.repeatDelay&&(u.repeatDelay=fn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Gn.instantAnimations||Gn.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const h=JC(u.keyframes,s);if(h!==void 0){ct.update(()=>{u.onUpdate(h),u.onComplete()});return}}return s.isSync?new Wc(u):new Nk(u)};function aA({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bu(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),h=s[u];if(h===void 0||c&&aA(c,u))continue;const f={delay:n,...tu(i||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===b&&!f.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=Dg(e);if(v){const y=window.MotionHandoffAnimation(v,u,ct);y!==null&&(f.startTime=y,g=!0)}}vu(e,u),d.start(yu(u,d,h,e.shouldReduceMotion&&Ym.has(u)?{type:!1}:f,e,g));const p=d.animation;p&&l.push(p)}return a&&Promise.all(l).then(()=>{ct.update(()=>{a&&ZC(e,a)})}),l}function xu(e,t,n={}){const r=Oi(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(bu(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return sA(e,t,c+l,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 sA(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(lA).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(xu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function lA(e,t){return e.sortNodePosition(t)}function cA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>xu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=xu(e,t,n);else{const o=typeof t=="function"?Oi(e,t,n.custom):t;r=Promise.all(bu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Ng(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 uA=cu.length;function Fg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Fg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uA;n++){const r=cu[n],o=e.props[r];(Ii(o)||o===!1)&&(t[r]=o)}return t}const dA=[...lu].reverse(),fA=lu.length;function pA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>cA(e,n,r)))}function hA(e){let t=pA(e),n=Lg(),r=!0;const o=l=>(c,u)=>{const d=Oi(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Fg(e.parent)||{},d=[],h=new Set;let f={},b=1/0;for(let p=0;p<fA;p++){const v=dA[p],y=n[v],x=c[v]!==void 0?c[v]:u[v],T=Ii(x),w=v===l?y.isActive:null;w===!1&&(b=p);let E=x===u[v]&&x!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...f},!y.isActive&&w===null||!x&&!y.prevProp||ja(x)||typeof x=="boolean")continue;const k=mA(y.prevProp,x);let C=k||v===l&&y.isActive&&!E&&T||p>b&&T,M=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(v),{});w===!1&&(F={});const{prevResolvedValues:V={}}=y,H={...V,...F},I=D=>{C=!0,h.has(D)&&(M=!0,h.delete(D)),y.needsAnimating[D]=!0;const P=e.getValue(D);P&&(P.liveStyle=!1)};for(const D in H){const P=F[D],j=V[D];if(f.hasOwnProperty(D))continue;let N=!1;gu(P)&&gu(j)?N=!Ng(P,j):N=P!==j,N?P!=null?I(D):h.add(D):P!==void 0&&h.has(D)?I(D):y.protectedKeys[D]=!0}y.prevProp=x,y.prevResolvedValues=F,y.isActive&&(f={...f,...F}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(E&&k)||M)&&d.push(..._.map(D=>({animation:D,options:{type:v}})))}if(h.size){const p={};if(typeof c.initial!="boolean"){const v=Oi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(p.transition=v.transition)}h.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),p[v]=y??null}),d.push({animation:p})}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=Lg(),r=!0}}}function mA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ng(t,e):!1}function zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lg(){return{animate:zr(!0),whileInView:zr(),whileHover:zr(),whileTap:zr(),whileDrag:zr(),whileFocus:zr(),exit:zr()}}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gA extends lr{constructor(t){super(t),t.animationState||(t.animationState=hA(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ja(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 vA=0;class yA extends lr{constructor(){super(...arguments),this.id=vA++}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 bA={animation:{Feature:gA},exit:{Feature:yA}};function Mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Di(e){return{point:{x:e.pageX,y:e.pageY}}}const xA=e=>t=>iu(t)&&e(t,Di(t));function Ni(e,t,n,r){return Mi(e,t,xA(n),r)}function Vg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SA(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}}const $g=1e-4,TA=1-$g,EA=1+$g,jg=.01,kA=0-jg,CA=0+jg;function qt(e){return e.max-e.min}function AA(e,t,n){return Math.abs(e-t)<=n}function zg(e,t,n,r=.5){e.origin=r,e.originPoint=ut(t.min,t.max,e.origin),e.scale=qt(n)/qt(t),e.translate=ut(n.min,n.max,e.origin)-e.originPoint,(e.scale>=TA&&e.scale<=EA||isNaN(e.scale))&&(e.scale=1),(e.translate>=kA&&e.translate<=CA||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){zg(e.x,t.x,n.x,r?r.originX:void 0),zg(e.y,t.y,n.y,r?r.originY:void 0)}function Rg(e,t,n){e.min=n.min+t.min,e.max=e.min+qt(t)}function PA(e,t,n){Rg(e.x,t.x,n.x),Rg(e.y,t.y,n.y)}function Bg(e,t,n){e.min=t.min-n.min,e.max=e.min+qt(t)}function Li(e,t,n){Bg(e.x,t.x,n.x),Bg(e.y,t.y,n.y)}const Hg=()=>({translate:0,scale:1,origin:0,originPoint:0}),To=()=>({x:Hg(),y:Hg()}),Wg=()=>({min:0,max:0}),yt=()=>({x:Wg(),y:Wg()});function pn(e){return[e("x"),e("y")]}function wu(e){return e===void 0||e===1}function Su({scale:e,scaleX:t,scaleY:n}){return!wu(e)||!wu(t)||!wu(n)}function Rr(e){return Su(e)||qg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qg(e){return Ug(e.x)||Ug(e.y)}function Ug(e){return e&&e!=="0%"}function Ba(e,t,n){const r=e-n,o=t*r;return n+o}function Kg(e,t,n,r,o){return o!==void 0&&(e=Ba(e,o,r)),Ba(e,n,r)+t}function Tu(e,t=0,n=1,r,o){e.min=Kg(e.min,t,n,r,o),e.max=Kg(e.max,t,n,r,o)}function Yg(e,{x:t,y:n}){Tu(e.x,t.translate,t.scale,t.originPoint),Tu(e.y,n.translate,n.scale,n.originPoint)}const Gg=.999999999999,Zg=1.0000000000001;function IA(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&&ko(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Yg(e,a)),r&&Rr(i.latestValues)&&ko(e,i.latestValues))}t.x<Zg&&t.x>Gg&&(t.x=1),t.y<Zg&&t.y>Gg&&(t.y=1)}function Eo(e,t){e.min=e.min+t,e.max=e.max+t}function Xg(e,t,n,r,o=.5){const i=ut(e.min,e.max,o);Tu(e,t,n,i,r)}function ko(e,t){Xg(e.x,t.x,t.scaleX,t.scale,t.originX),Xg(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qg(e,t){return Vg(SA(e.getBoundingClientRect(),t))}function _A(e,t,n){const r=Qg(e,n),{scroll:o}=t;return o&&(Eo(r.x,o.offset.x),Eo(r.y,o.offset.y)),r}const Jg=({current:e})=>e?e.ownerDocument.defaultView:null,ev=(e,t)=>Math.abs(e-t);function OA(e,t){const n=ev(e.x,t.x),r=ev(e.y,t.y);return Math.sqrt(n**2+r**2)}class tv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ku(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=OA(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:b}=d,{timestamp:g}=Vt;this.history.push({...b,timestamp:g});const{onStart:p,onMove:v}=this.handlers;h||(p&&p(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Eu(h,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:b,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=ku(d.type==="pointercancel"?this.lastMoveEventInfo:Eu(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,p),b&&b(d,p)},!iu(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Di(t),s=Eu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Vt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,ku(s,this.history)),this.removeListeners=xi(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zn(this.updatePoint)}}function Eu(e,t){return t?{point:t(e.point)}:e}function nv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ku({point:e},t){return{point:e,delta:nv(e,rv(t)),offset:nv(e,MA(t)),velocity:DA(t,.1)}}function MA(e){return e[0]}function rv(e){return e[e.length-1]}function DA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=rv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fn(t)));)n--;if(!r)return{x:0,y:0};const i=_n(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 NA(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ut(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ut(n,e,r.max):Math.min(e,n)),e}function ov(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 FA(e,{top:t,left:n,bottom:r,right:o}){return{x:ov(e.x,n,o),y:ov(e.y,t,r)}}function iv(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 LA(e,t){return{x:iv(e.x,t.x),y:iv(e.y,t.y)}}function VA(e,t){let n=.5;const r=qt(e),o=qt(t);return o>r?n=ho(t.min,t.max-r,e.min):r>o&&(n=ho(e.min,e.max-o,t.min)),Yn(0,1,n)}function $A(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 Cu=.35;function jA(e=Cu){return e===!1?e=0:e===!0&&(e=Cu),{x:av(e,"left","right"),y:av(e,"top","bottom")}}function av(e,t,n){return{min:sv(e,t),max:sv(e,n)}}function sv(e,t){return typeof e=="number"?e:e[t]||0}const zA=new WeakMap;class RA{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=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Di(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:b}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xk(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pn(p=>{let v=this.getAxisMotionValue(p).get()||0;if(On.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[p];x&&(v=qt(x)*(parseFloat(v)/100))}}this.originPoint[p]=v}),b&&ct.postRender(()=>b(u,d)),vu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:b,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=d;if(f&&this.currentDirection===null){this.currentDirection=BA(p),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",d.point,p),this.updateAxis("y",d.point,p),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>pn(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new tv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ct.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ha(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=NA(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&&So(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=FA(r.layoutBox,t):this.constraints=!1,this.elastic=jA(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=$A(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(t))return!1;const r=t.current;en(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=_A(r,o.root,this.visualElement.getTransformPagePoint());let a=LA(o.layout.layoutBox,i);if(n){const s=n(wA(a));this.hasMutatedConstraints=!!s,s&&(a=Vg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=pn(u=>{if(!Ha(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return vu(this.visualElement,t),r.start(yu(t,r,0,n,this.visualElement,!1))}stopAnimation(){pn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pn(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){pn(n=>{const{drag:r}=this.getProps();if(!Ha(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];i.set(t[n]-ut(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=VA({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(),pn(a=>{if(!Ha(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(ut(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;zA.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();So(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()),ct.read(r);const a=Mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pn(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=Cu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Ha(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BA(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HA extends lr{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new RA(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const lv=e=>(t,n)=>{e&&ct.postRender(()=>e(t,n))};class WA extends lr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new tv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:lv(t),onStart:lv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&ct.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Wa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=cv(e,t.target.x),r=cv(e,t.target.y);return`${n}% ${r}%`}},qA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=sr.parse(e);if(o.length>5)return r;const i=sr.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=ut(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class UA extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;_C(KA),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Wa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||ct.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ou.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;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 uv(e){const[t,n]=dg(),r=S.useContext(bi);return m.jsx(UA,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Tg),isPresent:t,safeToRemove:n})}const KA={borderRadius:{...Vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vi,borderTopRightRadius:Vi,borderBottomLeftRadius:Vi,borderBottomRightRadius:Vi,boxShadow:qA};function dv(e,t,n){const r=Pt(e)?e:jr(e);return r.start(yu("",r,t,n)),r.animation}const YA=(e,t)=>e.depth-t.depth;class GA{constructor(){this.children=[],this.isDirty=!1}add(t){xc(this.children,t),this.isDirty=!0}remove(t){Ia(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YA),this.isDirty=!1,this.children.forEach(t)}}function ZA(e,t){const n=Gt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Zn(r),e(i-t))};return ct.setup(r,!0),()=>Zn(r)}const fv=["TopLeft","TopRight","BottomLeft","BottomRight"],XA=fv.length,pv=e=>typeof e=="string"?parseFloat(e):e,hv=e=>typeof e=="number"||Ee.test(e);function QA(e,t,n,r,o,i){o?(e.opacity=ut(0,n.opacity??1,JA(r)),e.opacityExit=ut(t.opacity??1,0,eP(r))):i&&(e.opacity=ut(t.opacity??1,n.opacity??1,r));for(let a=0;a<XA;a++){const s=`border${fv[a]}Radius`;let l=mv(t,s),c=mv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||hv(l)===hv(c)?(e[s]=Math.max(ut(pv(l),pv(c),r),0),(On.test(c)||On.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=ut(t.rotate||0,n.rotate||0,r))}function mv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JA=gv(0,.5,sm),eP=gv(.5,.95,dn);function gv(e,t,n){return r=>r<e?0:r>t?1:n(ho(e,t,r))}function vv(e,t){e.min=t.min,e.max=t.max}function hn(e,t){vv(e.x,t.x),vv(e.y,t.y)}function yv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bv(e,t,n,r,o){return e-=t,e=Ba(e,1/n,r),o!==void 0&&(e=Ba(e,1/o,r)),e}function tP(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=ut(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=ut(i.min,i.max,r);e===i&&(s-=t),e.min=bv(e.min,t,n,s,o),e.max=bv(e.max,t,n,s,o)}function xv(e,t,[n,r,o],i,a){tP(e,t[n],t[r],t[o],t.scale,i,a)}const nP=["x","scaleX","originX"],rP=["y","scaleY","originY"];function wv(e,t,n,r){xv(e.x,t,nP,n?n.x:void 0,r?r.x:void 0),xv(e.y,t,rP,n?n.y:void 0,r?r.y:void 0)}function Sv(e){return e.translate===0&&e.scale===1}function Tv(e){return Sv(e.x)&&Sv(e.y)}function Ev(e,t){return e.min===t.min&&e.max===t.max}function oP(e,t){return Ev(e.x,t.x)&&Ev(e.y,t.y)}function kv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cv(e,t){return kv(e.x,t.x)&&kv(e.y,t.y)}function Av(e){return qt(e.x)/qt(e.y)}function Pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iP{constructor(){this.members=[]}add(t){xc(this.members,t),t.scheduleRender()}remove(t){if(Ia(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)}}function aP(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:h,skewX:f,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),b&&(r+=`skewY(${b}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 Au=["","X","Y","Z"],sP={visibility:"hidden"},lP=1e3;let cP=0;function Pu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Iv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Dg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ct,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Iv(r)}function _v({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=cP++,this.animationId=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.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(fP),this.nodes.forEach(vP),this.nodes.forEach(yP),this.nodes.forEach(pP)},this.resolvedRelativeTargetAt=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 GA)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Sc),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=su(a)&&!ug(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;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=ZA(d,250),Wa.hasAnimatedSinceResize&&(Wa.hasAnimatedSinceResize=!1,this.nodes.forEach(Mv))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||TP,{onLayoutAnimationStart:g,onLayoutAnimationComplete:p}=c.getProps(),v=!this.targetLayout||!Cv(this.targetLayout,f),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...tu(b,"layout"),onPlay:g,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||Mv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}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(),Zn(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(bP),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&&Iv(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(Ov);return}this.isUpdating||this.nodes.forEach(mP),this.isUpdating=!1,this.nodes.forEach(gP),this.nodes.forEach(uP),this.nodes.forEach(dP),this.clearAllSnapshots();const s=Gt.now();Vt.delta=Yn(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Ac.update.process(Vt),Ac.preRender.process(Vt),Ac.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ou.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hP),this.sharedNodes.forEach(xP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qt(this.snapshot.measuredBox.x)&&!qt(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.layoutCorrected=yt(),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&&!Tv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||Rr(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)),EP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(kP))){const{scroll:c}=this.root;c&&(Eo(s.x,c.offset.x),Eo(s.y,c.offset.y))}return s}removeElementScroll(a){const s=yt();if(hn(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&&hn(s,a),Eo(s.x,u.offset.x),Eo(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=yt();hn(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&&ko(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Rr(u.latestValues)&&ko(l,u.latestValues)}return Rr(this.latestValues)&&ko(l,this.latestValues),l}removeTransform(a){const s=yt();hn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Rr(c.latestValues))continue;Su(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();hn(u,d),wv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Rr(this.latestValues)&&wv(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!==Vt.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))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),Yg(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Li(this.relativeTargetOrigin,this.target,h.target),hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Su(this.parent.latestValues)||qg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}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===Vt.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;hn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;IA(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=yt());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yv(this.prevProjectionDelta.x,this.projectionDelta.x),yv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Pv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}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=To(),this.projectionDelta=To(),this.projectionDeltaWithTransform=To()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=To();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=yt(),f=l?l.source:void 0,b=this.layout?this.layout.source:void 0,g=f!==b,p=this.getStack(),v=!p||p.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(SP));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;Dv(d.x,a.x,w),Dv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wP(this.relativeTarget,this.relativeTargetOrigin,h,w),x&&oP(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),hn(x,this.relativeTarget)),g&&(this.animationValues=u,QA(u,c,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Zn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{Wa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=jr(0)),this.currentAnimation=dv(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(lP),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&&$v(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=qt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const h=qt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+h}hn(s,l),ko(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new iP),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&&Pu("z",a,c,this.animationValues);for(let u=0;u<Au.length;u++)Pu(`rotate${Au[u]}`,a,c,this.animationValues),Pu(`skew${Au[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()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return sP;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ra(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Ra(a?.pointerEvents)||""),this.hasProjected&&!Rr(this.latestValues)&&(f.transform=l?l({},""):"none",this.hasProjected=!1),f}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=aP(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:d,y:h}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${h.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 f in _i){if(u[f]===void 0)continue;const{correct:b,applyTo:g,isCSSVariable:p}=_i[f],v=s.transform==="none"?u[f]:b(u[f],c);if(g){const y=g.length;for(let x=0;x<y;x++)s[g[x]]=v}else p?this.options.visualElement.renderState.vars[f]=v:s[f]=v}return this.options.layoutId&&(s.pointerEvents=c===this?Ra(a?.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Ov),this.root.sharedNodes.clear()}}}function uP(e){e.updateLayout()}function dP(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"?pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=qt(d);d.min=n[u].min,d.max=d.min+h}):$v(o,t.layoutBox,n)&&pn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],h=qt(n[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=To();Fi(a,n,t.layoutBox);const s=To();i?Fi(s,e.applyTransform(r,!0),t.measuredBox):Fi(s,n,t.layoutBox);const l=!Tv(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const f=yt();Li(f,t.layoutBox,d.layoutBox);const b=yt();Li(b,n,h.layoutBox),Cv(f,b)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=f,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 fP(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 pP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hP(e){e.clearSnapshot()}function Ov(e){e.clearMeasurements()}function mP(e){e.isLayoutDirty=!1}function gP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vP(e){e.resolveTargetDelta()}function yP(e){e.calcProjection()}function bP(e){e.resetSkewAndRotation()}function xP(e){e.removeLeadSnapshot()}function Dv(e,t,n){e.translate=ut(t.translate,0,n),e.scale=ut(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nv(e,t,n,r){e.min=ut(t.min,n.min,r),e.max=ut(t.max,n.max,r)}function wP(e,t,n,r){Nv(e.x,t.x,n.x,r),Nv(e.y,t.y,n.y,r)}function SP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TP={duration:.45,ease:[.4,0,.1,1]},Fv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lv=Fv("applewebkit/")&&!Fv("chrome/")?Math.round:dn;function Vv(e){e.min=Lv(e.min),e.max=Lv(e.max)}function EP(e){Vv(e.x),Vv(e.y)}function $v(e,t,n){return e==="position"||e==="preserve-aspect"&&!AA(Av(t),Av(n),.2)}function kP(e){return e!==e.root&&e.scroll?.wasRoot}const CP=_v({attachResizeListener:(e,t)=>Mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Iu={current:void 0},jv=_v({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Iu.current){const e=new CP({});e.mount(window),e.setOptions({layoutScroll:!0}),Iu.current=e}return Iu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),AP={pan:{Feature:WA},drag:{Feature:HA,ProjectionNode:jv,MeasureLayout:uv}};function zv(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&&ct.postRender(()=>i(t,Di(t)))}class PP extends lr{mount(){const{current:t}=this.node;t&&(this.unmount=Qk(t,(n,r)=>(zv(this.node,r,"Start"),o=>zv(this.node,o,"End"))))}unmount(){}}class IP extends lr{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=xi(Mi(this.node.current,"focus",()=>this.onFocus()),Mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rv(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&&ct.postRender(()=>i(t,Di(t)))}class _P extends lr{mount(){const{current:t}=this.node;t&&(this.unmount=nC(t,(n,r)=>(Rv(this.node,r,"Start"),(o,{success:i})=>Rv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _u=new WeakMap,Ou=new WeakMap,OP=e=>{const t=_u.get(e.target);t&&t(e)},MP=e=>{e.forEach(OP)};function DP({root:e,...t}){const n=e||document;Ou.has(n)||Ou.set(n,{});const r=Ou.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(MP,{root:e,...t})),r[o]}function NP(e,t,n){const r=DP(t);return _u.set(e,n),r.observe(e),()=>{_u.delete(e),r.unobserve(e)}}const FP={some:0,all:1};class LP extends lr{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:FP[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(),h=c?u:d;h&&h(l)};return NP(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(VP(t,n))&&this.startObserver()}unmount(){}}function VP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $P={inView:{Feature:LP},tap:{Feature:_P},focus:{Feature:IP},hover:{Feature:PP}},jP={layout:{ProjectionNode:jv,MeasureLayout:uv}},Mu={current:null},Bv={current:!1};function zP(){if(Bv.current=!0,!!bc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mu.current=e.matches;e.addListener(t),t()}else Mu.current=!1}const $i=new WeakMap;function RP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o);else if(Pt(i))e.addValue(r,jr(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,jr(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Hv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Wv{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=Qc,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 h=Gt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ct.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=za(n),this.isVariantNode=xg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&Pt(f)&&f.set(l[h],!1)}}mount(t){this.current=t,$i.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)),Bv.current||zP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mu.current,process.env.NODE_ENV!=="production"&&Tc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Zn(this.notifyUpdate),Zn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=bo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),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 wo){const n=wo[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):yt()}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<Hv.length;r++){const o=Hv[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=RP(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=jr(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"&&(Zh(r)||Qh(r))?r=parseFloat(r):!iC(r)&&sr.test(n)&&(r=eg(t,n)),this.setBaseTarget(t,Pt(r)?r.get():r)),Pt(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=hu(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&&!Pt(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 Sc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class qv extends Wv{constructor(){super(...arguments),this.KeyframeResolver=Yk}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[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;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Uv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}function BP(e){return window.getComputedStyle(e)}class Kv extends qv{constructor(){super(...arguments),this.type="html",this.renderInstance=Uv}readValueFromInstance(t,n){if(bo.has(n))return this.projection?.isProjecting?Kc(n):dk(t,n);{const r=BP(t),o=(Pc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qg(t,n)}build(t,n,r){du(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return mu(t,n,r)}}const Yv=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"]);function HP(e,t,n,r){Uv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Yv.has(o)?o:uu(o),t.attrs[o])}class Gv extends qv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(bo.has(n)){const r=Jm(n);return r&&r.default||0}return n=Yv.has(n)?n:uu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Mg(t,n,r)}build(t,n,r){Ag(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){HP(t,n,r,o)}mount(t){this.isSVGTag=Ig(t.tagName),super.mount(t)}}const WP=(e,t)=>pu(e)?new Gv(t):new Kv(t,{allowProjection:e!==S.Fragment}),qP=KC({...bA,...$P,...AP,...jP},WP),Je=bC(qP);function UP(e){return S.useEffect(()=>()=>e(),[])}function qa(e){const t=bn(()=>jr(e)),{isStatic:n}=S.useContext(xo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Zv(e,t){const n=qa(t()),r=()=>n.set(t());return r(),Aa(()=>{const o=()=>ct.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Zn(r)}}),n}function KP(e){Pi.current=[],e();const t=Zv(Pi.current,e);return Pi.current=void 0,t}function YP(e,t,n,r){if(typeof e=="function")return KP(e);const o=typeof t=="function"?t:rC(t,n,r);return Array.isArray(e)?Xv(e,o):Xv([e],([i])=>o(i))}function Xv(e,t){const n=bn(()=>[]);return Zv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Du(e){return typeof e=="object"&&!Array.isArray(e)}function Qv(e,t,n,r){return typeof e=="string"&&Du(t)?tg(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function GP(e,t,n){return e*(t+1)}function Jv(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 ZP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ia(e,o),r--)}}function XP(e,t,n,r,o,i){ZP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:ut(o,i,r[a]),easing:dm(n,a)})}function QP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function JP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eI="easeInOut",tI=20;function nI(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,h=0;for(let f=0;f<e.length;f++){const b=e[f];if(typeof b=="string"){c.set(b,d);continue}else if(!Array.isArray(b)){c.set(b.name,Jv(d,b.at,u,c));continue}let[g,p,v={}]=b;v.at!==void 0&&(d=Jv(d,v.at,u,c));let y=0;const x=(T,w,E,k=0,C=0)=>{const M=rI(T),{delay:_=0,times:F=Dm(M),type:V="keyframes",repeat:H,repeatType:I,repeatDelay:O=0,...$}=w;let{ease:D=t.ease||"easeOut",duration:P}=w;const j=typeof _=="function"?_(k,C):_,N=M.length,U=Jc(V)?V:o?.[V||"keyframes"];if(N<=2&&U){let re=100;if(N===2&&aI(M)){const B=M[1]-M[0];re=Math.abs(B)}const te={...$};P!==void 0&&(te.duration=fn(P));const ee=Pm(te,re,U);D=ee.ease,P=ee.duration}P??(P=i);const R=d+j;F.length===1&&F[0]===0&&(F[1]=1);const Z=F.length-M.length;if(Z>0&&Mm(F,Z),M.length===1&&M.unshift(null),H){en(H<tI,"Repeat count too high, must be less than 20"),P=GP(P,H);const re=[...M],te=[...F];D=Array.isArray(D)?[...D]:[D];const ee=[...D];for(let B=0;B<H;B++){M.push(...re);for(let q=0;q<re.length;q++)F.push(te[q]+(B+1)),D.push(q===0?"linear":dm(ee,q-1))}QP(F,H)}const G=R+P;XP(E,M,D,F,R,G),y=Math.max(j+P,y),h=Math.max(G,h)};if(Pt(g)){const T=ey(g,s);x(p,v,ty("default",T))}else{const T=Qv(g,p,r,l),w=T.length;for(let E=0;E<w;E++){p=p,v=v;const k=T[E],C=ey(k,s);for(const M in p)x(p[M],oI(v,M),ty(M,C),E,w)}}u=d,d+=y}return s.forEach((f,b)=>{for(const g in f){const p=f[g];p.sort(JP);const v=[],y=[],x=[];for(let w=0;w<p.length;w++){const{at:E,value:k,easing:C}=p[w];v.push(k),y.push(ho(0,h,E)),x.push(C||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(eI)),y[y.length-1]!==1&&(y.push(1),v.push(null)),a.has(b)||a.set(b,{keyframes:{},transition:{}});const T=a.get(b);T.keyframes[g]=v,T.transition[g]={...t,duration:h,ease:x,times:y,...n}}}),a}function ey(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ty(e,t){return t[e]||(t[e]=[]),t[e]}function rI(e){return Array.isArray(e)?e:[e]}function oI(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iI=e=>typeof e=="number",aI=e=>e.every(iI);function sI(e,t){return e in t}class lI extends Wv{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(sI(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 yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function cI(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=su(e)&&!ug(e)?new Gv(t):new Kv(t);n.mount(e),$i.set(e,n)}function uI(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new lI(t);n.mount(e),$i.set(e,n)}function dI(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Du(t)}function ny(e,t,n,r){const o=[];if(dI(e,t))o.push(dv(e,Du(t)&&t.default||t,n&&(n.default||n)));else{const i=Qv(e,t,r),a=i.length;en(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?cI:uI;$i.has(l)||c(l);const u=$i.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...bu(u,{...t,transition:d},{}))}}return o}function fI(e,t,n){const r=[];return nI(e,t,n,{spring:Ci}).forEach(({keyframes:i,transition:a},s)=>{r.push(...ny(s,i,a))}),r}function pI(e){return Array.isArray(e)&&e.some(Array.isArray)}function hI(e){function t(n,r,o){let i=[];pI(n)?i=fI(n,r,e):i=ny(n,r,o,e);const a=new Lk(i);return e&&e.animations.push(a),a}return t}function mI(){const e=bn(()=>({current:null,animations:[]})),t=bn(()=>hI(e));return UP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class gI{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)})}}const vI=()=>new gI;function yI(){return bn(vI)}const ry=S.createContext(null);function bI(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=ut(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?pE(e,o,o+i):e}function xI({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=bn(()=>Je[t]),l=[],c=S.useRef(!1);en(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(b=>d===b.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(SI)},updateOrder:(d,h,f)=>{if(c.current)return;const b=bI(l,d,h,f);l!==b&&(c.current=!0,r(b.map(wI).filter(g=>o.indexOf(g)!==-1)))}};return S.useEffect(()=>{c.current=!1}),m.jsx(s,{...i,ref:a,ignoreStrict:!0,children:m.jsx(ry.Provider,{value:u,children:e})})}const oy=S.forwardRef(xI);function wI(e){return e.value}function SI(e,t){return e.layout.min-t.layout.min}function iy(e,t=0){return Pt(e)?e:qa(t)}function TI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=bn(()=>Je[r]),c=S.useContext(ry),u={x:iy(t.x),y:iy(t.y)},d=YP([u.x,u.y],([g,p])=>g||p?1:"unset");en(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:b}=c;return m.jsx(l,{drag:h,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,p)=>{const{velocity:v}=p;v[h]&&b(n,u[h].get(),v[h]),o&&o(g,p)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const ay=S.forwardRef(TI);function EI(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function kI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:EI(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Cc(r)(l/c)*c}return t+l}}/**
13
13
  * @license lucide-react v0.523.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -29,157 +29,157 @@
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Ye=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(_I,{ref:i,iconNode:t,className:ly(`lucide-${CI(sy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=sy(e),n};/**
32
+ */const Ge=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(_I,{ref:i,iconNode:t,className:ly(`lucide-${CI(sy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=sy(e),n};/**
33
33
  * @license lucide-react v0.523.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const OI=Ye("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"}]]);/**
37
+ */const OI=Ge("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"}]]);/**
38
38
  * @license lucide-react v0.523.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const MI=Ye("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"}]]);/**
42
+ */const MI=Ge("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"}]]);/**
43
43
  * @license lucide-react v0.523.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const cy=Ye("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"}]]);/**
47
+ */const cy=Ge("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"}]]);/**
48
48
  * @license lucide-react v0.523.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const DI=Ye("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"}]]);/**
52
+ */const DI=Ge("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"}]]);/**
53
53
  * @license lucide-react v0.523.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const NI=Ye("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"}]]);/**
57
+ */const NI=Ge("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"}]]);/**
58
58
  * @license lucide-react v0.523.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Fu=Ye("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
62
+ */const Nu=Ge("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.523.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const FI=Ye("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const FI=Ge("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.523.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Lu=Ye("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const Fu=Ge("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.523.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const uy=Ye("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"}]]);/**
77
+ */const uy=Ge("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"}]]);/**
78
78
  * @license lucide-react v0.523.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const LI=Ye("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"}]]);/**
82
+ */const LI=Ge("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"}]]);/**
83
83
  * @license lucide-react v0.523.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const VI=Ye("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"}]]);/**
87
+ */const VI=Ge("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"}]]);/**
88
88
  * @license lucide-react v0.523.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const $I=Ye("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["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"}]]);/**
92
+ */const $I=Ge("file-json",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["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"}]]);/**
93
93
  * @license lucide-react v0.523.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const dy=Ye("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
97
+ */const dy=Ge("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
98
98
  * @license lucide-react v0.523.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const fy=Ye("file-video-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/**
102
+ */const fy=Ge("file-video-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/**
103
103
  * @license lucide-react v0.523.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const py=Ye("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
107
+ */const py=Ge("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
108
108
  * @license lucide-react v0.523.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const jI=Ye("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"}]]);/**
112
+ */const jI=Ge("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"}]]);/**
113
113
  * @license lucide-react v0.523.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const zI=Ye("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"}]]);/**
117
+ */const zI=Ge("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"}]]);/**
118
118
  * @license lucide-react v0.523.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const hy=Ye("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"}]]);/**
122
+ */const hy=Ge("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"}]]);/**
123
123
  * @license lucide-react v0.523.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const RI=Ye("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"}]]);/**
127
+ */const RI=Ge("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"}]]);/**
128
128
  * @license lucide-react v0.523.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const my=Ye("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
132
+ */const my=Ge("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
133
133
  * @license lucide-react v0.523.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const BI=Ye("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
137
+ */const BI=Ge("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
138
138
  * @license lucide-react v0.523.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const HI=Ye("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
142
+ */const HI=Ge("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
143
143
  * @license lucide-react v0.523.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const Vu=Ye("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
147
+ */const Lu=Ge("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
148
148
  * @license lucide-react v0.523.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const WI=Ye("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"}]]);/**
152
+ */const WI=Ge("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"}]]);/**
153
153
  * @license lucide-react v0.523.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const qI=Ye("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"}]]);/**
157
+ */const qI=Ge("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"}]]);/**
158
158
  * @license lucide-react v0.523.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const $u=Ye("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"}]]);/**
162
+ */const Vu=Ge("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"}]]);/**
163
163
  * @license lucide-react v0.523.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const Ua=Ye("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
167
+ */const Ua=Ge("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
168
168
  * @license lucide-react v0.523.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const UI=Ye("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"}]]);/**
172
+ */const UI=Ge("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"}]]);/**
173
173
  * @license lucide-react v0.523.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const KI=Ye("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"}]]);/**
177
+ */const KI=Ge("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"}]]);/**
178
178
  * @license lucide-react v0.523.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const ko=Ye("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},YI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},vy=e=>m.jsx(Qe.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:gy,exit:gy.false,transition:YI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ce("aria-hidden:pointer-events-none",e.className),children:e.children}),GI=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"}}),ZI=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ce("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx(vy,{"data-open":!!i,open:!!i,children:m.jsxs(un,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ce(GI({theme:n}),t),children:[m.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?m.jsx(uy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(my,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(UI,{"aria-hidden":"true",size:20}):null,r,m.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?m.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:m.jsx(ko,{size:20})}):null]})})})}),yy=6048e5,XI=864e5,QI=6e4,JI=36e5,e_=1e3,by=Symbol.for("constructDateFrom");function at(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&by in e?e[by](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return at(t||e,e)}function Ka(e,t,n){const r=Je(e,n?.in);return isNaN(t)?at(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function xy(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return at(e,NaN);if(!t)return r;const o=r.getDate(),i=at(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 Co(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?xy(u,o+r*12):u,h=a||i?Ka(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return at(e,+h+g)}let t_={};function Br(){return t_}function Mn(e,t){const n=Br(),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 Ao(e,t){return Mn(e,{...t,weekStartsOn:1})}function wy(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=at(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Ao(o),a=at(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Ao(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ya(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 Ga(e,...t){const n=at.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Po(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function n_(e,t,n){const[r,o]=Ga(n?.in,e,t),i=Po(r),a=Po(o),s=+i-Ya(i),l=+a-Ya(a);return Math.round((s-l)/XI)}function r_(e,t){const n=wy(e,t),r=at(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ao(r)}function o_(e){return at(e,Date.now())}function i_(e,t,n){const[r,o]=Ga(n?.in,e,t);return+Po(r)==+Po(o)}function a_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ju(e){return!(!a_(e)&&typeof e!="number"||isNaN(+Je(e)))}function s_(e,t){const[n,r]=Ga(e,t.start,t.end);return{start:n,end:r}}function Sy(e,t){const{start:n,end:r}=s_(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(at(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Ty(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function l_(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function c_(e,t){const n=Br(),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 u_={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"}},d_=(e,t,n)=>{let r;const o=u_[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 zu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const f_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},p_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},h_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},m_={date:zu({formats:f_,defaultWidth:"full"}),time:zu({formats:p_,defaultWidth:"full"}),dateTime:zu({formats:h_,defaultWidth:"full"})},g_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},v_=(e,t,n,r)=>g_[e];function ji(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 y_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},x_={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"]},w_={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"]},S_={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"}},T_={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"}},E_={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:ji({values:y_,defaultWidth:"wide"}),quarter:ji({values:b_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ji({values:x_,defaultWidth:"wide"}),day:ji({values:w_,defaultWidth:"wide"}),dayPeriod:ji({values:S_,defaultWidth:"wide",formattingValues:T_,defaultFormattingWidth:"wide"})};function zi(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)?C_(s,d=>d.test(a)):k_(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 k_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function C_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function A_(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 P_=/^(\d+)(th|st|nd|rd)?/i,I_=/\d+/i,__={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},O_={any:[/^b/i,/^(a|c)/i]},M_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},D_={any:[/1/i,/2/i,/3/i,/4/i]},N_={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},F_={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]},L_={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},V_={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]},$_={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},j_={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}},z_={ordinalNumber:A_({matchPattern:P_,parsePattern:I_,valueCallback:e=>parseInt(e,10)}),era:zi({matchPatterns:__,defaultMatchWidth:"wide",parsePatterns:O_,defaultParseWidth:"any"}),quarter:zi({matchPatterns:M_,defaultMatchWidth:"wide",parsePatterns:D_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zi({matchPatterns:N_,defaultMatchWidth:"wide",parsePatterns:F_,defaultParseWidth:"any"}),day:zi({matchPatterns:L_,defaultMatchWidth:"wide",parsePatterns:V_,defaultParseWidth:"any"}),dayPeriod:zi({matchPatterns:$_,defaultMatchWidth:"any",parsePatterns:j_,defaultParseWidth:"any"})},Ey={code:"en-US",formatDistance:d_,formatLong:m_,formatRelative:v_,localize:E_,match:z_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function R_(e,t){const n=Je(e,t?.in);return n_(n,l_(n))+1}function ky(e,t){const n=Je(e,t?.in),r=+Ao(n)-+r_(n);return Math.round(r/yy)+1}function Ru(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=Br(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=at(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Mn(a,t),l=at(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Mn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function B_(e,t){const n=Br(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Ru(e,t),i=at(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Mn(i,t)}function Cy(e,t){const n=Je(e,t?.in),r=+Mn(n,t)-+B_(n,t);return Math.round(r/yy)+1}function et(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const cr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return et(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):et(n+1,2)},d(e,t){return et(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return et(e.getHours()%12||12,t.length)},H(e,t){return et(e.getHours(),t.length)},m(e,t){return et(e.getMinutes(),t.length)},s(e,t){return et(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return et(o,t.length)}},Io={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ay={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"});case"GGGG":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 cr.y(e,t)},Y:function(e,t,n,r){const o=Ru(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return et(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):et(i,t.length)},R:function(e,t){const n=wy(e);return et(n,t.length)},u:function(e,t){const n=e.getFullYear();return et(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 et(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"});case"QQQQ":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 et(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"});case"qqqq":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 cr.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"});case"MMMM":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 et(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Cy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):et(o,t.length)},I:function(e,t,n){const r=ky(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):et(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):cr.d(e,t)},D:function(e,t,n){const r=R_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):et(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"});case"EEEE":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 et(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"});case"eeee":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 et(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"});case"cccc":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 et(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"});case"iiii":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"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Io.noon:r===0?o=Io.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"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Io.evening:r>=12?o=Io.afternoon:r>=4?o=Io.morning:o=Io.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"});case"BBBB":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 cr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):cr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):cr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):cr.s(e,t)},S:function(e,t){return cr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Iy(r);case"XXXX":case"XX":return Hr(r);case"XXXXX":case"XXX":default:return Hr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Iy(r);case"xxxx":case"xx":return Hr(r);case"xxxxx":case"xxx":default:return Hr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Py(r,":");case"OOOO":default:return"GMT"+Hr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Py(r,":");case"zzzz":default:return"GMT"+Hr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return et(r,t.length)},T:function(e,t,n){return et(+e,t.length)}};function Py(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+et(i,2)}function Iy(e,t){return e%60===0?(e>0?"-":"+")+et(Math.abs(e)/60,2):Hr(e,t)}function Hr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=et(Math.trunc(r/60),2),i=et(r%60,2);return n+o+t+i}const _y=(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"});case"PPPP":default:return t.date({width:"full"})}},Oy=(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"});case"pppp":default:return t.time({width:"full"})}},Bu={p:Oy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return _y(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;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",_y(r,t)).replace("{{time}}",Oy(o,t))}},H_=/^D+$/,W_=/^Y+$/,q_=["D","DD","YY","YYYY"];function My(e){return H_.test(e)}function Dy(e){return W_.test(e)}function Hu(e,t,n){const r=U_(e,t,n);if(console.warn(r),q_.includes(e))throw new RangeError(r)}function U_(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 K_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,G_=/^'([^]*?)'?$/,Z_=/''/g,X_=/[a-zA-Z]/;function Q_(e,t,n){const r=Br(),o=r.locale??Ey,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!ju(s))throw new RangeError("Invalid time value");let l=t.match(Y_).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=Bu[d];return h(u,o.formatLong)}return u}).join("").match(K_).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:J_(u)};if(Ay[d])return{isToken:!0,value:u};if(d.match(X_))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;(Dy(d)||My(d))&&Hu(d,t,String(e));const h=Ay[d[0]];return h(s,d,o.localize,c)}).join("")}function J_(e){const t=e.match(G_);return t?t[1].replace(Z_,"'"):e}function eO(){return Object.assign({},Br())}function tO(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function nO(e,t){return+Je(e)>+Je(t)}function rO(e,t){return+Je(e)<+Je(t)}function oO(e,t){const n=iO(t)?new t(0):at(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function iO(e){return typeof e=="function"&&e.prototype?.constructor===e}const aO=10;class Ny{subPriority=0;validate(t,n){return!0}}class sO extends Ny{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 lO extends Ny{priority=aO;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>at(n,r))}set(t,n){return n.timestampIsSet?t:at(t,oO(t,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new sO(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class cO extends qe{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"});case"GGGG":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 wt={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}/},Dn={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 St(e,t){return e&&{value:t(e.value),rest:e.rest}}function mt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Nn(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*JI+i*QI+a*e_),rest:t.slice(n[0].length)}}function Fy(e){return mt(wt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+e+"}"),t)}}function Za(e,t){switch(e){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Wu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ly(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 Vy(e){return e%400===0||e%4===0&&e%100!==0}class uO extends qe{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 St(bt(4,t),o);case"yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(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=Ly(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 dO extends qe{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return St(bt(4,t),o);case"Yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Ru(t,o);if(r.isTwoDigitYear){const s=Ly(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mn(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),Mn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class fO extends qe{priority=130;parse(t,n){return Za(n==="R"?4:n.length,t)}set(t,n,r){const o=at(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Ao(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class pO extends qe{priority=130;parse(t,n){return Za(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 hO extends qe{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(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"});case"QQQQ":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 mO extends qe{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(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"});case"qqqq":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 gO extends qe{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 St(mt(wt.month,t),o);case"MM":return St(bt(2,t),o);case"Mo":return St(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"});case"MMMM":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 vO extends qe{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return St(mt(wt.month,t),o);case"LL":return St(bt(2,t),o);case"Lo":return St(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"});case"LLLL":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 yO(e,t,n){const r=Je(e,n?.in),o=Cy(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class bO extends qe{priority=100;parse(t,n,r){switch(n){case"w":return mt(wt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Mn(yO(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function xO(e,t,n){const r=Je(e,n?.in),o=ky(r,n)-t;return r.setDate(r.getDate()-o*7),r}class wO extends qe{priority=100;parse(t,n,r){switch(n){case"I":return mt(wt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Ao(xO(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const SO=[31,28,31,30,31,30,31,31,30,31,30,31],TO=[31,29,31,30,31,30,31,31,30,31,30,31];class EO extends qe{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return mt(wt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=Vy(r),i=t.getMonth();return o?n>=1&&n<=TO[i]:n>=1&&n<=SO[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 kO extends qe{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return mt(wt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return Vy(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 qu(e,t,n){const r=Br(),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 Ka(i,u,n)}class CO extends qe{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"});case"EEEE":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=qu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class AO extends qe{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 St(bt(n.length,t),i);case"eo":return St(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"});case"eeee":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=qu(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 PO extends qe{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 St(bt(n.length,t),i);case"co":return St(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"});case"cccc":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=qu(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 IO(e,t,n){const r=Je(e,n?.in),o=tO(r,n),i=t-o;return Ka(r,i,n)}class _O extends qe{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return St(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 St(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return St(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return St(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=IO(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 OO extends qe{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"});case"aaaa":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(Wu(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class MO extends qe{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"});case"bbbb":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(Wu(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class DO extends qe{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"});case"BBBB":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(Wu(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class NO extends qe{priority=70;parse(t,n,r){switch(n){case"h":return mt(wt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 FO extends qe{priority=70;parse(t,n,r){switch(n){case"H":return mt(wt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 LO extends qe{priority=70;parse(t,n,r){switch(n){case"K":return mt(wt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 VO extends qe{priority=70;parse(t,n,r){switch(n){case"k":return mt(wt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 $O extends qe{priority=60;parse(t,n,r){switch(n){case"m":return mt(wt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(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 jO extends qe{priority=50;parse(t,n,r){switch(n){case"s":return mt(wt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(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 zO extends qe{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return St(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class RO extends qe{priority=10;parse(t,n){switch(n){case"X":return Nn(Dn.basicOptionalMinutes,t);case"XX":return Nn(Dn.basic,t);case"XXXX":return Nn(Dn.basicOptionalSeconds,t);case"XXXXX":return Nn(Dn.extendedOptionalSeconds,t);case"XXX":default:return Nn(Dn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:at(t,t.getTime()-Ya(t)-r)}incompatibleTokens=["t","T","x"]}class BO extends qe{priority=10;parse(t,n){switch(n){case"x":return Nn(Dn.basicOptionalMinutes,t);case"xx":return Nn(Dn.basic,t);case"xxxx":return Nn(Dn.basicOptionalSeconds,t);case"xxxxx":return Nn(Dn.extendedOptionalSeconds,t);case"xxx":default:return Nn(Dn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:at(t,t.getTime()-Ya(t)-r)}incompatibleTokens=["t","T","X"]}class HO extends qe{priority=40;parse(t){return Fy(t)}set(t,n,r){return[at(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class WO extends qe{priority=20;parse(t){return Fy(t)}set(t,n,r){return[at(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const qO={G:new cO,y:new uO,Y:new dO,R:new fO,u:new pO,Q:new hO,q:new mO,M:new gO,L:new vO,w:new bO,I:new wO,d:new EO,D:new kO,E:new CO,e:new AO,c:new PO,i:new _O,a:new OO,b:new MO,B:new DO,h:new NO,H:new FO,K:new LO,k:new VO,m:new $O,s:new jO,S:new zO,X:new RO,x:new BO,t:new HO,T:new WO},UO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YO=/^'([^]*?)'?$/,GO=/''/g,ZO=/\S/,XO=/[a-zA-Z]/;function QO(e,t,n,r){const o=()=>at(n,NaN),i=eO(),a=i.locale??Ey,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 lO(r?.in,n)],d=t.match(KO).map(p=>{const v=p[0];if(v in Bu){const y=Bu[v];return y(p,a.formatLong)}return p}).join("").match(UO),h=[];for(let p of d){Dy(p)&&Hu(p,t,e),My(p)&&Hu(p,t,e);const v=p[0],y=qO[v];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=h.find(T=>x.includes(T.token)||T.token===v);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${p}\` at the same time`)}else if(y.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${p}\` and any other token at the same time`);h.push({token:v,fullToken:p});const E=y.run(e,p,a.match,c);if(!E)return o();u.push(E.setter),e=E.rest}else{if(v.match(XO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(p==="''"?p="'":v==="'"&&(p=JO(p)),e.indexOf(p)===0)e=e.slice(p.length);else return o()}}if(e.length>0&&ZO.test(e))return o();const f=u.map(p=>p.priority).sort((p,v)=>v-p).filter((p,v,y)=>y.indexOf(p)===v).map(p=>u.filter(v=>v.priority===p).sort((v,y)=>y.subPriority-v.subPriority)).map(p=>p[0]);let b=Je(n,r?.in);if(isNaN(+b))return o();const g={};for(const p of f){if(!p.validate(b,c))return o();const v=p.set(b,g,c);Array.isArray(v)?(b=v[0],Object.assign(g,v[1])):b=v}return b}function JO(e){return e.match(YO)[1].replace(GO,"'")}function eM(e,t,n){const[r,o]=Ga(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function tM(e,t){return i_(at(e,e),o_(e))}function nM(e,t,n){return Ka(e,-t,n)}function rM(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?at(e,NaN):(r.setFullYear(t),r)}function oM(e,t,n){return xy(e,-t,n)}function Ri(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=oM(e,o+r*12,n),d=nM(u,a+i*7,n),h=l+s*60,b=(c+h*60)*1e3;return at(e,+d-b)}var Tt=function(){return Tt=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},Tt.apply(this,arguments)};function Uu(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 Ku(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 Bi=function(e){return e.replace(new RegExp(" ","g")," ")},$y=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)},iM=function(e){return e.replace(/^0+([0-9]+)/,"$1")},jy=function(e,t,n){var r=e.length-2,o=iM(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},zy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Xa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},aM=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Yu=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},sM=function(e){return e==="money"||e==="currency"},lM=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Qa=function(e,t){var n=$y(zy(e),t.fraction.length),r="".concat(t.currency).concat(jy(n,t.group,t.decimal));return Bi(r)},cM=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=Uu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var b=lM(r,i,s);return b.currency=Bi("".concat(b.currency.trim()," ")),b.literal=Bi(b.literal.trim()),b},[r,i]),h=function(b){var g=Qa(b.target.value,d),p=Xa(g);b.target.value=g,b.target.setAttribute("data-number",p.toString()),l?.(b),p!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var b=u.current.value;if(b!==""){var g=Qa(b,d),p=Xa(g);u.current.value=g,u.current.setAttribute("data-number",p.toString());var v=new InputEvent("change",{});l?.(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),p!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Qa(c.defaultValue,d):void 0;return S.createElement("input",Tt({},c,{value:typeof c.value=="string"?Qa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),uM=1,dM=function(e){return e==="percentage"||e==="percent"||e==="percentual"},fM=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ja=function(e,t){var n=$y(zy(e),t.fraction.length),r="".concat(jy(n,t.group,t.decimal)," ").concat(t.percentSign);return Bi(r)},pM=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=Uu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=Ku(S.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Ja(y,d))},[a.value]);var d=S.useMemo(function(){var v=fM(r);return v.percentSign=Bi("".concat(v.percentSign)),v},[r]),h=c.length-d.percentSign.length-uM,f=function(v){var y,x=s.current;x&&(x.setSelectionRange(h,h),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},b=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,E=y.selectionEnd,w=x!==E,T=h<x;!w&&T&&f()}i?.(v)},g=function(v){var y=Ja(v.target.value,d),x=Xa(y);u(y),v.target.value=y,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=Ja(v,d),x=Xa(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var E=new InputEvent("change",{});o?.(Tt(Tt({},E),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return f()},[c]);var p=a.defaultValue?Ja(a.defaultValue,d):void 0;return S.createElement("input",Tt({},a,{defaultValue:p,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:b,ref:s,type:"text"}))}),Hi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},hM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=es[i];a===void 0?r.push(i.replace(Hi.dots,"\\.").replace(Hi.openParenthesis,"\\(").replace(Hi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Hi.leadingBars,"\\")},Wi=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=hM(o);return n?"^".concat(i,"$"):i},mM=function(e){return e.replace(Hi.escape,"\\$&")},Gu=function(e,t){var n=e.map(function(r){return typeof r=="string"?mM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},es={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]/}},gM=/\d/,Ry="(dd) 9dddd-dddd",By="(dd) dddd-dddd",Hy="ddd.ddd.ddd-dd",Wy="dd.ddd.ddd/dddd-dd",ts=function(e){return e.replace(/\D/g,"")},vM=["2",/[0-3]/,":",/[0-5]/,/\d/],yM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Zt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Hy,isoDate:"dddd-dd-dd",cnpj:Wy,telephone:By,cellphone:Ry,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ts(e).length<=11?Hy:Wy},int:function(e){return e===void 0&&(e=""),gM.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=ts(e);return t.length<11?By:Ry},time:function(e){var t=ts(e),n=t[0];return n==="2"?vM:yM}},Xt=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Wi(e,"",!0),infinity:n.infinity},n)},Bt={cellTelephone:Xt(Zt.cellTelephone,"tel"),cellphone:Xt(Zt.cellphone,"tel"),cep:Xt(Zt.cep,"decimal"),cnpj:Xt(Zt.cnpj,"decimal"),color:Xt(Zt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Xt(Zt.cpf,"decimal"),cpfCnpj:Xt(Zt.cpfCnpj,"decimal",{transform:ts}),creditCard:Xt(Zt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Xt(Zt.date,"decimal"),int:Xt(Zt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Xt(Zt.isoDate,"decimal"),telephone:Xt(Zt.telephone,"tel"),time:Xt(Zt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Xt(Zt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function qy(e,t,n,r){var o,i;r===void 0&&(r=es);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],h=a[c];if(d===void 0){s+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return s}var Uy=function(e){return e},bM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Wi(e,n,t));return r.test(n)};function xM(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var wM=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,h=e.as,f=Uu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),b=S.useRef(null);S.useImperativeHandle(t,function(){return b.current});var g=Yu(s),p=Yu(d),v=Yu(u),y=S.useRef(bM(u,i,f.value||f.defaultValue)),x=h??"input",E=Ku(S.useState(""),2),w=E[0],T=E[1],k=xM(w),C=S.useCallback(function(_,V){var N,P,$=(N=_??V)!==null&&N!==void 0?N:"";if(u===void 0)return $;var D=(P=$?.toString())!==null&&P!==void 0?P:"";return qy(D,typeof u=="function"?u(D):u,a??Uy,c??es)},[a,u,c]),M=Ku(S.useState(function(){return C(f.value,f.defaultValue)}),2),O=M[0],F=M[1],L=C(f.defaultValue,f.defaultValue),H=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(O);return Array.isArray(_)?Gu(_,i):Wi(u,O,i)}return typeof u=="string"?Wi(u,O,i):Gu(u,i)},[l,O,i,u]);S.useEffect(function(){if(f.value!==void 0){var _=C(f.value,f.defaultValue);F(_),b.current!==null&&(b.current.value=_)}},[f.value,u,a,f.defaultValue]);var I=function(_){var V,N,P,$,D,W=_.currentTarget,R=_.target.value;if(v.current===void 0)return F(R),(V=p.current)===null||V===void 0||V.call(p,R),(N=g.current)===null||N===void 0||N.call(g,_),d?.(R);var Z=new RegExp(Wi(v.current,R,i)),X=(P=W.selectionEnd)!==null&&P!==void 0?P:0,oe=function(G,J,j){if(G.type!=="number")return G.setSelectionRange(J,j)};if(r&&y.current&&R.length>=O.length)return W.value=O,oe(W,X-1,X-1);var te=!1;R.length<k.length&&(y.current=!1,te=!0),Z.test(R)&&(y.current=!0);var ee=X,B=R[ee-1],K=qy(R,typeof v.current=="function"?v.current(R):v.current,a??Uy,c??es);for(W.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==B;)ee+=1;te?oe(W,X,X):oe(W,ee,ee),_.target.value=K,T(K),($=p.current)===null||$===void 0||$.call(p,K),(D=g.current)===null||D===void 0||D.call(g,_)};return S.createElement(x,Tt({},f,{ref:b,pattern:H,onChange:I,defaultValue:Ky(f.defaultValue)?L:void 0,value:Ky(f.value)?C(f.value,f.value):f.value}))}),Ky=function(e){return typeof e=="string"},Yy=S.forwardRef(function(e,t){return sM(e.mask)?S.createElement(cM,Tt({},e,{mask:void 0,ref:t})):dM(e.mask)?S.createElement(pM,Tt({},e,{mask:void 0,ref:t})):S.createElement(wM,Tt({},e,{ref:t}))}),Qt=function(e){return function(t){return S.createElement(Yy,Tt({},e,t))}};Qt(Bt.cellTelephone),Qt(Bt.cellphone),Qt(Bt.cep),Qt(Bt.cnpj),Qt(Bt.color),Qt(Bt.cpf),Qt(Bt.cpfCnpj),Qt(Bt.creditCard),Qt(Bt.date),Qt(Bt.int),Qt(Bt.isoDate),Qt(Bt.telephone),Qt(Bt.time),Qt(Bt.uuid);var Gy=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&aM(Bt,t.mask)?Bt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return S.createElement(Yy,Tt({},o,{ref:n}))}),ns={exports:{}},Zu={},rs={exports:{}},Xu={};/**
182
+ */const Co=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},YI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},vy=e=>m.jsx(Je.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:gy,exit:gy.false,transition:YI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:ke("aria-hidden:pointer-events-none",e.className),children:e.children}),GI=so("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"}}),ZI=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return m.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:ke("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:m.jsx(vy,{"data-open":!!i,open:!!i,children:m.jsxs(un,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:ke(GI({theme:n}),t),children:[m.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?m.jsx(uy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?m.jsx(my,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?m.jsx(UI,{"aria-hidden":"true",size:20}):null,r,m.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?m.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:m.jsx(Co,{size:20})}):null]})})})}),yy=6048e5,XI=864e5,QI=6e4,JI=36e5,e_=1e3,by=Symbol.for("constructDateFrom");function st(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&by in e?e[by](t):e instanceof Date?new e.constructor(t):new Date(t)}function et(e,t){return st(t||e,e)}function Ka(e,t,n){const r=et(e,n?.in);return isNaN(t)?st(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function xy(e,t,n){const r=et(e,n?.in);if(isNaN(t))return st(e,NaN);if(!t)return r;const o=r.getDate(),i=st(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 Ao(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=et(e,n?.in),d=o||r?xy(u,o+r*12):u,h=a||i?Ka(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return st(e,+h+g)}let t_={};function Br(){return t_}function Mn(e,t){const n=Br(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=et(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 Po(e,t){return Mn(e,{...t,weekStartsOn:1})}function wy(e,t){const n=et(e,t?.in),r=n.getFullYear(),o=st(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Po(o),a=st(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Po(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ya(e){const t=et(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 Ga(e,...t){const n=st.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Io(e,t){const n=et(e,t?.in);return n.setHours(0,0,0,0),n}function n_(e,t,n){const[r,o]=Ga(n?.in,e,t),i=Io(r),a=Io(o),s=+i-Ya(i),l=+a-Ya(a);return Math.round((s-l)/XI)}function r_(e,t){const n=wy(e,t),r=st(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Po(r)}function o_(e){return st(e,Date.now())}function i_(e,t,n){const[r,o]=Ga(n?.in,e,t);return+Io(r)==+Io(o)}function a_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $u(e){return!(!a_(e)&&typeof e!="number"||isNaN(+et(e)))}function s_(e,t){const[n,r]=Ga(e,t.start,t.end);return{start:n,end:r}}function Sy(e,t){const{start:n,end:r}=s_(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(st(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Ty(e,t){const n=et(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function l_(e,t){const n=et(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function c_(e,t){const n=Br(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=et(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 u_={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"}},d_=(e,t,n)=>{let r;const o=u_[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 ju(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const f_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},p_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},h_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},m_={date:ju({formats:f_,defaultWidth:"full"}),time:ju({formats:p_,defaultWidth:"full"}),dateTime:ju({formats:h_,defaultWidth:"full"})},g_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},v_=(e,t,n,r)=>g_[e];function ji(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 y_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},x_={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"]},w_={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"]},S_={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"}},T_={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"}},E_={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:ji({values:y_,defaultWidth:"wide"}),quarter:ji({values:b_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ji({values:x_,defaultWidth:"wide"}),day:ji({values:w_,defaultWidth:"wide"}),dayPeriod:ji({values:S_,defaultWidth:"wide",formattingValues:T_,defaultFormattingWidth:"wide"})};function zi(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)?C_(s,d=>d.test(a)):k_(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 k_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function C_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function A_(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 P_=/^(\d+)(th|st|nd|rd)?/i,I_=/\d+/i,__={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},O_={any:[/^b/i,/^(a|c)/i]},M_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},D_={any:[/1/i,/2/i,/3/i,/4/i]},N_={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},F_={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]},L_={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},V_={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]},$_={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},j_={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}},z_={ordinalNumber:A_({matchPattern:P_,parsePattern:I_,valueCallback:e=>parseInt(e,10)}),era:zi({matchPatterns:__,defaultMatchWidth:"wide",parsePatterns:O_,defaultParseWidth:"any"}),quarter:zi({matchPatterns:M_,defaultMatchWidth:"wide",parsePatterns:D_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zi({matchPatterns:N_,defaultMatchWidth:"wide",parsePatterns:F_,defaultParseWidth:"any"}),day:zi({matchPatterns:L_,defaultMatchWidth:"wide",parsePatterns:V_,defaultParseWidth:"any"}),dayPeriod:zi({matchPatterns:$_,defaultMatchWidth:"any",parsePatterns:j_,defaultParseWidth:"any"})},Ey={code:"en-US",formatDistance:d_,formatLong:m_,formatRelative:v_,localize:E_,match:z_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function R_(e,t){const n=et(e,t?.in);return n_(n,l_(n))+1}function ky(e,t){const n=et(e,t?.in),r=+Po(n)-+r_(n);return Math.round(r/yy)+1}function zu(e,t){const n=et(e,t?.in),r=n.getFullYear(),o=Br(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=st(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Mn(a,t),l=st(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Mn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function B_(e,t){const n=Br(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=zu(e,t),i=st(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Mn(i,t)}function Cy(e,t){const n=et(e,t?.in),r=+Mn(n,t)-+B_(n,t);return Math.round(r/yy)+1}function tt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const cr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return tt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):tt(n+1,2)},d(e,t){return tt(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return tt(e.getHours()%12||12,t.length)},H(e,t){return tt(e.getHours(),t.length)},m(e,t){return tt(e.getMinutes(),t.length)},s(e,t){return tt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return tt(o,t.length)}},_o={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ay={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"});case"GGGG":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 cr.y(e,t)},Y:function(e,t,n,r){const o=zu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return tt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):tt(i,t.length)},R:function(e,t){const n=wy(e);return tt(n,t.length)},u:function(e,t){const n=e.getFullYear();return tt(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 tt(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"});case"QQQQ":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 tt(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"});case"qqqq":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 cr.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"});case"MMMM":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 tt(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Cy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):tt(o,t.length)},I:function(e,t,n){const r=ky(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):tt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):cr.d(e,t)},D:function(e,t,n){const r=R_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):tt(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"});case"EEEE":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 tt(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"});case"eeee":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 tt(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"});case"cccc":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 tt(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"});case"iiii":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"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=_o.noon:r===0?o=_o.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"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=_o.evening:r>=12?o=_o.afternoon:r>=4?o=_o.morning:o=_o.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"});case"BBBB":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 cr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):cr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):tt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):tt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):cr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):cr.s(e,t)},S:function(e,t){return cr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Iy(r);case"XXXX":case"XX":return Hr(r);case"XXXXX":case"XXX":default:return Hr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Iy(r);case"xxxx":case"xx":return Hr(r);case"xxxxx":case"xxx":default:return Hr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Py(r,":");case"OOOO":default:return"GMT"+Hr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Py(r,":");case"zzzz":default:return"GMT"+Hr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return tt(r,t.length)},T:function(e,t,n){return tt(+e,t.length)}};function Py(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+tt(i,2)}function Iy(e,t){return e%60===0?(e>0?"-":"+")+tt(Math.abs(e)/60,2):Hr(e,t)}function Hr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=tt(Math.trunc(r/60),2),i=tt(r%60,2);return n+o+t+i}const _y=(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"});case"PPPP":default:return t.date({width:"full"})}},Oy=(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"});case"pppp":default:return t.time({width:"full"})}},Ru={p:Oy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return _y(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;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",_y(r,t)).replace("{{time}}",Oy(o,t))}},H_=/^D+$/,W_=/^Y+$/,q_=["D","DD","YY","YYYY"];function My(e){return H_.test(e)}function Dy(e){return W_.test(e)}function Bu(e,t,n){const r=U_(e,t,n);if(console.warn(r),q_.includes(e))throw new RangeError(r)}function U_(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 K_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,G_=/^'([^]*?)'?$/,Z_=/''/g,X_=/[a-zA-Z]/;function Q_(e,t,n){const r=Br(),o=r.locale??Ey,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=et(e,n?.in);if(!$u(s))throw new RangeError("Invalid time value");let l=t.match(Y_).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=Ru[d];return h(u,o.formatLong)}return u}).join("").match(K_).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:J_(u)};if(Ay[d])return{isToken:!0,value:u};if(d.match(X_))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;(Dy(d)||My(d))&&Bu(d,t,String(e));const h=Ay[d[0]];return h(s,d,o.localize,c)}).join("")}function J_(e){const t=e.match(G_);return t?t[1].replace(Z_,"'"):e}function eO(){return Object.assign({},Br())}function tO(e,t){const n=et(e,t?.in).getDay();return n===0?7:n}function nO(e,t){return+et(e)>+et(t)}function rO(e,t){return+et(e)<+et(t)}function oO(e,t){const n=iO(t)?new t(0):st(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function iO(e){return typeof e=="function"&&e.prototype?.constructor===e}const aO=10;class Ny{subPriority=0;validate(t,n){return!0}}class sO extends Ny{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 lO extends Ny{priority=aO;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>st(n,r))}set(t,n){return n.timestampIsSet?t:st(t,oO(t,this.context))}}class qe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new sO(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class cO extends qe{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"});case"GGGG":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 wt={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}/},Dn={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 St(e,t){return e&&{value:t(e.value),rest:e.rest}}function mt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Nn(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*JI+i*QI+a*e_),rest:t.slice(n[0].length)}}function Fy(e){return mt(wt.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+e+"}"),t)}}function Za(e,t){switch(e){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Hu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ly(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 Vy(e){return e%400===0||e%4===0&&e%100!==0}class uO extends qe{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 St(bt(4,t),o);case"yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(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=Ly(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 dO extends qe{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return St(bt(4,t),o);case"Yo":return St(r.ordinalNumber(t,{unit:"year"}),o);default:return St(bt(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=zu(t,o);if(r.isTwoDigitYear){const s=Ly(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mn(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),Mn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class fO extends qe{priority=130;parse(t,n){return Za(n==="R"?4:n.length,t)}set(t,n,r){const o=st(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Po(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class pO extends qe{priority=130;parse(t,n){return Za(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 hO extends qe{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return bt(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"});case"QQQQ":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 mO extends qe{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return bt(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"});case"qqqq":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 gO extends qe{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 St(mt(wt.month,t),o);case"MM":return St(bt(2,t),o);case"Mo":return St(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"});case"MMMM":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 vO extends qe{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return St(mt(wt.month,t),o);case"LL":return St(bt(2,t),o);case"Lo":return St(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"});case"LLLL":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 yO(e,t,n){const r=et(e,n?.in),o=Cy(r,n)-t;return r.setDate(r.getDate()-o*7),et(r,n?.in)}class bO extends qe{priority=100;parse(t,n,r){switch(n){case"w":return mt(wt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Mn(yO(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function xO(e,t,n){const r=et(e,n?.in),o=ky(r,n)-t;return r.setDate(r.getDate()-o*7),r}class wO extends qe{priority=100;parse(t,n,r){switch(n){case"I":return mt(wt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return bt(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Po(xO(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const SO=[31,28,31,30,31,30,31,31,30,31,30,31],TO=[31,29,31,30,31,30,31,31,30,31,30,31];class EO extends qe{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return mt(wt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=Vy(r),i=t.getMonth();return o?n>=1&&n<=TO[i]:n>=1&&n<=SO[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 kO extends qe{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return mt(wt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return bt(n.length,t)}}validate(t,n){const r=t.getFullYear();return Vy(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 Wu(e,t,n){const r=Br(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=et(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 Ka(i,u,n)}class CO extends qe{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"});case"EEEE":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=Wu(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class AO extends qe{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 St(bt(n.length,t),i);case"eo":return St(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"});case"eeee":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=Wu(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 PO extends qe{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 St(bt(n.length,t),i);case"co":return St(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"});case"cccc":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=Wu(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 IO(e,t,n){const r=et(e,n?.in),o=tO(r,n),i=t-o;return Ka(r,i,n)}class _O extends qe{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return bt(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return St(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 St(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return St(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return St(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=IO(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 OO extends qe{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"});case"aaaa":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(Hu(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class MO extends qe{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"});case"bbbb":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(Hu(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class DO extends qe{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"});case"BBBB":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(Hu(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class NO extends qe{priority=70;parse(t,n,r){switch(n){case"h":return mt(wt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 FO extends qe{priority=70;parse(t,n,r){switch(n){case"H":return mt(wt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 LO extends qe{priority=70;parse(t,n,r){switch(n){case"K":return mt(wt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 VO extends qe{priority=70;parse(t,n,r){switch(n){case"k":return mt(wt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return bt(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 $O extends qe{priority=60;parse(t,n,r){switch(n){case"m":return mt(wt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return bt(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 jO extends qe{priority=50;parse(t,n,r){switch(n){case"s":return mt(wt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return bt(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 zO extends qe{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return St(bt(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class RO extends qe{priority=10;parse(t,n){switch(n){case"X":return Nn(Dn.basicOptionalMinutes,t);case"XX":return Nn(Dn.basic,t);case"XXXX":return Nn(Dn.basicOptionalSeconds,t);case"XXXXX":return Nn(Dn.extendedOptionalSeconds,t);case"XXX":default:return Nn(Dn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:st(t,t.getTime()-Ya(t)-r)}incompatibleTokens=["t","T","x"]}class BO extends qe{priority=10;parse(t,n){switch(n){case"x":return Nn(Dn.basicOptionalMinutes,t);case"xx":return Nn(Dn.basic,t);case"xxxx":return Nn(Dn.basicOptionalSeconds,t);case"xxxxx":return Nn(Dn.extendedOptionalSeconds,t);case"xxx":default:return Nn(Dn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:st(t,t.getTime()-Ya(t)-r)}incompatibleTokens=["t","T","X"]}class HO extends qe{priority=40;parse(t){return Fy(t)}set(t,n,r){return[st(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class WO extends qe{priority=20;parse(t){return Fy(t)}set(t,n,r){return[st(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const qO={G:new cO,y:new uO,Y:new dO,R:new fO,u:new pO,Q:new hO,q:new mO,M:new gO,L:new vO,w:new bO,I:new wO,d:new EO,D:new kO,E:new CO,e:new AO,c:new PO,i:new _O,a:new OO,b:new MO,B:new DO,h:new NO,H:new FO,K:new LO,k:new VO,m:new $O,s:new jO,S:new zO,X:new RO,x:new BO,t:new HO,T:new WO},UO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YO=/^'([^]*?)'?$/,GO=/''/g,ZO=/\S/,XO=/[a-zA-Z]/;function QO(e,t,n,r){const o=()=>st(n,NaN),i=eO(),a=i.locale??Ey,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():et(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new lO(r?.in,n)],d=t.match(KO).map(p=>{const v=p[0];if(v in Ru){const y=Ru[v];return y(p,a.formatLong)}return p}).join("").match(UO),h=[];for(let p of d){Dy(p)&&Bu(p,t,e),My(p)&&Bu(p,t,e);const v=p[0],y=qO[v];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=h.find(E=>x.includes(E.token)||E.token===v);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${p}\` at the same time`)}else if(y.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${p}\` and any other token at the same time`);h.push({token:v,fullToken:p});const T=y.run(e,p,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(XO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(p==="''"?p="'":v==="'"&&(p=JO(p)),e.indexOf(p)===0)e=e.slice(p.length);else return o()}}if(e.length>0&&ZO.test(e))return o();const f=u.map(p=>p.priority).sort((p,v)=>v-p).filter((p,v,y)=>y.indexOf(p)===v).map(p=>u.filter(v=>v.priority===p).sort((v,y)=>y.subPriority-v.subPriority)).map(p=>p[0]);let b=et(n,r?.in);if(isNaN(+b))return o();const g={};for(const p of f){if(!p.validate(b,c))return o();const v=p.set(b,g,c);Array.isArray(v)?(b=v[0],Object.assign(g,v[1])):b=v}return b}function JO(e){return e.match(YO)[1].replace(GO,"'")}function eM(e,t,n){const[r,o]=Ga(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function tM(e,t){return i_(st(e,e),o_(e))}function nM(e,t,n){return Ka(e,-t,n)}function rM(e,t,n){const r=et(e,n?.in);return isNaN(+r)?st(e,NaN):(r.setFullYear(t),r)}function oM(e,t,n){return xy(e,-t,n)}function Ri(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=oM(e,o+r*12,n),d=nM(u,a+i*7,n),h=l+s*60,b=(c+h*60)*1e3;return st(e,+d-b)}var Tt=function(){return Tt=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},Tt.apply(this,arguments)};function qu(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 Uu(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 Bi=function(e){return e.replace(new RegExp(" ","g")," ")},$y=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)},iM=function(e){return e.replace(/^0+([0-9]+)/,"$1")},jy=function(e,t,n){var r=e.length-2,o=iM(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},zy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Xa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},aM=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},sM=function(e){return e==="money"||e==="currency"},lM=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Tt(Tt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Qa=function(e,t){var n=$y(zy(e),t.fraction.length),r="".concat(t.currency).concat(jy(n,t.group,t.decimal));return Bi(r)},cM=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=qu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var b=lM(r,i,s);return b.currency=Bi("".concat(b.currency.trim()," ")),b.literal=Bi(b.literal.trim()),b},[r,i]),h=function(b){var g=Qa(b.target.value,d),p=Xa(g);b.target.value=g,b.target.setAttribute("data-number",p.toString()),l?.(b),p!==0&&(u.current.selectionEnd=g.length)};S.useEffect(function(){if(u.current!==null){var b=u.current.value;if(b!==""){var g=Qa(b,d),p=Xa(g);u.current.value=g,u.current.setAttribute("data-number",p.toString());var v=new InputEvent("change",{});l?.(Tt(Tt({},v),{target:u.current,currentTarget:u.current})),p!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Qa(c.defaultValue,d):void 0;return S.createElement("input",Tt({},c,{value:typeof c.value=="string"?Qa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),uM=1,dM=function(e){return e==="percentage"||e==="percent"||e==="percentual"},fM=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Tt(Tt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ja=function(e,t){var n=$y(zy(e),t.fraction.length),r="".concat(jy(n,t.group,t.decimal)," ").concat(t.percentSign);return Bi(r)},pM=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=qu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=Uu(S.useState(function(){var v,y;return(y=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var v,y=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Ja(y,d))},[a.value]);var d=S.useMemo(function(){var v=fM(r);return v.percentSign=Bi("".concat(v.percentSign)),v},[r]),h=c.length-d.percentSign.length-uM,f=function(v){var y,x=s.current;x&&(x.setSelectionRange(h,h),v&&((y=a.onFocus)===null||y===void 0||y.call(a,v)))},b=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var x=y.selectionStart,T=y.selectionEnd,w=x!==T,E=h<x;!w&&E&&f()}i?.(v)},g=function(v){var y=Ja(v.target.value,d),x=Xa(y);u(y),v.target.value=y,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var y=Ja(v,d),x=Xa(y);u(y),s.current.value=y,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Tt(Tt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return f()},[c]);var p=a.defaultValue?Ja(a.defaultValue,d):void 0;return S.createElement("input",Tt({},a,{defaultValue:p,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:b,ref:s,type:"text"}))}),Hi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},hM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=es[i];a===void 0?r.push(i.replace(Hi.dots,"\\.").replace(Hi.openParenthesis,"\\(").replace(Hi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Hi.leadingBars,"\\")},Wi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Yu(o,n);var i=hM(o);return n?"^".concat(i,"$"):i},mM=function(e){return e.replace(Hi.escape,"\\$&")},Yu=function(e,t){var n=e.map(function(r){return typeof r=="string"?mM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},es={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]/}},gM=/\d/,Ry="(dd) 9dddd-dddd",By="(dd) dddd-dddd",Hy="ddd.ddd.ddd-dd",Wy="dd.ddd.ddd/dddd-dd",ts=function(e){return e.replace(/\D/g,"")},vM=["2",/[0-3]/,":",/[0-5]/,/\d/],yM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Zt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Hy,isoDate:"dddd-dd-dd",cnpj:Wy,telephone:By,cellphone:Ry,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ts(e).length<=11?Hy:Wy},int:function(e){return e===void 0&&(e=""),gM.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=ts(e);return t.length<11?By:Ry},time:function(e){var t=ts(e),n=t[0];return n==="2"?vM:yM}},Xt=function(e,t,n){var r;return n===void 0&&(n={}),Tt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Wi(e,"",!0),infinity:n.infinity},n)},Bt={cellTelephone:Xt(Zt.cellTelephone,"tel"),cellphone:Xt(Zt.cellphone,"tel"),cep:Xt(Zt.cep,"decimal"),cnpj:Xt(Zt.cnpj,"decimal"),color:Xt(Zt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Xt(Zt.cpf,"decimal"),cpfCnpj:Xt(Zt.cpfCnpj,"decimal",{transform:ts}),creditCard:Xt(Zt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Xt(Zt.date,"decimal"),int:Xt(Zt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Xt(Zt.isoDate,"decimal"),telephone:Xt(Zt.telephone,"tel"),time:Xt(Zt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Xt(Zt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function qy(e,t,n,r){var o,i;r===void 0&&(r=es);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],h=a[c];if(d===void 0){s+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return s}var Uy=function(e){return e},bM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Wi(e,n,t));return r.test(n)};function xM(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var wM=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,h=e.as,f=qu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),b=S.useRef(null);S.useImperativeHandle(t,function(){return b.current});var g=Ku(s),p=Ku(d),v=Ku(u),y=S.useRef(bM(u,i,f.value||f.defaultValue)),x=h??"input",T=Uu(S.useState(""),2),w=T[0],E=T[1],k=xM(w),C=S.useCallback(function(O,$){var D,P,j=(D=O??$)!==null&&D!==void 0?D:"";if(u===void 0)return j;var N=(P=j?.toString())!==null&&P!==void 0?P:"";return qy(N,typeof u=="function"?u(N):u,a??Uy,c??es)},[a,u,c]),M=Uu(S.useState(function(){return C(f.value,f.defaultValue)}),2),_=M[0],F=M[1],V=C(f.defaultValue,f.defaultValue),H=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(_);return Array.isArray(O)?Yu(O,i):Wi(u,_,i)}return typeof u=="string"?Wi(u,_,i):Yu(u,i)},[l,_,i,u]);S.useEffect(function(){if(f.value!==void 0){var O=C(f.value,f.defaultValue);F(O),b.current!==null&&(b.current.value=O)}},[f.value,u,a,f.defaultValue]);var I=function(O){var $,D,P,j,N,U=O.currentTarget,R=O.target.value;if(v.current===void 0)return F(R),($=p.current)===null||$===void 0||$.call(p,R),(D=g.current)===null||D===void 0||D.call(g,O),d?.(R);var Z=new RegExp(Wi(v.current,R,i)),G=(P=U.selectionEnd)!==null&&P!==void 0?P:0,re=function(X,Q,z){if(X.type!=="number")return X.setSelectionRange(Q,z)};if(r&&y.current&&R.length>=_.length)return U.value=_,re(U,G-1,G-1);var te=!1;R.length<k.length&&(y.current=!1,te=!0),Z.test(R)&&(y.current=!0);var ee=G,B=R[ee-1],q=qy(R,typeof v.current=="function"?v.current(R):v.current,a??Uy,c??es);for(U.value=q,F(q);ee<q.length&&q.charAt(ee-1)!==B;)ee+=1;te?re(U,G,G):re(U,ee,ee),O.target.value=q,E(q),(j=p.current)===null||j===void 0||j.call(p,q),(N=g.current)===null||N===void 0||N.call(g,O)};return S.createElement(x,Tt({},f,{ref:b,pattern:H,onChange:I,defaultValue:Ky(f.defaultValue)?V:void 0,value:Ky(f.value)?C(f.value,f.value):f.value}))}),Ky=function(e){return typeof e=="string"},Yy=S.forwardRef(function(e,t){return sM(e.mask)?S.createElement(cM,Tt({},e,{mask:void 0,ref:t})):dM(e.mask)?S.createElement(pM,Tt({},e,{mask:void 0,ref:t})):S.createElement(wM,Tt({},e,{ref:t}))}),Qt=function(e){return function(t){return S.createElement(Yy,Tt({},e,t))}};Qt(Bt.cellTelephone),Qt(Bt.cellphone),Qt(Bt.cep),Qt(Bt.cnpj),Qt(Bt.color),Qt(Bt.cpf),Qt(Bt.cpfCnpj),Qt(Bt.creditCard),Qt(Bt.date),Qt(Bt.int),Qt(Bt.isoDate),Qt(Bt.telephone),Qt(Bt.time),Qt(Bt.uuid);var Gy=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&aM(Bt,t.mask)?Bt[t.mask]:{mask:t.mask}},[t.mask]),o=Tt(Tt({},t),r);return S.createElement(Yy,Tt({},o,{ref:n}))}),ns={exports:{}},Gu={},rs={exports:{}},Zu={};/**
183
183
  * @license React
184
184
  * use-sync-external-store-shim.production.js
185
185
  *
@@ -187,7 +187,7 @@
187
187
  *
188
188
  * This source code is licensed under the MIT license found in the
189
189
  * LICENSE file in the root directory of this source tree.
190
- */var Zy;function SM(){if(Zy)return Xu;Zy=1;var e=S;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,h){var f=h(),b=r({inst:{value:f,getSnapshot:h}}),g=b[0].inst,p=b[1];return i(function(){g.value=f,g.getSnapshot=h,l(g)&&p({inst:g})},[d,f,h]),o(function(){return l(g)&&p({inst:g}),d(function(){l(g)&&p({inst:g})})},[d]),a(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Xu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Xu}var Qu={};/**
190
+ */var Zy;function SM(){if(Zy)return Zu;Zy=1;var e=S;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,h){var f=h(),b=r({inst:{value:f,getSnapshot:h}}),g=b[0].inst,p=b[1];return i(function(){g.value=f,g.getSnapshot=h,l(g)&&p({inst:g})},[d,f,h]),o(function(){return l(g)&&p({inst:g}),d(function(){l(g)&&p({inst:g})})},[d]),a(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Zu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Zu}var Xu={};/**
191
191
  * @license React
192
192
  * use-sync-external-store-shim.development.js
193
193
  *
@@ -195,7 +195,7 @@
195
195
  *
196
196
  * This source code is licensed under the MIT license found in the
197
197
  * LICENSE file in the root directory of this source tree.
198
- */var Xy;function TM(){return Xy||(Xy=1,process.env.NODE_ENV!=="production"&&function(){function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}function t(f,b){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=b();if(!d){var p=b();i(g,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}p=a({inst:{value:g,getSnapshot:b}});var v=p[0].inst,y=p[1];return l(function(){v.value=g,v.getSnapshot=b,n(v)&&y({inst:v})},[f,g,b]),s(function(){return n(v)&&y({inst:v}),f(function(){n(v)&&y({inst:v})})},[f]),c(g),g}function n(f){var b=f.getSnapshot;f=f.value;try{var g=b();return!i(f,g)}catch{return!0}}function r(f,b){return b()}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,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Qu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Qu}var Qy;function Jy(){return Qy||(Qy=1,process.env.NODE_ENV==="production"?rs.exports=SM():rs.exports=TM()),rs.exports}/**
198
+ */var Xy;function TM(){return Xy||(Xy=1,process.env.NODE_ENV!=="production"&&function(){function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}function t(f,b){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=b();if(!d){var p=b();i(g,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}p=a({inst:{value:g,getSnapshot:b}});var v=p[0].inst,y=p[1];return l(function(){v.value=g,v.getSnapshot=b,n(v)&&y({inst:v})},[f,g,b]),s(function(){return n(v)&&y({inst:v}),f(function(){n(v)&&y({inst:v})})},[f]),c(g),g}function n(f){var b=f.getSnapshot;f=f.value;try{var g=b();return!i(f,g)}catch{return!0}}function r(f,b){return b()}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,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Xu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Xu}var Qy;function Jy(){return Qy||(Qy=1,process.env.NODE_ENV==="production"?rs.exports=SM():rs.exports=TM()),rs.exports}/**
199
199
  * @license React
200
200
  * use-sync-external-store-shim/with-selector.production.js
201
201
  *
@@ -203,7 +203,7 @@
203
203
  *
204
204
  * This source code is licensed under the MIT license found in the
205
205
  * LICENSE file in the root directory of this source tree.
206
- */var eb;function EM(){if(eb)return Zu;eb=1;var e=S,t=Jy();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 Zu.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(T){if(!y){if(y=!0,x=T,T=h(T),f!==void 0&&g.hasValue){var k=g.value;if(f(k,T))return E=k}return E=T}if(k=E,r(x,T))return k;var C=h(T);return f!==void 0&&f(k,C)?(x=T,k):(x=T,E=C)}var y=!1,x,E,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,h,f]);var p=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=p},[p]),l(p),p},Zu}var Ju={};/**
206
+ */var eb;function EM(){if(eb)return Gu;eb=1;var e=S,t=Jy();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 Gu.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=h(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=h(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,h,f]);var p=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=p},[p]),l(p),p},Gu}var Qu={};/**
207
207
  * @license React
208
208
  * use-sync-external-store-shim/with-selector.development.js
209
209
  *
@@ -211,37 +211,37 @@
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var tb;function kM(){return tb||(tb=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=Jy(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Ju.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(T){if(!y){if(y=!0,x=T,T=h(T),f!==void 0&&g.hasValue){var k=g.value;if(f(k,T))return E=k}return E=T}if(k=E,r(x,T))return k;var C=h(T);return f!==void 0&&f(k,C)?(x=T,k):(x=T,E=C)}var y=!1,x,E,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,h,f]);var p=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ju}var nb;function CM(){return nb||(nb=1,process.env.NODE_ENV==="production"?ns.exports=EM():ns.exports=kM()),ns.exports}CM();var _o=function(){return _o=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},_o.apply(this,arguments)};function qi(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 rb(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 Oo=function(e){var t=S.useRef(e??{});return S.useEffect(function(){return void(t.current=e)},[e]),t},AM=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},PM=function(e){return Object.entries(e)},ob=function(e){return e instanceof Promise},ib=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)},_o(_o({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},IM=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,rb([],qi(a),!1)),u=function(d,h){return n(function(f){return ib(d,f,i,h)})};return ob(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))}},_M=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,rb([],qi(a),!1)),c=function(u){return n(function(d){return ib(u,d,i,o.current)})};return ob(l)?l.then(function(u){return c(u)}):c(l)}},os=function(e,t,n){var r,o,i,a=qi(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Oo(s),u=Oo((r=n?.props)!==null&&r!==void 0?r:{}),d=Oo(t),h=Oo((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),f=Oo((i=n?.interceptor)!==null&&i!==void 0?i:[]),b=S.useRef(e),g=AM(s),p=Oo(g),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var E=v.current;h.current.forEach(function(w){w(s,g,E)})}},[s,h,g]);var y=qi(S.useState(function(){var E=function(){return u.current},w=d.current({props:E,state:function(){return c.current},initialState:b.current,previousState:function(){return p.current}});return PM(w).reduce(function(T,k){var C,M=qi(k,2),O=M[0],F=M[1];return _o(_o({},T),(C={},C[O]=n?.debug?IM(O,F,l,E,v,f.current):_M(O,F,l,E,v,f.current),C))},{})}),1),x=y[0];return[s,x,u.current]};const OM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function MM(e,t){return S.useRef(OM(e,t)).current}const is={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>)`},ur=(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(ur(a,t,n,s))},[]),ab=(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]:ab(a,t,n,s)}},{}),sb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},as=(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)},DM={default:e=>as(e,{result:sb.default}),dark:e=>as(e,{result:sb.dark})},Mo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},NM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),ed=(e,t)=>{const n=ur(e.colors,Mo(t?.colors)),r=ur(e.spacing,Mo(t?.spacing)),o=ur(e.rounded,Mo(t?.rounded)),i=ur(e.shadow,Mo(t?.rounded)),a=ur(e.zIndex,Mo(t?.zIndex??NM)),s=e.custom?ur(e.custom,Mo(t?.customTokens)):[];return n.concat(r,o,s,a,i)},FM=(e,t)=>as(ed(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),LM=(e,t)=>ed(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),VM=(e,t)=>as(ed(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ss={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",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",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"},ls={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Do=S.createContext({tweaks:ls,parser:is.hsla,map:ss,locale:void 0}),td=e=>{const t=S.useContext(Do);if(e)return e;if(t)return t.locale||e};function lb(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 Et=()=>{const e=S.useContext(Do);return e?e.map:ss},mn=(e,t=2)=>e.toString(16).padStart(t,"0"),No=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${mn(t,4)+mn(n,3)}-${mn(r[0])+mn(r[1])}-${mn(r[2])+mn(r[3])}-${mn(r[4])+mn(r[5])}-${mn(r[6])+mn(r[7])+mn(r[8])+mn(r[9])}`},cb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ub={basic:/[,[\]]+?/,extend:/[,[\].]+?/},nd=(e,t)=>{const n=cb(t,ub.basic,e)||cb(t,ub.extend,e);return n===void 0||n===e?void 0:n},dr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),db=(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},$M=e=>!e,od=()=>{},fb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},jM={type:"spring",bounce:.3,duration:.6},pb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),hb={enter:pb(1),exit:pb(-1),middle:{x:"0%",opacity:1}},mb={exit:{visibility:"hidden"}},zM=e=>{const t=Mn(Ty(e));return Sy({start:t,end:Co(t,{days:41})})},gb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),RM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Ty(new Date(1970,o,1).setMonth(o)),a=gb(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),id={ArrowLeft:(e,t)=>t==="days"?Ri(e,{days:1}):Ri(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Co(e,{days:1}):Co(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ri(e,{weeks:1}):Ri(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Co(e,{weeks:1}):Co(e,{years:1})},vb=(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:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Wr=e=>e.getFullYear().toString().padStart(4,"0"),BM=(e,t,n)=>e===void 0||n===void 0?!1:nO(t,e)&&rO(t,n),HM=e=>{const t=Et();return m.jsx(Qe.tbody,{layout:!0,variants:hb,custom:e.direction,onKeyDown:e.onKeyDown,className:Ce(e.styles?.week),children:e.zip.map((n,r)=>{const o=Ve.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?.toISOString(),l=tM(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=eM(i,e.stateDate),d=!u||c,h=e.rangeMode?BM(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:Ce("relative",Ve.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:Ce(`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":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",Ve.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}`)})})},WM=()=>Po(new Date),yb=({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,...h})=>{const f=S.useRef(No()),b=Et(),g=td(o),p=S.useRef(null),{date:v,range:y}=h,x=v||new Date,E=S.useRef(null),[w,T]=os({date:x,isAnimating:!1,year:Wr(x),direction:void 0,range:{from:y?.from,to:y?.to},months:RM(f.current,x,g),selectMode:l?"from":void 0,week:Sy({start:Mn(x),end:c_(x)})},_=>({onChangeYear:V=>({year:V}),onExitComplete:()=>(vb(E.current||null,p,_.state().date,200),E.current=null,{isAnimating:!1}),date:V=>{const N=V(_.state().date);return{date:N,year:Wr(N)}},nextMonth:V=>{V&&(E.current=V.currentTarget);const N=_.state();if(N.isAnimating)return N;const P=Co(N.date,{months:1});return{date:P,isAnimating:!0,direction:1,year:Wr(P)}},previousMonth:V=>{V&&(E.current=V.currentTarget);const N=_.state();if(N.isAnimating)return N;const P=Ri(N.date,{months:1});return{date:P,isAnimating:!0,direction:-1,year:Wr(P)}},onSelectDate:V=>{const N=_.state(),P=V.currentTarget.dataset.range==="true",$=V.currentTarget.dataset.date||"",D=new Date($);return{date:D,year:Wr(D),selectMode:N.selectMode===void 0?void 0:N.selectMode==="from"?"to":"from",range:P?{from:N.selectMode==="from"?D:N.range.from,to:N.selectMode==="to"?D:N.range.to}:N.range}},onChangeMonth:V=>{const N=V.target.value,$=Array.from(V.target.options).find(W=>W.value===N),D=_.state();if($){const W=$.dataset.index||"",R=new Date(_.state().date);return R.setMonth(+W),{...D,date:R,year:Wr(R)}}return D},onKeyDown:V=>{const N=V.key,P=_.state();if(N in id){(N==="ArrowUp"||N==="ArrowDown")&&V.preventDefault();const $=_.state().date,D=Ve.keyof(id,N)?id[N]($,V.shiftKey?"month":"days"):null;if(D!==null)return vb(V.target,p,D),{...P,date:D,year:Wr(D)}}return _.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(_,V,N)=>((N.method==="onChangeMonth"||N.method==="previousMonth"||N.method==="nextMonth")&&N.props.onChangeMonth?.(_.date),_),(_,V,N)=>(N.method==="onChangeYear"&&N.props.onChangeYear?.(_.date),_),(_,V,N)=>{const P=N.method==="onSelectDate"||N.method==="setToday"||N.method==="onKeyDown";return l&&P&&t?(c?.(_.range),_):(P&&t&&c?.(_.date),_)}]}),k=zM(w.date),C=db(k,7),M=w.date.toISOString(),O=gb(w.date,g);S.useEffect(()=>{t||c?.(w.date)},[M,t]);const F=MM(_=>T.date(V=>rM(new Date(V),+_)),1200),L=_=>{const V=_.currentTarget.value;T.onChangeYear(V),s?.(new Date(V)),F(V)},H=lb((_,V)=>(_.preventDefault(),V==="right"?T.previousMonth():T.nextMonth()),10),I=()=>{const _=WM();T.date(()=>_),c?.(_)};return m.jsx(bg,{transition:jM,children:m.jsxs("div",{ref:p,"data-component":"calendar",onTouchEnd:H.onTouchEnd,onTouchStart:H.onTouchStart,className:Ce("relative overflow-hidden",Ve.function(u?.calendar)?u?.calendar(k):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(Xn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:m.jsxs(Qe.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(Qe.button,{layout:!0,type:"button","data-focustrap":"prev",variants:mb,onClick:T.previousMonth,title:b.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(FI,{className:"h-4 w-4"})}),m.jsx(Qe.span,{layout:!0,variants:hb,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:O,onChange:T.onChangeMonth,"aria-label":b.calendarMonthLabel,style:{width:`${O.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),m.jsx(Gy,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:L,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(Qe.button,{layout:!0,type:"button","data-focustrap":"next",variants:mb,onClick:T.nextMonth,title:b.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(Lu,{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(Qe.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.jsx("th",{role:"columnheader",className:Ce("py-2 text-sm font-medium capitalize",Ve.function(u?.weekDay)?u.weekDay(_):u?.weekDay),children:_.toLocaleDateString(g,{weekday:"short"})},_.toString()))})}),m.jsx(HM,{zip:C,range:y,styles:u,date:v||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},O)})}),m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:I,className:"transition-transform duration-300 hover:scale-105",children:b.calendarToday})})]})})},ad=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>m.jsxs(un,{...s,as:r,"data-component":"card",className:Ce("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?m.jsx("header",{"data-component":"card-title",className:Ce("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,m.jsx("div",{"data-component":"card-body",className:Ce("min-w-full px-4 lg:px-8",a),children:e})]});ad.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:Ve.string(o.title)?o.title:void 0,className:Ce("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:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const bb=e=>{const t=e.Icon??py,n=Et();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})]})};function xb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=xb(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():xb(e[o],null)}}}}function tn(...e){return A.useCallback(wb(...e),e)}function cs(e){const t=qM(e),n=A.forwardRef((r,o)=>{const{children:i,...a}=r,s=A.Children.toArray(i),l=s.find(KM);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}var Sb=cs("Slot");function qM(e){const t=A.forwardRef((n,r)=>{const{children:o,...i}=n;if(A.isValidElement(o)){const a=GM(o),s=YM(i,o.props);return o.type!==A.Fragment&&(s.ref=r?wb(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UM=Symbol("radix.slottable");function KM(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UM}function YM(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 GM(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)}var ZM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$t=ZM.reduce((e,t)=>{const n=cs(`Primitive.${t}`),r=A.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Tb(e,t){e&&mi.flushSync(()=>e.dispatchEvent(t))}var XM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QM="VisuallyHidden",sd=A.forwardRef((e,t)=>m.jsx($t.span,{...e,ref:t,style:{...XM,...e.style}}));sd.displayName=QM;function us(e,t=[]){let n=[];function r(i,a){const s=A.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:h,children:f,...b}=d,g=h?.[e]?.[l]||s,p=A.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:p,children:f})};c.displayName=i+"Provider";function u(d,h){const f=h?.[e]?.[l]||s,b=A.useContext(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>A.createContext(a));return function(s){const l=s?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,JM(o,...t)]}function JM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Eb(e){const t=e+"CollectionProvider",[n,r]=us(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:p,children:v}=g,y=S.useRef(null),x=S.useRef(new Map).current;return m.jsx(o,{scope:p,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=cs(s),c=S.forwardRef((g,p)=>{const{scope:v,children:y}=g,x=i(s,v),E=tn(p,x.collectionRef);return m.jsx(l,{ref:E,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=cs(u),f=S.forwardRef((g,p)=>{const{scope:v,children:y,...x}=g,E=S.useRef(null),w=tn(p,E),T=i(u,v);return S.useEffect(()=>(T.itemMap.set(E,{ref:E,...x}),()=>void T.itemMap.delete(E))),m.jsx(h,{[d]:"",ref:w,children:y})});f.displayName=u;function b(g){const p=i(e+"CollectionConsumer",g);return S.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(p.itemMap.values()).sort((T,k)=>x.indexOf(T.ref.current)-x.indexOf(k.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},b,r]}function It(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Fo=globalThis?.document?A.useLayoutEffect:()=>{},eD=A[" useInsertionEffect ".trim().toString()]||Fo;function kb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=tD({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=A.useRef(e!==void 0);A.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=A.useCallback(u=>{if(s){const d=nD(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function tD({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),o=A.useRef(n),i=A.useRef(t);return eD(()=>{i.current=t},[t]),A.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function nD(e){return typeof e=="function"}function rD(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Cb=e=>{const{present:t,children:n}=e,r=oD(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=tn(r.ref,iD(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:i}):null};Cb.displayName="Presence";function oD(e){const[t,n]=A.useState(),r=A.useRef(null),o=A.useRef(e),i=A.useRef("none"),a=e?"mounted":"unmounted",[s,l]=rD(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const c=ds(r.current);i.current=s==="mounted"?c:"none"},[s]),Fo(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,f=ds(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Fo(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ds(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const p=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},h=f=>{f.target===t&&(i.current=ds(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:A.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function ds(e){return e?.animationName||"none"}function iD(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)}var aD=A.createContext(void 0);function sD(e){const t=A.useContext(aD);return e||t||"ltr"}function qr(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function lD(e,t=globalThis?.document){const n=qr(e);A.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cD="DismissableLayer",ld="dismissableLayer.update",uD="dismissableLayer.pointerDownOutside",dD="dismissableLayer.focusOutside",Ab,Pb=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ib=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=A.useContext(Pb),[u,d]=A.useState(null),h=u?.ownerDocument??globalThis?.document,[,f]=A.useState({}),b=tn(t,k=>d(k)),g=Array.from(c.layers),[p]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(p),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,E=y>=v,w=pD(k=>{const C=k.target,M=[...c.branches].some(O=>O.contains(C));!E||M||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h),T=hD(k=>{const C=k.target;[...c.branches].some(O=>O.contains(C))||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h);return lD(k=>{y===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),A.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ab=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ob(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ab)}},[u,h,n,c]),A.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ob())},[u,c]),A.useEffect(()=>{const k=()=>f({});return document.addEventListener(ld,k),()=>document.removeEventListener(ld,k)},[]),m.jsx($t.div,{...l,ref:b,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:It(e.onFocusCapture,T.onFocusCapture),onBlurCapture:It(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:It(e.onPointerDownCapture,w.onPointerDownCapture)})});Ib.displayName=cD;var fD="DismissableLayerBranch",_b=A.forwardRef((e,t)=>{const n=A.useContext(Pb),r=A.useRef(null),o=tn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx($t.div,{...e,ref:o})});_b.displayName=fD;function pD(e,t=globalThis?.document){const n=qr(e),r=A.useRef(!1),o=A.useRef(()=>{});return A.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Mb(uD,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hD(e,t=globalThis?.document){const n=qr(e),r=A.useRef(!1);return A.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mb(dD,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ob(){const e=new CustomEvent(ld);document.dispatchEvent(e)}function Mb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tb(o,i):o.dispatchEvent(i)}var mD=Ib,gD=_b,vD="Portal",Db=A.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=A.useState(!1);Fo(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?hi.createPortal(m.jsx($t.div,{...r,ref:t}),a):null});Db.displayName=vD;function Ur(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;function yD(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function bD(e){const[t,n]=A.useState(void 0);return Fo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Fn=Math.min,nn=Math.max,fs=Math.round,Lo=Math.floor,fr=e=>({x:e,y:e}),xD={left:"right",right:"left",bottom:"top",top:"bottom"},wD={start:"end",end:"start"};function cd(e,t,n){return nn(e,Fn(t,n))}function Vo(e,t){return typeof e=="function"?e(t):e}function pr(e){return e.split("-")[0]}function $o(e){return e.split("-")[1]}function Nb(e){return e==="x"?"y":"x"}function ud(e){return e==="y"?"height":"width"}function Kr(e){return["top","bottom"].includes(pr(e))?"y":"x"}function dd(e){return Nb(Kr(e))}function SD(e,t,n){n===void 0&&(n=!1);const r=$o(e),o=dd(e),i=ud(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ps(a)),[a,ps(a)]}function TD(e){const t=ps(e);return[fd(e),t,fd(t)]}function fd(e){return e.replace(/start|end/g,t=>wD[t])}function ED(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function kD(e,t,n,r){const o=$o(e);let i=ED(pr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(fd)))),i}function ps(e){return e.replace(/left|right|bottom|top/g,t=>xD[t])}function CD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fb(e){return typeof e!="number"?CD(e):{top:e,right:e,bottom:e,left:e}}function hs(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}}function Lb(e,t,n){let{reference:r,floating:o}=e;const i=Kr(t),a=dd(t),s=ud(a),l=pr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch($o(t)){case"start":f[a]-=h*(n&&c?-1:1);break;case"end":f[a]+=h*(n&&c?-1:1);break}return f}const AD=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}=Lb(c,r,l),h=r,f={},b=0;for(let g=0;g<s.length;g++){const{name:p,fn:v}=s[g],{x:y,y:x,data:E,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[p]:{...f[p],...E}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Lb(c,h,l)),g=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function pd(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:h=!1,padding:f=0}=Vo(t,e),b=Fb(f),p=s[h?d==="floating"?"reference":"floating":d],v=hs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(p)))==null||n?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=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)),E=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},w=hs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+b.top)/E.y,bottom:(w.bottom-v.bottom+b.bottom)/E.y,left:(v.left-w.left+b.left)/E.x,right:(w.right-v.right+b.right)/E.x}}const PD=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}=Vo(e,t)||{};if(c==null)return{};const d=Fb(u),h={x:n,y:r},f=dd(o),b=ud(f),g=await a.getDimensions(c),p=f==="y",v=p?"top":"left",y=p?"bottom":"right",x=p?"clientHeight":"clientWidth",E=i.reference[b]+i.reference[f]-h[f]-i.floating[b],w=h[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=T?T[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(T)))&&(k=s.floating[x]||i.floating[b]);const C=E/2-w/2,M=k/2-g[b]/2-1,O=Fn(d[v],M),F=Fn(d[y],M),L=O,H=k-g[b]-F,I=k/2-g[b]/2+C,_=cd(L,I,H),V=!l.arrow&&$o(o)!=null&&I!==_&&i.reference[b]/2-(I<L?O:F)-g[b]/2<0,N=V?I<L?I-L:I-H:0;return{[f]:h[f]+N,data:{[f]:_,centerOffset:I-_-N,...V&&{alignmentOffset:N}},reset:V}}}),ID=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:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...p}=Vo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=pr(o),y=Kr(s),x=pr(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=h||(x||!g?[ps(s)]:TD(s)),T=b!=="none";!h&&T&&w.push(...kD(s,g,b,E));const k=[s,...w],C=await pd(t,p),M=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&M.push(C[v]),d){const I=SD(o,a,E);M.push(C[I[0]],C[I[1]])}if(O=[...O,{placement:o,overflows:M}],!M.every(I=>I<=0)){var F,L;const I=(((F=i.flip)==null?void 0:F.index)||0)+1,_=k[I];if(_)return{data:{index:I,overflows:O},reset:{placement:_}};let V=(L=O.filter(N=>N.overflows[0]<=0).sort((N,P)=>N.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(f){case"bestFit":{var H;const N=(H=O.filter(P=>{if(T){const $=Kr(P.placement);return $===y||$==="y"}return!0}).map(P=>[P.placement,P.overflows.filter($=>$>0).reduce(($,D)=>$+D,0)]).sort((P,$)=>P[1]-$[1])[0])==null?void 0:H[0];N&&(V=N);break}case"initialPlacement":V=s;break}if(o!==V)return{reset:{placement:V}}}return{}}}};async function _D(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=pr(n),s=$o(n),l=Kr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Vo(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const OD=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 _D(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}}}}},MD=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:p=>{let{x:v,y}=p;return{x:v,y}}},...l}=Vo(e,t),c={x:n,y:r},u=await pd(t,l),d=Kr(pr(o)),h=Nb(d);let f=c[h],b=c[d];if(i){const p=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=f+u[p],x=f-u[v];f=cd(y,f,x)}if(a){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+u[p],x=b-u[v];b=cd(y,b,x)}const g=s.fn({...t,[h]:f,[d]:b});return{...g,data:{x:g.x-n,y:g.y-r}}}}},DD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Vo(e,t),l=await pd(t,s),c=pr(n),u=$o(n),d=Kr(n)==="y",{width:h,height:f}=r.floating;let b,g;c==="top"||c==="bottom"?(b=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,b=u==="end"?"top":"bottom");const p=f-l.top-l.bottom,v=h-l.left-l.right,y=Fn(f-l[b],p),x=Fn(h-l[g],v),E=!t.middlewareData.shift;let w=y,T=x;if(d?T=u||E?Fn(x,v):v:w=u||E?Fn(y,p):p,E&&!u){const C=nn(l.left,0),M=nn(l.right,0),O=nn(l.top,0),F=nn(l.bottom,0);d?T=h-2*(C!==0||M!==0?C+M:nn(l.left,l.right)):w=f-2*(O!==0||F!==0?O+F:nn(l.top,l.bottom))}await a({...t,availableWidth:T,availableHeight:w});const k=await o.getDimensions(i.floating);return h!==k.width||f!==k.height?{reset:{rects:!0}}:{}}}};function ms(){return typeof window<"u"}function hr(e){return Vb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){var t;return(t=(Vb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vb(e){return ms()?e instanceof Node||e instanceof Ut(e).Node:!1}function nt(e){return ms()?e instanceof Element||e instanceof Ut(e).Element:!1}function kt(e){return ms()?e instanceof HTMLElement||e instanceof Ut(e).HTMLElement:!1}function gs(e){return!ms()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot}function Ui(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ND(e){return["table","td","th"].includes(hr(e))}function vs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function hd(e){const t=ys(),n=nt(e)?rn(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FD(e){let t=er(e);for(;kt(t)&&!Jn(t);){if(hd(t))return t;if(vs(t))return null;t=er(t)}return null}function ys(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jn(e){return["html","body","#document"].includes(hr(e))}function rn(e){return Ut(e).getComputedStyle(e)}function bs(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gs(e)&&e.host||Qn(e);return gs(t)?t.host:t}function $b(e){const t=er(e);return Jn(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Ui(t)?t:$b(t)}function mr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$b(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ut(o);if(i){const s=md(a);return t.concat(a,a.visualViewport||[],Ui(o)?o:[],s&&n?mr(s):[])}return t.concat(o,mr(o,[],n))}function md(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jb(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=fs(n)!==i||fs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function gd(e){return nt(e)?e:e.contextElement}function jo(e){const t=gd(e);if(!kt(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=jb(t);let a=(i?fs(n.width):n.width)/r,s=(i?fs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LD=fr(0);function zb(e){const t=Ut(e);return!ys()||!t.visualViewport?LD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ut(e)?!1:t}function Yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=gd(e);let a=fr(1);t&&(r?nt(r)&&(a=jo(r)):a=jo(e));const s=VD(i,n,r)?zb(i):fr(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 h=Ut(i),f=r&&nt(r)?Ut(r):r;let b=h,g=md(b);for(;g&&r&&f!==b;){const p=jo(g),v=g.getBoundingClientRect(),y=rn(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*p.x,E=v.top+(g.clientTop+parseFloat(y.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=x,c+=E,b=Ut(g),g=md(b)}}return hs({width:u,height:d,x:l,y:c})}function $D(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Qn(r),s=t?vs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=fr(1);const u=fr(0),d=kt(r);if((d||!d&&!i)&&((hr(r)!=="body"||Ui(a))&&(l=bs(r)),kt(r))){const h=Yr(r);c=jo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function jD(e){return Array.from(e.getClientRects())}function Rb(e){return Yr(Qn(e)).left+bs(e).scrollLeft}function zD(e){const t=Qn(e),n=bs(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Rb(e);const s=-n.scrollTop;return rn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function RD(e,t){const n=Ut(e),r=Qn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=ys();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function BD(e,t){const n=Yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?jo(e):fr(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 Bb(e,t,n){let r;if(t==="viewport")r=RD(e,n);else if(t==="document")r=zD(Qn(e));else if(nt(t))r=BD(t,n);else{const o=zb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return hs(r)}function Hb(e,t){const n=er(e);return n===t||!nt(n)||Jn(n)?!1:rn(n).position==="fixed"||Hb(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=mr(e,[],!1).filter(s=>nt(s)&&hr(s)!=="body"),o=null;const i=rn(e).position==="fixed";let a=i?er(e):e;for(;nt(a)&&!Jn(a);){const s=rn(a),l=hd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ui(a)&&!l&&Hb(e,a))?r=r.filter(u=>u!==a):o=s,a=er(a)}return t.set(e,r),r}function WD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?vs(t)?[]:HD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Bb(t,u,o);return c.top=nn(d.top,c.top),c.right=Fn(d.right,c.right),c.bottom=Fn(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},Bb(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qD(e){const{width:t,height:n}=jb(e);return{width:t,height:n}}function UD(e,t,n){const r=kt(t),o=Qn(t),i=n==="fixed",a=Yr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=fr(0);if(r||!r&&!i)if((hr(t)!=="body"||Ui(o))&&(s=bs(t)),r){const d=Yr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Rb(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function vd(e){return rn(e).position==="static"}function Wb(e,t){return!kt(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function qb(e,t){const n=Ut(e);if(vs(e))return n;if(!kt(e)){let o=er(e);for(;o&&!Jn(o);){if(nt(o)&&!vd(o))return o;o=er(o)}return n}let r=Wb(e,t);for(;r&&ND(r)&&vd(r);)r=Wb(r,t);return r&&Jn(r)&&vd(r)&&!hd(r)?n:r||FD(e)||n}const KD=async function(e){const t=this.getOffsetParent||qb,n=this.getDimensions,r=await n(e.floating);return{reference:UD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YD(e){return rn(e).direction==="rtl"}const GD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:Qn,getClippingRect:WD,getOffsetParent:qb,getElementRects:KD,getClientRects:jD,getDimensions:qD,getScale:jo,isElement:nt,isRTL:YD};function ZD(e,t){let n=null,r;const o=Qn(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{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const f=Lo(u),b=Lo(o.clientWidth-(c+d)),g=Lo(o.clientHeight-(u+h)),p=Lo(c),y={rootMargin:-f+"px "+-b+"px "+-g+"px "+-p+"px",threshold:nn(0,Fn(1,l))||1};let x=!0;function E(w){const T=w[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(E,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(e)}return a(!0),i}function zo(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=gd(e),u=o||i?[...c?mr(c):[],...mr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?ZD(c,n):null;let h=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let b,g=l?Yr(e):null;l&&p();function p(){const v=Yr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,b=requestAnimationFrame(p)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const XD=OD,QD=MD,JD=ID,eN=DD,Ub=PD,tN=(e,t,n)=>{const r=new Map,o={platform:GD,...n},i={...o.platform,_c:r};return AD(e,t,{...o,platform:i})};function Kb(e,[t,n]){return Math.min(n,Math.max(t,e))}var yd="Progress",bd=100,[nN,gB]=us(yd),[rN,oN]=nN(yd),Yb=A.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=iN,...a}=e;(o||o===0)&&!Qb(o)&&console.error(aN(`${o}`,"Progress"));const s=Qb(o)?o:bd;r!==null&&!Jb(r,s)&&console.error(sN(`${r}`,"Progress"));const l=Jb(r,s)?r:null,c=xs(l)?i(l,s):void 0;return m.jsx(rN,{scope:n,value:l,max:s,children:m.jsx($t.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":xs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Xb(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Yb.displayName=yd;var Gb="ProgressIndicator",Zb=A.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=oN(Gb,n);return m.jsx($t.div,{"data-state":Xb(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Zb.displayName=Gb;function iN(e,t){return`${Math.round(e/t*100)}%`}function Xb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function xs(e){return typeof e=="number"}function Qb(e){return xs(e)&&!isNaN(e)&&e>0}function Jb(e,t){return xs(e)&&!isNaN(e)&&e<=t&&e>=0}function aN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bd}\`.`}function sN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
214
+ */var tb;function kM(){return tb||(tb=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=Jy(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Qu.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var b=i(null);if(b.current===null){var g={hasValue:!1,value:null};b.current=g}else g=b.current;b=s(function(){function v(E){if(!y){if(y=!0,x=E,E=h(E),f!==void 0&&g.hasValue){var k=g.value;if(f(k,E))return T=k}return T=E}if(k=T,r(x,E))return k;var C=h(E);return f!==void 0&&f(k,C)?(x=E,k):(x=E,T=C)}var y=!1,x,T,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,h,f]);var p=o(c,b[0],b[1]);return a(function(){g.hasValue=!0,g.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Qu}var nb;function CM(){return nb||(nb=1,process.env.NODE_ENV==="production"?ns.exports=EM():ns.exports=kM()),ns.exports}CM();var Oo=function(){return Oo=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},Oo.apply(this,arguments)};function qi(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 rb(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 Mo=function(e){var t=S.useRef(e??{});return S.useEffect(function(){return void(t.current=e)},[e]),t},AM=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},PM=function(e){return Object.entries(e)},ob=function(e){return e instanceof Promise},ib=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)},Oo(Oo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},IM=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,rb([],qi(a),!1)),u=function(d,h){return n(function(f){return ib(d,f,i,h)})};return ob(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))}},_M=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,rb([],qi(a),!1)),c=function(u){return n(function(d){return ib(u,d,i,o.current)})};return ob(l)?l.then(function(u){return c(u)}):c(l)}},Ju=function(e,t,n){var r,o,i,a=qi(S.useState(function(){return e}),2),s=a[0],l=a[1],c=Mo(s),u=Mo((r=n?.props)!==null&&r!==void 0?r:{}),d=Mo(t),h=Mo((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),f=Mo((i=n?.interceptor)!==null&&i!==void 0?i:[]),b=S.useRef(e),g=AM(s),p=Mo(g),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;h.current.forEach(function(w){w(s,g,T)})}},[s,h,g]);var y=qi(S.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return c.current},initialState:b.current,previousState:function(){return p.current}});return PM(w).reduce(function(E,k){var C,M=qi(k,2),_=M[0],F=M[1];return Oo(Oo({},E),(C={},C[_]=n?.debug?IM(_,F,l,T,v,f.current):_M(_,F,l,T,v,f.current),C))},{})}),1),x=y[0];return[s,x,u.current]};const OM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function MM(e,t){return S.useRef(OM(e,t)).current}const os={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>)`},ur=(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(ur(a,t,n,s))},[]),ab=(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]:ab(a,t,n,s)}},{}),sb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},is=(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)},DM={default:e=>is(e,{result:sb.default}),dark:e=>is(e,{result:sb.dark})},Do=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},NM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),ed=(e,t)=>{const n=ur(e.colors,Do(t?.colors)),r=ur(e.spacing,Do(t?.spacing)),o=ur(e.rounded,Do(t?.rounded)),i=ur(e.shadow,Do(t?.rounded)),a=ur(e.zIndex,Do(t?.zIndex??NM)),s=e.custom?ur(e.custom,Do(t?.customTokens)):[];return n.concat(r,o,s,a,i)},FM=(e,t)=>is(ed(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),LM=(e,t)=>ed(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),VM=(e,t)=>is(ed(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),as={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",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",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"},ss={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},No=S.createContext({tweaks:ss,parser:os.hsla,map:as,locale:void 0}),td=e=>{const t=S.useContext(No);if(e)return e;if(t)return t.locale||e};function lb(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 Et=()=>{const e=S.useContext(No);return e?e.map:as},mn=(e,t=2)=>e.toString(16).padStart(t,"0"),Fo=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${mn(t,4)+mn(n,3)}-${mn(r[0])+mn(r[1])}-${mn(r[2])+mn(r[3])}-${mn(r[4])+mn(r[5])}-${mn(r[6])+mn(r[7])+mn(r[8])+mn(r[9])}`},cb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ub={basic:/[,[\]]+?/,extend:/[,[\].]+?/},nd=(e,t)=>{const n=cb(t,ub.basic,e)||cb(t,ub.extend,e);return n===void 0||n===e?void 0:n},dr=()=>typeof window>"u",rd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),db=(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},$M=e=>!e,od=()=>{},fb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},jM={type:"spring",bounce:.3,duration:.6},pb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),hb={enter:pb(1),exit:pb(-1),middle:{x:"0%",opacity:1}},mb={exit:{visibility:"hidden"}},zM=e=>{const t=Mn(Ty(e));return Sy({start:t,end:Ao(t,{days:41})})},gb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),RM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Ty(new Date(1970,o,1).setMonth(o)),a=gb(i,n);return m.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),id={ArrowLeft:(e,t)=>t==="days"?Ri(e,{days:1}):Ri(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Ao(e,{days:1}):Ao(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ri(e,{weeks:1}):Ri(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Ao(e,{weeks:1}):Ao(e,{years:1})},vb=(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:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Wr=e=>e.getFullYear().toString().padStart(4,"0"),BM=(e,t,n)=>e===void 0||n===void 0?!1:nO(t,e)&&rO(t,n),HM=e=>{const t=Et();return m.jsx(Je.tbody,{layout:!0,variants:hb,custom:e.direction,onKeyDown:e.onKeyDown,className:ke(e.styles?.week),children:e.zip.map((n,r)=>{const o=$e.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?.toISOString(),l=tM(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=eM(i,e.stateDate),d=!u||c,h=e.rangeMode?BM(e.range?.from,i,e.range?.to):!1;return m.jsxs("td",{align:"center",className:ke("relative",$e.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:ke(`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":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",$e.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}`)})})},WM=()=>Io(new Date),yb=({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,...h})=>{const f=S.useRef(Fo()),b=Et(),g=td(o),p=S.useRef(null),{date:v,range:y}=h,x=v||new Date,T=S.useRef(null),[w,E]=Ju({date:x,isAnimating:!1,year:Wr(x),direction:void 0,range:{from:y?.from,to:y?.to},months:RM(f.current,x,g),selectMode:l?"from":void 0,week:Sy({start:Mn(x),end:c_(x)})},O=>({onChangeYear:$=>({year:$}),onExitComplete:()=>(vb(T.current||null,p,O.state().date,200),T.current=null,{isAnimating:!1}),date:$=>{const D=$(O.state().date);return{date:D,year:Wr(D)}},nextMonth:$=>{$&&(T.current=$.currentTarget);const D=O.state();if(D.isAnimating)return D;const P=Ao(D.date,{months:1});return{date:P,isAnimating:!0,direction:1,year:Wr(P)}},previousMonth:$=>{$&&(T.current=$.currentTarget);const D=O.state();if(D.isAnimating)return D;const P=Ri(D.date,{months:1});return{date:P,isAnimating:!0,direction:-1,year:Wr(P)}},onSelectDate:$=>{const D=O.state(),P=$.currentTarget.dataset.range==="true",j=$.currentTarget.dataset.date||"",N=new Date(j);return{date:N,year:Wr(N),selectMode:D.selectMode===void 0?void 0:D.selectMode==="from"?"to":"from",range:P?{from:D.selectMode==="from"?N:D.range.from,to:D.selectMode==="to"?N:D.range.to}:D.range}},onChangeMonth:$=>{const D=$.target.value,j=Array.from($.target.options).find(U=>U.value===D),N=O.state();if(j){const U=j.dataset.index||"",R=new Date(O.state().date);return R.setMonth(+U),{...N,date:R,year:Wr(R)}}return N},onKeyDown:$=>{const D=$.key,P=O.state();if(D in id){(D==="ArrowUp"||D==="ArrowDown")&&$.preventDefault();const j=O.state().date,N=$e.keyof(id,D)?id[D](j,$.shiftKey?"month":"days"):null;if(N!==null)return vb($.target,p,N),{...P,date:N,year:Wr(N)}}return O.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(O,$,D)=>((D.method==="onChangeMonth"||D.method==="previousMonth"||D.method==="nextMonth")&&D.props.onChangeMonth?.(O.date),O),(O,$,D)=>(D.method==="onChangeYear"&&D.props.onChangeYear?.(O.date),O),(O,$,D)=>{const P=D.method==="onSelectDate"||D.method==="setToday"||D.method==="onKeyDown";return l&&P&&t?(c?.(O.range),O):(P&&t&&c?.(O.date),O)}]}),k=zM(w.date),C=db(k,7),M=w.date.toISOString(),_=gb(w.date,g);S.useEffect(()=>{t||c?.(w.date)},[M,t]);const F=MM(O=>E.date($=>rM(new Date($),+O)),1200),V=O=>{const $=O.currentTarget.value;E.onChangeYear($),s?.(new Date($)),F($)},H=lb((O,$)=>(O.preventDefault(),$==="right"?E.previousMonth():E.nextMonth()),10),I=()=>{const O=WM();E.date(()=>O),c?.(O)};return m.jsx(bg,{transition:jM,children:m.jsxs("div",{ref:p,"data-component":"calendar",onTouchEnd:H.onTouchEnd,onTouchStart:H.onTouchStart,className:ke("relative overflow-hidden",$e.function(u?.calendar)?u?.calendar(k):u?.calendar),children:[m.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:m.jsx(Xn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:E.onExitComplete,children:m.jsxs(Je.div,{initial:"enter",animate:"middle",exit:"exit",children:[m.jsxs("header",{className:"relative flex justify-between",children:[m.jsx(Je.button,{layout:!0,type:"button","data-focustrap":"prev",variants:mb,onClick:E.previousMonth,title:b.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(FI,{className:"h-4 w-4"})}),m.jsx(Je.span,{layout:!0,variants:hb,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:_,onChange:E.onChangeMonth,"aria-label":b.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),m.jsx(Gy,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:V,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),m.jsx(Je.button,{layout:!0,type:"button","data-focustrap":"next",variants:mb,onClick:E.nextMonth,title:b.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:m.jsx(Fu,{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(Je.table,{className:"mt-2 table min-w-full table-auto border-0",children:[m.jsx("thead",{children:m.jsx("tr",{children:w.week.map(O=>m.jsx("th",{role:"columnheader",className:ke("py-2 text-sm font-medium capitalize",$e.function(u?.weekDay)?u.weekDay(O):u?.weekDay),children:O.toLocaleDateString(g,{weekday:"short"})},O.toString()))})}),m.jsx(HM,{zip:C,range:y,styles:u,date:v||null,dispatch:E,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},_)})}),m.jsx("footer",{className:"mt-2 text-center text-primary",children:m.jsx("button",{type:"button",onClick:I,className:"transition-transform duration-300 hover:scale-105",children:b.calendarToday})})]})})},ad=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>m.jsxs(un,{...s,as:r,"data-component":"card",className:ke("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?m.jsx("header",{"data-component":"card-title",className:ke("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,m.jsx("div",{"data-component":"card-body",className:ke("min-w-full px-4 lg:px-8",a),children:e})]});ad.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:$e.string(o.title)?o.title:void 0,className:ke("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:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const bb=e=>{const t=e.Icon??py,n=Et();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})]})};function xb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=xb(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():xb(e[o],null)}}}}function tn(...e){return A.useCallback(wb(...e),e)}function ls(e){const t=qM(e),n=A.forwardRef((r,o)=>{const{children:i,...a}=r,s=A.Children.toArray(i),l=s.find(KM);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}var Sb=ls("Slot");function qM(e){const t=A.forwardRef((n,r)=>{const{children:o,...i}=n;if(A.isValidElement(o)){const a=GM(o),s=YM(i,o.props);return o.type!==A.Fragment&&(s.ref=r?wb(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UM=Symbol("radix.slottable");function KM(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UM}function YM(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 GM(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)}var ZM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$t=ZM.reduce((e,t)=>{const n=ls(`Primitive.${t}`),r=A.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Tb(e,t){e&&mi.flushSync(()=>e.dispatchEvent(t))}var XM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QM="VisuallyHidden",sd=A.forwardRef((e,t)=>m.jsx($t.span,{...e,ref:t,style:{...XM,...e.style}}));sd.displayName=QM;function cs(e,t=[]){let n=[];function r(i,a){const s=A.createContext(a),l=n.length;n=[...n,a];const c=d=>{const{scope:h,children:f,...b}=d,g=h?.[e]?.[l]||s,p=A.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:p,children:f})};c.displayName=i+"Provider";function u(d,h){const f=h?.[e]?.[l]||s,b=A.useContext(f);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>A.createContext(a));return function(s){const l=s?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,JM(o,...t)]}function JM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Eb(e){const t=e+"CollectionProvider",[n,r]=cs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:p,children:v}=g,y=S.useRef(null),x=S.useRef(new Map).current;return m.jsx(o,{scope:p,itemMap:x,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=ls(s),c=S.forwardRef((g,p)=>{const{scope:v,children:y}=g,x=i(s,v),T=tn(p,x.collectionRef);return m.jsx(l,{ref:T,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=ls(u),f=S.forwardRef((g,p)=>{const{scope:v,children:y,...x}=g,T=S.useRef(null),w=tn(p,T),E=i(u,v);return S.useEffect(()=>(E.itemMap.set(T,{ref:T,...x}),()=>void E.itemMap.delete(T))),m.jsx(h,{[d]:"",ref:w,children:y})});f.displayName=u;function b(g){const p=i(e+"CollectionConsumer",g);return S.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(p.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},b,r]}function It(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Lo=globalThis?.document?A.useLayoutEffect:()=>{},eD=A[" useInsertionEffect ".trim().toString()]||Lo;function kb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=tD({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=A.useRef(e!==void 0);A.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=A.useCallback(u=>{if(s){const d=nD(u)?u(e):u;d!==e&&a.current?.(d)}else i(u)},[s,e,i,a]);return[l,c]}function tD({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),o=A.useRef(n),i=A.useRef(t);return eD(()=>{i.current=t},[t]),A.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function nD(e){return typeof e=="function"}function rD(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Cb=e=>{const{present:t,children:n}=e,r=oD(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=tn(r.ref,iD(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:i}):null};Cb.displayName="Presence";function oD(e){const[t,n]=A.useState(),r=A.useRef(null),o=A.useRef(e),i=A.useRef("none"),a=e?"mounted":"unmounted",[s,l]=rD(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const c=us(r.current);i.current=s==="mounted"?c:"none"},[s]),Lo(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,f=us(c);e?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Lo(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=us(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const p=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},h=f=>{f.target===t&&(i.current=us(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:A.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function us(e){return e?.animationName||"none"}function iD(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)}var aD=A.createContext(void 0);function sD(e){const t=A.useContext(aD);return e||t||"ltr"}function qr(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function lD(e,t=globalThis?.document){const n=qr(e);A.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cD="DismissableLayer",ld="dismissableLayer.update",uD="dismissableLayer.pointerDownOutside",dD="dismissableLayer.focusOutside",Ab,Pb=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ib=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=A.useContext(Pb),[u,d]=A.useState(null),h=u?.ownerDocument??globalThis?.document,[,f]=A.useState({}),b=tn(t,k=>d(k)),g=Array.from(c.layers),[p]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(p),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=v,w=pD(k=>{const C=k.target,M=[...c.branches].some(_=>_.contains(C));!T||M||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h),E=hD(k=>{const C=k.target;[...c.branches].some(_=>_.contains(C))||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h);return lD(k=>{y===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),A.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ab=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ob(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ab)}},[u,h,n,c]),A.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ob())},[u,c]),A.useEffect(()=>{const k=()=>f({});return document.addEventListener(ld,k),()=>document.removeEventListener(ld,k)},[]),m.jsx($t.div,{...l,ref:b,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:It(e.onFocusCapture,E.onFocusCapture),onBlurCapture:It(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:It(e.onPointerDownCapture,w.onPointerDownCapture)})});Ib.displayName=cD;var fD="DismissableLayerBranch",_b=A.forwardRef((e,t)=>{const n=A.useContext(Pb),r=A.useRef(null),o=tn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx($t.div,{...e,ref:o})});_b.displayName=fD;function pD(e,t=globalThis?.document){const n=qr(e),r=A.useRef(!1),o=A.useRef(()=>{});return A.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Mb(uD,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hD(e,t=globalThis?.document){const n=qr(e),r=A.useRef(!1);return A.useEffect(()=>{const o=i=>{i.target&&!r.current&&Mb(dD,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ob(){const e=new CustomEvent(ld);document.dispatchEvent(e)}function Mb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tb(o,i):o.dispatchEvent(i)}var mD=Ib,gD=_b,vD="Portal",Db=A.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=A.useState(!1);Lo(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?ao.createPortal(m.jsx($t.div,{...r,ref:t}),a):null});Db.displayName=vD;function Ur(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;function yD(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function bD(e){const[t,n]=A.useState(void 0);return Lo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Fn=Math.min,nn=Math.max,ds=Math.round,Vo=Math.floor,fr=e=>({x:e,y:e}),xD={left:"right",right:"left",bottom:"top",top:"bottom"},wD={start:"end",end:"start"};function cd(e,t,n){return nn(e,Fn(t,n))}function $o(e,t){return typeof e=="function"?e(t):e}function pr(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function Nb(e){return e==="x"?"y":"x"}function ud(e){return e==="y"?"height":"width"}function Kr(e){return["top","bottom"].includes(pr(e))?"y":"x"}function dd(e){return Nb(Kr(e))}function SD(e,t,n){n===void 0&&(n=!1);const r=jo(e),o=dd(e),i=ud(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=fs(a)),[a,fs(a)]}function TD(e){const t=fs(e);return[fd(e),t,fd(t)]}function fd(e){return e.replace(/start|end/g,t=>wD[t])}function ED(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function kD(e,t,n,r){const o=jo(e);let i=ED(pr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(fd)))),i}function fs(e){return e.replace(/left|right|bottom|top/g,t=>xD[t])}function CD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fb(e){return typeof e!="number"?CD(e):{top:e,right:e,bottom:e,left:e}}function ps(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}}function Lb(e,t,n){let{reference:r,floating:o}=e;const i=Kr(t),a=dd(t),s=ud(a),l=pr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(jo(t)){case"start":f[a]-=h*(n&&c?-1:1);break;case"end":f[a]+=h*(n&&c?-1:1);break}return f}const AD=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}=Lb(c,r,l),h=r,f={},b=0;for(let g=0;g<s.length;g++){const{name:p,fn:v}=s[g],{x:y,y:x,data:T,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=x??d,f={...f,[p]:{...f[p],...T}},w&&b<=50&&(b++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Lb(c,h,l)),g=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function pd(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:h=!1,padding:f=0}=$o(t,e),b=Fb(f),p=s[h?d==="floating"?"reference":"floating":d],v=ps(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(p)))==null||n?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=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},w=ps(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-w.top+b.top)/T.y,bottom:(w.bottom-v.bottom+b.bottom)/T.y,left:(v.left-w.left+b.left)/T.x,right:(w.right-v.right+b.right)/T.x}}const PD=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}=$o(e,t)||{};if(c==null)return{};const d=Fb(u),h={x:n,y:r},f=dd(o),b=ud(f),g=await a.getDimensions(c),p=f==="y",v=p?"top":"left",y=p?"bottom":"right",x=p?"clientHeight":"clientWidth",T=i.reference[b]+i.reference[f]-h[f]-i.floating[b],w=h[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let k=E?E[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=s.floating[x]||i.floating[b]);const C=T/2-w/2,M=k/2-g[b]/2-1,_=Fn(d[v],M),F=Fn(d[y],M),V=_,H=k-g[b]-F,I=k/2-g[b]/2+C,O=cd(V,I,H),$=!l.arrow&&jo(o)!=null&&I!==O&&i.reference[b]/2-(I<V?_:F)-g[b]/2<0,D=$?I<V?I-V:I-H:0;return{[f]:h[f]+D,data:{[f]:O,centerOffset:I-O-D,...$&&{alignmentOffset:D}},reset:$}}}),ID=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:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...p}=$o(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=pr(o),y=Kr(s),x=pr(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=h||(x||!g?[fs(s)]:TD(s)),E=b!=="none";!h&&E&&w.push(...kD(s,g,b,T));const k=[s,...w],C=await pd(t,p),M=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&M.push(C[v]),d){const I=SD(o,a,T);M.push(C[I[0]],C[I[1]])}if(_=[..._,{placement:o,overflows:M}],!M.every(I=>I<=0)){var F,V;const I=(((F=i.flip)==null?void 0:F.index)||0)+1,O=k[I];if(O)return{data:{index:I,overflows:_},reset:{placement:O}};let $=(V=_.filter(D=>D.overflows[0]<=0).sort((D,P)=>D.overflows[1]-P.overflows[1])[0])==null?void 0:V.placement;if(!$)switch(f){case"bestFit":{var H;const D=(H=_.filter(P=>{if(E){const j=Kr(P.placement);return j===y||j==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,N)=>j+N,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:H[0];D&&($=D);break}case"initialPlacement":$=s;break}if(o!==$)return{reset:{placement:$}}}return{}}}};async function _D(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=pr(n),s=jo(n),l=Kr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=$o(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const OD=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 _D(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}}}}},MD=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:p=>{let{x:v,y}=p;return{x:v,y}}},...l}=$o(e,t),c={x:n,y:r},u=await pd(t,l),d=Kr(pr(o)),h=Nb(d);let f=c[h],b=c[d];if(i){const p=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=f+u[p],x=f-u[v];f=cd(y,f,x)}if(a){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+u[p],x=b-u[v];b=cd(y,b,x)}const g=s.fn({...t,[h]:f,[d]:b});return{...g,data:{x:g.x-n,y:g.y-r}}}}},DD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=$o(e,t),l=await pd(t,s),c=pr(n),u=jo(n),d=Kr(n)==="y",{width:h,height:f}=r.floating;let b,g;c==="top"||c==="bottom"?(b=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,b=u==="end"?"top":"bottom");const p=f-l.top-l.bottom,v=h-l.left-l.right,y=Fn(f-l[b],p),x=Fn(h-l[g],v),T=!t.middlewareData.shift;let w=y,E=x;if(d?E=u||T?Fn(x,v):v:w=u||T?Fn(y,p):p,T&&!u){const C=nn(l.left,0),M=nn(l.right,0),_=nn(l.top,0),F=nn(l.bottom,0);d?E=h-2*(C!==0||M!==0?C+M:nn(l.left,l.right)):w=f-2*(_!==0||F!==0?_+F:nn(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:w});const k=await o.getDimensions(i.floating);return h!==k.width||f!==k.height?{reset:{rects:!0}}:{}}}};function hs(){return typeof window<"u"}function hr(e){return Vb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){var t;return(t=(Vb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vb(e){return hs()?e instanceof Node||e instanceof Ut(e).Node:!1}function rt(e){return hs()?e instanceof Element||e instanceof Ut(e).Element:!1}function kt(e){return hs()?e instanceof HTMLElement||e instanceof Ut(e).HTMLElement:!1}function ms(e){return!hs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot}function Ui(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ND(e){return["table","td","th"].includes(hr(e))}function gs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function hd(e){const t=vs(),n=rt(e)?rn(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FD(e){let t=er(e);for(;kt(t)&&!Jn(t);){if(hd(t))return t;if(gs(t))return null;t=er(t)}return null}function vs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jn(e){return["html","body","#document"].includes(hr(e))}function rn(e){return Ut(e).getComputedStyle(e)}function ys(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ms(e)&&e.host||Qn(e);return ms(t)?t.host:t}function $b(e){const t=er(e);return Jn(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Ui(t)?t:$b(t)}function mr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$b(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ut(o);if(i){const s=md(a);return t.concat(a,a.visualViewport||[],Ui(o)?o:[],s&&n?mr(s):[])}return t.concat(o,mr(o,[],n))}function md(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jb(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ds(n)!==i||ds(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function gd(e){return rt(e)?e:e.contextElement}function zo(e){const t=gd(e);if(!kt(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=jb(t);let a=(i?ds(n.width):n.width)/r,s=(i?ds(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LD=fr(0);function zb(e){const t=Ut(e);return!vs()||!t.visualViewport?LD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ut(e)?!1:t}function Yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=gd(e);let a=fr(1);t&&(r?rt(r)&&(a=zo(r)):a=zo(e));const s=VD(i,n,r)?zb(i):fr(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 h=Ut(i),f=r&&rt(r)?Ut(r):r;let b=h,g=md(b);for(;g&&r&&f!==b;){const p=zo(g),v=g.getBoundingClientRect(),y=rn(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*p.x,T=v.top+(g.clientTop+parseFloat(y.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=x,c+=T,b=Ut(g),g=md(b)}}return ps({width:u,height:d,x:l,y:c})}function $D(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Qn(r),s=t?gs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=fr(1);const u=fr(0),d=kt(r);if((d||!d&&!i)&&((hr(r)!=="body"||Ui(a))&&(l=ys(r)),kt(r))){const h=Yr(r);c=zo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function jD(e){return Array.from(e.getClientRects())}function Rb(e){return Yr(Qn(e)).left+ys(e).scrollLeft}function zD(e){const t=Qn(e),n=ys(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Rb(e);const s=-n.scrollTop;return rn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function RD(e,t){const n=Ut(e),r=Qn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=vs();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function BD(e,t){const n=Yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?zo(e):fr(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 Bb(e,t,n){let r;if(t==="viewport")r=RD(e,n);else if(t==="document")r=zD(Qn(e));else if(rt(t))r=BD(t,n);else{const o=zb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ps(r)}function Hb(e,t){const n=er(e);return n===t||!rt(n)||Jn(n)?!1:rn(n).position==="fixed"||Hb(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=mr(e,[],!1).filter(s=>rt(s)&&hr(s)!=="body"),o=null;const i=rn(e).position==="fixed";let a=i?er(e):e;for(;rt(a)&&!Jn(a);){const s=rn(a),l=hd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ui(a)&&!l&&Hb(e,a))?r=r.filter(u=>u!==a):o=s,a=er(a)}return t.set(e,r),r}function WD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?gs(t)?[]:HD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Bb(t,u,o);return c.top=nn(d.top,c.top),c.right=Fn(d.right,c.right),c.bottom=Fn(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},Bb(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qD(e){const{width:t,height:n}=jb(e);return{width:t,height:n}}function UD(e,t,n){const r=kt(t),o=Qn(t),i=n==="fixed",a=Yr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=fr(0);if(r||!r&&!i)if((hr(t)!=="body"||Ui(o))&&(s=ys(t)),r){const d=Yr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Rb(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function vd(e){return rn(e).position==="static"}function Wb(e,t){return!kt(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function qb(e,t){const n=Ut(e);if(gs(e))return n;if(!kt(e)){let o=er(e);for(;o&&!Jn(o);){if(rt(o)&&!vd(o))return o;o=er(o)}return n}let r=Wb(e,t);for(;r&&ND(r)&&vd(r);)r=Wb(r,t);return r&&Jn(r)&&vd(r)&&!hd(r)?n:r||FD(e)||n}const KD=async function(e){const t=this.getOffsetParent||qb,n=this.getDimensions,r=await n(e.floating);return{reference:UD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YD(e){return rn(e).direction==="rtl"}const GD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:Qn,getClippingRect:WD,getOffsetParent:qb,getElementRects:KD,getClientRects:jD,getDimensions:qD,getScale:zo,isElement:rt,isRTL:YD};function ZD(e,t){let n=null,r;const o=Qn(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{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const f=Vo(u),b=Vo(o.clientWidth-(c+d)),g=Vo(o.clientHeight-(u+h)),p=Vo(c),y={rootMargin:-f+"px "+-b+"px "+-g+"px "+-p+"px",threshold:nn(0,Fn(1,l))||1};let x=!0;function T(w){const E=w[0].intersectionRatio;if(E!==l){if(!x)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return a(!0),i}function Ro(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=gd(e),u=o||i?[...c?mr(c):[],...mr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?ZD(c,n):null;let h=-1,f=null;a&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let b,g=l?Yr(e):null;l&&p();function p(){const v=Yr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,b=requestAnimationFrame(p)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const XD=OD,QD=MD,JD=ID,eN=DD,Ub=PD,tN=(e,t,n)=>{const r=new Map,o={platform:GD,...n},i={...o.platform,_c:r};return AD(e,t,{...o,platform:i})};function Kb(e,[t,n]){return Math.min(n,Math.max(t,e))}var yd="Progress",bd=100,[nN,gB]=cs(yd),[rN,oN]=nN(yd),Yb=A.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=iN,...a}=e;(o||o===0)&&!Qb(o)&&console.error(aN(`${o}`,"Progress"));const s=Qb(o)?o:bd;r!==null&&!Jb(r,s)&&console.error(sN(`${r}`,"Progress"));const l=Jb(r,s)?r:null,c=bs(l)?i(l,s):void 0;return m.jsx(rN,{scope:n,value:l,max:s,children:m.jsx($t.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":bs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Xb(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Yb.displayName=yd;var Gb="ProgressIndicator",Zb=A.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=oN(Gb,n);return m.jsx($t.div,{"data-state":Xb(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Zb.displayName=Gb;function iN(e,t){return`${Math.round(e/t*100)}%`}function Xb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function bs(e){return typeof e=="number"}function Qb(e){return bs(e)&&!isNaN(e)&&e>0}function Jb(e,t){return bs(e)&&!isNaN(e)&&e<=t&&e>=0}function aN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bd}\`.`}function sN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
215
215
  - a positive number
216
216
  - less than the value passed to \`max\` (or ${bd} if no \`max\` prop is set)
217
217
  - \`null\` or \`undefined\` if the progress is indeterminate.
218
218
 
219
- Defaulting to \`null\`.`}var lN=Yb,cN=Zb,ex=["PageUp","PageDown"],tx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],nx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ro="Slider",[xd,uN,dN]=Eb(Ro),[rx,vB]=us(Ro,[dN]),[fN,ws]=rx(Ro),ox=A.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:b,...g}=e,p=A.useRef(new Set),v=A.useRef(0),x=a==="horizontal"?pN:hN,[E=[],w]=kb({prop:u,defaultProp:c,onChange:F=>{[...p.current][v.current]?.focus(),d(F)}}),T=A.useRef(E);function k(F){const L=bN(E,F);O(F,L)}function C(F){O(F,v.current)}function M(){const F=T.current[v.current];E[v.current]!==F&&h(E)}function O(F,L,{commit:H}={commit:!1}){const I=TN(i),_=EN(Math.round((F-r)/i)*i+r,I),V=Kb(_,[r,o]);w((N=[])=>{const P=vN(N,V,L);if(SN(P,l*i)){v.current=P.indexOf(V);const $=String(P)!==String(N);return $&&H&&h(P),$?P:N}else return N})}return m.jsx(fN,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:p.current,values:E,orientation:a,form:b,children:m.jsx(xd.Provider,{scope:e.__scopeSlider,children:m.jsx(xd.Slot,{scope:e.__scopeSlider,children:m.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:It(g.onPointerDown,()=>{s||(T.current=E)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:k,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:M,onHomeKeyDown:()=>!s&&O(r,0,{commit:!0}),onEndKeyDown:()=>!s&&O(o,E.length-1,{commit:!0}),onStepKeyDown:({event:F,direction:L})=>{if(!s){const _=ex.includes(F.key)||F.shiftKey&&tx.includes(F.key)?10:1,V=v.current,N=E[V],P=i*_*L;O(N+P,V,{commit:!0})}}})})})})});ox.displayName=Ro;var[ix,ax]=rx(Ro,{startEdge:"left",endEdge:"right",size:"width",direction:1}),pN=A.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,h]=A.useState(null),f=tn(t,x=>h(x)),b=A.useRef(void 0),g=sD(o),p=g==="ltr",v=p&&!i||!p&&i;function y(x){const E=b.current||d.getBoundingClientRect(),w=[0,E.width],k=Td(w,v?[n,r]:[r,n]);return b.current=E,k(x-E.left)}return m.jsx(ix,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:m.jsx(sx,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const E=y(x.clientX);a?.(E)},onSlideMove:x=>{const E=y(x.clientX);s?.(E)},onSlideEnd:()=>{b.current=void 0,l?.()},onStepKeyDown:x=>{const w=nx[v?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:w?-1:1})}})})}),hN=A.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=A.useRef(null),d=tn(t,u),h=A.useRef(void 0),f=!o;function b(g){const p=h.current||u.current.getBoundingClientRect(),v=[0,p.height],x=Td(v,f?[r,n]:[n,r]);return h.current=p,x(g-p.top)}return m.jsx(ix,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:m.jsx(sx,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const p=b(g.clientY);i?.(p)},onSlideMove:g=>{const p=b(g.clientY);a?.(p)},onSlideEnd:()=>{h.current=void 0,s?.()},onStepKeyDown:g=>{const v=nx[f?"from-bottom":"from-top"].includes(g.key);l?.({event:g,direction:v?-1:1})}})})}),sx=A.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ws(Ro,n);return m.jsx($t.span,{...c,ref:t,onKeyDown:It(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):ex.concat(tx).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:It(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(h)?h.focus():r(d)}),onPointerMove:It(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:It(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),lx="SliderTrack",cx=A.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ws(lx,n);return m.jsx($t.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});cx.displayName=lx;var wd="SliderRange",ux=A.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ws(wd,n),i=ax(wd,n),a=A.useRef(null),s=tn(t,a),l=o.values.length,c=o.values.map(h=>px(h,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return m.jsx($t.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});ux.displayName=wd;var Sd="SliderThumb",dx=A.forwardRef((e,t)=>{const n=uN(e.__scopeSlider),[r,o]=A.useState(null),i=tn(t,s=>o(s)),a=A.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return m.jsx(mN,{...e,ref:i,index:a})}),mN=A.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ws(Sd,n),s=ax(Sd,n),[l,c]=A.useState(null),u=tn(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,h=bD(l),f=a.values[r],b=f===void 0?0:px(f,a.min,a.max),g=yN(r,a.values.length),p=h?.[s.size],v=p?xN(p,b,s.direction):0;return A.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${v}px)`},children:[m.jsx(xd.ItemSlot,{scope:e.__scopeSlider,children:m.jsx($t.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:It(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&m.jsx(fx,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});dx.displayName=Sd;var gN="RadioBubbleInput",fx=A.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=A.useRef(null),i=tn(o,r),a=yD(t);return A.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),m.jsx($t.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});fx.displayName=gN;function vN(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function px(e,t,n){const i=100/(n-t)*(e-t);return Kb(i,[0,100])}function yN(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function bN(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function xN(e,t,n){const r=e/2,i=Td([0,50],[0,r]);return(r-i(t)*n)*n}function wN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function SN(e,t){if(t>0){const n=wN(e);return Math.min(...n)>=t}return!0}function Td(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function TN(e){return(String(e).split(".")[1]||"").length}function EN(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var kN=ox,CN=cx,AN=ux,PN=dx,Ed="ToastProvider",[kd,IN,_N]=Eb("Toast"),[hx,yB]=us("Toast",[_N]),[ON,Ss]=hx(Ed),mx=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=A.useState(null),[c,u]=A.useState(0),d=A.useRef(!1),h=A.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ed}\`. Expected non-empty \`string\`.`),m.jsx(kd.Provider,{scope:t,children:m.jsx(ON,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:A.useCallback(()=>u(f=>f+1),[]),onToastRemove:A.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:a})})};mx.displayName=Ed;var gx="ToastViewport",MN=["F8"],Cd="toast.viewportPause",Ad="toast.viewportResume",vx=A.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=MN,label:o="Notifications ({hotkey})",...i}=e,a=Ss(gx,n),s=IN(n),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),h=tn(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;A.useEffect(()=>{const p=v=>{r.length!==0&&r.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[r]),A.useEffect(()=>{const p=l.current,v=d.current;if(b&&p&&v){const y=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(Cd);v.dispatchEvent(T),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(Ad);v.dispatchEvent(T),a.isClosePausedRef.current=!1}},E=T=>{!p.contains(T.relatedTarget)&&x()},w=()=>{p.contains(document.activeElement)||x()};return p.addEventListener("focusin",y),p.addEventListener("focusout",E),p.addEventListener("pointermove",y),p.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{p.removeEventListener("focusin",y),p.removeEventListener("focusout",E),p.removeEventListener("pointermove",y),p.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,a.isClosePausedRef]);const g=A.useCallback(({tabbingDirection:p})=>{const y=s().map(x=>{const E=x.ref.current,w=[E,...UN(E)];return p==="forwards"?w:w.reverse()});return(p==="forwards"?y.reverse():y).flat()},[s]);return A.useEffect(()=>{const p=d.current;if(p){const v=y=>{const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const w=document.activeElement,T=y.shiftKey;if(y.target===p&&T){c.current?.focus();return}const M=g({tabbingDirection:T?"backwards":"forwards"}),O=M.findIndex(F=>F===w);_d(M.slice(O+1))?y.preventDefault():T?c.current?.focus():u.current?.focus()}};return p.addEventListener("keydown",v),()=>p.removeEventListener("keydown",v)}},[s,g]),m.jsxs(gD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&m.jsx(Pd,{ref:c,onFocusFromOutsideViewport:()=>{const p=g({tabbingDirection:"forwards"});_d(p)}}),m.jsx(kd.Slot,{scope:n,children:m.jsx($t.ol,{tabIndex:-1,...i,ref:h})}),b&&m.jsx(Pd,{ref:u,onFocusFromOutsideViewport:()=>{const p=g({tabbingDirection:"backwards"});_d(p)}})]})});vx.displayName=gx;var yx="ToastFocusProxy",Pd=A.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss(yx,n);return m.jsx(sd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});Pd.displayName=yx;var Ki="Toast",DN="toast.swipeStart",NN="toast.swipeMove",FN="toast.swipeCancel",LN="toast.swipeEnd",bx=A.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=kb({prop:r,defaultProp:o??!0,onChange:i,caller:Ki});return m.jsx(Cb,{present:n||s,children:m.jsx(jN,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:qr(e.onPause),onResume:qr(e.onResume),onSwipeStart:It(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:It(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});bx.displayName=Ki;var[VN,$N]=hx(Ki,{onClose(){}}),jN=A.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...b}=e,g=Ss(Ki,n),[p,v]=A.useState(null),y=tn(t,I=>v(I)),x=A.useRef(null),E=A.useRef(null),w=o||g.duration,T=A.useRef(0),k=A.useRef(w),C=A.useRef(0),{onToastAdd:M,onToastRemove:O}=g,F=qr(()=>{p?.contains(document.activeElement)&&g.viewport?.focus(),a()}),L=A.useCallback(I=>{!I||I===1/0||(window.clearTimeout(C.current),T.current=new Date().getTime(),C.current=window.setTimeout(F,I))},[F]);A.useEffect(()=>{const I=g.viewport;if(I){const _=()=>{L(k.current),c?.()},V=()=>{const N=new Date().getTime()-T.current;k.current=k.current-N,window.clearTimeout(C.current),l?.()};return I.addEventListener(Cd,V),I.addEventListener(Ad,_),()=>{I.removeEventListener(Cd,V),I.removeEventListener(Ad,_)}}},[g.viewport,w,l,c,L]),A.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(w)},[i,w,g.isClosePausedRef,L]),A.useEffect(()=>(M(),()=>O()),[M,O]);const H=A.useMemo(()=>p?kx(p):null,[p]);return g.viewport?m.jsxs(m.Fragment,{children:[H&&m.jsx(zN,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),m.jsx(VN,{scope:n,onClose:F,children:mi.createPortal(m.jsx(kd.ItemSlot,{scope:n,children:m.jsx(mD,{asChild:!0,onEscapeKeyDown:It(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx($t.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:It(e.onKeyDown,I=>{I.key==="Escape"&&(s?.(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:It(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:It(e.onPointerMove,I=>{if(!x.current)return;const _=I.clientX-x.current.x,V=I.clientY-x.current.y,N=!!E.current,P=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=P?$(0,_):0,W=P?0:$(0,V),R=I.pointerType==="touch"?10:2,Z={x:D,y:W},X={originalEvent:I,delta:Z};N?(E.current=Z,Ts(NN,d,X,{discrete:!1})):Cx(Z,g.swipeDirection,R)?(E.current=Z,Ts(DN,u,X,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(_)>R||Math.abs(V)>R)&&(x.current=null)}),onPointerUp:It(e.onPointerUp,I=>{const _=E.current,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),E.current=null,x.current=null,_){const N=I.currentTarget,P={originalEvent:I,delta:_};Cx(_,g.swipeDirection,g.swipeThreshold)?Ts(LN,f,P,{discrete:!0}):Ts(FN,h,P,{discrete:!0}),N.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),zN=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ki,t),[i,a]=A.useState(!1),[s,l]=A.useState(!1);return WN(()=>a(!0)),A.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:m.jsx(Db,{asChild:!0,children:m.jsx(sd,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},RN="ToastTitle",xx=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx($t.div,{...r,ref:t})});xx.displayName=RN;var BN="ToastDescription",wx=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx($t.div,{...r,ref:t})});wx.displayName=BN;var Sx="ToastAction",HN=A.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Ex,{altText:n,asChild:!0,children:m.jsx(Id,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sx}\`. Expected non-empty \`string\`.`),null)});HN.displayName=Sx;var Tx="ToastClose",Id=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$N(Tx,n);return m.jsx(Ex,{asChild:!0,children:m.jsx($t.button,{type:"button",...r,ref:t,onClick:It(e.onClick,o.onClose)})})});Id.displayName=Tx;var Ex=A.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx($t.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function kx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qN(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...kx(r))}}),t}function Ts(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tb(o,i):o.dispatchEvent(i)}var Cx=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function WN(e=()=>{}){const t=qr(e);Fo(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qN(e){return e.nodeType===e.ELEMENT_NODE}function UN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var KN=mx,YN=vx,GN=bx,ZN=xx,XN=wx,QN=Id;const JN=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},e2=ao("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",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",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",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border"}},defaultVariants:{theme:"default"}}),Ax=S.createContext(()=>{throw new Error("Not implemented")}),t2=()=>S.useContext(Ax),Px={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},n2=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=e2({theme:t.theme||"default"});return m.jsx(GN,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:m.jsx(Qe.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Px[t.reversedIndex]||Px.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:m.jsxs("div",{className:a,children:[m.jsxs("div",{className:"flex flex-col p-4",children:[t.title?m.jsx(ZN,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,m.jsx(XN,{className:"select-text truncate",children:t.text})]}),r?m.jsx(QN,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:m.jsx(ko,{className:"size-5"})}):null]})})})});function r2({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=JN(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const b=[...f,{...u,id:d,text:c}];return b.length>t?b.slice(b.length-t,b.length+1):b}),{clear:s,close:()=>a(f=>f.filter(b=>b.id!==d))}},[t]);return m.jsxs(KN,{duration:n,swipeThreshold:150,children:[m.jsx(Ax.Provider,{value:l,children:e}),m.jsx(Qe.ol,{children:m.jsx(Xn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const h=()=>a(f=>f.filter(b=>b.id!==c.id));return S.createElement(n2,{...c,hover:o,index:u,key:c.id,onClose:h,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),m.jsx(YN,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const o2=e=>m.jsxs(lN,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:Ce("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(cN,{style:{transform:Ve.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Ce("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Ve.number(e.percent)?m.jsx("p",{className:Ce("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]}),i2=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:Ce("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]}),Ix=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},_x={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},Ox=S.createContext(""),a2=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Od=(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(!a2(a))return a}return n==="backward"?Od(e,e.length-1,"backward"):Od(e,-1,"forward")},Mx=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Od(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Dx={[_x.ArrowLeft]:(e,t)=>Mx(t,"backward"),[_x.ArrowRight]:(e,t)=>Mx(t,"forward")},s2=e=>{const[t,n]=Ix(e.active),r=S.useRef(null),o=ir(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(Ve.keyof(Dx,c)){const u=Dx[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(Ox.Provider,{value:t,children:m.jsx(ad,{className:e.className,container:Ce("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[m.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",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:Ce("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(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},l2=()=>S.useContext(Ox),c2=e=>{const t=l2();return m.jsx(S.Fragment,{children:e.id===t?e.children:null})},Es=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})]});Es.Icon=function(t){return m.jsx("header",{...t,className:Ce("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Es.Body=function(t){return m.jsx(un,{...t,className:Ce("min-w-0 flex-1",t.className),children:t.children})},Es.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(un,{...t,type:"button"})})};const u2=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});/*!
219
+ Defaulting to \`null\`.`}var lN=Yb,cN=Zb,ex=["PageUp","PageDown"],tx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],nx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Bo="Slider",[xd,uN,dN]=Eb(Bo),[rx,vB]=cs(Bo,[dN]),[fN,xs]=rx(Bo),ox=A.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:b,...g}=e,p=A.useRef(new Set),v=A.useRef(0),x=a==="horizontal"?pN:hN,[T=[],w]=kb({prop:u,defaultProp:c,onChange:F=>{[...p.current][v.current]?.focus(),d(F)}}),E=A.useRef(T);function k(F){const V=bN(T,F);_(F,V)}function C(F){_(F,v.current)}function M(){const F=E.current[v.current];T[v.current]!==F&&h(T)}function _(F,V,{commit:H}={commit:!1}){const I=TN(i),O=EN(Math.round((F-r)/i)*i+r,I),$=Kb(O,[r,o]);w((D=[])=>{const P=vN(D,$,V);if(SN(P,l*i)){v.current=P.indexOf($);const j=String(P)!==String(D);return j&&H&&h(P),j?P:D}else return D})}return m.jsx(fN,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:p.current,values:T,orientation:a,form:b,children:m.jsx(xd.Provider,{scope:e.__scopeSlider,children:m.jsx(xd.Slot,{scope:e.__scopeSlider,children:m.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:It(g.onPointerDown,()=>{s||(E.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:k,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:M,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:F,direction:V})=>{if(!s){const O=ex.includes(F.key)||F.shiftKey&&tx.includes(F.key)?10:1,$=v.current,D=T[$],P=i*O*V;_(D+P,$,{commit:!0})}}})})})})});ox.displayName=Bo;var[ix,ax]=rx(Bo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),pN=A.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,h]=A.useState(null),f=tn(t,x=>h(x)),b=A.useRef(void 0),g=sD(o),p=g==="ltr",v=p&&!i||!p&&i;function y(x){const T=b.current||d.getBoundingClientRect(),w=[0,T.width],k=Td(w,v?[n,r]:[r,n]);return b.current=T,k(x-T.left)}return m.jsx(ix,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:m.jsx(sx,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=y(x.clientX);a?.(T)},onSlideMove:x=>{const T=y(x.clientX);s?.(T)},onSlideEnd:()=>{b.current=void 0,l?.()},onStepKeyDown:x=>{const w=nx[v?"from-left":"from-right"].includes(x.key);c?.({event:x,direction:w?-1:1})}})})}),hN=A.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=A.useRef(null),d=tn(t,u),h=A.useRef(void 0),f=!o;function b(g){const p=h.current||u.current.getBoundingClientRect(),v=[0,p.height],x=Td(v,f?[r,n]:[n,r]);return h.current=p,x(g-p.top)}return m.jsx(ix,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:m.jsx(sx,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const p=b(g.clientY);i?.(p)},onSlideMove:g=>{const p=b(g.clientY);a?.(p)},onSlideEnd:()=>{h.current=void 0,s?.()},onStepKeyDown:g=>{const v=nx[f?"from-bottom":"from-top"].includes(g.key);l?.({event:g,direction:v?-1:1})}})})}),sx=A.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=xs(Bo,n);return m.jsx($t.span,{...c,ref:t,onKeyDown:It(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):ex.concat(tx).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:It(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(h)?h.focus():r(d)}),onPointerMove:It(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:It(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),lx="SliderTrack",cx=A.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=xs(lx,n);return m.jsx($t.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});cx.displayName=lx;var wd="SliderRange",ux=A.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=xs(wd,n),i=ax(wd,n),a=A.useRef(null),s=tn(t,a),l=o.values.length,c=o.values.map(h=>px(h,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return m.jsx($t.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});ux.displayName=wd;var Sd="SliderThumb",dx=A.forwardRef((e,t)=>{const n=uN(e.__scopeSlider),[r,o]=A.useState(null),i=tn(t,s=>o(s)),a=A.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return m.jsx(mN,{...e,ref:i,index:a})}),mN=A.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=xs(Sd,n),s=ax(Sd,n),[l,c]=A.useState(null),u=tn(t,y=>c(y)),d=l?a.form||!!l.closest("form"):!0,h=bD(l),f=a.values[r],b=f===void 0?0:px(f,a.min,a.max),g=yN(r,a.values.length),p=h?.[s.size],v=p?xN(p,b,s.direction):0;return A.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${v}px)`},children:[m.jsx(xd.ItemSlot,{scope:e.__scopeSlider,children:m.jsx($t.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:It(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&m.jsx(fx,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});dx.displayName=Sd;var gN="RadioBubbleInput",fx=A.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=A.useRef(null),i=tn(o,r),a=yD(t);return A.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),m.jsx($t.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});fx.displayName=gN;function vN(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function px(e,t,n){const i=100/(n-t)*(e-t);return Kb(i,[0,100])}function yN(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function bN(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function xN(e,t,n){const r=e/2,i=Td([0,50],[0,r]);return(r-i(t)*n)*n}function wN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function SN(e,t){if(t>0){const n=wN(e);return Math.min(...n)>=t}return!0}function Td(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function TN(e){return(String(e).split(".")[1]||"").length}function EN(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var kN=ox,CN=cx,AN=ux,PN=dx,Ed="ToastProvider",[kd,IN,_N]=Eb("Toast"),[hx,yB]=cs("Toast",[_N]),[ON,ws]=hx(Ed),mx=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=A.useState(null),[c,u]=A.useState(0),d=A.useRef(!1),h=A.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ed}\`. Expected non-empty \`string\`.`),m.jsx(kd.Provider,{scope:t,children:m.jsx(ON,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:A.useCallback(()=>u(f=>f+1),[]),onToastRemove:A.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:a})})};mx.displayName=Ed;var gx="ToastViewport",MN=["F8"],Cd="toast.viewportPause",Ad="toast.viewportResume",vx=A.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=MN,label:o="Notifications ({hotkey})",...i}=e,a=ws(gx,n),s=IN(n),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),h=tn(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;A.useEffect(()=>{const p=v=>{r.length!==0&&r.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[r]),A.useEffect(()=>{const p=l.current,v=d.current;if(b&&p&&v){const y=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Cd);v.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Ad);v.dispatchEvent(E),a.isClosePausedRef.current=!1}},T=E=>{!p.contains(E.relatedTarget)&&x()},w=()=>{p.contains(document.activeElement)||x()};return p.addEventListener("focusin",y),p.addEventListener("focusout",T),p.addEventListener("pointermove",y),p.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{p.removeEventListener("focusin",y),p.removeEventListener("focusout",T),p.removeEventListener("pointermove",y),p.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,a.isClosePausedRef]);const g=A.useCallback(({tabbingDirection:p})=>{const y=s().map(x=>{const T=x.ref.current,w=[T,...UN(T)];return p==="forwards"?w:w.reverse()});return(p==="forwards"?y.reverse():y).flat()},[s]);return A.useEffect(()=>{const p=d.current;if(p){const v=y=>{const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const w=document.activeElement,E=y.shiftKey;if(y.target===p&&E){c.current?.focus();return}const M=g({tabbingDirection:E?"backwards":"forwards"}),_=M.findIndex(F=>F===w);_d(M.slice(_+1))?y.preventDefault():E?c.current?.focus():u.current?.focus()}};return p.addEventListener("keydown",v),()=>p.removeEventListener("keydown",v)}},[s,g]),m.jsxs(gD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&m.jsx(Pd,{ref:c,onFocusFromOutsideViewport:()=>{const p=g({tabbingDirection:"forwards"});_d(p)}}),m.jsx(kd.Slot,{scope:n,children:m.jsx($t.ol,{tabIndex:-1,...i,ref:h})}),b&&m.jsx(Pd,{ref:u,onFocusFromOutsideViewport:()=>{const p=g({tabbingDirection:"backwards"});_d(p)}})]})});vx.displayName=gx;var yx="ToastFocusProxy",Pd=A.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=ws(yx,n);return m.jsx(sd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const s=a.relatedTarget;!i.viewport?.contains(s)&&r()}})});Pd.displayName=yx;var Ki="Toast",DN="toast.swipeStart",NN="toast.swipeMove",FN="toast.swipeCancel",LN="toast.swipeEnd",bx=A.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=kb({prop:r,defaultProp:o??!0,onChange:i,caller:Ki});return m.jsx(Cb,{present:n||s,children:m.jsx(jN,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:qr(e.onPause),onResume:qr(e.onResume),onSwipeStart:It(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:It(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});bx.displayName=Ki;var[VN,$N]=hx(Ki,{onClose(){}}),jN=A.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...b}=e,g=ws(Ki,n),[p,v]=A.useState(null),y=tn(t,I=>v(I)),x=A.useRef(null),T=A.useRef(null),w=o||g.duration,E=A.useRef(0),k=A.useRef(w),C=A.useRef(0),{onToastAdd:M,onToastRemove:_}=g,F=qr(()=>{p?.contains(document.activeElement)&&g.viewport?.focus(),a()}),V=A.useCallback(I=>{!I||I===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(F,I))},[F]);A.useEffect(()=>{const I=g.viewport;if(I){const O=()=>{V(k.current),c?.()},$=()=>{const D=new Date().getTime()-E.current;k.current=k.current-D,window.clearTimeout(C.current),l?.()};return I.addEventListener(Cd,$),I.addEventListener(Ad,O),()=>{I.removeEventListener(Cd,$),I.removeEventListener(Ad,O)}}},[g.viewport,w,l,c,V]),A.useEffect(()=>{i&&!g.isClosePausedRef.current&&V(w)},[i,w,g.isClosePausedRef,V]),A.useEffect(()=>(M(),()=>_()),[M,_]);const H=A.useMemo(()=>p?kx(p):null,[p]);return g.viewport?m.jsxs(m.Fragment,{children:[H&&m.jsx(zN,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),m.jsx(VN,{scope:n,onClose:F,children:mi.createPortal(m.jsx(kd.ItemSlot,{scope:n,children:m.jsx(mD,{asChild:!0,onEscapeKeyDown:It(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx($t.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:It(e.onKeyDown,I=>{I.key==="Escape"&&(s?.(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:It(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:It(e.onPointerMove,I=>{if(!x.current)return;const O=I.clientX-x.current.x,$=I.clientY-x.current.y,D=!!T.current,P=["left","right"].includes(g.swipeDirection),j=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,N=P?j(0,O):0,U=P?0:j(0,$),R=I.pointerType==="touch"?10:2,Z={x:N,y:U},G={originalEvent:I,delta:Z};D?(T.current=Z,Ss(NN,d,G,{discrete:!1})):Cx(Z,g.swipeDirection,R)?(T.current=Z,Ss(DN,u,G,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(O)>R||Math.abs($)>R)&&(x.current=null)}),onPointerUp:It(e.onPointerUp,I=>{const O=T.current,$=I.target;if($.hasPointerCapture(I.pointerId)&&$.releasePointerCapture(I.pointerId),T.current=null,x.current=null,O){const D=I.currentTarget,P={originalEvent:I,delta:O};Cx(O,g.swipeDirection,g.swipeThreshold)?Ss(LN,f,P,{discrete:!0}):Ss(FN,h,P,{discrete:!0}),D.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),zN=e=>{const{__scopeToast:t,children:n,...r}=e,o=ws(Ki,t),[i,a]=A.useState(!1),[s,l]=A.useState(!1);return WN(()=>a(!0)),A.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:m.jsx(Db,{asChild:!0,children:m.jsx(sd,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},RN="ToastTitle",xx=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx($t.div,{...r,ref:t})});xx.displayName=RN;var BN="ToastDescription",wx=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx($t.div,{...r,ref:t})});wx.displayName=BN;var Sx="ToastAction",HN=A.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(Ex,{altText:n,asChild:!0,children:m.jsx(Id,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sx}\`. Expected non-empty \`string\`.`),null)});HN.displayName=Sx;var Tx="ToastClose",Id=A.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$N(Tx,n);return m.jsx(Ex,{asChild:!0,children:m.jsx($t.button,{type:"button",...r,ref:t,onClick:It(e.onClick,o.onClose)})})});Id.displayName=Tx;var Ex=A.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx($t.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function kx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qN(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...kx(r))}}),t}function Ss(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tb(o,i):o.dispatchEvent(i)}var Cx=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function WN(e=()=>{}){const t=qr(e);Lo(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qN(e){return e.nodeType===e.ELEMENT_NODE}function UN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var KN=mx,YN=vx,GN=bx,ZN=xx,XN=wx,QN=Id;const JN=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},e2=so("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",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",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",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border"}},defaultVariants:{theme:"default"}}),Ax=S.createContext(()=>{throw new Error("Not implemented")}),t2=()=>S.useContext(Ax),Px={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},n2=S.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=e2({theme:t.theme||"default"});return m.jsx(GN,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:m.jsx(Je.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Px[t.reversedIndex]||Px.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:m.jsxs("div",{className:a,children:[m.jsxs("div",{className:"flex flex-col p-4",children:[t.title?m.jsx(ZN,{className:"select-text truncate text-lg font-medium leading-relaxed",children:t.title}):null,m.jsx(XN,{className:"select-text truncate",children:t.text})]}),r?m.jsx(QN,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:m.jsx(Co,{className:"size-5"})}):null]})})})});function r2({children:e,max:t=5,duration:n=5e3}){const r=S.useRef(null),o=JN(r),[i,a]=S.useState([]),s=S.useCallback(()=>a([]),[]);S.useEffect(()=>s,[s]);const l=S.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const b=[...f,{...u,id:d,text:c}];return b.length>t?b.slice(b.length-t,b.length+1):b}),{clear:s,close:()=>a(f=>f.filter(b=>b.id!==d))}},[t]);return m.jsxs(KN,{duration:n,swipeThreshold:150,children:[m.jsx(Ax.Provider,{value:l,children:e}),m.jsx(Je.ol,{children:m.jsx(Xn,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const h=()=>a(f=>f.filter(b=>b.id!==c.id));return S.createElement(n2,{...c,hover:o,index:u,key:c.id,onClose:h,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})})}),m.jsx(YN,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const o2=e=>m.jsxs(lN,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:ke("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[m.jsx(cN,{style:{transform:$e.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:ke("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),$e.number(e.percent)?m.jsx("p",{className:ke("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]}),i2=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:ke("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]}),Ix=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},_x={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},Ox=S.createContext(""),a2=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Od=(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(!a2(a))return a}return n==="backward"?Od(e,e.length-1,"backward"):Od(e,-1,"forward")},Mx=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Od(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Dx={[_x.ArrowLeft]:(e,t)=>Mx(t,"backward"),[_x.ArrowRight]:(e,t)=>Mx(t,"forward")},s2=e=>{const[t,n]=Ix(e.active),r=S.useRef(null),o=ir(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($e.keyof(Dx,c)){const u=Dx[c],d=u(l,r.current);if(d===null)return;n(d)}};return m.jsx(Ox.Provider,{value:t,children:m.jsx(ad,{className:e.className,container:ke("pt-0 max-w-full w-full min-w-0",e.container),header:m.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[m.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),m.jsx("nav",{className:"min-w-0",children:m.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",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:ke("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(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},l2=()=>S.useContext(Ox),c2=e=>{const t=l2();return m.jsx(S.Fragment,{children:e.id===t?e.children:null})},Ts=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})]});Ts.Icon=function(t){return m.jsx("header",{...t,className:ke("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ts.Body=function(t){return m.jsx(un,{...t,className:ke("min-w-0 flex-1",t.className),children:t.children})},Ts.Right=function(t){return m.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:m.jsx(un,{...t,type:"button"})})};const u2=e=>m.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});/*!
220
220
  * tabbable 6.2.0
221
221
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
222
- */var d2=["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])"],ks=d2.join(","),Nx=typeof Element>"u",Bo=Nx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cs=!Nx&&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},As=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},f2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Fx=function(t,n,r){if(As(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ks));return n&&Bo.call(t,ks)&&o.unshift(t),o=o.filter(r),o},Lx=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!As(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=Bo.call(a,ks);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),h=!As(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&h){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},Vx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},$x=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||f2(t))&&!Vx(t)?0:t.tabIndex},p2=function(t,n){var r=$x(t);return r<0&&n&&!Vx(t)?0:r},h2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jx=function(t){return t.tagName==="INPUT"},m2=function(t){return jx(t)&&t.type==="hidden"},g2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},v2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},y2=function(t){if(!t.name)return!0;var n=t.form||Cs(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=v2(o,t.form);return!i||i===t},b2=function(t){return jx(t)&&t.type==="radio"},x2=function(t){return b2(t)&&!y2(t)},w2=function(t){var n,r=t&&Cs(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=Cs(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},zx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},S2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Bo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Bo.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=Cs(t);if(l&&!l.shadowRoot&&o(l)===!0)return zx(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(w2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return zx(t);return!1},T2=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 Bo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Md=function(t,n){return!(n.disabled||As(n)||m2(n)||S2(n,t)||g2(n)||T2(n))},Dd=function(t,n){return!(x2(n)||$x(n)<0||!Md(t,n))},E2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},k2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=p2(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(h2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ps=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Lx([t],n.includeContainer,{filter:Dd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:E2}):r=Fx(t,n.includeContainer,Dd.bind(null,n)),k2(r)},C2=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Lx([t],n.includeContainer,{filter:Md.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Fx(t,n.includeContainer,Md.bind(null,n)),r},Rx=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Bo.call(t,ks)===!1?!1:Dd(n,t)};function Nd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Bx(){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 Hx(){return/apple/i.test(navigator.vendor)}function Fd(){const e=/android/i;return e.test(Nd())||e.test(Bx())}function A2(){return Nd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Wx(){return Bx().includes("jsdom/")}const qx="data-floating-ui-focusable",P2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ld="ArrowLeft",Vd="ArrowRight",I2="ArrowUp",_2="ArrowDown";function Ln(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 Dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&gs(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $d(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 O2(e){return e.matches("html,body")}function jt(e){return e?.ownerDocument||document}function jd(e){return kt(e)&&e.matches(P2)}function zd(e){return e?e.getAttribute("role")==="combobox"&&jd(e):!1}function M2(e){if(!e||Wx())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Is(e){return e?e.hasAttribute(qx)?e:e.querySelector("["+qx+"]")||e:null}function Ho(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function D2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Ho(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Ux(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 zt(e){e.preventDefault(),e.stopPropagation()}function N2(e){return"nativeEvent"in e}function Kx(e){return e.mozInputSource===0&&e.isTrusted?!0:Fd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yx(e){return Wx()?!1:!Fd()&&e.width===0&&e.height===0||Fd()&&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 Wo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var F2=typeof document<"u",L2=function(){},Ue=F2?S.useLayoutEffect:L2;const V2={...A};function Nt(e){const t=A.useRef(e);return Ue(()=>{t.current=e}),t}const $2=V2.useInsertionEffect||(e=>e());function gt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return $2(()=>{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 _s(e,t,n){return Math.floor(e/t)!==n}function Yi(e,t){return t<0||t>=e.current.length}function Rd(e,t){return Ht(e,{disabledIndices:t})}function Gx(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(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&&Os(e,a,o));return a}function j2(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,h=u;if(n.key===I2){if(d&&zt(n),u===-1)h=c;else if(h=Ht(e,{startingIndex:h,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||h<0)){const f=u%a,b=c%a,g=c-(b-f);b===f?h=c:h=b>f?g:g-a}Yi(e,h)&&(h=u)}if(n.key===_2&&(d&&zt(n),u===-1?h=l:(h=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(h=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Yi(e,h)&&(h=u)),r==="both"){const f=Lo(u/a);n.key===(i?Ld:Vd)&&(d&&zt(n),u%a!==a-1?(h=Ht(e,{startingIndex:u,disabledIndices:s}),o&&_s(h,a,f)&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),_s(h,a,f)&&(h=u)),n.key===(i?Vd:Ld)&&(d&&zt(n),u%a!==0?(h=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&_s(h,a,f)&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),_s(h,a,f)&&(h=u));const b=Lo(c/a)===f;Yi(e,h)&&(o&&b?h=n.key===(i?Vd:Ld)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):h=u)}return h}function z2(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 h=0;h<l;h++)u.push(o+d+h*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function R2(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 B2(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Os(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 Gi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zx(e,t){const n=Ps(e,Gi()),r=n.length;if(r===0)return;const o=Ln(jt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Xx(e){return Zx(jt(e).body,1)||e}function Qx(e){return Zx(jt(e).body,-1)||e}function Zi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Dt(n,r)}function H2(e){Ps(e,Gi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Jx(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var W2=typeof document<"u",q2=function(){},Ms=W2?S.useLayoutEffect:q2;function Ds(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(!Ds(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)&&!Ds(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function e0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function t0(e,t){const n=e0(e);return Math.round(t*n)/n}function Bd(e){const t=A.useRef(e);return Ms(()=>{t.current=e}),t}function U2(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}),[h,f]=A.useState(r);Ds(h,r)||f(r);const[b,g]=A.useState(null),[p,v]=A.useState(null),y=A.useCallback(P=>{P!==T.current&&(T.current=P,g(P))},[]),x=A.useCallback(P=>{P!==k.current&&(k.current=P,v(P))},[]),E=i||b,w=a||p,T=A.useRef(null),k=A.useRef(null),C=A.useRef(u),M=l!=null,O=Bd(l),F=Bd(o),L=Bd(c),H=A.useCallback(()=>{if(!T.current||!k.current)return;const P={placement:t,strategy:n,middleware:h};F.current&&(P.platform=F.current),tN(T.current,k.current,P).then($=>{const D={...$,isPositioned:L.current!==!1};I.current&&!Ds(C.current,D)&&(C.current=D,mi.flushSync(()=>{d(D)}))})},[h,t,n,F,L]);Ms(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const I=A.useRef(!1);Ms(()=>(I.current=!0,()=>{I.current=!1}),[]),Ms(()=>{if(E&&(T.current=E),w&&(k.current=w),E&&w){if(O.current)return O.current(E,w,H);H()}},[E,w,H,O,M]);const _=A.useMemo(()=>({reference:T,floating:k,setReference:y,setFloating:x}),[y,x]),V=A.useMemo(()=>({reference:E,floating:w}),[E,w]),N=A.useMemo(()=>{const P={position:n,left:0,top:0};if(!V.floating)return P;const $=t0(V.floating,u.x),D=t0(V.floating,u.y);return s?{...P,transform:"translate("+$+"px, "+D+"px)",...e0(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:D}},[n,s,V.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:H,refs:_,elements:V,floatingStyles:N}),[u,H,_,V,N])}const K2=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?Ub({element:r.current,padding:o}).fn(n):{}:r?Ub({element:r,padding:o}).fn(n):{}}}},Xi=(e,t)=>({...XD(e),options:[e,t]}),Hd=(e,t)=>({...QD(e),options:[e,t]}),Wd=(e,t)=>({...JD(e),options:[e,t]}),n0=(e,t)=>({...eN(e),options:[e,t]}),r0=(e,t)=>({...K2(e),options:[e,t]});function Y2(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 o0=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function G2(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(Y2).forEach((d,h)=>{c.set(d,h)}),c},[o]);return m.jsx(o0.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function i0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(o0),[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 h;const f=t!==void 0;a.current[s]=f?t:(h=d?.textContent)!=null?h:null}},[s,i,a,t]);return Ue(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ue(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const Z2="data-floating-ui-focusable",a0="active",s0="selected",Qi="ArrowLeft",Ji="ArrowRight",l0="ArrowUp",Ns="ArrowDown",X2={...A};let c0=!1,Q2=0;const u0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Q2++;function J2(){const[e,t]=A.useState(()=>c0?u0():void 0);return Ue(()=>{e==null&&t(u0())},[]),A.useEffect(()=>{c0=!0},[]),e}const ea=X2.useId||J2;let ta;process.env.NODE_ENV!=="production"&&(ta=new Set);function Fs(){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=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.warn(o)}}function eF(){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=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.error(o)}}const d0=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:h,d:f,style:{transform:b,...g}={},...p}=t;process.env.NODE_ENV!=="production"&&(n||Fs("The `ref` prop is required for `FloatingArrow`."));const v=ea(),[y,x]=A.useState(!1);if(Ue(()=>{if(!o)return;rn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[E,w]=r.split("-"),T=E==="top"||E==="bottom";let k=d;(T&&a!=null&&a.x||!T&&a!=null&&a.y)&&(k=null);const C=u*2,M=C/2,O=s/2*(c/-8+1),F=l/2*c/4,L=!!f,H=k&&w==="end"?"bottom":"top";let I=k&&w==="end"?"right":"left";k&&y&&(I=w==="end"?"left":"right");const _=i?.x!=null?k||i.x:"",V=i?.y!=null?k||i.y:"",N=f||"M0,0"+(" H"+s)+(" L"+(s-O)+","+(l-F))+(" Q"+s/2+","+l+" "+O+","+(l-F))+" Z",P={top:L?"rotate(180deg)":"",left:L?"rotate(90deg)":"rotate(-90deg)",bottom:L?"":"rotate(180deg)",right:L?"rotate(-90deg)":"rotate(90deg)"}[E];return m.jsxs("svg",{...p,"aria-hidden":!0,ref:n,width:L?s:s+C,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[I]:_,[H]:V,[E]:T||L?"100%":"calc(100% - "+C/2+"px)",transform:[P,b].filter($=>!!$).join(" "),...g},children:[C>0&&m.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:h,strokeWidth:C+(f?0:1),d:N}),m.jsx("path",{stroke:C&&!f?p.fill:"none",d:N}),m.jsx("clipPath",{id:v,children:m.jsx("rect",{x:-M,y:M*(L?-1:1),width:s+C,height:s})})]})});function f0(){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 p0=A.createContext(null),h0=A.createContext(null),gr=()=>{var e;return((e=A.useContext(p0))==null?void 0:e.id)||null},vr=()=>A.useContext(h0);function tF(e){const t=ea(),n=vr(),o=gr();return Ue(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function nF(e){const{children:t,id:n}=e,r=gr();return m.jsx(p0.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function rF(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(()=>f0());return m.jsx(h0.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function Gr(e){return"data-floating-ui-"+e}function Rt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const m0=Gr("safe-polygon");function qd(e,t,n){if(n&&!Wo(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 Ud(e){return typeof e=="function"?e():e}function g0(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:h=!0}=t,f=vr(),b=gr(),g=Nt(c),p=Nt(l),v=Nt(n),y=Nt(d),x=A.useRef(),E=A.useRef(-1),w=A.useRef(),T=A.useRef(-1),k=A.useRef(!0),C=A.useRef(!1),M=A.useRef(()=>{}),O=A.useRef(!1),F=gt(()=>{var N;const P=(N=o.current.openEvent)==null?void 0:N.type;return P?.includes("mouse")&&P!=="mousedown"});A.useEffect(()=>{if(!s)return;function N(P){let{open:$}=P;$||(Rt(E),Rt(T),k.current=!0,O.current=!1)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[s,i]),A.useEffect(()=>{if(!s||!g.current||!n)return;function N($){F()&&r(!1,$,"hover")}const P=jt(a.floating).documentElement;return P.addEventListener("mouseleave",N),()=>{P.removeEventListener("mouseleave",N)}},[a.floating,n,r,s,g,F]);const L=A.useCallback(function(N,P,$){P===void 0&&(P=!0),$===void 0&&($="hover");const D=qd(p.current,"close",x.current);D&&!w.current?(Rt(E),E.current=window.setTimeout(()=>r(!1,N,$),D)):P&&(Rt(E),r(!1,N,$))},[p,r]),H=gt(()=>{M.current(),w.current=void 0}),I=gt(()=>{if(C.current){const N=jt(a.floating).body;N.style.pointerEvents="",N.removeAttribute(m0),C.current=!1}}),_=gt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function N(R){if(Rt(E),k.current=!1,u&&!Wo(x.current)||Ud(y.current)>0&&!qd(p.current,"open"))return;const Z=qd(p.current,"open",x.current);Z?E.current=window.setTimeout(()=>{v.current||r(!0,R,"hover")},Z):n||r(!0,R,"hover")}function P(R){if(_()){I();return}M.current();const Z=jt(a.floating);if(Rt(T),O.current=!1,g.current&&o.current.floatingContext){n||Rt(E),w.current=g.current({...o.current.floatingContext,tree:f,x:R.clientX,y:R.clientY,onClose(){I(),H(),_()||L(R,!0,"safe-polygon")}});const oe=w.current;Z.addEventListener("mousemove",oe),M.current=()=>{Z.removeEventListener("mousemove",oe)};return}(x.current==="touch"?!Dt(a.floating,R.relatedTarget):!0)&&L(R)}function $(R){_()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:R.clientX,y:R.clientY,onClose(){I(),H(),_()||L(R)}})(R))}function D(){Rt(E)}function W(R){_()||L(R,!1)}if(nt(a.domReference)){const R=a.domReference,Z=a.floating;return n&&R.addEventListener("mouseleave",$),h&&R.addEventListener("mousemove",N,{once:!0}),R.addEventListener("mouseenter",N),R.addEventListener("mouseleave",P),Z&&(Z.addEventListener("mouseleave",$),Z.addEventListener("mouseenter",D),Z.addEventListener("mouseleave",W)),()=>{n&&R.removeEventListener("mouseleave",$),h&&R.removeEventListener("mousemove",N),R.removeEventListener("mouseenter",N),R.removeEventListener("mouseleave",P),Z&&(Z.removeEventListener("mouseleave",$),Z.removeEventListener("mouseenter",D),Z.removeEventListener("mouseleave",W))}}},[a,s,e,u,h,L,H,I,r,n,v,f,p,g,o,_,y]),Ue(()=>{var N;if(s&&n&&(N=g.current)!=null&&(N=N.__options)!=null&&N.blockPointerEvents&&F()){C.current=!0;const $=a.floating;if(nt(a.domReference)&&$){var P;const D=jt(a.floating).body;D.setAttribute(m0,"");const W=a.domReference,R=f==null||(P=f.nodesRef.current.find(Z=>Z.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return R&&(R.style.pointerEvents=""),D.style.pointerEvents="none",W.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",W.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,n,b,a,f,g,F]),Ue(()=>{n||(x.current=void 0,O.current=!1,H(),I())},[n,H,I]),A.useEffect(()=>()=>{H(),Rt(E),Rt(T),I()},[s,a.domReference,H,I]);const V=A.useMemo(()=>{function N(P){x.current=P.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(P){const{nativeEvent:$}=P;function D(){!k.current&&!v.current&&r(!0,$,"hover")}u&&!Wo(x.current)||n||Ud(y.current)===0||O.current&&P.movementX**2+P.movementY**2<2||(Rt(T),x.current==="touch"?D():(O.current=!0,T.current=window.setTimeout(D,Ud(y.current))))}}},[u,r,n,v,y]);return A.useMemo(()=>s?{reference:V}:{},[s,V])}let v0=0;function Zr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(v0);const i=()=>e?.focus({preventScroll:n});o?i():v0=requestAnimationFrame(i)}function Kd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&gs(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function oF(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iF(e){return e?.ownerDocument||document}const qo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function y0(e){return e==="inert"?qo.inert:e==="aria-hidden"?qo["aria-hidden"]:qo.none}let Ls=new WeakSet,Vs={},Yd=0;const aF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,b0=e=>e&&(e.host||b0(e.parentNode)),sF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=b0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function lF(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=sF(t,e),s=new Set,l=new Set(a),c=[];Vs[o]||(Vs[o]=new WeakMap);const u=Vs[o];a.forEach(d),h(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(hr(b)!=="script")if(s.has(b))h(b);else{const g=i?b.getAttribute(i):null,p=g!==null&&g!=="false",v=y0(i),y=(v.get(b)||0)+1,x=(u.get(b)||0)+1;v.set(b,y),u.set(b,x),c.push(b),y===1&&p&&Ls.add(b),x===1&&b.setAttribute(o,""),!p&&i&&b.setAttribute(i,i==="inert"?"":"true")}})}return Yd++,()=>{c.forEach(f=>{const b=y0(i),p=(b.get(f)||0)-1,v=(u.get(f)||0)-1;b.set(f,p),u.set(f,v),p||(!Ls.has(f)&&i&&f.removeAttribute(i),Ls.delete(f)),v||f.removeAttribute(o)}),Yd--,Yd||(qo.inert=new WeakMap,qo["aria-hidden"]=new WeakMap,qo.none=new WeakMap,Ls=new WeakSet,Vs={})}}function x0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=iF(e[0]).body;return lF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $s={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();Ue(()=>{Hx()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Gr("focus-guard")]:"",style:$s};return m.jsx("span",{...t,...i})}),w0=A.createContext(null),S0=Gr("portal");function cF(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ea(),o=T0(),[i,a]=A.useState(null),s=A.useRef(null);return Ue(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ue(()=>{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(S0,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ue(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!nt(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(S0,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function yr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=cF({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),h=a?.modal,f=a?.open,b=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||h)return;function g(p){i&&Zi(p)&&(p.type==="focusin"?Jx:H2)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,h]),A.useEffect(()=>{i&&(f||Jx(i))},[f,i]),m.jsxs(w0.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[b&&i&&m.jsx(js,{"data-type":"outside",ref:l,onFocus:g=>{if(Zi(g,i)){var p;(p=u.current)==null||p.focus()}else{const v=a?a.domReference:null,y=Qx(v);y?.focus()}}}),b&&i&&m.jsx("span",{"aria-owns":i.id,style:$s}),i&&mi.createPortal(t,i),b&&i&&m.jsx(js,{"data-type":"outside",ref:c,onFocus:g=>{if(Zi(g,i)){var p;(p=d.current)==null||p.focus()}else{const v=a?a.domReference:null,y=Xx(v);y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const T0=()=>A.useContext(w0);function E0(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const uF=20;let Xr=[];function dF(e){Xr=Xr.filter(t=>t.isConnected),e&&hr(e)!=="body"&&(Xr.push(e),Xr.length>uF&&(Xr=Xr.slice(-20)))}function k0(){return Xr.slice().reverse().find(e=>e.isConnected)}function fF(e){const t=Gi();return Rx(e,t)?e:Ps(e,t)[0]||e}function C0(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Gi(),i=C2(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Rx(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 pF=A.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:$s})});function Qr(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:h=!1,getInsideElements:f=()=>[]}=e,{open:b,onOpenChange:g,events:p,dataRef:v,elements:{domReference:y,floating:x}}=t,E=gt(()=>{var J;return(J=v.current.floatingContext)==null?void 0:J.nodeId}),w=gt(f),T=typeof a=="number"&&a<0,k=zd(y)&&T,C=aF(),M=C?i:!0,O=!M||C&&h,F=Nt(o),L=Nt(a),H=Nt(s),I=vr(),_=T0(),V=A.useRef(null),N=A.useRef(null),P=A.useRef(!1),$=A.useRef(!1),D=A.useRef(-1),W=_!=null,R=Is(x),Z=gt(function(J){return J===void 0&&(J=R),J?Ps(J,Gi()):[]}),X=gt(J=>{const j=Z(J);return F.current.map(Y=>y&&Y==="reference"?y:R&&Y==="floating"?R:j).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function J(Y){if(Y.key==="Tab"){Dt(R,Ln(jt(R)))&&Z().length===0&&!k&&zt(Y);const Q=X(),ue=Vn(Y);F.current[0]==="reference"&&ue===y&&(zt(Y),Y.shiftKey?Zr(Q[Q.length-1]):Zr(Q[1])),F.current[1]==="floating"&&ue===R&&Y.shiftKey&&(zt(Y),Zr(Q[0]))}}const j=jt(R);return j.addEventListener("keydown",J),()=>{j.removeEventListener("keydown",J)}},[r,y,R,c,F,k,Z,X]),A.useEffect(()=>{if(r||!x)return;function J(j){const Y=Vn(j),ue=Z().indexOf(Y);ue!==-1&&(D.current=ue)}return x.addEventListener("focusin",J),()=>{x.removeEventListener("focusin",J)}},[r,x,Z]),A.useEffect(()=>{if(r||!d)return;function J(){$.current=!0,setTimeout(()=>{$.current=!1})}function j(Y){const Q=Y.relatedTarget,ue=Y.currentTarget,ve=Vn(Y);queueMicrotask(()=>{const xe=E(),Ee=!(Dt(y,Q)||Dt(x,Q)||Dt(Q,x)||Dt(_?.portalNode,Q)||Q!=null&&Q.hasAttribute(Gr("focus-guard"))||I&&(Ho(I.nodesRef.current,xe).find(we=>{var Te,We;return Dt((Te=we.context)==null?void 0:Te.elements.floating,Q)||Dt((We=we.context)==null?void 0:We.elements.domReference,Q)})||Ux(I.nodesRef.current,xe).find(we=>{var Te,We,fe;return[(Te=we.context)==null?void 0:Te.elements.floating,Is((We=we.context)==null?void 0:We.elements.floating)].includes(Q)||((fe=we.context)==null?void 0:fe.elements.domReference)===Q})));if(ue===y&&R&&C0(R,F),l&&ue!==y&&!(ve!=null&&ve.isConnected)&&Ln(jt(R))===jt(R).body){kt(R)&&R.focus();const we=D.current,Te=Z(),We=Te[we]||Te[Te.length-1]||R;kt(We)&&We.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(k||!c)&&Q&&Ee&&!$.current&&Q!==k0()&&(P.current=!0,g(!1,Y,"focus-out"))})}if(x&&kt(y))return y.addEventListener("focusout",j),y.addEventListener("pointerdown",J),x.addEventListener("focusout",j),()=>{y.removeEventListener("focusout",j),y.removeEventListener("pointerdown",J),x.removeEventListener("focusout",j)}},[r,y,x,R,c,I,_,g,d,l,Z,k,E,F,v]);const oe=A.useRef(null),te=A.useRef(null),ee=E0([oe,_?.beforeInsideRef]),B=E0([te,_?.afterInsideRef]);A.useEffect(()=>{var J,j;if(r||!x)return;const Y=Array.from((_==null||(J=_.portalNode)==null?void 0:J.querySelectorAll("["+Gr("portal")+"]"))||[]),Q=I?Ux(I.nodesRef.current,E()):[],ue=I&&!c?Q.map(we=>{var Te;return(Te=we.context)==null?void 0:Te.elements.floating}):[],ve=(j=Q.find(we=>{var Te;return zd(((Te=we.context)==null?void 0:Te.elements.domReference)||null)}))==null||(j=j.context)==null?void 0:j.elements.domReference,xe=[x,ve,...Y,...ue,...w(),V.current,N.current,oe.current,te.current,_?.beforeOutsideRef.current,_?.afterOutsideRef.current,F.current.includes("reference")||k?y:null].filter(we=>we!=null),Ee=c||k?x0(xe,!O,O):x0(xe);return()=>{Ee()}},[r,y,x,c,F,_,k,M,O,I,E,w]),Ue(()=>{if(r||!kt(R))return;const J=jt(R),j=Ln(J);queueMicrotask(()=>{const Y=X(R),Q=L.current,ue=(typeof Q=="number"?Y[Q]:Q.current)||R,ve=Dt(R,j);!T&&!ve&&b&&Zr(ue,{preventScroll:ue===R})})},[r,b,R,T,X,L]),Ue(()=>{if(r||!R)return;const J=jt(R),j=Ln(J);dF(j);function Y(ve){let{reason:xe,event:Ee,nested:we}=ve;if(["hover","safe-polygon"].includes(xe)&&Ee.type==="mouseleave"&&(P.current=!0),xe==="outside-press")if(we)P.current=!1;else if(Kx(Ee)||Yx(Ee))P.current=!1;else{let Te=!1;document.createElement("div").focus({get preventScroll(){return Te=!0,!1}}),Te?P.current=!1:P.current=!0}}p.on("openchange",Y);const Q=J.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,$s),W&&y&&y.insertAdjacentElement("afterend",Q);function ue(){if(typeof H.current=="boolean"){const ve=y||k0();return ve&&ve.isConnected?ve:Q}return H.current.current||Q}return()=>{p.off("openchange",Y);const ve=Ln(J),xe=Dt(x,ve)||I&&Ho(I.nodesRef.current,E()).some(we=>{var Te;return Dt((Te=we.context)==null?void 0:Te.elements.floating,ve)}),Ee=ue();queueMicrotask(()=>{const we=fF(Ee);H.current&&!P.current&&kt(we)&&(!(we!==ve&&ve!==J.body)||xe)&&we.focus({preventScroll:!0}),Q.remove()})}},[r,x,R,H,v,p,I,W,y,E]),A.useEffect(()=>{queueMicrotask(()=>{P.current=!1})},[r]),Ue(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:d,open:b,onOpenChange:g,domReference:y}),()=>{_.setFocusManagerState(null)}},[r,_,c,b,g,d,y]),Ue(()=>{r||R&&C0(R,F)},[r,R,F]);function K(J){return r||!u||!c?null:m.jsx(pF,{ref:J==="start"?V:N,onClick:j=>g(!1,j.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const G=!r&&M&&(c?!k:!0)&&(W||c);return m.jsxs(m.Fragment,{children:[G&&m.jsx(js,{"data-type":"inside",ref:ee,onFocus:J=>{if(c){const Y=X();Zr(o[0]==="reference"?Y[0]:Y[Y.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(P.current=!1,Zi(J,_.portalNode)){const Y=Xx(y);Y?.focus()}else{var j;(j=_.beforeOutsideRef.current)==null||j.focus()}}}),!k&&K("start"),n,K("end"),G&&m.jsx(js,{"data-type":"inside",ref:B,onFocus:J=>{if(c)Zr(X()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(d&&(P.current=!0),Zi(J,_.portalNode)){const Y=Qx(y);Y?.focus()}else{var j;(j=_.afterOutsideRef.current)==null||j.focus()}}})]})}let zs=0;const A0="--floating-ui-scrollbar-width";function hF(){const e=Nd(),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(A0,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(A0),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let P0=()=>{};const Gd=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ue(()=>{if(r)return zs++,zs===1&&(P0=hF()),()=>{zs--,zs===0&&P0()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function I0(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function mF(e){return kt(e.target)&&e.target.tagName==="A"}function _0(e){return jd(e)}function Uo(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,h=A.useRef(),f=A.useRef(!1),b=A.useMemo(()=>({onPointerDown(g){h.current=g.pointerType},onMouseDown(g){const p=h.current;g.button===0&&s!=="click"&&(Wo(p,!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 p=h.current;if(s==="mousedown"&&h.current){h.current=void 0;return}Wo(p,!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){h.current=void 0,!(g.defaultPrevented||!u||I0(g))&&(g.key===" "&&!_0(i)&&(g.preventDefault(),f.current=!0),!mF(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||I0(g)||_0(i)||g.key===" "&&f.current&&(f.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:b}:{},[a,b])}function gF(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,h=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),h-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,h=s&&t.x!=null?t.x:h,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function O0(e){return e!=null&&e.clientX!=null}function vF(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),h=A.useRef(null),[f,b]=A.useState(),[g,p]=A.useState([]),v=gt((T,k)=>{d.current||r.current.openEvent&&!O0(r.current.openEvent)||a.setPositionReference(gF(i,{x:T,y:k,axis:l,dataRef:r,pointerType:f}))}),y=gt(T=>{c!=null||u!=null||(n?h.current||p([]):v(T.clientX,T.clientY))}),x=Wo(f)?o:n,E=A.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const T=Ut(o);function k(C){const M=Vn(C);Dt(o,M)?(T.removeEventListener("mousemove",k),h.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||O0(r.current.openEvent)){T.addEventListener("mousemove",k);const C=()=>{T.removeEventListener("mousemove",k),h.current=null};return h.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);A.useEffect(()=>E(),[E,g]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ue(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=A.useMemo(()=>{function T(k){let{pointerType:C}=k;b(C)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:y,onMouseEnter:y}},[y]);return A.useMemo(()=>s?{reference:w}:{},[s,w])}const yF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},bF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},M0=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 br(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:h=!1,bubbles:f,capture:b}=t,g=vr(),p=gt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?p:l,y=A.useRef(!1),{escapeKey:x,outsidePress:E}=M0(f),{escapeKey:w,outsidePress:T}=M0(b),k=A.useRef(!1),C=A.useRef(-1),M=gt(_=>{var V;if(!n||!a||!s||_.key!=="Escape"||k.current)return;const N=(V=i.current.floatingContext)==null?void 0:V.nodeId,P=g?Ho(g.nodesRef.current,N):[];if(!x&&(_.stopPropagation(),P.length>0)){let $=!0;if(P.forEach(D=>{var W;if((W=D.context)!=null&&W.open&&!D.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}r(!1,N2(_)?_.nativeEvent:_,"escape-key")}),O=gt(_=>{var V;const N=()=>{var P;M(_),(P=Vn(_))==null||P.removeEventListener("keydown",N)};(V=Vn(_))==null||V.addEventListener("keydown",N)}),F=gt(_=>{var V;const N=i.current.insideReactTree;i.current.insideReactTree=!1;const P=y.current;if(y.current=!1,c==="click"&&P||N||typeof v=="function"&&!v(_))return;const $=Vn(_),D="["+Gr("inert")+"]",W=jt(o.floating).querySelectorAll(D);let R=nt($)?$:null;for(;R&&!Jn(R);){const te=er(R);if(Jn(te)||!nt(te))break;R=te}if(W.length&&nt($)&&!O2($)&&!Dt($,o.floating)&&Array.from(W).every(te=>!Dt(R,te)))return;if(kt($)&&I){const te=Jn($),ee=rn($),B=/auto|scroll/,K=te||B.test(ee.overflowX),G=te||B.test(ee.overflowY),J=K&&$.clientWidth>0&&$.scrollWidth>$.clientWidth,j=G&&$.clientHeight>0&&$.scrollHeight>$.clientHeight,Y=ee.direction==="rtl",Q=j&&(Y?_.offsetX<=$.offsetWidth-$.clientWidth:_.offsetX>$.clientWidth),ue=J&&_.offsetY>$.clientHeight;if(Q||ue)return}const Z=(V=i.current.floatingContext)==null?void 0:V.nodeId,X=g&&Ho(g.nodesRef.current,Z).some(te=>{var ee;return $d(_,(ee=te.context)==null?void 0:ee.elements.floating)});if($d(_,o.floating)||$d(_,o.domReference)||X)return;const oe=g?Ho(g.nodesRef.current,Z):[];if(oe.length>0){let te=!0;if(oe.forEach(ee=>{var B;if((B=ee.context)!=null&&B.open&&!ee.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,_,"outside-press")}),L=gt(_=>{var V;const N=()=>{var P;F(_),(P=Vn(_))==null||P.removeEventListener(c,N)};(V=Vn(_))==null||V.addEventListener(c,N)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=E;let _=-1;function V(W){r(!1,W,"ancestor-scroll")}function N(){window.clearTimeout(_),k.current=!0}function P(){_=window.setTimeout(()=>{k.current=!1},ys()?5:0)}const $=jt(o.floating);s&&($.addEventListener("keydown",w?O:M,w),$.addEventListener("compositionstart",N),$.addEventListener("compositionend",P)),v&&$.addEventListener(c,T?L:F,T);let D=[];return h&&(nt(o.domReference)&&(D=mr(o.domReference)),nt(o.floating)&&(D=D.concat(mr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(mr(o.reference.contextElement)))),D=D.filter(W=>{var R;return W!==((R=$.defaultView)==null?void 0:R.visualViewport)}),D.forEach(W=>{W.addEventListener("scroll",V,{passive:!0})}),()=>{s&&($.removeEventListener("keydown",w?O:M,w),$.removeEventListener("compositionstart",N),$.removeEventListener("compositionend",P)),v&&$.removeEventListener(c,T?L:F,T),D.forEach(W=>{W.removeEventListener("scroll",V)}),window.clearTimeout(_)}},[i,o,s,v,c,n,r,h,a,x,E,M,w,O,F,T,L]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const H=A.useMemo(()=>({onKeyDown:M,...u&&{[yF[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[M,r,u,d]),I=A.useMemo(()=>({onKeyDown:M,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[bF[c]]:()=>{i.current.insideReactTree=!0},onBlurCapture(){g||(Rt(C),i.current.insideReactTree=!0,C.current=window.setTimeout(()=>{i.current.insideReactTree=!1}))}}),[M,c,i,g]);return A.useMemo(()=>a?{reference:H,floating:I}:{},[a,H,I])}function xF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ea(),i=A.useRef({}),[a]=A.useState(()=>f0()),s=gr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&eF("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=gt((f,b,g)=>{i.current.openEvent=f?b:void 0,a.emit("openchange",{open:f,event:b,reason:g,nested:s}),n?.(f,b,g)}),d=A.useMemo(()=>({setPositionReference:c}),[]),h=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:h,events:a,floatingId:o,refs:d}),[t,u,h,a,o,d])}function tr(e){e===void 0&&(e={});const{nodeId:t}=e,n=xF({...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),h=vr();Ue(()=>{u&&(d.current=u)},[u]);const f=U2({...e,elements:{...o,...s&&{reference:s}}}),b=A.useCallback(x=>{const E=nt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(E),f.refs.setReference(E)},[f.refs]),g=A.useCallback(x=>{(nt(x)||x===null)&&(d.current=x,a(x)),(nt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!nt(x))&&f.refs.setReference(x)},[f.refs]),p=A.useMemo(()=>({...f.refs,setReference:g,setPositionReference:b,domReference:d}),[f.refs,g,b]),v=A.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=A.useMemo(()=>({...f,...r,refs:p,elements:v,nodeId:t}),[f,p,v,t,r]);return Ue(()=>{r.dataRef.current.floatingContext=y;const x=h?.nodesRef.current.find(E=>E.id===t);x&&(x.context=y)}),A.useMemo(()=>({...f,context:y,refs:p,elements:v}),[f,p,v,y])}function Zd(){return A2()&&Hx()}function wF(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 f=Ut(a.domReference);function b(){!n&&kt(a.domReference)&&a.domReference===Ln(jt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function p(){d.current=!1}return f.addEventListener("blur",b),Zd()&&(f.addEventListener("keydown",g,!0),f.addEventListener("pointerdown",p,!0)),()=>{f.removeEventListener("blur",b),Zd()&&(f.removeEventListener("keydown",g,!0),f.removeEventListener("pointerdown",p,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function f(b){let{reason:g}=b;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),A.useEffect(()=>()=>{Rt(u)},[]);const h=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const b=Vn(f.nativeEvent);if(l&&nt(b)){if(Zd()&&!f.relatedTarget){if(!d.current&&!jd(b))return}else if(!M2(b))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const b=f.relatedTarget,g=f.nativeEvent,p=nt(b)&&b.hasAttribute(Gr("focus-guard"))&&b.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=Ln(a.domReference?a.domReference.ownerDocument:document);!b&&y===a.domReference||Dt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||Dt(a.domReference,y)||p||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:h}:{},[s,h])}function Xd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[a0]:a,[s0]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[Z2]:""},...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&&[a0,s0].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 h,f=arguments.length,b=new Array(f),g=0;g<f;g++)b[g]=arguments[g];return(h=r.get(c))==null?void 0:h.map(p=>p(...b)).find(p=>p!==void 0)}}}else a[c]=u}),a),{})}}function nr(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=>Xd(s,e,"reference"),t),i=A.useCallback(s=>Xd(s,e,"floating"),n),a=A.useCallback(s=>Xd(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const SF="Escape";function Rs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bs(e,t){return Rs(t,e===l0||e===Ns,e===Qi||e===Ji)}function Qd(e,t,n){return Rs(t,e===Ns,n?e===Qi:e===Ji)||e==="Enter"||e===" "||e===""}function D0(e,t,n){return Rs(t,n?e===Qi:e===Ji,e===Ns)}function N0(e,t,n,r){const o=n?e===Ji:e===Qi,i=e===l0;return t==="both"||t==="horizontal"&&r&&r>1?e===SF:Rs(t,o,i)}function Hs(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:h=!1,nested:f=!1,rtl:b=!1,virtual:g=!1,focusItemOnOpen:p="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:E="vertical",parentOrientation:w,cols:T=1,scrollItemIntoView:k=!0,virtualItemRef:C,itemSizes:M,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(h||Fs("`useListNavigation` looping must be enabled to allow escaping."),g||Fs("`useListNavigation` must be virtual to allow escaping.")),E==="vertical"&&T>1&&Fs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=Is(o.floating),L=Nt(F),H=gr(),I=vr();Ue(()=>{e.dataRef.current.orientation=E},[e,E]);const _=gt(()=>{l(P.current===-1?null:P.current)}),V=zd(o.domReference),N=A.useRef(p),P=A.useRef(u??-1),$=A.useRef(null),D=A.useRef(!0),W=A.useRef(_),R=A.useRef(!!o.floating),Z=A.useRef(n),X=A.useRef(!1),oe=A.useRef(!1),te=Nt(x),ee=Nt(n),B=Nt(k),K=Nt(u),[G,J]=A.useState(),[j,Y]=A.useState(),Q=gt(()=>{function fe(me){if(g){var Se;(Se=me.id)!=null&&Se.endsWith("-fui-option")&&(me.id=i+"-"+Math.random().toString(16).slice(2,10)),J(me.id),I?.events.emit("virtualfocus",me),C&&(C.current=me)}else Zr(me,{sync:X.current,preventScroll:!0})}const ae=a.current[P.current],z=oe.current;ae&&fe(ae),(X.current?me=>me():requestAnimationFrame)(()=>{const me=a.current[P.current]||ae;if(!me)return;ae||fe(me);const Se=B.current;Se&&ve&&(z||!D.current)&&(me.scrollIntoView==null||me.scrollIntoView(typeof Se=="boolean"?{block:"nearest",inline:"nearest"}:Se))})});Ue(()=>{c&&(n&&o.floating?N.current&&u!=null&&(oe.current=!0,P.current=u,_()):R.current&&(P.current=-1,W.current()))},[c,n,o.floating,u,_]),Ue(()=>{if(c&&n&&o.floating)if(s==null){if(X.current=!1,K.current!=null)return;if(R.current&&(P.current=-1,Q()),(!Z.current||!R.current)&&N.current&&($.current!=null||N.current===!0&&$.current==null)){let fe=0;const ae=()=>{a.current[0]==null?(fe<2&&(fe?requestAnimationFrame:queueMicrotask)(ae),fe++):(P.current=$.current==null||Qd($.current,E,b)||f?Rd(a,te.current):Gx(a,te.current),$.current=null,_())};ae()}}else Yi(a,s)||(P.current=s,Q(),oe.current=!1)},[c,n,o.floating,s,K,f,a,E,b,_,Q,te]),Ue(()=>{var fe;if(!c||o.floating||!I||g||!R.current)return;const ae=I.nodesRef.current,z=(fe=ae.find(Se=>Se.id===H))==null||(fe=fe.context)==null?void 0:fe.elements.floating,ne=Ln(jt(o.floating)),me=ae.some(Se=>Se.context&&Dt(Se.context.elements.floating,ne));z&&!me&&D.current&&z.focus({preventScroll:!0})},[c,o.floating,I,H,g]),Ue(()=>{if(!c||!I||!g||H)return;function fe(ae){Y(ae.id),C&&(C.current=ae)}return I.events.on("virtualfocus",fe),()=>{I.events.off("virtualfocus",fe)}},[c,I,g,H,C]),Ue(()=>{W.current=_,Z.current=n,R.current=!!o.floating}),Ue(()=>{n||($.current=null,N.current=p)},[n,p]);const ue=s!=null,ve=A.useMemo(()=>{function fe(z){if(!ee.current)return;const ne=a.current.indexOf(z);ne!==-1&&P.current!==ne&&(P.current=ne,_())}return{onFocus(z){let{currentTarget:ne}=z;X.current=!0,fe(ne)},onClick:z=>{let{currentTarget:ne}=z;return ne.focus({preventScroll:!0})},...v&&{onMouseMove(z){let{currentTarget:ne}=z;X.current=!0,oe.current=!1,fe(ne)},onPointerLeave(z){let{pointerType:ne}=z;if(!(!D.current||ne==="touch")&&(X.current=!0,P.current=-1,_(),!g)){var me;(me=L.current)==null||me.focus({preventScroll:!0})}}}}},[ee,L,v,a,_,g]),xe=A.useCallback(()=>{var fe;return w??(I==null||(fe=I.nodesRef.current.find(ae=>ae.id===H))==null||(fe=fe.context)==null||(fe=fe.dataRef)==null?void 0:fe.current.orientation)},[H,I,w]),Ee=gt(fe=>{if(D.current=!1,X.current=!0,fe.which===229||!ee.current&&fe.currentTarget===L.current)return;if(f&&N0(fe.key,E,b,T)){Bs(fe.key,xe())||zt(fe),r(!1,fe.nativeEvent,"list-navigation"),kt(o.domReference)&&(g?I?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ae=P.current,z=Rd(a,x),ne=Gx(a,x);if(V||(fe.key==="Home"&&(zt(fe),P.current=z,_()),fe.key==="End"&&(zt(fe),P.current=ne,_())),T>1){const me=M||Array.from({length:a.current.length},()=>({width:1,height:1})),Se=z2(me,T,O),ze=Se.findIndex(xt=>xt!=null&&!Os(a,xt,x)),lt=Se.reduce((xt,Yt,qn)=>Yt!=null&&!Os(a,Yt,x)?qn:xt,-1),Lt=Se[j2({current:Se.map(xt=>xt!=null?a.current[xt]:null)},{event:fe,orientation:E,loop:h,rtl:b,cols:T,disabledIndices:B2([...(typeof x!="function"?x:null)||a.current.map((xt,Yt)=>Os(a,Yt,x)?Yt:void 0),void 0],Se),minIndex:ze,maxIndex:lt,prevIndex:R2(P.current>ne?z:P.current,me,Se,T,fe.key===Ns?"bl":fe.key===(b?Qi:Ji)?"tr":"tl"),stopEvent:!0})];if(Lt!=null&&(P.current=Lt,_()),E==="both")return}if(Bs(fe.key,E)){if(zt(fe),n&&!g&&Ln(fe.currentTarget.ownerDocument)===fe.currentTarget){P.current=Qd(fe.key,E,b)?z:ne,_();return}Qd(fe.key,E,b)?h?P.current=ae>=ne?d&&ae!==a.current.length?-1:z:Ht(a,{startingIndex:ae,disabledIndices:x}):P.current=Math.min(ne,Ht(a,{startingIndex:ae,disabledIndices:x})):h?P.current=ae<=z?d&&ae!==-1?a.current.length:ne:Ht(a,{startingIndex:ae,decrement:!0,disabledIndices:x}):P.current=Math.max(z,Ht(a,{startingIndex:ae,decrement:!0,disabledIndices:x})),Yi(a,P.current)&&(P.current=-1),_()}}),we=A.useMemo(()=>g&&n&&ue&&{"aria-activedescendant":j||G},[g,n,ue,j,G]),Te=A.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...V?{}:we,onKeyDown:Ee,onPointerMove(){D.current=!0}}),[we,Ee,E,V]),We=A.useMemo(()=>{function fe(z){p==="auto"&&Kx(z.nativeEvent)&&(N.current=!0)}function ae(z){N.current=p,p==="auto"&&Yx(z.nativeEvent)&&(N.current=!0)}return{...we,onKeyDown(z){D.current=!1;const ne=z.key.startsWith("Arrow"),me=["Home","End"].includes(z.key),Se=ne||me,ze=D0(z.key,E,b),lt=N0(z.key,E,b,T),Lt=D0(z.key,xe(),b),xt=Bs(z.key,E),Yt=(f?Lt:xt)||z.key==="Enter"||z.key.trim()==="";if(g&&n){const q=I?.nodesRef.current.find(Ne=>Ne.parentId==null),U=I&&q?D2(I.nodesRef.current,q.id):null;if(Se&&U&&C){const Ne=new KeyboardEvent("keydown",{key:z.key,bubbles:!0});if(ze||lt){var qn,Cn;const Xe=((qn=U.context)==null?void 0:qn.elements.domReference)===z.currentTarget,rt=lt&&!Xe?(Cn=U.context)==null?void 0:Cn.elements.domReference:ze?a.current.find(Me=>Me?.id===G):null;rt&&(zt(z),rt.dispatchEvent(Ne),Y(void 0))}if((xt||me)&&U.context&&U.context.open&&U.parentId&&z.currentTarget!==U.context.elements.domReference){var An;zt(z),(An=U.context.elements.domReference)==null||An.dispatchEvent(Ne);return}}return Ee(z)}if(!(!n&&!y&&ne)){if(Yt){const q=Bs(z.key,xe());$.current=f&&q?null:z.key}if(f){Lt&&(zt(z),n?(P.current=Rd(a,te.current),_()):r(!0,z.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(P.current=u),zt(z),!n&&y?r(!0,z.nativeEvent,"list-navigation"):Ee(z),n&&_())}},onFocus(){n&&!g&&(P.current=-1,_())},onPointerDown:ae,onPointerEnter:ae,onMouseDown:fe,onClick:fe}},[G,we,T,Ee,te,p,a,f,_,r,n,y,E,xe,b,u,I,g,C]);return A.useMemo(()=>c?{reference:We,floating:Te,item:ve}:{},[c,We,Te,ve])}const TF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xr(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=ea(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var y;return((y=Is(i.floating))==null?void 0:y.id)||a},[i.floating,a]),h=(r=TF.get(l))!=null?r:l,b=gr()!=null,g=A.useMemo(()=>h==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":h==="alertdialog"?"dialog":h,"aria-controls":o?d:void 0,...h==="listbox"&&{role:"combobox"},...h==="menu"&&{id:u},...h==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[h,d,b,o,u,l]),p=A.useMemo(()=>{const y={id:d,...h&&{role:h}};return h==="tooltip"||l==="label"?y:{...y,...h==="menu"&&{"aria-labelledby":u}}},[h,d,u,l]),v=A.useCallback(y=>{let{active:x,selected:E}=y;const w={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":return{...w,"aria-selected":x&&E};case"combobox":return{...w,"aria-selected":E}}return{}},[d,l]);return A.useMemo(()=>s?{reference:g,floating:p,item:v}:{},[s,g,p,v])}const F0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ko(e,t){return typeof e=="function"?e(t):e}function EF(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 kF(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=EF(n,a);return!c&&s==="close"&&l("unmounted"),Ue(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{mi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function L0(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,h=(u?a:a.close)||0,[f,b]=A.useState(()=>({...Ko(i,c),...Ko(n,c)})),{isMounted:g,status:p}=kF(e,{duration:a}),v=Nt(n),y=Nt(r),x=Nt(o),E=Nt(i);return Ue(()=>{const w=Ko(v.current,c),T=Ko(x.current,c),k=Ko(E.current,c),C=Ko(y.current,c)||Object.keys(w).reduce((M,O)=>(M[O]="",M),{});if(p==="initial"&&b(M=>({transitionProperty:M.transitionProperty,...k,...w})),p==="open"&&b({transitionProperty:Object.keys(C).map(F0).join(","),transitionDuration:d+"ms",...k,...C}),p==="close"){const M=T||w;b({transitionProperty:Object.keys(M).map(F0).join(","),transitionDuration:h+"ms",...k,...M})}},[h,x,v,y,E,d,p,c]),{isMounted:g,styles:f}}function CF(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:h=[],selectedIndex:f=null}=t,b=A.useRef(-1),g=A.useRef(""),p=A.useRef((n=f??a)!=null?n:-1),v=A.useRef(null),y=gt(s),x=gt(l),E=Nt(u),w=Nt(h);Ue(()=>{r&&(Rt(b),v.current=null,g.current="")},[r]),Ue(()=>{if(r&&g.current===""){var O;p.current=(O=f??a)!=null?O:-1}},[r,f,a]);const T=gt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),k=gt(O=>{function F(V,N,P){const $=E.current?E.current(N,P):N.find(D=>D?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return $?V.indexOf($):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(F(L,L,g.current)===-1?T(!1):O.key===" "&&zt(O)),L==null||w.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(zt(O),T(!0)),L.every(V=>{var N,P;return V?((N=V[0])==null?void 0:N.toLocaleLowerCase())!==((P=V[1])==null?void 0:P.toLocaleLowerCase()):!0})&&g.current===O.key&&(g.current="",p.current=v.current),g.current+=O.key,Rt(b),b.current=window.setTimeout(()=>{g.current="",p.current=v.current,T(!1)},d);const I=p.current,_=F(L,[...L.slice((I||0)+1),...L.slice(0,(I||0)+1)],g.current);_!==-1?(y(_),v.current=_):O.key!==" "&&(g.current="",T(!1))}),C=A.useMemo(()=>({onKeyDown:k}),[k]),M=A.useMemo(()=>({onKeyDown:k,onKeyUp(O){O.key===" "&&T(!1)}}),[k,T]);return A.useMemo(()=>c?{reference:C,floating:M}:{},[c,C,M])}function AF(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function V0(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 PF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function $0(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=performance.now();function c(d,h){const f=performance.now(),b=f-l;if(a===null||s===null||b===0)return a=d,s=h,l=f,null;const g=d-a,p=h-s,y=Math.sqrt(g*g+p*p)/b;return a=d,s=h,l=f,y}const u=d=>{let{x:h,y:f,placement:b,elements:g,onClose:p,nodeId:v,tree:y}=d;return function(E){function w(){Rt(o),p()}if(Rt(o),!g.domReference||!g.floating||b==null||h==null||f==null)return;const{clientX:T,clientY:k}=E,C=[T,k],M=oF(E),O=E.type==="mouseleave",F=Kd(g.floating,M),L=Kd(g.domReference,M),H=g.domReference.getBoundingClientRect(),I=g.floating.getBoundingClientRect(),_=b.split("-")[0],V=h>I.right-I.width/2,N=f>I.bottom-I.height/2,P=PF(C,H),$=I.width>H.width,D=I.height>H.height,W=($?H:I).left,R=($?H:I).right,Z=(D?H:I).top,X=(D?H:I).bottom;if(F&&(i=!0,!O))return;if(L&&(i=!1),L&&!O){i=!0;return}if(O&&nt(E.relatedTarget)&&Kd(g.floating,E.relatedTarget)||y&&AF(y.nodesRef.current,v).length)return;if(_==="top"&&f>=H.bottom-1||_==="bottom"&&f<=H.top+1||_==="left"&&h>=H.right-1||_==="right"&&h<=H.left+1)return w();let oe=[];switch(_){case"top":oe=[[W,H.top+1],[W,I.bottom-1],[R,I.bottom-1],[R,H.top+1]];break;case"bottom":oe=[[W,I.top+1],[W,H.bottom-1],[R,H.bottom-1],[R,I.top+1]];break;case"left":oe=[[I.right-1,X],[I.right-1,Z],[H.left+1,Z],[H.left+1,X]];break;case"right":oe=[[H.right-1,X],[H.right-1,Z],[I.left+1,Z],[I.left+1,X]];break}function te(ee){let[B,K]=ee;switch(_){case"top":{const G=[$?B+t/2:V?B+t*4:B-t*4,K+t+1],J=[$?B-t/2:V?B+t*4:B-t*4,K+t+1],j=[[I.left,V||$?I.bottom-t:I.top],[I.right,V?$?I.bottom-t:I.top:I.bottom-t]];return[G,J,...j]}case"bottom":{const G=[$?B+t/2:V?B+t*4:B-t*4,K-t],J=[$?B-t/2:V?B+t*4:B-t*4,K-t],j=[[I.left,V||$?I.top+t:I.bottom],[I.right,V?$?I.top+t:I.bottom:I.top+t]];return[G,J,...j]}case"left":{const G=[B+t+1,D?K+t/2:N?K+t*4:K-t*4],J=[B+t+1,D?K-t/2:N?K+t*4:K-t*4];return[...[[N||D?I.right-t:I.left,I.top],[N?D?I.right-t:I.left:I.right-t,I.bottom]],G,J]}case"right":{const G=[B-t,D?K+t/2:N?K+t*4:K-t*4],J=[B-t,D?K-t/2:N?K+t*4:K-t*4],j=[[N||D?I.left+t:I.right,I.top],[N?D?I.left+t:I.right:I.left+t,I.bottom]];return[G,J,...j]}}}if(!V0([T,k],oe)){if(i&&!P)return w();if(!O&&r){const ee=c(E.clientX,E.clientY);if(ee!==null&&ee<.1)return w()}V0([T,k],te([h,f]))?!i&&r&&(o.current=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const IF=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(yr,{children:m.jsx(bg,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(Xn,{presenceAffectsLayout:!0,children:[e?m.jsx(Qe.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(Gd,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(Qr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(Qe.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(ko,{})})}),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]})})}),_F=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=tr({open:t!==null,transform:!0,onOpenChange:h=>h?void 0:n(null)}),a=Uo(o),s=xr(o,{role:"dialog"}),l=br(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=nr([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return m.jsxs(S.Fragment,{children:[m.jsx(IF,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((h,f)=>{const b=h.props,g=`${r}-${f}`,p=()=>n({...b,id:g}),v=b.leading;return m.jsx(Qe.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(Qe.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(S.Fragment,{children:[b.avatar?m.jsx("div",{children:m.jsx("div",{className:"relative px-1",children:m.jsx("button",{onClick:p,className:"flex size-10 items-center justify-center ring-primary",children:b.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:p,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[m.jsx("h3",{children:b.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:b.description})]}),v?m.jsx(v,{open:p}):null]})})]})})})},g)})})]})},OF=e=>m.jsx(S.Fragment,{children:e.children}),MF=/Mac|iPod|iPhone|iPad/,Ws=()=>MF.test(navigator.userAgent),DF=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ws()?"Meta":"Control":n==="Hyper"?Ws()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),j0=e=>e.map(t=>t.trim()).join("+");class NF{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=j0(DF(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=j0(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()}}class wn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof wn&&(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 wn(this);return t?t(n):n}static from(t,n){return new wn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(wn.from(t,n).values())}toArray(){return Array.from(this.values())}}const FF=(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]},z0=(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},R0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},B0=(e,t)=>{const n=z0(t,R0.basic,e);return n!==void 0&&n!==e?n:z0(t,R0.extend,e)},H0=e=>e.replace(/[^0-9]/g,""),qs=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),W0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?H0(e).includes(H0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?FF(e,t)!==null:!1,LF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>W0(e,o,n,r)):W0(e,t,n,r),Jd=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Ve.array(i.value)?i.value.map(qs):qs(`${i.value}`)}));return e.forEach(i=>{const a=B0(i,t);o.forEach(s=>{const l=B0(i,s.key);if(!l)return;const c=qs(`${s.value}`.toLocaleLowerCase()).trim(),u=qs(`${l}`.toLocaleLowerCase()).trim();if(LF(u,c,s.score,s.match))return void r.set(a,i);Ve.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},VF=e=>(e=e.trim(),e==="Alt"?Ws()?m.jsx(HI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Ws()?m.jsx(VI,{"aria-label":"Command",size:14}):"Ctrl":e),$F=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex 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:VF(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},ef=m.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),jF=(e,t)=>dr()?t:window.matchMedia(e).matches,zF=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(jF(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},q0=()=>window.matchMedia("@media (pointer: coarse)"),RF=()=>{const e=S.useRef(dr()?null:q0()),[t,n]=S.useState(dr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?q0():e.current).addEventListener("change",o=>n(o.matches))},[]),t},tf=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=RF(),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||fb())return;document.documentElement.style.padding=Gh(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(ET(c.style.height)):null,h=Ve.number(d)?d:u.height,f=c.scrollHeight<=h;return h===c.scrollHeight?e?l.preventDefault():void 0:f?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},BF=Sb,Sn="500ms",HF={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},WF={initial:{x:["30%","0%"],opacity:.8},enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn}},nf={drawer:e=>e==="left"?HF:WF,sheet:{initial:{opacity:.5,y:"25%",animationDuration:Sn,transformOrigin:"bottom"},enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.1,y:"50%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn}}},qF=ao("z-floating border border-card-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"}}),U0={top:0,left:0,right:0,bottom:0},K0=e=>e*.6,UF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const u=e.parent.current,d=e.value.get()||u.getBoundingClientRect().width,h=e.position==="right"?-r.delta.x:r.delta.x,f=Math.abs(d+h);return e.value.set(f)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=window.outerHeight,c=K0(l);return s>=c?e.value.set(s):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}};return m.jsx(Qe.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:U0,whileDrag:{cursor:"grabbing"},className:Ce("absolute rounded-lg",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:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Us={drawer:"right",sheet:"none",dialog:"none"},KF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Us.drawer:Us[o]:t?Us[o]:Us.sheet},YF=[],rf=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:h=!0,forceType:f=!1,layoutId:b=void 0,overlayClassName:g="",type:p="dialog",position:v,overlayClickClose:y=!1,role:x="dialog",interactions:E=YF,...w},T)=>{const k=tf(e,"block-only"),C=S.useId(),M=S.useId(),O=zF("(min-width: 64rem)"),F=p!=="dialog",L=KF(O,f,p,v),H=O||f?nf[p]:nf.sheet,I=typeof H=="function"?H(L):H,_=O||f?p:"sheet",V=tr({open:e,onOpenChange:a}),N=Uo(V.context,{}),P=xr(V.context,{role:x}),$=br(V.context,{escapeKey:!0,outsidePress:y}),D=nr([N,P,$].concat(E)),W=o,R=qa(void 0);S.useEffect(()=>{R.set(void 0)},[_]);const Z=()=>a(!1);S.useImperativeHandle(T,()=>({context:V.context,floating:k.current}),[V.context,k]);const X=(ee,B)=>{const K=V.refs.floating;if(K.current&&_==="sheet"){const J=K.current.getBoundingClientRect(),j=R.get()||J.height,Y=Math.abs(j-B.delta.y),Q=K0(window.outerHeight);return Y<Q?(Z(),setTimeout(()=>R.set(window.outerHeight),350)):R.set(Y)}},oe={layoutId:b,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:I},te=d&&_==="sheet"?{...oe,dragElastic:0,onDrag:X,dragConstraints:U0,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:_==="sheet",drag:_==="sheet"?"y":"x"}:oe;return m.jsxs(S.Fragment,{children:[o?m.jsx(S.Fragment,{children:r?m.jsx(BF,{ref:V.refs.setReference,...D.getReferenceProps({layoutId:b}),children:W}):m.jsx(Qe.button,{ref:V.refs.setReference,...D.getReferenceProps(),layoutId:b,type:"button",children:W})}):null,m.jsx(yr,{preserveTabOrder:!0,children:m.jsx(Xn,{propagate:!0,mode:"wait",initial:!1,children:e?m.jsx(Gd,{lockScroll:!0,className:Ce("inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70",_==="drawer"?"":"flex items-start justify-center p-10",g),children:m.jsx(Qr,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:V.context,children:m.jsxs(Qe.div,{...w,...te,...t?{"aria-labelledby":C,"aria-describedby":M}:{"aria-label":s},...D.getFloatingProps({"aria-modal":e,ref:Kn(V.refs.setFloating,k),className:Ce(qF({position:L,type:_}),l,"overscroll-contain")}),"data-component":"modal",style:_==="drawer"?{width:R}:{height:R},children:[t?m.jsx("header",{className:"relative w-full",children:t?m.jsx("h2",{id:C,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,m.jsx("section",{"data-component":"modal-body",className:Ce("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?m.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,h?m.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:m.jsx("button",{type:"button",onClick:Z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:m.jsx(ko,{})})}):null,F&&u?m.jsx(UF,{onChange:a,value:R,sheet:_==="sheet",position:L,parent:V.refs.floating}):null]})})}):null},C)})]})}),GF=e=>m.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:bc(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),ZF=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:m.jsx(GF,{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:Ce("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 items-center gap-2",children:[o.Icon?o.Icon:null,m.jsx("span",{children:bc(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx($F,{value:o.shortcut}):null]})}),XF=(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:Ve.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Ve.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=Jd(o,"title",n),a=r.filter(s=>Ve.function(s.enabled)?s.enabled({text:t}):!1);return wn.unique(i.concat(a),s=>s.title)},QF=[0,0,0,0,0],JF=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=Et(),[o,i]=S.useState(""),a=ir(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=tr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:zo}),h=Hs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:y=>u(x=>Ve.number(y)?y:e.open?x??0:null)}),{getItemProps:f}=nr([h]),b=e.commands.flatMap(y=>y.type==="group"?[y,...y.items]:[y]),g=XF(b,o),p=o===""?b:[{type:"group",title:"Results",items:[]},...g.filter(y=>y.type!=="group")];S.useEffect(()=>{const y=new NF;return y.add(t,()=>e.onChangeVisibility?.(!0)),b.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&y.add(x.shortcut,E=>x.action({event:E,text:a.current,setOpen:e.onChangeVisibility}))}),y.register()},[t]);const v=e.Icon??hy;return m.jsx(S.Fragment,{children:m.jsxs(rf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[h],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[m.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[m.jsx("div",{className:"flex size-10 items-center justify-center",children:m.jsx(v,{Default:hy,text:o,size:16})}),m.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:y=>i(y.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:y=>{if((y.key==="ArrowDown"||y.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),y.key==="Enter"){if(c!==null&&p[c]){y.preventDefault();const x=p[c],E=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:E})}if(p.length===1){y.preventDefault();const x=p[0],E=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:E})}}}})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),QF.map((y,x)=>m.jsx("li",{className:Ce("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:ef},`${s}-${x}-skeleton-index`))]}):m.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[p.map((y,x)=>S.createElement(ZF,{...f({onMouseEnter:()=>u(x),ref(E){n.current[x]=E},onClick(E){E.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),y.type==="shortcut"&&y.action({event:E,setOpen:e.onChangeVisibility,text:o})}}),item:y,text:o,active:c===x,key:`${s}-${y.type}-${x}`})),p.length===1?m.jsx("div",{className:Ce("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Ve.number(c)?m.jsx(e.Preview,{command:p[c],text:o}):null]}),e.footer?m.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},Yo=e=>{const t=S.useId(),[n,r]=S.useState(e.open),o=S.useRef(null),i=S.useMemo(()=>[Xi(10),Wd({fallbackAxisSideDirection:"end"}),Hd(),r0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=tr({open:n,middleware:i,transform:!0,whileElementsMounted:zo,onOpenChange:(b,g)=>{const p=g?.relatedTarget;p&&p.dataset.floating==="true"&&!b||(r(b),e.onChange?.(b))}}),c=Uo(l),u=br(l),d=xr(l,{role:"tooltip"}),{getReferenceProps:h,getFloatingProps:f}=nr([c,u,d]);return m.jsxs(S.Fragment,{children:[m.jsx("button",{ref:a.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(yr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(Qr,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[m.jsx(d0,{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-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},eL=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}=tr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Uo(s,{enabled:e.disabled??!0}),u=xr(s,{role:"tooltip"}),d=br(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=nr([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(ka,{...f(e),as:Qe.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(Qe.span,{layoutId:o,children:e.trigger})}),m.jsx(Xn,{children:i?m.jsx(yr,{root:t,children:m.jsx(Qr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(Qe.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Y0=200,tL=500,G0=(e="")=>Ce("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),of=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Z0=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),[h,f]=S.useState(!1),[b,g]=S.useState(null),p=S.useRef([]),v=S.useRef([]),y=S.useContext(of),x=gr(),E=vr(),w=tF(),T=i0(),k=x!==null,{floatingStyles:C,refs:M,context:O}=tr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:zo,placement:k?"right":"bottom-start",middleware:[Xi({mainAxis:k?0:4,alignmentAxis:k?-4:0}),Wd(),Hd()]}),F=xr(O,{role:"menu"}),L=br(O,{bubbles:!0}),H=g0(O,{move:!1,enabled:n,delay:{open:Y0},handleClose:$0({blockPointerEvents:!0,requireIntent:!1})}),I=Uo(O,{toggle:!k,event:"mousedown",ignoreMouse:k,keyboardHandlers:!0}),_=Hs(O,{loop:!0,activeIndex:b,nested:k,listRef:p,onNavigate:g}),V=CF(O,{activeIndex:b,listRef:v,resetMs:tL,onMatch:u?g:void 0}),{getReferenceProps:N,getFloatingProps:P,getItemProps:$}=nr([H,I,F,L,_,V]);S.useEffect(()=>{if(!E)return;const W=()=>d(!1),R=Z=>{Z.nodeId!==w&&Z.parentId===x&&d(!1)};return E.events.on("click",W),E.events.on("menuopen",R),()=>{E.events.off("click",W),E.events.off("menuopen",R)}},[E,w,x]),S.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:x,nodeId:w})},[E,u,w,x]);const D=o?l.className:Ce(G0(l.className));return m.jsxs(nF,{id:w,children:[m.jsx(S.Fragment,{children:l.asChild?m.jsx(Sb,{...N(y.getItemProps({...l,onFocus(W){l.onFocus?.(W),f(!1),y.setHasFocusInside(!0)}})),children:s,className:D,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Kn(M.setReference,T.ref,c),tabIndex:k?y.activeIndex===T.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:D,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Kn(M.setReference,T.ref,c),tabIndex:k?y.activeIndex===T.index?0:-1:void 0,...N(y.getItemProps({...l,onFocus(W){l.onFocus?.(W),f(!1),y.setHasFocusInside(!0)}})),children:[s,k&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(Lu,{size:14})]})]})}),m.jsx(of.Provider,{value:{activeIndex:b,setActiveIndex:g,getItemProps:$,setHasFocusInside:f,isOpen:u},children:m.jsx(G2,{elementsRef:p,labelsRef:v,children:u&&m.jsx(yr,{preserveTabOrder:!0,children:m.jsx(Qr,{context:O,modal:!1,initialFocus:k?-1:0,returnFocus:o?i:!k,children:m.jsx(t,{...P(),ref:M.setFloating,style:{...l.style,...C},className:Ce("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})})})})})]})}),nL=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(of),s=i0({label:n?null:e}),l=vr(),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:Kn(s.ref,i),className:G0(`${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]})}),rL=S.forwardRef((e,t)=>gr()===null?m.jsx(rF,{children:m.jsx(Z0,{...e,isParent:!0,ref:t})}):m.jsx(Z0,{...e,isParent:!1,ref:t})),oL=e=>m.jsx(Qe.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),af=S.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=od,...h},f){const[b,g]=S.useState(i??!1),p=S.useRef(null),v=t||"span",y=I=>{g(I),d?.(I)},{refs:x,floatingStyles:E,context:w}=tr({open:b,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:zo,onOpenChange:i?void 0:y,middleware:[Hd(),Xi(5),Wd({fallbackAxisSideDirection:"start"}),r0({padding:5,element:p})]}),T=g0(w,{move:!0,delay:{open:Y0},enabled:l?s:!1,handleClose:c?$0():null}),k=wF(w,{enabled:l?a:!1}),C=Uo(w,{enabled:l?c:!1}),M=br(w,{enabled:l}),O=xr(w,{role:"tooltip",enabled:l}),F=vF(w,{enabled:!!l&&!!u}),{getReferenceProps:L,getFloatingProps:H}=nr([O,M,F,a?k:void 0,s?T:void 0,c?C:void 0]);return S.useEffect(()=>g(i===void 0?!1:i),[i]),m.jsxs(S.Fragment,{children:[m.jsx(v,{...L(h),ref:Kn(x.setReference,f),children:n}),b&&m.jsx(yr,{preserveTabOrder:!0,children:m.jsxs(un,{...H(),ref:x.setFloating,style:E,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(d0,{ref:p,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Ks=0,wr=1,Go=2,X0=4;function Q0(e){return()=>e}function iL(e){e()}function na(e,t){return n=>e(t(n))}function J0(e,t){return()=>e(t)}function aL(e,t){return n=>e(t,n)}function sf(e){return e!==void 0}function sL(...e){return()=>{e.map(iL)}}function Zo(){}function Ys(e,t){return t(e),e}function lL(e,t){return t(e)}function dt(...e){return e}function tt(e,t){return e(wr,t)}function Le(e,t){e(Ks,t)}function lf(e){e(Go)}function Ft(e){return e(X0)}function be(e,t){return tt(e,aL(t,Ks))}function $n(e,t){const n=e(wr,r=>{n(),t(r)});return n}function ew(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function tw(e,t){return e===t}function ft(e=tw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ae(e){return t=>n=>{e(n)&&t(n)}}function de(e){return t=>na(t,e)}function jn(e){return t=>()=>{t(e)}}function ie(e,...t){const n=cL(...t);return(r,o)=>{switch(r){case Go:lf(e);return;case wr:return tt(e,n(o))}}}function zn(e,t){return n=>r=>{n(t=e(t,r))}}function Xo(e){return t=>n=>{e>0?e--:t(n)}}function Sr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function $e(...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);tt(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 cL(...e){return t=>e.reduceRight(lL,t)}function uL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case wr:return i?n===i?void 0:(r(),n=i,t=tt(e,i),t):(r(),Zo);case Go:r(),n=null;return}}}function le(e){let t=e;const n=Re();return(r,o)=>{switch(r){case Ks:t=o;break;case wr:{o(t);break}case X0:return t}return n(r,o)}}function Wt(e,t){return Ys(le(t),n=>be(e,n))}function Re(){const e=[];return(t,n)=>{switch(t){case Ks:e.slice().forEach(r=>{r(n)});return;case Go:e.splice(0,e.length);return;case wr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function on(e){return Ys(Re(),t=>be(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:dL(),singleton:n}}const dL=()=>Symbol();function fL(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 _t(...e){const t=Re(),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);tt(i,l=>{n[a]=l,r=r|s,r===o&&Le(t,n)})}),function(i,a){switch(i){case Go:{lf(t);return}case wr:return r===o&&a(n),tt(t,a)}}}function Pe(e,t=tw){return ie(e,ft(t))}function nw(...e){return function(t,n){switch(t){case Go:return;case wr:return sL(...e.map(r=>tt(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const pL={0:"debug",3:"error",1:"log",2:"warn"},hL=()=>typeof globalThis>"u"?window:globalThis,Tr=Ke(()=>{const e=le(3);return{log:le((t,n,r=1)=>{var o;const i=(o=hL().VIRTUOSO_LOG_LEVEL)!=null?o:Ft(e);r>=i&&console[pL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Rn(e,t,n){return cf(e,t,n).callbackRef}function cf(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 rw(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=mL(u.children,t,s?"offsetWidth":"offsetHeight",o);let h=u.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const f=h.lastElementChild.dataset.viewportType==="window";let b;f&&(b=h.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:s?h.scrollLeft:h.scrollTop,p=a?s?a.scrollWidth:a.scrollHeight:f?s?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:s?h.scrollWidth:h.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?b.innerWidth:b.innerHeight:s?h.offsetWidth:h.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(g,0),viewportHeight:v}),i?.(s?ow("column-gap",getComputedStyle(u).columnGap,o):ow("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return cf(c,n,l)}function mL(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},Jt.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 ow(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function uf(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,h;if(t){const f=t.getBoundingClientRect(),b=c.top-f.top;h=f.height-Math.max(0,b),d=b+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;h=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:h,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=cf(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 Kt=Ke(()=>{const e=Re(),t=Re(),n=le(0),r=Re(),o=le(0),i=Re(),a=Re(),s=le(0),l=le(0),c=le(0),u=le(0),d=Re(),h=Re(),f=le(!1),b=le(!1),g=le(!1);return be(ie(e,de(({scrollTop:p})=>p)),t),be(ie(e,de(({scrollHeight:p})=>p)),a),be(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:b,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ra={lvl:0};function iw(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 ot(e){return e===ra}function oa(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?oa(e.l,t):oa(e.r,t)}function Tn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Tn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Tn(e.l,t,n)}function an(e,t,n){return ot(e)?lw(t,n,1):t===e.k?Ot(e,{k:t,v:n}):t<e.k?cw(Ot(e,{l:an(e.l,t,n)})):cw(Ot(e,{r:an(e.r,t,n)}))}function Qo(){return ra}function Gs(e,t,n){if(ot(e))return[];const r=Tn(e,t)[0];return gL(ff(e,r,n))}function df(e,t){if(ot(e))return ra;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=sw(r);return Zs(Ot(e,{k:i,l:aw(r),v:a}))}}else return t<n?Zs(Ot(e,{l:df(r,t)})):Zs(Ot(e,{r:df(o,t)}))}function Jr(e){return ot(e)?[]:[...Jr(e.l),{k:e.k,v:e.v},...Jr(e.r)]}function ff(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ff(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ff(i,t,n))),s}function Zs(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(pf(t))return uw(Ot(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Ot(t.r,{l:Ot(t,{r:t.r.l}),lvl:n,r:Ot(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(pf(e))return hf(Ot(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=pf(o)?r.lvl-1:r.lvl;return Ot(o,{l:Ot(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:hf(Ot(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ot(e,t){return lw(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 aw(e){return ot(e.r)?e.l:Zs(Ot(e,{r:aw(e.r)}))}function pf(e){return ot(e)||e.lvl>e.r.lvl}function sw(e){return ot(e.r)?[e.k,e.v]:sw(e.r)}function lw(e,t,n,r=ra,o=ra){return{k:e,l:r,lvl:n,r:o,v:t}}function cw(e){return hf(uw(e))}function uw(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ot(t,{r:Ot(e,{l:t.r})}):e}function hf(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ot(n,{l:Ot(e,{r:n.l}),lvl:t+1}):e}function gL(e){return iw(e,({k:t,v:n})=>({index:t,value:n}))}function dw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ia(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const mf=Ke(()=>({recalcInProgress:le(!1)}),[],{singleton:!0});function fw(e,t,n){return e[Xs(e,t,n)]}function Xs(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 vL(e,t,n,r){const o=Xs(e,t,r),i=Xs(e,n,r,o);return e.slice(o,i+1)}function En(e,t){return Math.round(e.getBoundingClientRect()[t])}function Qs(e){return!ot(e.groupOffsetTree)}function gf({index:e},t){return t===e?0:t<e?-1:1}function yL(){return{groupIndices:[],groupOffsetTree:Qo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Qo()}}function bL(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=an(e,0,i);continue}const s=Gs(e,a-1,o+1);if(s.some(CL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:h}of s)l?(o>=d||i===h)&&(e=df(e,d)):(c=h!==i,l=!0),u>o&&o>=d&&h!==i&&(e=an(e,o+1,h));c&&(e=an(e,a,i))}return[e,n]}function xL(e){return typeof e.groupIndex<"u"}function wL({offset:e},t){return t===e?0:t<e?-1:1}function aa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=fw(t,e,gf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function pw(e,t){if(!Qs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function hw(e,t,n){if(xL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=pw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function SL(e,t,n,r=0){return r>0&&(t=Math.max(t,fw(e,r,gf).offset)),iw(vL(e,t,n,wL),kL)}function TL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const h=t[0].size,f=t[1].size;a=n.reduce((b,g)=>an(an(b,g,h),g+1,f),a)}else[a,s]=bL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=vf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((h,f)=>an(h,f,aa(f,d,o)),Qo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function EL(e){return Jr(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 mw(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 vf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Xs(o,t-1,gf),s=o[l].offset;const c=Tn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Tn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Gs(n,t,1/0)){const d=c-i,h=d*a+s+d*r;o.push({index:c,offset:h,size:u}),i=c,s=h,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function kL(e){return{index:e.index,value:e}}function CL(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 AL={offsetHeight:"height",offsetWidth:"width"},Bn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Re(),r=Re(),o=Wt(r,0),i=Re(),a=Re(),s=le(0),l=le([]),c=le(void 0),u=le(void 0),d=le((w,T)=>En(w,AL[T])),h=le(void 0),f=le(0),b=yL(),g=Wt(ie(n,$e(l,e,f),zn(TL,b),ft()),b),p=Wt(ie(l,ft(),zn((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),de(({prev:w})=>w)),[]);be(ie(l,Ae(w=>w.length>0),$e(g,f),de(([w,T,k])=>{const C=w.reduce((M,O,F)=>an(M,O,aa(O,T.offsetTree,k)||F),Qo());return{...T,groupIndices:w,groupOffsetTree:C}})),g),be(ie(r,$e(g),Ae(([w,{lastIndex:T}])=>w<T),de(([w,{lastIndex:T,lastSize:k}])=>[{endIndex:T,size:k,startIndex:w}])),n),be(c,u);const v=Wt(ie(c,de(w=>w===void 0)),!0);be(ie(u,Ae(w=>w!==void 0&&ot(Ft(g).sizeTree)),de(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=on(ie(n,$e(g),zn(({sizes:w},[T,k])=>({changed:k!==w,sizes:k}),{changed:!1,sizes:b}),de(w=>w.changed)));tt(ie(s,zn((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),de(w=>w.diff)),w=>{const{groupIndices:T}=Ft(g);if(w>0)Le(t,!0),Le(i,w+mw(w,T));else if(w<0){const k=Ft(p);k.length>0&&(w-=mw(-w,k)),Le(a,w)}}),tt(ie(s,$e(e)),([w,T])=>{w<0&&T("`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},Jt.ERROR)});const x=on(i);be(ie(i,$e(g),de(([w,T])=>{const k=T.groupIndices.length>0,C=[],M=T.lastSize;if(k){const O=oa(T.sizeTree,0);let F=0,L=0;for(;F<w;){const I=T.groupIndices[L],_=T.groupIndices.length===L+1?1/0:T.groupIndices[L+1]-I-1;C.push({endIndex:I,size:O,startIndex:I}),C.push({endIndex:I+1+_-1,size:M,startIndex:I+1}),L++,F+=_+1}const H=Jr(T.sizeTree);return F!==w&&H.shift(),H.reduce((I,{k:_,v:V})=>{let N=I.ranges;return I.prevSize!==0&&(N=[...I.ranges,{endIndex:_+w-1,size:I.prevSize,startIndex:I.prevIndex}]),{prevIndex:_+w,prevSize:V,ranges:N}},{prevIndex:w,prevSize:0,ranges:C}).ranges}return Jr(T.sizeTree).reduce((O,{k:F,v:L})=>({prevIndex:F+w,prevSize:L,ranges:[...O.ranges,{endIndex:F+w-1,size:O.prevSize,startIndex:O.prevIndex}]}),{prevIndex:0,prevSize:M,ranges:[]}).ranges})),n);const E=on(ie(a,$e(g,f),de(([w,{offsetTree:T},k])=>{const C=-w;return aa(C,T,k)})));return be(ie(a,$e(g,f),de(([w,T,k])=>{if(T.groupIndices.length>0){if(ot(T.sizeTree))return T;let C=Qo();const M=Ft(p);let O=0,F=0,L=0;for(;O<-w;){L=M[F];const H=M[F+1]-L-1;F++,O+=H+1}if(C=Jr(T.sizeTree).reduce((H,{k:I,v:_})=>an(H,Math.max(0,I+w),_),C),O!==-w){const H=oa(T.sizeTree,L);C=an(C,0,H);const I=Tn(T.sizeTree,-w+1)[1];C=an(C,1,I)}return{...T,sizeTree:C,...vf(T.offsetTree,0,C,k)}}else{const C=Jr(T.sizeTree).reduce((M,{k:O,v:F})=>an(M,Math.max(0,O+w),F),Qo());return{...T,sizeTree:C,...vf(T.offsetTree,0,C,k)}}})),g),{beforeUnshiftWith:x,data:h,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:E,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(Tr,mf),{singleton:!0});function PL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const gw=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Re(),a=Re(),s=on(ie(i,de(PL)));return be(ie(s,de(l=>l.totalCount)),n),be(ie(s,de(l=>l.groupIndices)),e),be(ie(_t(o,t,r),Ae(([l,c])=>Qs(c)),de(([l,c,u])=>Tn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ft(),de(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Bn,Kt)),Er=Ke(([{log:e}])=>{const t=le(!1),n=on(ie(t,Ae(r=>r),ft()));return tt(t,r=>{r&&Ft(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},dt(Tr),{singleton:!0}),IL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!IL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const sa=Ke(([{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:h}])=>{const f=Re(),b=Re(),g=le(0);let p=null,v=null,y=null;function x(){p&&(p(),p=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Le(l,!1)}return be(ie(f,$e(n,d,r,g,s,a,h),$e(e,i,o),de(([[E,w,T,k,C,M,O,F],L,H,I])=>{const _=vw(E),{align:V,behavior:N,offset:P}=_,$=k-1,D=hw(_,w,$);let W=aa(D,w.offsetTree,L)+M;V==="end"?(W+=H+Tn(w.sizeTree,D)[1]-T+I,D===$&&(W+=O)):V==="center"?W+=(H+Tn(w.sizeTree,D)[1]-T+I)/2:W-=C,P&&(W+=P);const R=Z=>{x(),Z?(F("retrying to scroll to",{location:E},Jt.DEBUG),Le(f,E)):(Le(b,!0),F("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),N==="smooth"){let Z=!1;y=tt(t,X=>{Z=Z||X}),p=$n(u,()=>{R(Z)})}else p=$n(ie(t,_L(150)),R);return v=setTimeout(()=>{x()},1200),Le(l,!0),F("scrolling from index to",{behavior:N,index:D,top:W},Jt.DEBUG),{behavior:N,top:W}})),c),{scrollTargetReached:b,scrollToIndex:f,topListHeight:g}},dt(Bn,Kt,Tr),{singleton:!0});function _L(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function yf(e,t){e==0?t():requestAnimationFrame(()=>{yf(e-1,t)})}function bf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const la=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=le(!0),l=le(0),c=le(!0);return be(ie(a,$e(l),Ae(([u,d])=>!!d),jn(!1)),s),be(ie(a,$e(l),Ae(([u,d])=>!!d),jn(!1)),c),tt(ie(_t(t,a),$e(s,n,e,c),Ae(([[,u],d,{sizeTree:h},f,b])=>u&&(!ot(h)||sf(f))&&!d&&!b),$e(l)),([,u])=>{$n(o,()=>{Le(c,!0)}),yf(4,()=>{$n(r,()=>{Le(s,!0)}),Le(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Bn,Kt,sa,Er),{singleton:!0});function yw(e,t){return Math.abs(e-t)<1.01}const ca="up",ua="down",OL="none",ML={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},DL=0,da=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=le(!1),s=le(!0),l=Re(),c=Re(),u=le(4),d=le(DL),h=Wt(ie(nw(ie(Pe(o),Xo(1),jn(!0)),ie(Pe(o),Xo(1),jn(!1),ew(100))),ft()),!1),f=Wt(ie(nw(ie(n,jn(!0)),ie(n,jn(!1),ew(200))),ft()),!1);be(ie(_t(Pe(o),Pe(d)),de(([y,x])=>y<=x),ft()),s),be(ie(s,Sr(50)),c);const b=on(ie(_t(r,Pe(i),Pe(t),Pe(e),Pe(u)),zn((y,[{scrollHeight:x,scrollTop:E},w,T,k,C])=>{const M=E+w-x>-C,O={scrollHeight:x,scrollTop:E,viewportHeight:w};if(M){let L,H;return E>y.state.scrollTop?(L="SCROLLED_DOWN",H=y.state.scrollTop-E):(L="SIZE_DECREASED",H=y.state.scrollTop-E||y.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:H,state:O}}let F;return O.scrollHeight>y.state.scrollHeight?F="SIZE_INCREASED":w<y.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":E<y.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:O}},ML),ft((y,x)=>y&&y.atBottom===x.atBottom))),g=Wt(ie(r,zn((y,{scrollHeight:x,scrollTop:E,viewportHeight:w})=>{if(yw(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:E};{const T=x-(E+w)<1;return y.scrollTop!==E&&T?{changed:!0,jump:y.scrollTop-E,scrollHeight:x,scrollTop:E}:{changed:!0,jump:0,scrollHeight:x,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ae(y=>y.changed),de(y=>y.jump)),0);be(ie(b,de(y=>y.atBottom)),a),be(ie(a,Sr(50)),l);const p=le(ua);be(ie(r,de(({scrollTop:y})=>y),ft(),zn((y,x)=>Ft(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ca:ua,prevScrollTop:x},{direction:ua,prevScrollTop:0}),de(y=>y.direction)),p),be(ie(r,Sr(50),jn(OL)),p);const v=le(0);return be(ie(h,Ae(y=>!y),jn(0)),v),be(ie(o,Sr(100),$e(h),Ae(([y,x])=>!!x),zn(([y,x],[E])=>[x,E],[0,0]),de(([y,x])=>x-y)),v),{atBottomState:b,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:g,scrollDirection:p,scrollVelocity:v}},dt(Kt)),Js="top",el="bottom",bw="none";function xw(e,t,n){return typeof e=="number"?n===ca&&t===Js||n===ua&&t===el?e:0:n===ca?t===Js?e.main:e.reverse:t===el?e.main:e.reverse}function ww(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const xf=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Re(),a=le(0),s=le(0),l=le(0),c=Wt(ie(_t(Pe(r),Pe(o),Pe(n),Pe(i,ia),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),de(([u,d,h,[f,b],g,p,v,y,x])=>{const E=u-y,w=p+v,T=Math.max(h-E,0);let k=bw;const C=ww(x,Js),M=ww(x,el);return f-=y,f+=h+v,b+=h+v,b-=y,f>u+w-C&&(k=ca),b<u-T+d+M&&(k=ua),k!==bw?[Math.max(E-h-xw(g,Js,k)-C,0),E-T-v+d+xw(g,el,k)+M]:null}),Ae(u=>u!=null),ft(ia)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Kt),{singleton:!0});function NL(e,t,n){if(Qs(t)){const r=pw(e,t);return[{index:Tn(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 wf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tl(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,h=s+d*l+(d-1)*r,f=c,b=h-u;return{bottom:u,firstItemIndex:i,items:Tw(e,o,i),offsetBottom:b,offsetTop:c,top:f,topItems:Tw(t,o,i),topListHeight:t.reduce((g,p)=>p.size+g,0),totalCount:n}}function Sw(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=bf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return tl(c,[],s,o,n,r)}function Tw(e,t,n){if(e.length===0)return[];if(!Qs(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=Gs(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}const eo=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:b}])=>{const g=le([]),p=le(0),v=Re();be(i.topItemsIndexes,g);const y=Wt(ie(_t(f,b,Pe(l,ia),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ae(([T,k,,C,,,,,,,M])=>{const O=M&&M.length!==C;return T&&!k&&!O}),de(([,,[T,k],C,M,O,F,L,H,I,_])=>{const V=M,{offsetTree:N,sizeTree:P}=V,$=Ft(p);if(C===0)return{...wf,totalCount:C};if(T===0&&k===0)return $===0?{...wf,totalCount:C}:Sw($,O,M,H,I,_||[]);if(ot(P))return $>0?null:tl(NL(bf(O,C),V,_),[],C,I,V,H);const D=[];if(L.length>0){const oe=L[0],te=L[L.length-1];let ee=0;for(const B of Gs(P,oe,te)){const K=B.value,G=Math.max(B.start,oe),J=Math.min(B.end,te);for(let j=G;j<=J;j++)D.push({data:_?.[j],index:j,offset:ee,size:K}),ee+=K}}if(!F)return tl([],D,C,I,V,H);const W=L.length>0?L[L.length-1]+1:0,R=SL(N,T,k,W);if(R.length===0)return null;const Z=C-1,X=Ys([],oe=>{for(const te of R){const ee=te.value;let B=ee.offset,K=te.start;const G=ee.size;if(ee.offset<T){K+=Math.floor((T-ee.offset+I)/(G+I));const j=K-te.start;B+=j*G+j*I}K<W&&(B+=(W-K)*G,K=W);const J=Math.min(te.end,Z);for(let j=K;j<=J&&!(B>=k);j++)oe.push({data:_?.[j],index:j,offset:B,size:G}),B+=G+I}});return tl(X,D,C,I,V,H)}),Ae(T=>T!==null),ft()),wf);be(ie(e,Ae(sf),de(T=>T?.length)),o),be(ie(y,de(T=>T.topListHeight)),d),be(d,s),be(ie(y,de(T=>[T.top,T.bottom])),a),be(ie(y,de(T=>T.items)),v);const x=on(ie(y,Ae(({items:T})=>T.length>0),$e(o,e),Ae(([{items:T},k])=>T[T.length-1].originalIndex===k-1),de(([,T,k])=>[T-1,k]),ft(ia),de(([T])=>T))),E=on(ie(y,Sr(200),Ae(({items:T,topItems:k})=>T.length>0&&T[0].originalIndex===k.length),de(({items:T})=>T[0].index),ft())),w=on(ie(y,Ae(({items:T})=>T.length>0),de(({items:T})=>{let k=0,C=T.length-1;for(;T[k].type==="group"&&k<C;)k++;for(;T[C].type==="group"&&C>k;)C--;return{endIndex:T[C].index,startIndex:T[k].index}}),ft(dw)));return{endReached:x,initialItemCount:p,itemsRendered:v,listState:y,rangeChanged:w,startReached:E,topItemsIndexes:g,...h}},dt(Bn,gw,xf,la,sa,da,Er,mf),{singleton:!0}),Ew=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Re(),a=Wt(ie(_t(n,e,r,t,o),de(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return be(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Kt,eo),{singleton:!0}),FL=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=le(!1),r=Wt(ie(_t(n,e,t),Ae(([o])=>o),de(([,o,i])=>Math.max(0,o-i)),Sr(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Kt,Ew),{singleton:!0});function kw(e){return e?e==="smooth"?"smooth":"auto":!1}const LL=(e,t)=>typeof e=="function"?kw(e(t)):t&&kw(e),VL=Ke(([{listRefresh:e,totalCount:t,fixedItemSize:n},{atBottomState:r,isAtBottom:o},{scrollToIndex:i},{scrolledToInitialItem:a},{didMount:s,propsReady:l},{log:c},{scrollingInProgress:u}])=>{const d=le(!1),h=Re();let f=null;function b(p){Le(i,{align:"end",behavior:p,index:"LAST"})}tt(ie(_t(ie(Pe(t),Xo(1)),s),$e(Pe(d),o,a,u),de(([[p,v],y,x,E,w])=>{let T=v&&E,k="auto";return T&&(k=LL(y,x||w),T=T&&!!k),{followOutputBehavior:k,shouldFollow:T,totalCount:p}}),Ae(({shouldFollow:p})=>p)),({followOutputBehavior:p,totalCount:v})=>{f&&(f(),f=null),Ft(n)?requestAnimationFrame(()=>{Ft(c)("following output to ",{totalCount:v},Jt.DEBUG),b(p)}):f=$n(e,()=>{Ft(c)("following output to ",{totalCount:v},Jt.DEBUG),b(p),f=null})});function g(p){const v=$n(r,y=>{p&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Ft(c)("scrolling to bottom due to increased size",{},Jt.DEBUG),b("auto"))});setTimeout(v,100)}return tt(ie(_t(Pe(d),t,l),Ae(([p,,v])=>p&&v),zn(({value:p},[,v])=>({refreshed:p===v,value:v}),{refreshed:!1,value:0}),Ae(({refreshed:p})=>p),$e(d,t)),([,p])=>{Ft(a)&&g(p!==!1)}),tt(h,()=>{g(Ft(d)!==!1)}),tt(_t(Pe(d),r),([p,v])=>{p&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")}),{autoscrollToBottom:h,followOutput:d}},dt(Bn,da,sa,la,Er,Tr,Kt)),$L=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(be(ie(s,$e(i),Ae(([,l])=>l!==0),$e(o,r,t,n,e),de(([[,l],c,u,d,h,f=[]])=>Sw(l,c,u,d,h,f))),a),{}),dt(Bn,la,eo,Er),{singleton:!0}),jL=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=le(0);return tt(ie(e,$e(r),Ae(([,o])=>o!==0),de(([,o])=>({top:o}))),o=>{$n(ie(n,Xo(1),Ae(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Le(t,o)})})}),{initialScrollTop:r}},dt(Er,Kt,eo),{singleton:!0}),zL=({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,RL=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Re();return be(ie(u,$e(t,l,n,i,o,r,s),$e(e),de(([[d,h,f,b,g,p,v,y],x])=>{const{align:E,behavior:w,calculateViewLocation:T=zL,done:k,...C}=d,M=hw(d,h,b-1),O=aa(M,h.offsetTree,x)+g+p,F=O+Tn(h.sizeTree,M)[1],L=y+p,H=y+f-v,I=T({itemBottom:F,itemTop:O,locationParams:{align:E,behavior:w,...C},viewportBottom:H,viewportTop:L});return I?k&&$n(ie(a,Ae(_=>!_),Xo(Ft(a)?1:2)),k):k&&k(),I}),Ae(d=>d!==null)),c),{scrollIntoView:u}},dt(Bn,Kt,sa,eo,Tr),{singleton:!0}),Cw=Ke(([{scrollVelocity:e}])=>{const t=le(!1),n=Re(),r=le(!1);return be(ie(e,$e(r,t,n),Ae(([o,i])=>!!i),de(([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}),ft()),t),tt(ie(_t(t,e,n),$e(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(da),{singleton:!0}),Sf=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Re(),r=Re(),o=Re(),i=le(!1),a=le(void 0);return be(ie(_t(n,r),de(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),be(ie(t,$e(r),de(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Kt)),BL=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Re(),u=le(void 0),d=le(null),h=le(null);return be(s,d),be(l,h),tt(ie(c,$e(t,r,a,d,h,n)),([f,b,g,p,v,y,x])=>{const E=EL(b.sizeTree);p&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:E,scrollTop:g})}),be(ie(u,Ae(sf),de(HL)),o),be(ie(i,$e(u),Ae(([,f])=>f!==void 0),ft(),de(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Bn,Kt,la,Er,Sf));function HL(e){return{align:"start",index:0,offset:e.scrollTop}}const WL=Ke(([{topItemsIndexes:e}])=>{const t=le(0);return be(ie(t,Ae(n=>n>=0),de(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(eo));function Aw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const qL=Aw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UL=Ke(([{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:h},{log:f},{recalcInProgress:b}])=>{const g=on(ie(l,$e(a),zn(([,v,y,x],[{bottom:E,items:w,offsetBottom:T,totalCount:k},C])=>{const M=E+T;let O=0;return y===k&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(O=M-x,O!==0&&(O+=C))),[O,w,k,M]},[0,[],0,0]),Ae(([v])=>v!==0),$e(r,s,n,o,f,b),Ae(([,v,y,x,,,E])=>!E&&!x&&v!==0&&y===ca),de(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Jt.DEBUG),v))));function p(v){v>0?(Le(t,{behavior:"auto",top:-v}),Le(e,0)):(Le(e,0),Le(t,{behavior:"auto",top:-v}))}return tt(ie(g,$e(e,i)),([v,y,x])=>{x&&qL()?Le(e,y-v):p(-v)}),tt(ie(_t(Wt(i,!1),e,b),Ae(([v,y,x])=>!v&&!x&&y!==0),de(([v,y])=>y),Sr(1)),p),be(ie(d,de(v=>({top:-v}))),t),tt(ie(c,$e(h,u),de(([v,{groupIndices:y,lastSize:x,sizeTree:E},w])=>{function T(k){return k*(x+w)}if(y.length===0)return T(v);{let k=0;const C=oa(E,0);let M=0,O=0;for(;M<v;){M++,k+=C;let F=y.length===O+1?1/0:y[O+1]-y[O]-1;M+F>v&&(k-=C,F=v-M+1),M+=F,k+=T(F),O++}return k}})),v=>{Le(e,v),requestAnimationFrame(()=>{Le(t,{top:v}),requestAnimationFrame(()=>{Le(e,0),Le(b,!1)})})}),{deviation:e}},dt(Kt,da,eo,Bn,Tr,mf)),KL=Ke(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),dt(xf,$L,Er,Cw,Ew,jL,FL,Sf,RL,Tr)),Pw=Ke(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:h,initialTopMostItemIndex:f,scrolledToInitialItem:b},g,p,v,{listState:y,topItemsIndexes:x,...E},{scrollToIndex:w},T,{topItemCount:k},{groupCounts:C},M])=>(be(E.rangeChanged,M.scrollSeekRangeChanged),be(ie(M.windowViewportRect,de(O=>O.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:C,initialItemFinalLocationReached:h,initialTopMostItemIndex:f,scrolledToInitialItem:b,sizeRanges:s,topItemCount:k,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...E,...M,...g,sizes:l,...p}),dt(Bn,la,Kt,BL,VL,eo,sa,UL,WL,gw,KL));function YL(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 nl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Tf(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(p,v){p.propsReady&&Le(p.propsReady,!1);for(const y of r){const x=p[t.required[y]];Le(x,v[y])}for(const y of o)if(y in v){const x=p[t.optional[y]];Le(x,v[y])}p.propsReady&&Le(p.propsReady,!0)}function c(p){return i.reduce((v,y)=>(v[y]=x=>{const E=p[t.methods[y]];Le(E,x)},v),{})}function u(p){return a.reduce((v,y)=>(v[y]=uL(p[t.events[y]]),v),{})}const d=S.forwardRef((p,v)=>{const{children:y,...x}=p,[E]=S.useState(()=>Ys(fL(e),k=>{l(k,x)})),[w]=S.useState(J0(u,E));nl(()=>{for(const k of a)k in x&&tt(w[k],x[k]);return()=>{Object.values(w).map(lf)}},[x,w,E]),nl(()=>{l(E,x)}),S.useImperativeHandle(v,Q0(c(E)));const T=n;return m.jsx(s.Provider,{value:E,children:n?m.jsx(T,{...YL([...r,...o,...a],x),children:y}):y})}),h=p=>{const v=S.useContext(s);return S.useCallback(y=>{Le(v[p],y)},[v,p])},f=p=>{const v=S.useContext(s)[p],y=S.useCallback(x=>tt(v,x),[v]);return S.useSyncExternalStore(y,()=>Ft(v),()=>Ft(v))},b=p=>{const v=S.useContext(s)[p],[y,x]=S.useState(J0(Ft,v));return nl(()=>tt(v,E=>{E!==y&&x(Q0(E))}),[v,y]),y},g=S.version.startsWith("18")?f:b;return{Component:d,useEmitter:(p,v)=>{const y=S.useContext(s)[p];nl(()=>tt(y,v),[v,y])},useEmitterValue:g,usePublisher:h}}const rl=S.createContext(void 0),Iw=S.createContext(void 0),_w=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Ef(e){return"self"in e}function GL(e){return"body"in e}function Ow(e,t,n,r=Zo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(h=>{let f,b,g;const p=h.target;if(GL(p)||Ef(p)){const y=Ef(p)?p:p.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,b=i?y.innerWidth:y.innerHeight}else g=i?p.scrollLeft:p.scrollTop,f=i?p.scrollWidth:p.scrollHeight,b=i?p.offsetWidth:p.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:b})};h.suppressFlushSync?v():hi.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-b)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const h=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(h){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const b=h.behavior==="smooth";let g,p,v;Ef(f)?(p=Math.max(En(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(p=f[i?"scrollWidth":"scrollHeight"],g=En(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=p-g;if(h.top=Math.ceil(Math.max(Math.min(y,h.top),0)),yw(g,p)||h.top===v){e({scrollHeight:p,scrollTop:v,viewportHeight:g}),b&&t(!0);return}b?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(h={behavior:h.behavior,left:h.top}),f.scrollTo(h)}function d(h){i&&(h={behavior:h.behavior,left:h.top}),a.current.scrollBy(h)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const kf="-webkit-sticky",Mw="sticky",Cf=Aw(()=>{if(typeof document>"u")return Mw;const e=document.createElement("div");return e.style.position=kf,e.style.position===kf?kf:Mw});function Af(e){return e}const ZL=Ke(()=>{const e=le(l=>`Item ${l}`),t=le(null),n=le(l=>`Group ${l}`),r=le({}),o=le(Af),i=le("div"),a=le(Zo),s=(l,c=null)=>Wt(ie(r,de(u=>u[l]),ft()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),XL=Ke(([e,t])=>({...e,...t}),dt(Pw,ZL)),QL=({height:e})=>m.jsx("div",{style:{height:e}}),JL={overflowAnchor:"none",position:Cf(),zIndex:1},Dw={overflowAnchor:"none"},eV={...Dw,display:"inline-block",height:"100%"},Nw=S.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=gn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=gn("windowScrollContainerState"),a=gn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),h=Ie("itemSize"),f=Ie("log"),b=gn("gap"),g=Ie("horizontalDirection"),{callbackRef:p}=rw(n,h,d,e?Zo:s,f,b,o,g,Ie("skipAnimationFrameInResizeObserver")),[v,y]=S.useState(0);_f("deviation",I=>{v!==I&&y(I)});const x=Ie("EmptyPlaceholder"),E=Ie("ScrollSeekPlaceholder")||QL,w=Ie("ListComponent"),T=Ie("ItemComponent"),k=Ie("GroupComponent"),C=Ie("computeItemKey"),M=Ie("isSeeking"),O=Ie("groupIndices").length>0,F=Ie("alignToBottom"),L=Ie("initialItemFinalLocationReached"),H=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...st(x,c)}):m.jsx(w,{...st(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:p,style:H,children:(e?t.topItems:t.items).map(I=>{const _=I.originalIndex,V=C(_+t.firstItemIndex,I.data,c);return M?S.createElement(E,{...st(E,c),height:I.size,index:I.index,key:V,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?S.createElement(k,{...st(k,c),"data-index":_,"data-item-index":I.index,"data-known-size":I.size,key:V,style:JL},u(I.index,c)):S.createElement(T,{...st(T,c),...Fw(T,I.data),"data-index":_,"data-item-group-index":I.groupIndex,"data-item-index":I.index,"data-known-size":I.size,key:V,style:g?eV:Dw},O?l(I.index,I.groupIndex,I.data,c):l(I.index,I.data,c))})})}),tV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},nV={outline:"none",overflowX:"auto",position:"relative"},Jo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),rV={position:Cf(),top:0,width:"100%",zIndex:1};function st(e,t){if(typeof e!="string")return{context:t}}function Fw(e,t){return{item:typeof e=="string"?void 0:t}}const oV=S.memo(function(){const e=Ie("HeaderComponent"),t=gn("headerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...st(e,o)})}):null}),iV=S.memo(function(){const e=Ie("FooterComponent"),t=gn("footerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...st(e,o)})}):null});function Pf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:f,scrollToCallback:b}=Ow(a,l,s,c,void 0,d);return e("scrollTo",b),e("scrollBy",h),m.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?nV:tV,...o},tabIndex:0,...i,...st(s,u),children:r})})}function If({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),h=t("context"),f=S.useRef(null),b=t("scrollerRef"),{scrollByCallback:g,scrollerRef:p,scrollToCallback:v}=Ow(a,l,s,b,d);return _w(()=>{var y;return p.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{p.current=null}},[p,d]),e("windowScrollTo",v),e("scrollBy",g),m.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...st(s,h),children:r})})}const aV=({children:e})=>{const t=S.useContext(rl),n=gn("viewportHeight"),r=gn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=S.useMemo(()=>na(n,l=>En(l,i?"width":"height")),[n,i]),s=Rn(a,!0,Ie("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:Jo(o),children:e})},sV=({children:e})=>{const t=S.useContext(rl),n=gn("windowViewportRect"),r=gn("fixedItemHeight"),o=Ie("customScrollParent"),i=uf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("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:Jo(a),children:e})},lV=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...rV,marginTop:`${n}px`},o=Ie("context");return m.jsx(t,{style:r,...st(t,o),children:e})},cV=S.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?fV:dV,a=r||t?sV:aV;return m.jsxs(i,{...e,...st(i,o),children:[n&&m.jsx(lV,{children:m.jsx(Nw,{showTopList:!0})}),m.jsxs(a,{children:[m.jsx(oV,{}),m.jsx(Nw,{}),m.jsx(iV,{})]})]})}),{Component:uV,useEmitter:_f,useEmitterValue:Ie,usePublisher:gn}=Tf(XL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",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"}},cV),dV=Pf({useEmitter:_f,useEmitterValue:Ie,usePublisher:gn}),fV=If({useEmitter:_f,useEmitterValue:Ie,usePublisher:gn}),Of=uV,pV=Ke(()=>{const e=le(c=>m.jsxs("td",{children:["Item $",c]})),t=le(null),n=le(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=le(null),o=le(null),i=le({}),a=le(Af),s=le(Zo),l=(c,u=null)=>Wt(ie(i,de(d=>d[c]),ft()),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")}}),hV=Ke(([e,t])=>({...e,...t}),dt(Pw,pV)),mV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),gV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),vV={overflowAnchor:"none"},Lw={position:Cf(),zIndex:2,overflowAnchor:"none"},Vw=S.memo(function({showTopList:e=!1}){const t=De("listState"),n=De("computeItemKey"),r=De("firstItemIndex"),o=De("context"),i=De("isSeeking"),a=De("fixedHeaderHeight"),s=De("groupIndices").length>0,l=De("itemContent"),c=De("groupContent"),u=De("ScrollSeekPlaceholder")||mV,d=De("GroupComponent"),h=De("TableRowComponent"),f=(e?t.topItems:[]).reduce((g,p,v)=>(v===0?g.push(p.size):g.push(g[v-1]+p.size),g),[]),b=(e?t.topItems:t.items).map(g=>{const p=g.originalIndex,v=n(p+r,g.data,o),y=e?p===0?0:f[p-1]:0;return i?S.createElement(u,{...st(u,o),height:g.size,index:g.index,key:v,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...st(d,o),"data-index":p,"data-item-index":g.index,"data-known-size":g.size,key:v,style:{...Lw,top:a}},c(g.index,o)):S.createElement(h,{...st(h,o),...Fw(h,g.data),"data-index":p,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:v,style:e?{...Lw,top:a+y}:vV},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:b})}),yV=S.memo(function(){const e=De("listState"),t=De("topItemsIndexes").length>0,n=kn("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=kn("windowScrollContainerState"),a=kn("scrollContainerState"),s=o||r?i:a,l=De("trackItemSizes"),c=De("itemSize"),u=De("log"),{callbackRef:d,ref:h}=rw(n,c,l,s,u,void 0,o,!1,De("skipAnimationFrameInResizeObserver")),[f,b]=S.useState(0);Mf("deviation",O=>{f!==O&&(h.current.style.marginTop=`${O}px`,b(O))});const g=De("EmptyPlaceholder"),p=De("FillerRow")||gV,v=De("TableBodyComponent"),y=De("paddingTopAddition"),x=De("statefulTotalCount"),E=De("context");if(x===0&&g)return m.jsx(g,{...st(g,E)});const w=(t?e.topItems:[]).reduce((O,F)=>O+F.size,0),T=e.offsetTop+y+f-w,k=e.offsetBottom,C=T>0?m.jsx(p,{context:E,height:T},"padding-top"):null,M=k>0?m.jsx(p,{context:E,height:k},"padding-bottom"):null;return m.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...st(v,E),children:[C,t&&m.jsx(Vw,{showTopList:!0}),m.jsx(Vw,{}),M]})}),bV=({children:e})=>{const t=S.useContext(rl),n=kn("viewportHeight"),r=kn("fixedItemHeight"),o=Rn(S.useMemo(()=>na(n,i=>En(i,"height")),[n]),!0,De("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:Jo(!1),children:e})},xV=({children:e})=>{const t=S.useContext(rl),n=kn("windowViewportRect"),r=kn("fixedItemHeight"),o=De("customScrollParent"),i=uf(n,o,De("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:Jo(!1),children:e})},wV=S.memo(function(e){const t=De("useWindowScroll"),n=De("customScrollParent"),r=kn("fixedHeaderHeight"),o=kn("fixedFooterHeight"),i=De("fixedHeaderContent"),a=De("fixedFooterContent"),s=De("context"),l=Rn(S.useMemo(()=>na(r,v=>En(v,"height")),[r]),!0,De("skipAnimationFrameInResizeObserver")),c=Rn(S.useMemo(()=>na(o,v=>En(v,"height")),[o]),!0,De("skipAnimationFrameInResizeObserver")),u=n||t?EV:TV,d=n||t?xV:bV,h=De("TableComponent"),f=De("TableHeadComponent"),b=De("TableFooterComponent"),g=i?m.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...st(f,s),children:i()},"TableHead"):null,p=a?m.jsx(b,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...st(b,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...st(u,s),children:m.jsx(d,{children:m.jsxs(h,{style:{borderSpacing:0,overflowAnchor:"none"},...st(h,s),children:[g,m.jsx(yV,{},"TableBody"),p]})})})}),{Component:SV,useEmitter:Mf,useEmitterValue:De,usePublisher:kn}=Tf(hV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",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"}},wV),TV=Pf({useEmitter:Mf,useEmitterValue:De,usePublisher:kn}),EV=If({useEmitter:Mf,useEmitterValue:De,usePublisher:kn}),kV=SV,$w={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},CV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:jw,floor:ol,max:fa,min:Df,round:zw}=Math;function Rw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function AV(e){return{...CV,items:e}}function il(e,t){return e&&e.width===t.width&&e.height===t.height}function PV(e,t){return e&&e.column===t.column&&e.row===t.row}const IV=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},h,f,{didMount:b,propsReady:g},{customScrollParent:p,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:E},w])=>{const T=le(0),k=le(0),C=le($w),M=le({height:0,width:0}),O=le({height:0,width:0}),F=Re(),L=Re(),H=le(0),I=le(null),_=le({column:0,row:0}),V=Re(),N=Re(),P=le(!1),$=le(0),D=le(!0),W=le(!1),R=le(!1);tt(ie(b,$e($),Ae(([B,K])=>!!K)),()=>{Le(D,!1)}),tt(ie(_t(b,D,O,M,$,W),Ae(([B,K,G,J,,j])=>B&&!K&&G.height!==0&&J.height!==0&&!j)),([,,,,B])=>{Le(W,!0),yf(1,()=>{Le(F,B)}),$n(ie(c),()=>{Le(t,[0,0]),Le(D,!0)})}),be(ie(N,Ae(B=>B!=null&&B.scrollTop>0),jn(0)),k),tt(ie(b,$e(N),Ae(([,B])=>B!=null)),([,B])=>{B&&(Le(M,B.viewport),Le(O,B.item),Le(_,B.gap),B.scrollTop>0&&(Le(P,!0),$n(ie(c,Xo(1)),K=>{Le(P,!1)}),Le(l,{top:B.scrollTop})))}),be(ie(M,de(({height:B})=>B)),d),be(ie(_t(Pe(M,il),Pe(O,il),Pe(_,(B,K)=>B&&B.column===K.column&&B.row===K.row),Pe(c)),de(([B,K,G,J])=>({gap:G,item:K,scrollTop:J,viewport:B}))),V),be(ie(_t(Pe(T),r,Pe(_,PV),Pe(O,il),Pe(M,il),Pe(I),Pe(k),Pe(P),Pe(D),Pe($)),Ae(([,,,,,,,B])=>!B),de(([B,[K,G],J,j,Y,Q,ue,,ve,xe])=>{const{column:Ee,row:we}=J,{height:Te,width:We}=j,{width:fe}=Y;if(ue===0&&(B===0||fe===0))return $w;if(We===0){const xt=bf(xe,B),Yt=xt+Math.max(ue-1,0);return AV(Rw(xt,Yt,Q))}const ae=Bw(fe,We,Ee);let z,ne;ve?K===0&&G===0&&ue>0?(z=0,ne=ue-1):(z=ae*ol((K+we)/(Te+we)),ne=ae*jw((G+we)/(Te+we))-1,ne=Df(B-1,fa(ne,ae-1)),z=Df(ne,fa(0,z))):(z=0,ne=-1);const me=Rw(z,ne,Q),{bottom:Se,top:ze}=Hw(Y,J,j,me),lt=jw(B/ae),Lt=lt*Te+(lt-1)*we-Se;return{bottom:Se,itemHeight:Te,items:me,itemWidth:We,offsetBottom:Lt,offsetTop:ze,top:ze}})),C),be(ie(I,Ae(B=>B!==null),de(B=>B.length)),T),be(ie(_t(M,O,C,_),Ae(([B,K,{items:G}])=>G.length>0&&K.height!==0&&B.height!==0),de(([B,K,{items:G},J])=>{const{bottom:j,top:Y}=Hw(B,J,K,G);return[Y,j]}),ft(ia)),t);const Z=le(!1);be(ie(c,$e(Z),de(([B,K])=>K||B!==0)),Z);const X=on(ie(_t(C,T),Ae(([{items:B}])=>B.length>0),$e(Z),Ae(([[B,K],G])=>{const J=B.items[B.items.length-1].index===K-1;return(G||B.bottom>0&&B.itemHeight>0&&B.offsetBottom===0&&B.items.length===K)&&J}),de(([[,B]])=>B-1),ft())),oe=on(ie(Pe(C),Ae(({items:B})=>B.length>0&&B[0].index===0),jn(0),ft())),te=on(ie(Pe(C),$e(P),Ae(([{items:B},K])=>B.length>0&&!K),de(([{items:B}])=>({endIndex:B[B.length-1].index,startIndex:B[0].index})),ft(dw),Sr(0)));be(te,f.scrollSeekRangeChanged),be(ie(F,$e(M,O,T,_),de(([B,K,G,J,j])=>{const Y=vw(B),{align:Q,behavior:ue,offset:ve}=Y;let xe=Y.index;xe==="LAST"&&(xe=J-1),xe=fa(0,xe,Df(J-1,xe));let Ee=Nf(K,j,G,xe);return Q==="end"?Ee=zw(Ee-K.height+G.height):Q==="center"&&(Ee=zw(Ee-K.height/2+G.height/2)),ve&&(Ee+=ve),{behavior:ue,top:Ee}})),l);const ee=Wt(ie(C,de(B=>B.offsetBottom+B.bottom)),0);return be(ie(E,de(B=>({height:B.visibleHeight,width:B.visibleWidth}))),M),{customScrollParent:p,data:I,deviation:H,footerHeight:o,gap:_,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:O,overscan:n,restoreStateFrom:N,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:E,...f,gridState:C,horizontalDirection:R,initialTopMostItemIndex:$,totalListHeight:ee,...h,endReached:X,propsReady:g,rangeChanged:te,startReached:oe,stateChanged:V,stateRestoreInProgress:P,...w}},dt(xf,Kt,da,Cw,Er,Sf,Tr));function Bw(e,t,n){return fa(1,ol((e+n)/(ol(t)+n)))}function Hw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Nf(e,t,n,r[0].index);return{bottom:Nf(e,t,n,r[r.length-1].index)+o,top:i}}function Nf(e,t,n,r){const o=Bw(e.width,n.width,t.column),i=ol(r/o),a=i*n.height+fa(0,i-1)*t.row;return a>0?a+t.row:a}const _V=Ke(()=>{const e=le(d=>`Item ${d}`),t=le({}),n=le(null),r=le("virtuoso-grid-item"),o=le("virtuoso-grid-list"),i=le(Af),a=le("div"),s=le(Zo),l=(d,h=null)=>Wt(ie(t,de(f=>f[d]),ft()),h),c=le(!1),u=le(!1);return be(Pe(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")}}),OV=Ke(([e,t])=>({...e,...t}),dt(IV,_V)),MV=S.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),o=pt("computeItemKey"),i=pt("isSeeking"),a=vn("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),c=pt("ScrollSeekPlaceholder"),u=pt("context"),d=vn("itemDimensions"),h=vn("gap"),f=pt("log"),b=pt("stateRestoreInProgress"),g=vn("reportReadyState"),p=Rn(S.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:E,width:w}=x.getBoundingClientRect();d({height:E,width:w})}h({column:qw("column-gap",getComputedStyle(v).columnGap,f),row:qw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,h,f]),!0,!1);return _w(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),b?null:m.jsx(l,{className:t,ref:p,...st(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?m.jsx(c,{...st(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):S.createElement(s,{...st(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),DV=S.memo(function(){const e=pt("HeaderComponent"),t=vn("headerHeight"),n=pt("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...st(e,o)})}):null}),NV=S.memo(function(){const e=pt("FooterComponent"),t=vn("footerHeight"),n=pt("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...st(e,o)})}):null}),FV=({children:e})=>{const t=S.useContext(Iw),n=vn("itemDimensions"),r=vn("viewportDimensions"),o=Rn(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:Jo(!1),children:e})},LV=({children:e})=>{const t=S.useContext(Iw),n=vn("windowViewportRect"),r=vn("itemDimensions"),o=pt("customScrollParent"),i=uf(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:Jo(!1),children:e})},VV=S.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?jV:$V,o=n||t?LV:FV,i=pt("context");return m.jsx(r,{...e,...st(r,i),children:m.jsxs(o,{children:[m.jsx(DV,{}),m.jsx(MV,{}),m.jsx(NV,{})]})})}),{useEmitter:Ww,useEmitterValue:pt,usePublisher:vn}=Tf(OV,{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"}},VV),$V=Pf({useEmitter:Ww,useEmitterValue:pt,usePublisher:vn}),jV=If({useEmitter:Ww,useEmitterValue:pt,usePublisher:vn});function qw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Ff=()=>{const e=S.useContext(Do);return e?e.tweaks:ls},Uw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:Ce("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?m.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?m.jsx(af,{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(my,{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 max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?m.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[m.jsx(uy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(LI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),pa=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:h="",name:f,title:b,componentName:g,placeholder:p,hideLeft:v=!1,required:y,disabled:x,reportStatus:E},w)=>{const T=Ff(),k=E!==void 0?E:T.input.iconFeedback,C=d??f,M=Et(),O=e??M.inputOptionalLabel;return m.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Ce("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[m.jsx(Uw,{info:s,hideLeft:v,reportStatus:k,title:b,placeholder:p,children:O||n?m.jsxs(S.Fragment,{children:[y?null:m.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:O}),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 ${h}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",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})]})}),zV=e=>m.jsx(S.Fragment,{children:e.children}),RV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},BV=[],HV=S.forwardRef(function(t,n){return m.jsx(Qe.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:m.jsx(Xn,{children:t.children})})}),WV=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Qe.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),qV={List:HV,Item:WV},ei=44,UV=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:h=!1,required:f=!1,dynamicOption:b=!1,...g},p)=>{const v=S.useRef(null),y=S.useRef(null),x=S.useRef(null),E=o.length===0?"":g.value??g.defaultValue??"",w=Et(),[T,k]=os({open:!1,shadow:"",value:E,label:o.find(Y=>Y.value===E)?.label??E,index:null},Y=>({open:Q=>({open:Q}),index:Q=>({index:Q}),shadow:Q=>({shadow:Q}),option:(Q,ue)=>({value:Q,label:ue}),select:(Q,ue,ve)=>({open:!1,shadow:"",index:ve,value:Q,label:ue}),caretDown:()=>({open:!0,shadow:""}),onClose:()=>({open:!1,label:"",value:"",shadow:""}),onFocus:()=>{const Q=Y.state();return{index:Q.index===null?0:Q.index,open:!0,shadow:""}}})),[C,M]=S.useState(()=>Math.min(320,ei*o.length)),O=S.useRef(BV),F=tf(T.open,"block-only"),L=b&&T.shadow!==""?[{value:T.shadow,label:T.shadow,"data-dynamic":"true"},...o]:o,H=T.shadow?Jd(L,"value",[{key:"value",value:T.shadow},{key:"label",value:T.shadow}]):L,I=()=>{M(0),k.open(!1)},_=H.filter(Y=>Y.hidden!==!0),V=b?void 0:`^(${o.map(Y=>`${rd(Y.value)}${Y.label?"|"+rd(Y.label):""}`).join("|")})$`,{x:N,y:P,strategy:$,refs:D,context:W}=tr({open:T.open,transform:!0,placement:"bottom-start",onOpenChange:k.open,whileElementsMounted:zo,middleware:[Xi(4),n0({padding:10,elementContext:"reference",apply(Y){const ue=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=yi(D.reference.current,window.innerHeight),xe=Math.min(ue<ei?ve:ue,ve,Y.availableHeight),Ee=_.length===0?ei:Math.min(xe,ve,ue),we=`${y.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:we,maxWidth:we,height:Ee})}})]}),R=L0(W,RV),{getReferenceProps:Z,getFloatingProps:X,getItemProps:oe}=nr([xr(W,{role:"listbox"}),br(W),Hs(W,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,activeIndex:T.index,selectedIndex:T.index})]);S.useEffect(()=>{if(g.value){if(o.length===0)return k.option("","");const Y=o.find(Q=>Q.value===g.value);if(Y)return k.option(Y.value,Y.label??Y.value)}},[g.value,o.length]),S.useEffect(()=>{if(!open)return M(0);const Y=D.reference;if(Y.current===null)return;const Q=yi(Y.current,window.innerHeight);setTimeout(()=>M(Math.min(Q,_.length*ei)),100)},[T.shadow,T.open,D.reference,_.length]),S.useEffect(()=>{const Y=D.reference.current;if(Y)return vi(Y)},[]);const te=(Y,Q)=>{const ue=D.reference.current;if(!ue)return void k.option(Y.value,Y.label??Y.value);ue?.setAttribute("data-value",Y.value),ue.value=Y.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});ue.dispatchEvent(ve),g.onChange&&g.onChange(ve);const xe=o.find(Ee=>Ee.value===Y.value)?.label||Y.value;k.select(Y.value,xe,Q)},ee=Y=>{const Q=Y.target.value;return k.shadow(Q),!open&&Q===""?k.open(!0):(Y.target.name=g.name||"",Q?k.open(!0):g.onChange?.(Y))},B=()=>{k.caretDown(),D.reference.current?.focus()},K=()=>{D.reference.current?.setAttribute("data-value",""),k.onClose(),Yh(D.reference.current)},G=g.id||g.name,J=`${G}-shadow`,j=_.length===0;return m.jsxs(pa,{...g,left:e,error:t,ref:y,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:h,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:J,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:B,children:[m.jsx(Fu,{size:20}),m.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),T.value?m.jsx("button",{type:"button",onClick:K,className:"p-2 transition-colors link:text-danger md:p-1",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",...Z({...g,onFocus:k.onFocus,pattern:V,id:J,name:J,ref:D.setReference,onClick:Y=>Y.currentTarget.focus(),onKeyDown(Y){if(Y.key==="Escape")return Y.currentTarget.blur(),I();if(open){if(Y.key==="ArrowDown"){let Q=Ve.number(T.index)?T.index+1:0;return Q>_.length-1&&(Q=0),x.current?.scrollIntoView({index:Q}),k.index(Q)}if(Y.key==="ArrowUp"){let Q=Ve.number(T.index)?T.index-1:_.length-1;return Q<0&&(Q=_.length-1),x.current?.scrollIntoView({index:Q}),k.index(Q)}if(Y.key==="Enter"){if(T.index!==null&&_[T.index])return Y.preventDefault(),te(_[T.index],T.index);if(_.length===1)return Y.preventDefault(),te(_[0],0)}}}}),"data-name":G,"data-target":G,autoComplete:"off",onChange:ee,required:f,"data-error":!!t,"aria-autocomplete":"list","data-value":T.value,placeholder:g.placeholder,value:T.open?T.shadow:T.label||T.value,className:Ce("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:G,name:G,type:"hidden","data-origin":G,ref:p,required:f,defaultValue:g.value||T.value||void 0}),m.jsx(yr,{preserveTabOrder:!0,children:open?m.jsx(Qr,{modal:!0,guards:!0,returnFocus:!1,context:W,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(Qe.div,{...X({ref:Kn(F,D.setFloating),style:{...R.styles,left:N,top:P??0,position:$}}),initial:!1,"data-floating":"true",animate:{height:j?"auto":C},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!open)return M(0);const Q=D.floating.current.querySelectorAll("li").item(0),ue=(Q?Q.getBoundingClientRect().height:ei)*_.length;return hi.flushSync(()=>M(ue+10))},children:[j?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,m.jsx(Of,{overscan:40,ref:x,hidden:j,data:_,style:{height:C-10},defaultItemHeight:ei,components:qV,scrollerRef:Y=>void(v.current=Y),className:"max-h-[calc(100%-2px)] overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(Y,Q)=>{const ue=Q.Render??zV,ve=T.value===Q.value||T.value===Q.label,xe=T.index===Y,Ee=Q.label??Q.value;return m.jsx("button",{"data-value":Q.value,...oe({ref:we=>void(O.current[Y]=we),role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":Q.disabled,onClick:()=>te(Q,Y),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${xe?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(ue,{...g,label:Q.label,value:Q.value,children:Ee})})}})]})}):null})]})}),Lf=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:Ce("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:Ce("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:Ce("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Kw=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:h,optionalText:f,type:b="text",labelClassName:g,feedback:p=null,hideLeft:v=!1,loading:y,...x},E)=>{const w=e,T=x.id??x.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const C=k.current,M=vi(k.current),O=r?.(C),F=L=>{const H=L;if(H.key==="Enter"&&C.enterKeyHint==="next"){const I=C.getAttribute("data-next");if(I){const _=document.getElementById(I);if(_)return _.focus(),void H.preventDefault()}}};return C.addEventListener("keydown",F),()=>{O?.(),M(),C.removeEventListener("keydown",F)}},[]),m.jsx(pa,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:p,hideLeft:v,title:x.title,container:Ce(u,n.container),rightLabel:d,disabled:x.disabled,interactive:h,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:m.jsx(w,{...n,...x,id:T,name:T,type:b,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Kn(E,k),className:Ce("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",x.className)})})}),ha=Kw(Gy,"input",{type:"text"}),Yw=new Date(1970,11,31),Vf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Gw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},KV={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},$f=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},YV=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=td(t),l=S.useId(),c=Et(),u=S.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,h]=S.useState(e||void 0),[f,b]=S.useState(!1),g=$f(u,Yw).flatMap(k=>Ve.keyof(Vf,k.type)?Vf[k.type](k.value):[]),p=$f(u,Yw).reduce((k,C)=>k+(Ve.keyof(Gw,C.type)?Gw[C.type](C.value):""),""),[v,y]=S.useState(d?$f(u,d).reduce((k,C)=>k+(Ve.keyof(Vf,C.type)?KV[C.type](d,C.value):""),""):""),x=k=>{const C=k.target.value;if(y(C),g.length===C.length&&g.every((O,F)=>{const L=C.charAt(F);return typeof O=="string"?L===O:O.test(L)})){const O=Po(QO(C,p,new Date));return h(O),r?.(O)}return h(void 0),r?.(void 0)},E=k=>(h(k),r?.(k),y(k?Q_(k,p):"")),w=ju(d),T=w?d.toISOString():void 0;return m.jsx(ha,{...i,mask:g,value:v,id:void 0,name:void 0,"data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??p,right:m.jsxs(S.Fragment,{children:[m.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),m.jsx(Yo,{open:f,onChange:b,trigger:m.jsxs("span",{"aria-labelledby":l,children:[m.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),m.jsx(NI,{})]}),buttonProps:{"aria-describedby":l},children:m.jsx(yb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:E,disabledDate:n,date:w?d:void 0})})]})})}),GV=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],ZV=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],XV=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],QV=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Zw=(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},Xw=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},JV=e=>typeof e=="number"?Math.log(e):Xw(e)*Math.log(10),e$=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t};function t$(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,...t};const n=t.bits?t.binary?QV:XV:t.binary?ZV:GV,r=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Zw(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?JV(e)/Math.log(1024):Xw(e)/3),n.length-1);e=e$(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));const l=Zw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var al={exports:{}},sl={exports:{}},Ge={};/** @license React v16.13.1
222
+ */var d2=["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])"],Es=d2.join(","),Nx=typeof Element>"u",Ho=Nx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ks=!Nx&&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},Cs=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},f2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Fx=function(t,n,r){if(Cs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&Ho.call(t,Es)&&o.unshift(t),o=o.filter(r),o},Lx=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Cs(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=Ho.call(a,Es);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),h=!Cs(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&h){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},Vx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},$x=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||f2(t))&&!Vx(t)?0:t.tabIndex},p2=function(t,n){var r=$x(t);return r<0&&n&&!Vx(t)?0:r},h2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jx=function(t){return t.tagName==="INPUT"},m2=function(t){return jx(t)&&t.type==="hidden"},g2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},v2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},y2=function(t){if(!t.name)return!0;var n=t.form||ks(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=v2(o,t.form);return!i||i===t},b2=function(t){return jx(t)&&t.type==="radio"},x2=function(t){return b2(t)&&!y2(t)},w2=function(t){var n,r=t&&ks(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=ks(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},zx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},S2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ho.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ho.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=ks(t);if(l&&!l.shadowRoot&&o(l)===!0)return zx(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(w2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return zx(t);return!1},T2=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 Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Md=function(t,n){return!(n.disabled||Cs(n)||m2(n)||S2(n,t)||g2(n)||T2(n))},Dd=function(t,n){return!(x2(n)||$x(n)<0||!Md(t,n))},E2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},k2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=p2(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(h2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},As=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Lx([t],n.includeContainer,{filter:Dd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:E2}):r=Fx(t,n.includeContainer,Dd.bind(null,n)),k2(r)},C2=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Lx([t],n.includeContainer,{filter:Md.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Fx(t,n.includeContainer,Md.bind(null,n)),r},Rx=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,Es)===!1?!1:Dd(n,t)};function Nd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Bx(){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 Hx(){return/apple/i.test(navigator.vendor)}function Fd(){const e=/android/i;return e.test(Nd())||e.test(Bx())}function A2(){return Nd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Wx(){return Bx().includes("jsdom/")}const qx="data-floating-ui-focusable",P2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ld="ArrowLeft",Vd="ArrowRight",I2="ArrowUp",_2="ArrowDown";function Ln(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 Dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ms(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $d(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 O2(e){return e.matches("html,body")}function jt(e){return e?.ownerDocument||document}function jd(e){return kt(e)&&e.matches(P2)}function zd(e){return e?e.getAttribute("role")==="combobox"&&jd(e):!1}function M2(e){if(!e||Wx())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ps(e){return e?e.hasAttribute(qx)?e:e.querySelector("["+qx+"]")||e:null}function Wo(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function D2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Wo(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Ux(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 zt(e){e.preventDefault(),e.stopPropagation()}function N2(e){return"nativeEvent"in e}function Kx(e){return e.mozInputSource===0&&e.isTrusted?!0:Fd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yx(e){return Wx()?!1:!Fd()&&e.width===0&&e.height===0||Fd()&&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 qo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var F2=typeof document<"u",L2=function(){},Ue=F2?S.useLayoutEffect:L2;const V2={...A};function Nt(e){const t=A.useRef(e);return Ue(()=>{t.current=e}),t}const $2=V2.useInsertionEffect||(e=>e());function gt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return $2(()=>{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 Yi(e,t){return t<0||t>=e.current.length}function Rd(e,t){return Ht(e,{disabledIndices:t})}function Gx(e,t){return Ht(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ht(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&&_s(e,a,o));return a}function j2(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,h=u;if(n.key===I2){if(d&&zt(n),u===-1)h=c;else if(h=Ht(e,{startingIndex:h,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||h<0)){const f=u%a,b=c%a,g=c-(b-f);b===f?h=c:h=b>f?g:g-a}Yi(e,h)&&(h=u)}if(n.key===_2&&(d&&zt(n),u===-1?h=l:(h=Ht(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(h=Ht(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Yi(e,h)&&(h=u)),r==="both"){const f=Vo(u/a);n.key===(i?Ld:Vd)&&(d&&zt(n),u%a!==a-1?(h=Ht(e,{startingIndex:u,disabledIndices:s}),o&&Is(h,a,f)&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u-u%a-1,disabledIndices:s})),Is(h,a,f)&&(h=u)),n.key===(i?Vd:Ld)&&(d&&zt(n),u%a!==0?(h=Ht(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Is(h,a,f)&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(h=Ht(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Is(h,a,f)&&(h=u));const b=Vo(c/a)===f;Yi(e,h)&&(o&&b?h=n.key===(i?Vd:Ld)?c:Ht(e,{startingIndex:u-u%a-1,disabledIndices:s}):h=u)}return h}function z2(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 h=0;h<l;h++)u.push(o+d+h*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function R2(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 B2(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function _s(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 Gi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zx(e,t){const n=As(e,Gi()),r=n.length;if(r===0)return;const o=Ln(jt(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Xx(e){return Zx(jt(e).body,1)||e}function Qx(e){return Zx(jt(e).body,-1)||e}function Zi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Dt(n,r)}function H2(e){As(e,Gi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Jx(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var W2=typeof document<"u",q2=function(){},Os=W2?S.useLayoutEffect:q2;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 e0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function t0(e,t){const n=e0(e);return Math.round(t*n)/n}function Bd(e){const t=A.useRef(e);return Os(()=>{t.current=e}),t}function U2(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}),[h,f]=A.useState(r);Ms(h,r)||f(r);const[b,g]=A.useState(null),[p,v]=A.useState(null),y=A.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),x=A.useCallback(P=>{P!==k.current&&(k.current=P,v(P))},[]),T=i||b,w=a||p,E=A.useRef(null),k=A.useRef(null),C=A.useRef(u),M=l!=null,_=Bd(l),F=Bd(o),V=Bd(c),H=A.useCallback(()=>{if(!E.current||!k.current)return;const P={placement:t,strategy:n,middleware:h};F.current&&(P.platform=F.current),tN(E.current,k.current,P).then(j=>{const N={...j,isPositioned:V.current!==!1};I.current&&!Ms(C.current,N)&&(C.current=N,mi.flushSync(()=>{d(N)}))})},[h,t,n,F,V]);Os(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const I=A.useRef(!1);Os(()=>(I.current=!0,()=>{I.current=!1}),[]),Os(()=>{if(T&&(E.current=T),w&&(k.current=w),T&&w){if(_.current)return _.current(T,w,H);H()}},[T,w,H,_,M]);const O=A.useMemo(()=>({reference:E,floating:k,setReference:y,setFloating:x}),[y,x]),$=A.useMemo(()=>({reference:T,floating:w}),[T,w]),D=A.useMemo(()=>{const P={position:n,left:0,top:0};if(!$.floating)return P;const j=t0($.floating,u.x),N=t0($.floating,u.y);return s?{...P,transform:"translate("+j+"px, "+N+"px)",...e0($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:N}},[n,s,$.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:H,refs:O,elements:$,floatingStyles:D}),[u,H,O,$,D])}const K2=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?Ub({element:r.current,padding:o}).fn(n):{}:r?Ub({element:r,padding:o}).fn(n):{}}}},Xi=(e,t)=>({...XD(e),options:[e,t]}),Hd=(e,t)=>({...QD(e),options:[e,t]}),Wd=(e,t)=>({...JD(e),options:[e,t]}),n0=(e,t)=>({...eN(e),options:[e,t]}),r0=(e,t)=>({...K2(e),options:[e,t]});function Y2(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 o0=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function G2(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(Y2).forEach((d,h)=>{c.set(d,h)}),c},[o]);return m.jsx(o0.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function i0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(o0),[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 h;const f=t!==void 0;a.current[s]=f?t:(h=d?.textContent)!=null?h:null}},[s,i,a,t]);return Ue(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ue(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const Z2="data-floating-ui-focusable",a0="active",s0="selected",Qi="ArrowLeft",Ji="ArrowRight",l0="ArrowUp",Ds="ArrowDown",X2={...A};let c0=!1,Q2=0;const u0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Q2++;function J2(){const[e,t]=A.useState(()=>c0?u0():void 0);return Ue(()=>{e==null&&t(u0())},[]),A.useEffect(()=>{c0=!0},[]),e}const ea=X2.useId||J2;let ta;process.env.NODE_ENV!=="production"&&(ta=new Set);function Ns(){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=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.warn(o)}}function eF(){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=ta)!=null&&e.has(o))){var i;(i=ta)==null||i.add(o),console.error(o)}}const d0=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:h,d:f,style:{transform:b,...g}={},...p}=t;process.env.NODE_ENV!=="production"&&(n||Ns("The `ref` prop is required for `FloatingArrow`."));const v=ea(),[y,x]=A.useState(!1);if(Ue(()=>{if(!o)return;rn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,w]=r.split("-"),E=T==="top"||T==="bottom";let k=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(k=null);const C=u*2,M=C/2,_=s/2*(c/-8+1),F=l/2*c/4,V=!!f,H=k&&w==="end"?"bottom":"top";let I=k&&w==="end"?"right":"left";k&&y&&(I=w==="end"?"left":"right");const O=i?.x!=null?k||i.x:"",$=i?.y!=null?k||i.y:"",D=f||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",P={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",{...p,"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",[I]:O,[H]:$,[T]:E||V?"100%":"calc(100% - "+C/2+"px)",transform:[P,b].filter(j=>!!j).join(" "),...g},children:[C>0&&m.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:h,strokeWidth:C+(f?0:1),d:D}),m.jsx("path",{stroke:C&&!f?p.fill:"none",d:D}),m.jsx("clipPath",{id:v,children:m.jsx("rect",{x:-M,y:M*(V?-1:1),width:s+C,height:s})})]})});function f0(){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 p0=A.createContext(null),h0=A.createContext(null),gr=()=>{var e;return((e=A.useContext(p0))==null?void 0:e.id)||null},vr=()=>A.useContext(h0);function tF(e){const t=ea(),n=vr(),o=gr();return Ue(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function nF(e){const{children:t,id:n}=e,r=gr();return m.jsx(p0.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function rF(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(()=>f0());return m.jsx(h0.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function Gr(e){return"data-floating-ui-"+e}function Rt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const m0=Gr("safe-polygon");function qd(e,t,n){if(n&&!qo(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 Ud(e){return typeof e=="function"?e():e}function g0(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:h=!0}=t,f=vr(),b=gr(),g=Nt(c),p=Nt(l),v=Nt(n),y=Nt(d),x=A.useRef(),T=A.useRef(-1),w=A.useRef(),E=A.useRef(-1),k=A.useRef(!0),C=A.useRef(!1),M=A.useRef(()=>{}),_=A.useRef(!1),F=gt(()=>{var D;const P=(D=o.current.openEvent)==null?void 0:D.type;return P?.includes("mouse")&&P!=="mousedown"});A.useEffect(()=>{if(!s)return;function D(P){let{open:j}=P;j||(Rt(T),Rt(E),k.current=!0,_.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),A.useEffect(()=>{if(!s||!g.current||!n)return;function D(j){F()&&r(!1,j,"hover")}const P=jt(a.floating).documentElement;return P.addEventListener("mouseleave",D),()=>{P.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,g,F]);const V=A.useCallback(function(D,P,j){P===void 0&&(P=!0),j===void 0&&(j="hover");const N=qd(p.current,"close",x.current);N&&!w.current?(Rt(T),T.current=window.setTimeout(()=>r(!1,D,j),N)):P&&(Rt(T),r(!1,D,j))},[p,r]),H=gt(()=>{M.current(),w.current=void 0}),I=gt(()=>{if(C.current){const D=jt(a.floating).body;D.style.pointerEvents="",D.removeAttribute(m0),C.current=!1}}),O=gt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function D(R){if(Rt(T),k.current=!1,u&&!qo(x.current)||Ud(y.current)>0&&!qd(p.current,"open"))return;const Z=qd(p.current,"open",x.current);Z?T.current=window.setTimeout(()=>{v.current||r(!0,R,"hover")},Z):n||r(!0,R,"hover")}function P(R){if(O()){I();return}M.current();const Z=jt(a.floating);if(Rt(E),_.current=!1,g.current&&o.current.floatingContext){n||Rt(T),w.current=g.current({...o.current.floatingContext,tree:f,x:R.clientX,y:R.clientY,onClose(){I(),H(),O()||V(R,!0,"safe-polygon")}});const re=w.current;Z.addEventListener("mousemove",re),M.current=()=>{Z.removeEventListener("mousemove",re)};return}(x.current==="touch"?!Dt(a.floating,R.relatedTarget):!0)&&V(R)}function j(R){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:R.clientX,y:R.clientY,onClose(){I(),H(),O()||V(R)}})(R))}function N(){Rt(T)}function U(R){O()||V(R,!1)}if(rt(a.domReference)){const R=a.domReference,Z=a.floating;return n&&R.addEventListener("mouseleave",j),h&&R.addEventListener("mousemove",D,{once:!0}),R.addEventListener("mouseenter",D),R.addEventListener("mouseleave",P),Z&&(Z.addEventListener("mouseleave",j),Z.addEventListener("mouseenter",N),Z.addEventListener("mouseleave",U)),()=>{n&&R.removeEventListener("mouseleave",j),h&&R.removeEventListener("mousemove",D),R.removeEventListener("mouseenter",D),R.removeEventListener("mouseleave",P),Z&&(Z.removeEventListener("mouseleave",j),Z.removeEventListener("mouseenter",N),Z.removeEventListener("mouseleave",U))}}},[a,s,e,u,h,V,H,I,r,n,v,f,p,g,o,O,y]),Ue(()=>{var D;if(s&&n&&(D=g.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&F()){C.current=!0;const j=a.floating;if(rt(a.domReference)&&j){var P;const N=jt(a.floating).body;N.setAttribute(m0,"");const U=a.domReference,R=f==null||(P=f.nodesRef.current.find(Z=>Z.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return R&&(R.style.pointerEvents=""),N.style.pointerEvents="none",U.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{N.style.pointerEvents="",U.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,b,a,f,g,F]),Ue(()=>{n||(x.current=void 0,_.current=!1,H(),I())},[n,H,I]),A.useEffect(()=>()=>{H(),Rt(T),Rt(E),I()},[s,a.domReference,H,I]);const $=A.useMemo(()=>{function D(P){x.current=P.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(P){const{nativeEvent:j}=P;function N(){!k.current&&!v.current&&r(!0,j,"hover")}u&&!qo(x.current)||n||Ud(y.current)===0||_.current&&P.movementX**2+P.movementY**2<2||(Rt(E),x.current==="touch"?N():(_.current=!0,E.current=window.setTimeout(N,Ud(y.current))))}}},[u,r,n,v,y]);return A.useMemo(()=>s?{reference:$}:{},[s,$])}let v0=0;function Zr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(v0);const i=()=>e?.focus({preventScroll:n});o?i():v0=requestAnimationFrame(i)}function Kd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ms(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function oF(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iF(e){return e?.ownerDocument||document}const Uo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function y0(e){return e==="inert"?Uo.inert:e==="aria-hidden"?Uo["aria-hidden"]:Uo.none}let Fs=new WeakSet,Ls={},Yd=0;const aF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,b0=e=>e&&(e.host||b0(e.parentNode)),sF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=b0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function lF(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=sF(t,e),s=new Set,l=new Set(a),c=[];Ls[o]||(Ls[o]=new WeakMap);const u=Ls[o];a.forEach(d),h(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,b=>{if(hr(b)!=="script")if(s.has(b))h(b);else{const g=i?b.getAttribute(i):null,p=g!==null&&g!=="false",v=y0(i),y=(v.get(b)||0)+1,x=(u.get(b)||0)+1;v.set(b,y),u.set(b,x),c.push(b),y===1&&p&&Fs.add(b),x===1&&b.setAttribute(o,""),!p&&i&&b.setAttribute(i,i==="inert"?"":"true")}})}return Yd++,()=>{c.forEach(f=>{const b=y0(i),p=(b.get(f)||0)-1,v=(u.get(f)||0)-1;b.set(f,p),u.set(f,v),p||(!Fs.has(f)&&i&&f.removeAttribute(i),Fs.delete(f)),v||f.removeAttribute(o)}),Yd--,Yd||(Uo.inert=new WeakMap,Uo["aria-hidden"]=new WeakMap,Uo.none=new WeakMap,Fs=new WeakSet,Ls={})}}function x0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=iF(e[0]).body;return lF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Vs={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},$s=A.forwardRef(function(t,n){const[r,o]=A.useState();Ue(()=>{Hx()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Gr("focus-guard")]:"",style:Vs};return m.jsx("span",{...t,...i})}),w0=A.createContext(null),S0=Gr("portal");function cF(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ea(),o=T0(),[i,a]=A.useState(null),s=A.useRef(null);return Ue(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ue(()=>{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(S0,""),l.appendChild(c),s.current=c,a(c)},[t,r]),Ue(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!rt(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(S0,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function yr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=cF({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),h=a?.modal,f=a?.open,b=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||h)return;function g(p){i&&Zi(p)&&(p.type==="focusin"?Jx:H2)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,h]),A.useEffect(()=>{i&&(f||Jx(i))},[f,i]),m.jsxs(w0.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[b&&i&&m.jsx($s,{"data-type":"outside",ref:l,onFocus:g=>{if(Zi(g,i)){var p;(p=u.current)==null||p.focus()}else{const v=a?a.domReference:null,y=Qx(v);y?.focus()}}}),b&&i&&m.jsx("span",{"aria-owns":i.id,style:Vs}),i&&mi.createPortal(t,i),b&&i&&m.jsx($s,{"data-type":"outside",ref:c,onFocus:g=>{if(Zi(g,i)){var p;(p=d.current)==null||p.focus()}else{const v=a?a.domReference:null,y=Xx(v);y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const T0=()=>A.useContext(w0);function E0(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const uF=20;let Xr=[];function dF(e){Xr=Xr.filter(t=>t.isConnected),e&&hr(e)!=="body"&&(Xr.push(e),Xr.length>uF&&(Xr=Xr.slice(-20)))}function k0(){return Xr.slice().reverse().find(e=>e.isConnected)}function fF(e){const t=Gi();return Rx(e,t)?e:As(e,t)[0]||e}function C0(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Gi(),i=C2(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Rx(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 pF=A.forwardRef(function(t,n){return m.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Vs})});function Qr(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:h=!1,getInsideElements:f=()=>[]}=e,{open:b,onOpenChange:g,events:p,dataRef:v,elements:{domReference:y,floating:x}}=t,T=gt(()=>{var Q;return(Q=v.current.floatingContext)==null?void 0:Q.nodeId}),w=gt(f),E=typeof a=="number"&&a<0,k=zd(y)&&E,C=aF(),M=C?i:!0,_=!M||C&&h,F=Nt(o),V=Nt(a),H=Nt(s),I=vr(),O=T0(),$=A.useRef(null),D=A.useRef(null),P=A.useRef(!1),j=A.useRef(!1),N=A.useRef(-1),U=O!=null,R=Ps(x),Z=gt(function(Q){return Q===void 0&&(Q=R),Q?As(Q,Gi()):[]}),G=gt(Q=>{const z=Z(Q);return F.current.map(ae=>y&&ae==="reference"?y:R&&ae==="floating"?R:z).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function Q(ae){if(ae.key==="Tab"){Dt(R,Ln(jt(R)))&&Z().length===0&&!k&&zt(ae);const le=G(),be=Vn(ae);F.current[0]==="reference"&&be===y&&(zt(ae),ae.shiftKey?Zr(le[le.length-1]):Zr(le[1])),F.current[1]==="floating"&&be===R&&ae.shiftKey&&(zt(ae),Zr(le[0]))}}const z=jt(R);return z.addEventListener("keydown",Q),()=>{z.removeEventListener("keydown",Q)}},[r,y,R,c,F,k,Z,G]),A.useEffect(()=>{if(r||!x)return;function Q(z){const ae=Vn(z),be=Z().indexOf(ae);be!==-1&&(N.current=be)}return x.addEventListener("focusin",Q),()=>{x.removeEventListener("focusin",Q)}},[r,x,Z]),A.useEffect(()=>{if(r||!d)return;function Q(){j.current=!0,setTimeout(()=>{j.current=!1})}function z(ae){const le=ae.relatedTarget,be=ae.currentTarget,we=Vn(ae);queueMicrotask(()=>{const Se=T(),Pe=!(Dt(y,le)||Dt(x,le)||Dt(le,x)||Dt(O?.portalNode,le)||le!=null&&le.hasAttribute(Gr("focus-guard"))||I&&(Wo(I.nodesRef.current,Se).find(Te=>{var ve,Re;return Dt((ve=Te.context)==null?void 0:ve.elements.floating,le)||Dt((Re=Te.context)==null?void 0:Re.elements.domReference,le)})||Ux(I.nodesRef.current,Se).find(Te=>{var ve,Re,de;return[(ve=Te.context)==null?void 0:ve.elements.floating,Ps((Re=Te.context)==null?void 0:Re.elements.floating)].includes(le)||((de=Te.context)==null?void 0:de.elements.domReference)===le})));if(be===y&&R&&C0(R,F),l&&be!==y&&!(we!=null&&we.isConnected)&&Ln(jt(R))===jt(R).body){kt(R)&&R.focus();const Te=N.current,ve=Z(),Re=ve[Te]||ve[ve.length-1]||R;kt(Re)&&Re.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(k||!c)&&le&&Pe&&!j.current&&le!==k0()&&(P.current=!0,g(!1,ae,"focus-out"))})}if(x&&kt(y))return y.addEventListener("focusout",z),y.addEventListener("pointerdown",Q),x.addEventListener("focusout",z),()=>{y.removeEventListener("focusout",z),y.removeEventListener("pointerdown",Q),x.removeEventListener("focusout",z)}},[r,y,x,R,c,I,O,g,d,l,Z,k,T,F,v]);const re=A.useRef(null),te=A.useRef(null),ee=E0([re,O?.beforeInsideRef]),B=E0([te,O?.afterInsideRef]);A.useEffect(()=>{var Q,z;if(r||!x)return;const ae=Array.from((O==null||(Q=O.portalNode)==null?void 0:Q.querySelectorAll("["+Gr("portal")+"]"))||[]),le=I?Ux(I.nodesRef.current,T()):[],be=I&&!c?le.map(Te=>{var ve;return(ve=Te.context)==null?void 0:ve.elements.floating}):[],we=(z=le.find(Te=>{var ve;return zd(((ve=Te.context)==null?void 0:ve.elements.domReference)||null)}))==null||(z=z.context)==null?void 0:z.elements.domReference,Se=[x,we,...ae,...be,...w(),$.current,D.current,re.current,te.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,F.current.includes("reference")||k?y:null].filter(Te=>Te!=null),Pe=c||k?x0(Se,!_,_):x0(Se);return()=>{Pe()}},[r,y,x,c,F,O,k,M,_,I,T,w]),Ue(()=>{if(r||!kt(R))return;const Q=jt(R),z=Ln(Q);queueMicrotask(()=>{const ae=G(R),le=V.current,be=(typeof le=="number"?ae[le]:le.current)||R,we=Dt(R,z);!E&&!we&&b&&Zr(be,{preventScroll:be===R})})},[r,b,R,E,G,V]),Ue(()=>{if(r||!R)return;const Q=jt(R),z=Ln(Q);dF(z);function ae(we){let{reason:Se,event:Pe,nested:Te}=we;if(["hover","safe-polygon"].includes(Se)&&Pe.type==="mouseleave"&&(P.current=!0),Se==="outside-press")if(Te)P.current=!1;else if(Kx(Pe)||Yx(Pe))P.current=!1;else{let ve=!1;document.createElement("div").focus({get preventScroll(){return ve=!0,!1}}),ve?P.current=!1:P.current=!0}}p.on("openchange",ae);const le=Q.createElement("span");le.setAttribute("tabindex","-1"),le.setAttribute("aria-hidden","true"),Object.assign(le.style,Vs),U&&y&&y.insertAdjacentElement("afterend",le);function be(){if(typeof H.current=="boolean"){const we=y||k0();return we&&we.isConnected?we:le}return H.current.current||le}return()=>{p.off("openchange",ae);const we=Ln(Q),Se=Dt(x,we)||I&&Wo(I.nodesRef.current,T()).some(Te=>{var ve;return Dt((ve=Te.context)==null?void 0:ve.elements.floating,we)}),Pe=be();queueMicrotask(()=>{const Te=fF(Pe);H.current&&!P.current&&kt(Te)&&(!(Te!==we&&we!==Q.body)||Se)&&Te.focus({preventScroll:!0}),le.remove()})}},[r,x,R,H,v,p,I,U,y,T]),A.useEffect(()=>{queueMicrotask(()=>{P.current=!1})},[r]),Ue(()=>{if(!r&&O)return O.setFocusManagerState({modal:c,closeOnFocusOut:d,open:b,onOpenChange:g,domReference:y}),()=>{O.setFocusManagerState(null)}},[r,O,c,b,g,d,y]),Ue(()=>{r||R&&C0(R,F)},[r,R,F]);function q(Q){return r||!u||!c?null:m.jsx(pF,{ref:Q==="start"?$:D,onClick:z=>g(!1,z.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const X=!r&&M&&(c?!k:!0)&&(U||c);return m.jsxs(m.Fragment,{children:[X&&m.jsx($s,{"data-type":"inside",ref:ee,onFocus:Q=>{if(c){const ae=G();Zr(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(P.current=!1,Zi(Q,O.portalNode)){const ae=Xx(y);ae?.focus()}else{var z;(z=O.beforeOutsideRef.current)==null||z.focus()}}}),!k&&q("start"),n,q("end"),X&&m.jsx($s,{"data-type":"inside",ref:B,onFocus:Q=>{if(c)Zr(G()[0]);else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(d&&(P.current=!0),Zi(Q,O.portalNode)){const ae=Qx(y);ae?.focus()}else{var z;(z=O.afterOutsideRef.current)==null||z.focus()}}})]})}let js=0;const A0="--floating-ui-scrollbar-width";function hF(){const e=Nd(),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(A0,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(A0),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let P0=()=>{};const Gd=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return Ue(()=>{if(r)return js++,js===1&&(P0=hF()),()=>{js--,js===0&&P0()}},[r]),m.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function I0(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function mF(e){return kt(e.target)&&e.target.tagName==="A"}function _0(e){return jd(e)}function Ko(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,h=A.useRef(),f=A.useRef(!1),b=A.useMemo(()=>({onPointerDown(g){h.current=g.pointerType},onMouseDown(g){const p=h.current;g.button===0&&s!=="click"&&(qo(p,!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 p=h.current;if(s==="mousedown"&&h.current){h.current=void 0;return}qo(p,!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){h.current=void 0,!(g.defaultPrevented||!u||I0(g))&&(g.key===" "&&!_0(i)&&(g.preventDefault(),f.current=!0),!mF(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||I0(g)||_0(i)||g.key===" "&&f.current&&(f.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:b}:{},[a,b])}function gF(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,h=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),h-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,h=s&&t.x!=null?t.x:h,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function O0(e){return e!=null&&e.clientX!=null}function vF(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),h=A.useRef(null),[f,b]=A.useState(),[g,p]=A.useState([]),v=gt((E,k)=>{d.current||r.current.openEvent&&!O0(r.current.openEvent)||a.setPositionReference(gF(i,{x:E,y:k,axis:l,dataRef:r,pointerType:f}))}),y=gt(E=>{c!=null||u!=null||(n?h.current||p([]):v(E.clientX,E.clientY))}),x=qo(f)?o:n,T=A.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const E=Ut(o);function k(C){const M=Vn(C);Dt(o,M)?(E.removeEventListener("mousemove",k),h.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||O0(r.current.openEvent)){E.addEventListener("mousemove",k);const C=()=>{E.removeEventListener("mousemove",k),h.current=null};return h.current=C,C}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);A.useEffect(()=>T(),[T,g]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),Ue(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=A.useMemo(()=>{function E(k){let{pointerType:C}=k;b(C)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return A.useMemo(()=>s?{reference:w}:{},[s,w])}const yF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},bF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},M0=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 br(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:h=!1,bubbles:f,capture:b}=t,g=vr(),p=gt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?p:l,y=A.useRef(!1),{escapeKey:x,outsidePress:T}=M0(f),{escapeKey:w,outsidePress:E}=M0(b),k=A.useRef(!1),C=A.useRef(-1),M=gt(O=>{var $;if(!n||!a||!s||O.key!=="Escape"||k.current)return;const D=($=i.current.floatingContext)==null?void 0:$.nodeId,P=g?Wo(g.nodesRef.current,D):[];if(!x&&(O.stopPropagation(),P.length>0)){let j=!0;if(P.forEach(N=>{var U;if((U=N.context)!=null&&U.open&&!N.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,N2(O)?O.nativeEvent:O,"escape-key")}),_=gt(O=>{var $;const D=()=>{var P;M(O),(P=Vn(O))==null||P.removeEventListener("keydown",D)};($=Vn(O))==null||$.addEventListener("keydown",D)}),F=gt(O=>{var $;const D=i.current.insideReactTree;i.current.insideReactTree=!1;const P=y.current;if(y.current=!1,c==="click"&&P||D||typeof v=="function"&&!v(O))return;const j=Vn(O),N="["+Gr("inert")+"]",U=jt(o.floating).querySelectorAll(N);let R=rt(j)?j:null;for(;R&&!Jn(R);){const te=er(R);if(Jn(te)||!rt(te))break;R=te}if(U.length&&rt(j)&&!O2(j)&&!Dt(j,o.floating)&&Array.from(U).every(te=>!Dt(R,te)))return;if(kt(j)&&I){const te=Jn(j),ee=rn(j),B=/auto|scroll/,q=te||B.test(ee.overflowX),X=te||B.test(ee.overflowY),Q=q&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,z=X&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,ae=ee.direction==="rtl",le=z&&(ae?O.offsetX<=j.offsetWidth-j.clientWidth:O.offsetX>j.clientWidth),be=Q&&O.offsetY>j.clientHeight;if(le||be)return}const Z=($=i.current.floatingContext)==null?void 0:$.nodeId,G=g&&Wo(g.nodesRef.current,Z).some(te=>{var ee;return $d(O,(ee=te.context)==null?void 0:ee.elements.floating)});if($d(O,o.floating)||$d(O,o.domReference)||G)return;const re=g?Wo(g.nodesRef.current,Z):[];if(re.length>0){let te=!0;if(re.forEach(ee=>{var B;if((B=ee.context)!=null&&B.open&&!ee.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,O,"outside-press")}),V=gt(O=>{var $;const D=()=>{var P;F(O),(P=Vn(O))==null||P.removeEventListener(c,D)};($=Vn(O))==null||$.addEventListener(c,D)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let O=-1;function $(U){r(!1,U,"ancestor-scroll")}function D(){window.clearTimeout(O),k.current=!0}function P(){O=window.setTimeout(()=>{k.current=!1},vs()?5:0)}const j=jt(o.floating);s&&(j.addEventListener("keydown",w?_:M,w),j.addEventListener("compositionstart",D),j.addEventListener("compositionend",P)),v&&j.addEventListener(c,E?V:F,E);let N=[];return h&&(rt(o.domReference)&&(N=mr(o.domReference)),rt(o.floating)&&(N=N.concat(mr(o.floating))),!rt(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(mr(o.reference.contextElement)))),N=N.filter(U=>{var R;return U!==((R=j.defaultView)==null?void 0:R.visualViewport)}),N.forEach(U=>{U.addEventListener("scroll",$,{passive:!0})}),()=>{s&&(j.removeEventListener("keydown",w?_:M,w),j.removeEventListener("compositionstart",D),j.removeEventListener("compositionend",P)),v&&j.removeEventListener(c,E?V:F,E),N.forEach(U=>{U.removeEventListener("scroll",$)}),window.clearTimeout(O)}},[i,o,s,v,c,n,r,h,a,x,T,M,w,_,F,E,V]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const H=A.useMemo(()=>({onKeyDown:M,...u&&{[yF[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[M,r,u,d]),I=A.useMemo(()=>({onKeyDown:M,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[bF[c]]:()=>{i.current.insideReactTree=!0},onBlurCapture(){g||(Rt(C),i.current.insideReactTree=!0,C.current=window.setTimeout(()=>{i.current.insideReactTree=!1}))}}),[M,c,i,g]);return A.useMemo(()=>a?{reference:H,floating:I}:{},[a,H,I])}function xF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ea(),i=A.useRef({}),[a]=A.useState(()=>f0()),s=gr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!rt(f)&&eF("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=gt((f,b,g)=>{i.current.openEvent=f?b:void 0,a.emit("openchange",{open:f,event:b,reason:g,nested:s}),n?.(f,b,g)}),d=A.useMemo(()=>({setPositionReference:c}),[]),h=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:h,events:a,floatingId:o,refs:d}),[t,u,h,a,o,d])}function tr(e){e===void 0&&(e={});const{nodeId:t}=e,n=xF({...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),h=vr();Ue(()=>{u&&(d.current=u)},[u]);const f=U2({...e,elements:{...o,...s&&{reference:s}}}),b=A.useCallback(x=>{const T=rt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),f.refs.setReference(T)},[f.refs]),g=A.useCallback(x=>{(rt(x)||x===null)&&(d.current=x,a(x)),(rt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!rt(x))&&f.refs.setReference(x)},[f.refs]),p=A.useMemo(()=>({...f.refs,setReference:g,setPositionReference:b,domReference:d}),[f.refs,g,b]),v=A.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=A.useMemo(()=>({...f,...r,refs:p,elements:v,nodeId:t}),[f,p,v,t,r]);return Ue(()=>{r.dataRef.current.floatingContext=y;const x=h?.nodesRef.current.find(T=>T.id===t);x&&(x.context=y)}),A.useMemo(()=>({...f,context:y,refs:p,elements:v}),[f,p,v,y])}function Zd(){return A2()&&Hx()}function wF(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 f=Ut(a.domReference);function b(){!n&&kt(a.domReference)&&a.domReference===Ln(jt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}function p(){d.current=!1}return f.addEventListener("blur",b),Zd()&&(f.addEventListener("keydown",g,!0),f.addEventListener("pointerdown",p,!0)),()=>{f.removeEventListener("blur",b),Zd()&&(f.removeEventListener("keydown",g,!0),f.removeEventListener("pointerdown",p,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function f(b){let{reason:g}=b;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),A.useEffect(()=>()=>{Rt(u)},[]);const h=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const b=Vn(f.nativeEvent);if(l&&rt(b)){if(Zd()&&!f.relatedTarget){if(!d.current&&!jd(b))return}else if(!M2(b))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const b=f.relatedTarget,g=f.nativeEvent,p=rt(b)&&b.hasAttribute(Gr("focus-guard"))&&b.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=Ln(a.domReference?a.domReference.ownerDocument:document);!b&&y===a.domReference||Dt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,y)||Dt(a.domReference,y)||p||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:h}:{},[s,h])}function Xd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[a0]:a,[s0]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[Z2]:""},...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&&[a0,s0].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 h,f=arguments.length,b=new Array(f),g=0;g<f;g++)b[g]=arguments[g];return(h=r.get(c))==null?void 0:h.map(p=>p(...b)).find(p=>p!==void 0)}}}else a[c]=u}),a),{})}}function nr(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=>Xd(s,e,"reference"),t),i=A.useCallback(s=>Xd(s,e,"floating"),n),a=A.useCallback(s=>Xd(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const SF="Escape";function zs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rs(e,t){return zs(t,e===l0||e===Ds,e===Qi||e===Ji)}function Qd(e,t,n){return zs(t,e===Ds,n?e===Qi:e===Ji)||e==="Enter"||e===" "||e===""}function D0(e,t,n){return zs(t,n?e===Qi:e===Ji,e===Ds)}function N0(e,t,n,r){const o=n?e===Ji:e===Qi,i=e===l0;return t==="both"||t==="horizontal"&&r&&r>1?e===SF:zs(t,o,i)}function Bs(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:h=!1,nested:f=!1,rtl:b=!1,virtual:g=!1,focusItemOnOpen:p="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:k=!0,virtualItemRef:C,itemSizes:M,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(h||Ns("`useListNavigation` looping must be enabled to allow escaping."),g||Ns("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&E>1&&Ns("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=Ps(o.floating),V=Nt(F),H=gr(),I=vr();Ue(()=>{e.dataRef.current.orientation=T},[e,T]);const O=gt(()=>{l(P.current===-1?null:P.current)}),$=zd(o.domReference),D=A.useRef(p),P=A.useRef(u??-1),j=A.useRef(null),N=A.useRef(!0),U=A.useRef(O),R=A.useRef(!!o.floating),Z=A.useRef(n),G=A.useRef(!1),re=A.useRef(!1),te=Nt(x),ee=Nt(n),B=Nt(k),q=Nt(u),[X,Q]=A.useState(),[z,ae]=A.useState(),le=gt(()=>{function de(ce){if(g){var xe;(xe=ce.id)!=null&&xe.endsWith("-fui-option")&&(ce.id=i+"-"+Math.random().toString(16).slice(2,10)),Q(ce.id),I?.events.emit("virtualfocus",ce),C&&(C.current=ce)}else Zr(ce,{sync:G.current,preventScroll:!0})}const Y=a.current[P.current],L=re.current;Y&&de(Y),(G.current?ce=>ce():requestAnimationFrame)(()=>{const ce=a.current[P.current]||Y;if(!ce)return;Y||de(ce);const xe=B.current;xe&&we&&(L||!N.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof xe=="boolean"?{block:"nearest",inline:"nearest"}:xe))})});Ue(()=>{c&&(n&&o.floating?D.current&&u!=null&&(re.current=!0,P.current=u,O()):R.current&&(P.current=-1,U.current()))},[c,n,o.floating,u,O]),Ue(()=>{if(c&&n&&o.floating)if(s==null){if(G.current=!1,q.current!=null)return;if(R.current&&(P.current=-1,le()),(!Z.current||!R.current)&&D.current&&(j.current!=null||D.current===!0&&j.current==null)){let de=0;const Y=()=>{a.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Y),de++):(P.current=j.current==null||Qd(j.current,T,b)||f?Rd(a,te.current):Gx(a,te.current),j.current=null,O())};Y()}}else Yi(a,s)||(P.current=s,le(),re.current=!1)},[c,n,o.floating,s,q,f,a,T,b,O,le,te]),Ue(()=>{var de;if(!c||o.floating||!I||g||!R.current)return;const Y=I.nodesRef.current,L=(de=Y.find(xe=>xe.id===H))==null||(de=de.context)==null?void 0:de.elements.floating,J=Ln(jt(o.floating)),ce=Y.some(xe=>xe.context&&Dt(xe.context.elements.floating,J));L&&!ce&&N.current&&L.focus({preventScroll:!0})},[c,o.floating,I,H,g]),Ue(()=>{if(!c||!I||!g||H)return;function de(Y){ae(Y.id),C&&(C.current=Y)}return I.events.on("virtualfocus",de),()=>{I.events.off("virtualfocus",de)}},[c,I,g,H,C]),Ue(()=>{U.current=O,Z.current=n,R.current=!!o.floating}),Ue(()=>{n||(j.current=null,D.current=p)},[n,p]);const be=s!=null,we=A.useMemo(()=>{function de(L){if(!ee.current)return;const J=a.current.indexOf(L);J!==-1&&P.current!==J&&(P.current=J,O())}return{onFocus(L){let{currentTarget:J}=L;G.current=!0,de(J)},onClick:L=>{let{currentTarget:J}=L;return J.focus({preventScroll:!0})},...v&&{onMouseMove(L){let{currentTarget:J}=L;G.current=!0,re.current=!1,de(J)},onPointerLeave(L){let{pointerType:J}=L;if(!(!N.current||J==="touch")&&(G.current=!0,P.current=-1,O(),!g)){var ce;(ce=V.current)==null||ce.focus({preventScroll:!0})}}}}},[ee,V,v,a,O,g]),Se=A.useCallback(()=>{var de;return w??(I==null||(de=I.nodesRef.current.find(Y=>Y.id===H))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[H,I,w]),Pe=gt(de=>{if(N.current=!1,G.current=!0,de.which===229||!ee.current&&de.currentTarget===V.current)return;if(f&&N0(de.key,T,b,E)){Rs(de.key,Se())||zt(de),r(!1,de.nativeEvent,"list-navigation"),kt(o.domReference)&&(g?I?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const Y=P.current,L=Rd(a,x),J=Gx(a,x);if($||(de.key==="Home"&&(zt(de),P.current=L,O()),de.key==="End"&&(zt(de),P.current=J,O())),E>1){const ce=M||Array.from({length:a.current.length},()=>({width:1,height:1})),xe=z2(ce,E,_),Ne=xe.findIndex(xt=>xt!=null&&!_s(a,xt,x)),Ye=xe.reduce((xt,Yt,qn)=>Yt!=null&&!_s(a,Yt,x)?qn:xt,-1),Lt=xe[j2({current:xe.map(xt=>xt!=null?a.current[xt]:null)},{event:de,orientation:T,loop:h,rtl:b,cols:E,disabledIndices:B2([...(typeof x!="function"?x:null)||a.current.map((xt,Yt)=>_s(a,Yt,x)?Yt:void 0),void 0],xe),minIndex:Ne,maxIndex:Ye,prevIndex:R2(P.current>J?L:P.current,ce,xe,E,de.key===Ds?"bl":de.key===(b?Qi:Ji)?"tr":"tl"),stopEvent:!0})];if(Lt!=null&&(P.current=Lt,O()),T==="both")return}if(Rs(de.key,T)){if(zt(de),n&&!g&&Ln(de.currentTarget.ownerDocument)===de.currentTarget){P.current=Qd(de.key,T,b)?L:J,O();return}Qd(de.key,T,b)?h?P.current=Y>=J?d&&Y!==a.current.length?-1:L:Ht(a,{startingIndex:Y,disabledIndices:x}):P.current=Math.min(J,Ht(a,{startingIndex:Y,disabledIndices:x})):h?P.current=Y<=L?d&&Y!==-1?a.current.length:J:Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x}):P.current=Math.max(L,Ht(a,{startingIndex:Y,decrement:!0,disabledIndices:x})),Yi(a,P.current)&&(P.current=-1),O()}}),Te=A.useMemo(()=>g&&n&&be&&{"aria-activedescendant":z||X},[g,n,be,z,X]),ve=A.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...$?{}:Te,onKeyDown:Pe,onPointerMove(){N.current=!0}}),[Te,Pe,T,$]),Re=A.useMemo(()=>{function de(L){p==="auto"&&Kx(L.nativeEvent)&&(D.current=!0)}function Y(L){D.current=p,p==="auto"&&Yx(L.nativeEvent)&&(D.current=!0)}return{...Te,onKeyDown(L){N.current=!1;const J=L.key.startsWith("Arrow"),ce=["Home","End"].includes(L.key),xe=J||ce,Ne=D0(L.key,T,b),Ye=N0(L.key,T,b,E),Lt=D0(L.key,Se(),b),xt=Rs(L.key,T),Yt=(f?Lt:xt)||L.key==="Enter"||L.key.trim()==="";if(g&&n){const W=I?.nodesRef.current.find(Fe=>Fe.parentId==null),K=I&&W?D2(I.nodesRef.current,W.id):null;if(xe&&K&&C){const Fe=new KeyboardEvent("keydown",{key:L.key,bubbles:!0});if(Ne||Ye){var qn,Cn;const Qe=((qn=K.context)==null?void 0:qn.elements.domReference)===L.currentTarget,ot=Ye&&!Qe?(Cn=K.context)==null?void 0:Cn.elements.domReference:Ne?a.current.find(Me=>Me?.id===X):null;ot&&(zt(L),ot.dispatchEvent(Fe),ae(void 0))}if((xt||ce)&&K.context&&K.context.open&&K.parentId&&L.currentTarget!==K.context.elements.domReference){var An;zt(L),(An=K.context.elements.domReference)==null||An.dispatchEvent(Fe);return}}return Pe(L)}if(!(!n&&!y&&J)){if(Yt){const W=Rs(L.key,Se());j.current=f&&W?null:L.key}if(f){Lt&&(zt(L),n?(P.current=Rd(a,te.current),O()):r(!0,L.nativeEvent,"list-navigation"));return}xt&&(u!=null&&(P.current=u),zt(L),!n&&y?r(!0,L.nativeEvent,"list-navigation"):Pe(L),n&&O())}},onFocus(){n&&!g&&(P.current=-1,O())},onPointerDown:Y,onPointerEnter:Y,onMouseDown:de,onClick:de}},[X,Te,E,Pe,te,p,a,f,O,r,n,y,T,Se,b,u,I,g,C]);return A.useMemo(()=>c?{reference:Re,floating:ve,item:we}:{},[c,Re,ve,we])}const TF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xr(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=ea(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var y;return((y=Ps(i.floating))==null?void 0:y.id)||a},[i.floating,a]),h=(r=TF.get(l))!=null?r:l,b=gr()!=null,g=A.useMemo(()=>h==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":h==="alertdialog"?"dialog":h,"aria-controls":o?d:void 0,...h==="listbox"&&{role:"combobox"},...h==="menu"&&{id:u},...h==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[h,d,b,o,u,l]),p=A.useMemo(()=>{const y={id:d,...h&&{role:h}};return h==="tooltip"||l==="label"?y:{...y,...h==="menu"&&{"aria-labelledby":u}}},[h,d,u,l]),v=A.useCallback(y=>{let{active:x,selected:T}=y;const w={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":return{...w,"aria-selected":x&&T};case"combobox":return{...w,"aria-selected":T}}return{}},[d,l]);return A.useMemo(()=>s?{reference:g,floating:p,item:v}:{},[s,g,p,v])}const F0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Yo(e,t){return typeof e=="function"?e(t):e}function EF(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 kF(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=EF(n,a);return!c&&s==="close"&&l("unmounted"),Ue(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{mi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function L0(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,h=(u?a:a.close)||0,[f,b]=A.useState(()=>({...Yo(i,c),...Yo(n,c)})),{isMounted:g,status:p}=kF(e,{duration:a}),v=Nt(n),y=Nt(r),x=Nt(o),T=Nt(i);return Ue(()=>{const w=Yo(v.current,c),E=Yo(x.current,c),k=Yo(T.current,c),C=Yo(y.current,c)||Object.keys(w).reduce((M,_)=>(M[_]="",M),{});if(p==="initial"&&b(M=>({transitionProperty:M.transitionProperty,...k,...w})),p==="open"&&b({transitionProperty:Object.keys(C).map(F0).join(","),transitionDuration:d+"ms",...k,...C}),p==="close"){const M=E||w;b({transitionProperty:Object.keys(M).map(F0).join(","),transitionDuration:h+"ms",...k,...M})}},[h,x,v,y,T,d,p,c]),{isMounted:g,styles:f}}function CF(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:h=[],selectedIndex:f=null}=t,b=A.useRef(-1),g=A.useRef(""),p=A.useRef((n=f??a)!=null?n:-1),v=A.useRef(null),y=gt(s),x=gt(l),T=Nt(u),w=Nt(h);Ue(()=>{r&&(Rt(b),v.current=null,g.current="")},[r]),Ue(()=>{if(r&&g.current===""){var _;p.current=(_=f??a)!=null?_:-1}},[r,f,a]);const E=gt(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),k=gt(_=>{function F($,D,P){const j=T.current?T.current(D,P):D.find(N=>N?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return j?$.indexOf(j):-1}const V=i.current;if(g.current.length>0&&g.current[0]!==" "&&(F(V,V,g.current)===-1?E(!1):_.key===" "&&zt(_)),V==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(zt(_),E(!0)),V.every($=>{var D,P;return $?((D=$[0])==null?void 0:D.toLocaleLowerCase())!==((P=$[1])==null?void 0:P.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",p.current=v.current),g.current+=_.key,Rt(b),b.current=window.setTimeout(()=>{g.current="",p.current=v.current,E(!1)},d);const I=p.current,O=F(V,[...V.slice((I||0)+1),...V.slice(0,(I||0)+1)],g.current);O!==-1?(y(O),v.current=O):_.key!==" "&&(g.current="",E(!1))}),C=A.useMemo(()=>({onKeyDown:k}),[k]),M=A.useMemo(()=>({onKeyDown:k,onKeyUp(_){_.key===" "&&E(!1)}}),[k,E]);return A.useMemo(()=>c?{reference:C,floating:M}:{},[c,C,M])}function AF(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function V0(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 PF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function $0(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=performance.now();function c(d,h){const f=performance.now(),b=f-l;if(a===null||s===null||b===0)return a=d,s=h,l=f,null;const g=d-a,p=h-s,y=Math.sqrt(g*g+p*p)/b;return a=d,s=h,l=f,y}const u=d=>{let{x:h,y:f,placement:b,elements:g,onClose:p,nodeId:v,tree:y}=d;return function(T){function w(){Rt(o),p()}if(Rt(o),!g.domReference||!g.floating||b==null||h==null||f==null)return;const{clientX:E,clientY:k}=T,C=[E,k],M=oF(T),_=T.type==="mouseleave",F=Kd(g.floating,M),V=Kd(g.domReference,M),H=g.domReference.getBoundingClientRect(),I=g.floating.getBoundingClientRect(),O=b.split("-")[0],$=h>I.right-I.width/2,D=f>I.bottom-I.height/2,P=PF(C,H),j=I.width>H.width,N=I.height>H.height,U=(j?H:I).left,R=(j?H:I).right,Z=(N?H:I).top,G=(N?H:I).bottom;if(F&&(i=!0,!_))return;if(V&&(i=!1),V&&!_){i=!0;return}if(_&&rt(T.relatedTarget)&&Kd(g.floating,T.relatedTarget)||y&&AF(y.nodesRef.current,v).length)return;if(O==="top"&&f>=H.bottom-1||O==="bottom"&&f<=H.top+1||O==="left"&&h>=H.right-1||O==="right"&&h<=H.left+1)return w();let re=[];switch(O){case"top":re=[[U,H.top+1],[U,I.bottom-1],[R,I.bottom-1],[R,H.top+1]];break;case"bottom":re=[[U,I.top+1],[U,H.bottom-1],[R,H.bottom-1],[R,I.top+1]];break;case"left":re=[[I.right-1,G],[I.right-1,Z],[H.left+1,Z],[H.left+1,G]];break;case"right":re=[[H.right-1,G],[H.right-1,Z],[I.left+1,Z],[I.left+1,G]];break}function te(ee){let[B,q]=ee;switch(O){case"top":{const X=[j?B+t/2:$?B+t*4:B-t*4,q+t+1],Q=[j?B-t/2:$?B+t*4:B-t*4,q+t+1],z=[[I.left,$||j?I.bottom-t:I.top],[I.right,$?j?I.bottom-t:I.top:I.bottom-t]];return[X,Q,...z]}case"bottom":{const X=[j?B+t/2:$?B+t*4:B-t*4,q-t],Q=[j?B-t/2:$?B+t*4:B-t*4,q-t],z=[[I.left,$||j?I.top+t:I.bottom],[I.right,$?j?I.top+t:I.bottom:I.top+t]];return[X,Q,...z]}case"left":{const X=[B+t+1,N?q+t/2:D?q+t*4:q-t*4],Q=[B+t+1,N?q-t/2:D?q+t*4:q-t*4];return[...[[D||N?I.right-t:I.left,I.top],[D?N?I.right-t:I.left:I.right-t,I.bottom]],X,Q]}case"right":{const X=[B-t,N?q+t/2:D?q+t*4:q-t*4],Q=[B-t,N?q-t/2:D?q+t*4:q-t*4],z=[[D||N?I.left+t:I.right,I.top],[D?N?I.left+t:I.right:I.left+t,I.bottom]];return[X,Q,...z]}}}if(!V0([E,k],re)){if(i&&!P)return w();if(!_&&r){const ee=c(T.clientX,T.clientY);if(ee!==null&&ee<.1)return w()}V0([E,k],te([h,f]))?!i&&r&&(o.current=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const IF=({item:e,context:t,setter:n,get:r,refs:o})=>m.jsx(yr,{children:m.jsx(bg,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:m.jsxs(Xn,{presenceAffectsLayout:!0,children:[e?m.jsx(Je.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(Gd,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:m.jsx(Qr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:m.jsxs(Je.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(Co,{})})}),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]})})}),_F=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=tr({open:t!==null,transform:!0,onOpenChange:h=>h?void 0:n(null)}),a=Ko(o),s=xr(o,{role:"dialog"}),l=br(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=nr([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return m.jsxs(S.Fragment,{children:[m.jsx(IF,{refs:i,context:o,get:c,item:t,setter:u}),m.jsx("ul",{role:"list",children:d.map((h,f)=>{const b=h.props,g=`${r}-${f}`,p=()=>n({...b,id:g}),v=b.leading;return m.jsx(Je.li,{layout:!0,layoutId:`item-${g}`,className:"border-b border-card-border py-2 last:border-transparent",children:m.jsx(Je.div,{layoutId:`toast-${g}`,className:"relative",children:m.jsx("div",{className:"relative flex items-start space-x-3",children:m.jsxs(S.Fragment,{children:[b.avatar?m.jsx("div",{children:m.jsx("div",{className:"relative px-1",children:m.jsx("button",{onClick:p,className:"flex size-10 items-center justify-center ring-primary",children:b.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:p,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[m.jsx("h3",{children:b.title}),m.jsx("p",{className:"text-sm leading-snug text-secondary",children:b.description})]}),v?m.jsx(v,{open:p}):null]})})]})})})},g)})})]})},OF=e=>m.jsx(S.Fragment,{children:e.children}),MF=/Mac|iPod|iPhone|iPad/,Hs=()=>MF.test(navigator.userAgent),DF=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Hs()?"Meta":"Control":n==="Hyper"?Hs()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),j0=e=>e.map(t=>t.trim()).join("+");class NF{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=j0(DF(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=j0(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()}}class wn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof wn&&(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 wn(this);return t?t(n):n}static from(t,n){return new wn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(wn.from(t,n).values())}toArray(){return Array.from(this.values())}}const FF=(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]},z0=(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},R0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},B0=(e,t)=>{const n=z0(t,R0.basic,e);return n!==void 0&&n!==e?n:z0(t,R0.extend,e)},H0=e=>e.replace(/[^0-9]/g,""),Ws=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),W0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?H0(e).includes(H0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?FF(e,t)!==null:!1,LF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>W0(e,o,n,r)):W0(e,t,n,r),Jd=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:$e.array(i.value)?i.value.map(Ws):Ws(`${i.value}`)}));return e.forEach(i=>{const a=B0(i,t);o.forEach(s=>{const l=B0(i,s.key);if(!l)return;const c=Ws(`${s.value}`.toLocaleLowerCase()).trim(),u=Ws(`${l}`.toLocaleLowerCase()).trim();if(LF(u,c,s.score,s.match))return void r.set(a,i);$e.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},VF=e=>(e=e.trim(),e==="Alt"?Hs()?m.jsx(HI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Hs()?m.jsx(VI,{"aria-label":"Command",size:14}):"Ctrl":e),$F=e=>{const t=e.value.trim().split("+");return m.jsx("span",{className:"flex 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:VF(n)}),o?null:m.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},ef=m.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),jF=(e,t)=>dr()?t:window.matchMedia(e).matches,zF=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(jF(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},q0=()=>window.matchMedia("@media (pointer: coarse)"),RF=()=>{const e=S.useRef(dr()?null:q0()),[t,n]=S.useState(dr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?q0():e.current).addEventListener("change",o=>n(o.matches))},[]),t},tf=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=RF(),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||fb())return;document.documentElement.style.padding=Gh(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(ET(c.style.height)):null,h=$e.number(d)?d:u.height,f=c.scrollHeight<=h;return h===c.scrollHeight?e?l.preventDefault():void 0:f?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},BF=Sb,Sn="500ms",HF={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},WF={initial:{x:["30%","0%"],opacity:.8},enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn}},nf={drawer:e=>e==="left"?HF:WF,sheet:{initial:{opacity:.5,y:"25%",animationDuration:Sn,transformOrigin:"bottom"},enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.1,y:"50%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn}}},qF=so("z-floating border border-card-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"}}),U0={top:0,left:0,right:0,bottom:0},K0=e=>e*.6,UF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const u=e.parent.current,d=e.value.get()||u.getBoundingClientRect().width,h=e.position==="right"?-r.delta.x:r.delta.x,f=Math.abs(d+h);return e.value.set(f)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=window.outerHeight,c=K0(l);return s>=c?e.value.set(s):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}};return m.jsx(Je.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:U0,whileDrag:{cursor:"grabbing"},className:ke("absolute rounded-lg",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:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},qs={drawer:"right",sheet:"none",dialog:"none"},KF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??qs.drawer:qs[o]:t?qs[o]:qs.sheet},YF=[],rf=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:h=!0,forceType:f=!1,layoutId:b=void 0,overlayClassName:g="",type:p="dialog",position:v,overlayClickClose:y=!1,role:x="dialog",interactions:T=YF,...w},E)=>{const k=tf(e,"block-only"),C=S.useId(),M=S.useId(),_=zF("(min-width: 64rem)"),F=p!=="dialog",V=KF(_,f,p,v),H=_||f?nf[p]:nf.sheet,I=typeof H=="function"?H(V):H,O=_||f?p:"sheet",$=tr({open:e,onOpenChange:a}),D=Ko($.context,{}),P=xr($.context,{role:x}),j=br($.context,{escapeKey:!0,outsidePress:y}),N=nr([D,P,j].concat(T)),U=o,R=qa(void 0);S.useEffect(()=>{R.set(void 0)},[O]);const Z=()=>a(!1);S.useImperativeHandle(E,()=>({context:$.context,floating:k.current}),[$.context,k]);const G=(ee,B)=>{const q=$.refs.floating;if(q.current&&O==="sheet"){const Q=q.current.getBoundingClientRect(),z=R.get()||Q.height,ae=Math.abs(z-B.delta.y),le=K0(window.outerHeight);return ae<le?(Z(),setTimeout(()=>R.set(window.outerHeight),350)):R.set(ae)}},re={layoutId:b,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:I},te=d&&O==="sheet"?{...re,dragElastic:0,onDrag:G,dragConstraints:U0,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:O==="sheet",drag:O==="sheet"?"y":"x"}:re;return m.jsxs(S.Fragment,{children:[o?m.jsx(S.Fragment,{children:r?m.jsx(BF,{ref:$.refs.setReference,...N.getReferenceProps({layoutId:b}),children:U}):m.jsx(Je.button,{ref:$.refs.setReference,...N.getReferenceProps(),layoutId:b,type:"button",children:U})}):null,m.jsx(yr,{preserveTabOrder:!0,children:m.jsx(Xn,{propagate:!0,mode:"wait",initial:!1,children:e?m.jsx(Gd,{lockScroll:!0,className:ke("inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70",O==="drawer"?"":"flex items-start justify-center p-10",g),children:m.jsx(Qr,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:$.context,children:m.jsxs(Je.div,{...w,...te,...t?{"aria-labelledby":C,"aria-describedby":M}:{"aria-label":s},...N.getFloatingProps({"aria-modal":e,ref:Kn($.refs.setFloating,k),className:ke(qF({position:V,type:O}),l,"overscroll-contain")}),"data-component":"modal",style:O==="drawer"?{width:R}:{height:R},children:[t?m.jsx("header",{className:"relative w-full",children:t?m.jsx("h2",{id:C,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,m.jsx("section",{"data-component":"modal-body",className:ke("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?m.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,h?m.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:m.jsx("button",{type:"button",onClick:Z,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:m.jsx(Co,{})})}):null,F&&u?m.jsx(UF,{onChange:a,value:R,sheet:O==="sheet",position:V,parent:$.refs.floating}):null]})})}):null},C)})]})}),GF=e=>m.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:yc(e.item.title)?m.jsx(e.item.title,{text:e.text}):e.item.title}),ZF=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?m.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:m.jsx(GF,{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:ke("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 items-center gap-2",children:[o.Icon?o.Icon:null,m.jsx("span",{children:yc(o.title)?m.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?m.jsx($F,{value:o.shortcut}):null]})}),XF=(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:$e.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=$e.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=Jd(o,"title",n),a=r.filter(s=>$e.function(s.enabled)?s.enabled({text:t}):!1);return wn.unique(i.concat(a),s=>s.title)},QF=[0,0,0,0,0],JF=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=Et(),[o,i]=S.useState(""),a=ir(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=tr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Ro}),h=Bs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:y=>u(x=>$e.number(y)?y:e.open?x??0:null)}),{getItemProps:f}=nr([h]),b=e.commands.flatMap(y=>y.type==="group"?[y,...y.items]:[y]),g=XF(b,o),p=o===""?b:[{type:"group",title:"Results",items:[]},...g.filter(y=>y.type!=="group")];S.useEffect(()=>{const y=new NF;return y.add(t,()=>e.onChangeVisibility?.(!0)),b.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&y.add(x.shortcut,T=>x.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),y.register()},[t]);const v=e.Icon??hy;return m.jsx(S.Fragment,{children:m.jsxs(rf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[h],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[m.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[m.jsx("div",{className:"flex size-10 items-center justify-center",children:m.jsx(v,{Default:hy,text:o,size:16})}),m.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:y=>i(y.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:y=>{if((y.key==="ArrowDown"||y.key==="ArrowUp")&&c!==null&&n.current[c]?.scrollIntoView({block:"start",inline:"start"}),y.key==="Enter"){if(c!==null&&p[c]){y.preventDefault();const x=p[c],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}if(p.length===1){y.preventDefault();const x=p[0],T=y.currentTarget.value;if(x.type==="shortcut")return x.action({event:y,setOpen:e.onChangeVisibility,text:T})}}}})]}),e.loading?m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),QF.map((y,x)=>m.jsx("li",{className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:ef},`${s}-${x}-skeleton-index`))]}):m.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[m.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[p.map((y,x)=>S.createElement(ZF,{...f({onMouseEnter:()=>u(x),ref(T){n.current[x]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),d.refs.domReference.current?.focus(),y.type==="shortcut"&&y.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:y,text:o,active:c===x,key:`${s}-${y.type}-${x}`})),p.length===1?m.jsx("div",{className:ke("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&$e.number(c)?m.jsx(e.Preview,{command:p[c],text:o}):null]}),e.footer?m.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},Go=e=>{const t=S.useId(),[n,r]=S.useState(e.open),o=S.useRef(null),i=S.useMemo(()=>[Xi(10),Wd({fallbackAxisSideDirection:"end"}),Hd(),r0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=tr({open:n,middleware:i,transform:!0,whileElementsMounted:Ro,onOpenChange:(b,g)=>{const p=g?.relatedTarget;p&&p.dataset.floating==="true"&&!b||(r(b),e.onChange?.(b))}}),c=Ko(l),u=br(l),d=xr(l,{role:"tooltip"}),{getReferenceProps:h,getFloatingProps:f}=nr([c,u,d]);return m.jsxs(S.Fragment,{children:[m.jsx("button",{ref:a.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&m.jsx(yr,{preserveTabOrder:!0,id:`${t}-portal`,children:m.jsx(Qr,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:m.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[m.jsx(d0,{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-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},eL=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}=tr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ko(s,{enabled:e.disabled??!0}),u=xr(s,{role:"tooltip"}),d=br(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=nr([c,u,d]);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[m.jsx(ka,{...f(e),as:Je.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:m.jsx(Je.span,{layoutId:o,children:e.trigger})}),m.jsx(Xn,{children:i?m.jsx(yr,{root:t,children:m.jsx(Qr,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:m.jsx(Je.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Y0=200,tL=500,G0=(e="")=>ke("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),of=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Z0=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),[h,f]=S.useState(!1),[b,g]=S.useState(null),p=S.useRef([]),v=S.useRef([]),y=S.useContext(of),x=gr(),T=vr(),w=tF(),E=i0(),k=x!==null,{floatingStyles:C,refs:M,context:_}=tr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ro,placement:k?"right":"bottom-start",middleware:[Xi({mainAxis:k?0:4,alignmentAxis:k?-4:0}),Wd(),Hd()]}),F=xr(_,{role:"menu"}),V=br(_,{bubbles:!0}),H=g0(_,{move:!1,enabled:n,delay:{open:Y0},handleClose:$0({blockPointerEvents:!0,requireIntent:!1})}),I=Ko(_,{toggle:!k,event:"mousedown",ignoreMouse:k,keyboardHandlers:!0}),O=Bs(_,{loop:!0,activeIndex:b,nested:k,listRef:p,onNavigate:g}),$=CF(_,{activeIndex:b,listRef:v,resetMs:tL,onMatch:u?g:void 0}),{getReferenceProps:D,getFloatingProps:P,getItemProps:j}=nr([H,I,F,V,O,$]);S.useEffect(()=>{if(!T)return;const U=()=>d(!1),R=Z=>{Z.nodeId!==w&&Z.parentId===x&&d(!1)};return T.events.on("click",U),T.events.on("menuopen",R),()=>{T.events.off("click",U),T.events.off("menuopen",R)}},[T,w,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:w})},[T,u,w,x]);const N=o?l.className:ke(G0(l.className));return m.jsxs(nF,{id:w,children:[m.jsx(S.Fragment,{children:l.asChild?m.jsx(Sb,{...D(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:s,className:N,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Kn(M.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0}):m.jsxs("button",{type:"button",className:N,"data-open":u?"":void 0,"data-nested":k?"":void 0,role:k?"menuitem":void 0,"data-focus-inside":h?"":void 0,ref:Kn(M.setReference,E.ref,c),tabIndex:k?y.activeIndex===E.index?0:-1:void 0,...D(y.getItemProps({...l,onFocus(U){l.onFocus?.(U),f(!1),y.setHasFocusInside(!0)}})),children:[s,k&&m.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[m.jsx("span",{className:"sr-only",children:"Next menu"}),m.jsx(Fu,{size:14})]})]})}),m.jsx(of.Provider,{value:{activeIndex:b,setActiveIndex:g,getItemProps:j,setHasFocusInside:f,isOpen:u},children:m.jsx(G2,{elementsRef:p,labelsRef:v,children:u&&m.jsx(yr,{preserveTabOrder:!0,children:m.jsx(Qr,{context:_,modal:!1,initialFocus:k?-1:0,returnFocus:o?i:!k,children:m.jsx(t,{...P(),ref:M.setFloating,style:{...l.style,...C},className:ke("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})})})})})]})}),nL=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(of),s=i0({label:n?null:e}),l=vr(),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:Kn(s.ref,i),className:G0(`${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]})}),rL=S.forwardRef((e,t)=>gr()===null?m.jsx(rF,{children:m.jsx(Z0,{...e,isParent:!0,ref:t})}):m.jsx(Z0,{...e,isParent:!1,ref:t})),oL=e=>m.jsx(Je.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),af=S.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=od,...h},f){const[b,g]=S.useState(i??!1),p=S.useRef(null),v=t||"span",y=I=>{g(I),d?.(I)},{refs:x,floatingStyles:T,context:w}=tr({open:b,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Ro,onOpenChange:i?void 0:y,middleware:[Hd(),Xi(5),Wd({fallbackAxisSideDirection:"start"}),r0({padding:5,element:p})]}),E=g0(w,{move:!0,delay:{open:Y0},enabled:l?s:!1,handleClose:c?$0():null}),k=wF(w,{enabled:l?a:!1}),C=Ko(w,{enabled:l?c:!1}),M=br(w,{enabled:l}),_=xr(w,{role:"tooltip",enabled:l}),F=vF(w,{enabled:!!l&&!!u}),{getReferenceProps:V,getFloatingProps:H}=nr([_,M,F,a?k:void 0,s?E:void 0,c?C:void 0]);return S.useEffect(()=>g(i===void 0?!1:i),[i]),m.jsxs(S.Fragment,{children:[m.jsx(v,{...V(h),ref:Kn(x.setReference,f),children:n}),b&&m.jsx(yr,{preserveTabOrder:!0,children:m.jsxs(un,{...H(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[m.jsx(d0,{ref:p,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Us=0,wr=1,Zo=2,X0=4;function Q0(e){return()=>e}function iL(e){e()}function na(e,t){return n=>e(t(n))}function J0(e,t){return()=>e(t)}function aL(e,t){return n=>e(t,n)}function sf(e){return e!==void 0}function sL(...e){return()=>{e.map(iL)}}function Xo(){}function Ks(e,t){return t(e),e}function lL(e,t){return t(e)}function dt(...e){return e}function nt(e,t){return e(wr,t)}function Ve(e,t){e(Us,t)}function lf(e){e(Zo)}function Ft(e){return e(X0)}function ye(e,t){return nt(e,aL(t,Us))}function $n(e,t){const n=e(wr,r=>{n(),t(r)});return n}function ew(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function tw(e,t){return e===t}function ft(e=tw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function fe(e){return t=>na(t,e)}function jn(e){return t=>()=>{t(e)}}function oe(e,...t){const n=cL(...t);return(r,o)=>{switch(r){case Zo:lf(e);return;case wr:return nt(e,n(o))}}}function zn(e,t){return n=>r=>{n(t=e(t,r))}}function Qo(e){return t=>n=>{e>0?e--:t(n)}}function Sr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function je(...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);nt(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 cL(...e){return t=>e.reduceRight(lL,t)}function uL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case wr:return i?n===i?void 0:(r(),n=i,t=nt(e,i),t):(r(),Xo);case Zo:r(),n=null;return}}}function se(e){let t=e;const n=Be();return(r,o)=>{switch(r){case Us:t=o;break;case wr:{o(t);break}case X0:return t}return n(r,o)}}function Wt(e,t){return Ks(se(t),n=>ye(e,n))}function Be(){const e=[];return(t,n)=>{switch(t){case Us:e.slice().forEach(r=>{r(n)});return;case Zo:e.splice(0,e.length);return;case wr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function on(e){return Ks(Be(),t=>ye(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:dL(),singleton:n}}const dL=()=>Symbol();function fL(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 _t(...e){const t=Be(),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);nt(i,l=>{n[a]=l,r=r|s,r===o&&Ve(t,n)})}),function(i,a){switch(i){case Zo:{lf(t);return}case wr:return r===o&&a(n),nt(t,a)}}}function Ae(e,t=tw){return oe(e,ft(t))}function nw(...e){return function(t,n){switch(t){case Zo:return;case wr:return sL(...e.map(r=>nt(r,n)))}}}var Jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Jt||{});const pL={0:"debug",3:"error",1:"log",2:"warn"},hL=()=>typeof globalThis>"u"?window:globalThis,Tr=Ke(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=hL().VIRTUOSO_LOG_LEVEL)!=null?o:Ft(e);r>=i&&console[pL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Rn(e,t,n){return cf(e,t,n).callbackRef}function cf(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 rw(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=mL(u.children,t,s?"offsetWidth":"offsetHeight",o);let h=u.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const f=h.lastElementChild.dataset.viewportType==="window";let b;f&&(b=h.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:s?h.scrollLeft:h.scrollTop,p=a?s?a.scrollWidth:a.scrollHeight:f?s?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:s?h.scrollWidth:h.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?b.innerWidth:b.innerHeight:s?h.offsetWidth:h.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(g,0),viewportHeight:v}),i?.(s?ow("column-gap",getComputedStyle(u).columnGap,o):ow("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return cf(c,n,l)}function mL(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},Jt.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 ow(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function uf(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,h;if(t){const f=t.getBoundingClientRect(),b=c.top-f.top;h=f.height-Math.max(0,b),d=b+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;h=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:h,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=cf(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 Kt=Ke(()=>{const e=Be(),t=Be(),n=se(0),r=Be(),o=se(0),i=Be(),a=Be(),s=se(0),l=se(0),c=se(0),u=se(0),d=Be(),h=Be(),f=se(!1),b=se(!1),g=se(!1);return ye(oe(e,fe(({scrollTop:p})=>p)),t),ye(oe(e,fe(({scrollHeight:p})=>p)),a),ye(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:b,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),ra={lvl:0};function iw(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 it(e){return e===ra}function oa(e,t){if(!it(e))return t===e.k?e.v:t<e.k?oa(e.l,t):oa(e.r,t)}function Tn(e,t,n="k"){if(it(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Tn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Tn(e.l,t,n)}function an(e,t,n){return it(e)?lw(t,n,1):t===e.k?Ot(e,{k:t,v:n}):t<e.k?cw(Ot(e,{l:an(e.l,t,n)})):cw(Ot(e,{r:an(e.r,t,n)}))}function Jo(){return ra}function Ys(e,t,n){if(it(e))return[];const r=Tn(e,t)[0];return gL(ff(e,r,n))}function df(e,t){if(it(e))return ra;const{k:n,l:r,r:o}=e;if(t===n){if(it(r))return o;if(it(o))return r;{const[i,a]=sw(r);return Gs(Ot(e,{k:i,l:aw(r),v:a}))}}else return t<n?Gs(Ot(e,{l:df(r,t)})):Gs(Ot(e,{r:df(o,t)}))}function Jr(e){return it(e)?[]:[...Jr(e.l),{k:e.k,v:e.v},...Jr(e.r)]}function ff(e,t,n){if(it(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(ff(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ff(i,t,n))),s}function Gs(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(pf(t))return uw(Ot(e,{lvl:n-1}));if(!it(t)&&!it(t.r))return Ot(t.r,{l:Ot(t,{r:t.r.l}),lvl:n,r:Ot(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(pf(e))return hf(Ot(e,{lvl:n-1}));if(!it(r)&&!it(r.l)){const o=r.l,i=pf(o)?r.lvl-1:r.lvl;return Ot(o,{l:Ot(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:hf(Ot(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ot(e,t){return lw(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 aw(e){return it(e.r)?e.l:Gs(Ot(e,{r:aw(e.r)}))}function pf(e){return it(e)||e.lvl>e.r.lvl}function sw(e){return it(e.r)?[e.k,e.v]:sw(e.r)}function lw(e,t,n,r=ra,o=ra){return{k:e,l:r,lvl:n,r:o,v:t}}function cw(e){return hf(uw(e))}function uw(e){const{l:t}=e;return!it(t)&&t.lvl===e.lvl?Ot(t,{r:Ot(e,{l:t.r})}):e}function hf(e){const{lvl:t,r:n}=e;return!it(n)&&!it(n.r)&&n.lvl===t&&n.r.lvl===t?Ot(n,{l:Ot(e,{r:n.l}),lvl:t+1}):e}function gL(e){return iw(e,({k:t,v:n})=>({index:t,value:n}))}function dw(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ia(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const mf=Ke(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function fw(e,t,n){return e[Zs(e,t,n)]}function Zs(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 vL(e,t,n,r){const o=Zs(e,t,r),i=Zs(e,n,r,o);return e.slice(o,i+1)}function En(e,t){return Math.round(e.getBoundingClientRect()[t])}function Xs(e){return!it(e.groupOffsetTree)}function gf({index:e},t){return t===e?0:t<e?-1:1}function yL(){return{groupIndices:[],groupOffsetTree:Jo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Jo()}}function bL(e,t){let n=it(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),it(e)){e=an(e,0,i);continue}const s=Ys(e,a-1,o+1);if(s.some(CL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:h}of s)l?(o>=d||i===h)&&(e=df(e,d)):(c=h!==i,l=!0),u>o&&o>=d&&h!==i&&(e=an(e,o+1,h));c&&(e=an(e,a,i))}return[e,n]}function xL(e){return typeof e.groupIndex<"u"}function wL({offset:e},t){return t===e?0:t<e?-1:1}function aa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=fw(t,e,gf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function pw(e,t){if(!Xs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function hw(e,t,n){if(xL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=pw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function SL(e,t,n,r=0){return r>0&&(t=Math.max(t,fw(e,r,gf).offset)),iw(vL(e,t,n,wL),kL)}function TL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Jt.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&it(i)&&t.length===2){const h=t[0].size,f=t[1].size;a=n.reduce((b,g)=>an(an(b,g,h),g+1,f),a)}else[a,s]=bL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=vf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((h,f)=>an(h,f,aa(f,d,o)),Jo()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function EL(e){return Jr(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 mw(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 vf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Zs(o,t-1,gf),s=o[l].offset;const c=Tn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Tn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ys(n,t,1/0)){const d=c-i,h=d*a+s+d*r;o.push({index:c,offset:h,size:u}),i=c,s=h,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function kL(e){return{index:e.index,value:e}}function CL(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 AL={offsetHeight:"height",offsetWidth:"width"},Bn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Be(),r=Be(),o=Wt(r,0),i=Be(),a=Be(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,E)=>En(w,AL[E])),h=se(void 0),f=se(0),b=yL(),g=Wt(oe(n,je(l,e,f),zn(TL,b),ft()),b),p=Wt(oe(l,ft(),zn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),fe(({prev:w})=>w)),[]);ye(oe(l,Ce(w=>w.length>0),je(g,f),fe(([w,E,k])=>{const C=w.reduce((M,_,F)=>an(M,_,aa(_,E.offsetTree,k)||F),Jo());return{...E,groupIndices:w,groupOffsetTree:C}})),g),ye(oe(r,je(g),Ce(([w,{lastIndex:E}])=>w<E),fe(([w,{lastIndex:E,lastSize:k}])=>[{endIndex:E,size:k,startIndex:w}])),n),ye(c,u);const v=Wt(oe(c,fe(w=>w===void 0)),!0);ye(oe(u,Ce(w=>w!==void 0&&it(Ft(g).sizeTree)),fe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const y=on(oe(n,je(g),zn(({sizes:w},[E,k])=>({changed:k!==w,sizes:k}),{changed:!1,sizes:b}),fe(w=>w.changed)));nt(oe(s,zn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),fe(w=>w.diff)),w=>{const{groupIndices:E}=Ft(g);if(w>0)Ve(t,!0),Ve(i,w+mw(w,E));else if(w<0){const k=Ft(p);k.length>0&&(w-=mw(-w,k)),Ve(a,w)}}),nt(oe(s,je(e)),([w,E])=>{w<0&&E("`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},Jt.ERROR)});const x=on(i);ye(oe(i,je(g),fe(([w,E])=>{const k=E.groupIndices.length>0,C=[],M=E.lastSize;if(k){const _=oa(E.sizeTree,0);let F=0,V=0;for(;F<w;){const I=E.groupIndices[V],O=E.groupIndices.length===V+1?1/0:E.groupIndices[V+1]-I-1;C.push({endIndex:I,size:_,startIndex:I}),C.push({endIndex:I+1+O-1,size:M,startIndex:I+1}),V++,F+=O+1}const H=Jr(E.sizeTree);return F!==w&&H.shift(),H.reduce((I,{k:O,v:$})=>{let D=I.ranges;return I.prevSize!==0&&(D=[...I.ranges,{endIndex:O+w-1,size:I.prevSize,startIndex:I.prevIndex}]),{prevIndex:O+w,prevSize:$,ranges:D}},{prevIndex:w,prevSize:0,ranges:C}).ranges}return Jr(E.sizeTree).reduce((_,{k:F,v:V})=>({prevIndex:F+w,prevSize:V,ranges:[..._.ranges,{endIndex:F+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:M,ranges:[]}).ranges})),n);const T=on(oe(a,je(g,f),fe(([w,{offsetTree:E},k])=>{const C=-w;return aa(C,E,k)})));return ye(oe(a,je(g,f),fe(([w,E,k])=>{if(E.groupIndices.length>0){if(it(E.sizeTree))return E;let C=Jo();const M=Ft(p);let _=0,F=0,V=0;for(;_<-w;){V=M[F];const H=M[F+1]-V-1;F++,_+=H+1}if(C=Jr(E.sizeTree).reduce((H,{k:I,v:O})=>an(H,Math.max(0,I+w),O),C),_!==-w){const H=oa(E.sizeTree,V);C=an(C,0,H);const I=Tn(E.sizeTree,-w+1)[1];C=an(C,1,I)}return{...E,sizeTree:C,...vf(E.offsetTree,0,C,k)}}else{const C=Jr(E.sizeTree).reduce((M,{k:_,v:F})=>an(M,Math.max(0,_+w),F),Jo());return{...E,sizeTree:C,...vf(E.offsetTree,0,C,k)}}})),g),{beforeUnshiftWith:x,data:h,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(Tr,mf),{singleton:!0});function PL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const gw=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Be(),a=Be(),s=on(oe(i,fe(PL)));return ye(oe(s,fe(l=>l.totalCount)),n),ye(oe(s,fe(l=>l.groupIndices)),e),ye(oe(_t(o,t,r),Ce(([l,c])=>Xs(c)),fe(([l,c,u])=>Tn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ft(),fe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Bn,Kt)),Er=Ke(([{log:e}])=>{const t=se(!1),n=on(oe(t,Ce(r=>r),ft()));return nt(t,r=>{r&&Ft(e)("props updated",{},Jt.DEBUG)}),{didMount:n,propsReady:t}},dt(Tr),{singleton:!0}),IL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!IL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const sa=Ke(([{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:h}])=>{const f=Be(),b=Be(),g=se(0);let p=null,v=null,y=null;function x(){p&&(p(),p=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Ve(l,!1)}return ye(oe(f,je(n,d,r,g,s,a,h),je(e,i,o),fe(([[T,w,E,k,C,M,_,F],V,H,I])=>{const O=vw(T),{align:$,behavior:D,offset:P}=O,j=k-1,N=hw(O,w,j);let U=aa(N,w.offsetTree,V)+M;$==="end"?(U+=H+Tn(w.sizeTree,N)[1]-E+I,N===j&&(U+=_)):$==="center"?U+=(H+Tn(w.sizeTree,N)[1]-E+I)/2:U-=C,P&&(U+=P);const R=Z=>{x(),Z?(F("retrying to scroll to",{location:T},Jt.DEBUG),Ve(f,T)):(Ve(b,!0),F("list did not change, scroll successful",{},Jt.DEBUG))};if(x(),D==="smooth"){let Z=!1;y=nt(t,G=>{Z=Z||G}),p=$n(u,()=>{R(Z)})}else p=$n(oe(t,_L(150)),R);return v=setTimeout(()=>{x()},1200),Ve(l,!0),F("scrolling from index to",{behavior:D,index:N,top:U},Jt.DEBUG),{behavior:D,top:U}})),c),{scrollTargetReached:b,scrollToIndex:f,topListHeight:g}},dt(Bn,Kt,Tr),{singleton:!0});function _L(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function yf(e,t){e==0?t():requestAnimationFrame(()=>{yf(e-1,t)})}function bf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const la=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return ye(oe(a,je(l),Ce(([u,d])=>!!d),jn(!1)),s),ye(oe(a,je(l),Ce(([u,d])=>!!d),jn(!1)),c),nt(oe(_t(t,a),je(s,n,e,c),Ce(([[,u],d,{sizeTree:h},f,b])=>u&&(!it(h)||sf(f))&&!d&&!b),je(l)),([,u])=>{$n(o,()=>{Ve(c,!0)}),yf(4,()=>{$n(r,()=>{Ve(s,!0)}),Ve(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Bn,Kt,sa,Er),{singleton:!0});function yw(e,t){return Math.abs(e-t)<1.01}const ca="up",ua="down",OL="none",ML={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},DL=0,da=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=Be(),c=Be(),u=se(4),d=se(DL),h=Wt(oe(nw(oe(Ae(o),Qo(1),jn(!0)),oe(Ae(o),Qo(1),jn(!1),ew(100))),ft()),!1),f=Wt(oe(nw(oe(n,jn(!0)),oe(n,jn(!1),ew(200))),ft()),!1);ye(oe(_t(Ae(o),Ae(d)),fe(([y,x])=>y<=x),ft()),s),ye(oe(s,Sr(50)),c);const b=on(oe(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),zn((y,[{scrollHeight:x,scrollTop:T},w,E,k,C])=>{const M=T+w-x>-C,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(M){let V,H;return T>y.state.scrollTop?(V="SCROLLED_DOWN",H=y.state.scrollTop-T):(V="SIZE_DECREASED",H=y.state.scrollTop-T||y.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:H,state:_}}let F;return _.scrollHeight>y.state.scrollHeight?F="SIZE_INCREASED":w<y.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":T<y.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},ML),ft((y,x)=>y&&y.atBottom===x.atBottom))),g=Wt(oe(r,zn((y,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(yw(y.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const E=x-(T+w)<1;return y.scrollTop!==T&&E?{changed:!0,jump:y.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(y=>y.changed),fe(y=>y.jump)),0);ye(oe(b,fe(y=>y.atBottom)),a),ye(oe(a,Sr(50)),l);const p=se(ua);ye(oe(r,fe(({scrollTop:y})=>y),ft(),zn((y,x)=>Ft(f)?{direction:y.direction,prevScrollTop:x}:{direction:x<y.prevScrollTop?ca:ua,prevScrollTop:x},{direction:ua,prevScrollTop:0}),fe(y=>y.direction)),p),ye(oe(r,Sr(50),jn(OL)),p);const v=se(0);return ye(oe(h,Ce(y=>!y),jn(0)),v),ye(oe(o,Sr(100),je(h),Ce(([y,x])=>!!x),zn(([y,x],[T])=>[x,T],[0,0]),fe(([y,x])=>x-y)),v),{atBottomState:b,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:g,scrollDirection:p,scrollVelocity:v}},dt(Kt)),Qs="top",Js="bottom",bw="none";function xw(e,t,n){return typeof e=="number"?n===ca&&t===Qs||n===ua&&t===Js?e:0:n===ca?t===Qs?e.main:e.reverse:t===Js?e.main:e.reverse}function ww(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const xf=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Be(),a=se(0),s=se(0),l=se(0),c=Wt(oe(_t(Ae(r),Ae(o),Ae(n),Ae(i,ia),Ae(l),Ae(a),Ae(t),Ae(e),Ae(s)),fe(([u,d,h,[f,b],g,p,v,y,x])=>{const T=u-y,w=p+v,E=Math.max(h-T,0);let k=bw;const C=ww(x,Qs),M=ww(x,Js);return f-=y,f+=h+v,b+=h+v,b-=y,f>u+w-C&&(k=ca),b<u-E+d+M&&(k=ua),k!==bw?[Math.max(T-h-xw(g,Qs,k)-C,0),T-E-v+d+xw(g,Js,k)+M]:null}),Ce(u=>u!=null),ft(ia)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Kt),{singleton:!0});function NL(e,t,n){if(Xs(t)){const r=pw(e,t);return[{index:Tn(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 wf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function el(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,h=s+d*l+(d-1)*r,f=c,b=h-u;return{bottom:u,firstItemIndex:i,items:Tw(e,o,i),offsetBottom:b,offsetTop:c,top:f,topItems:Tw(t,o,i),topListHeight:t.reduce((g,p)=>p.size+g,0),totalCount:n}}function Sw(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=bf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return el(c,[],s,o,n,r)}function Tw(e,t,n){if(e.length===0)return[];if(!Xs(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=Ys(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}const eo=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:b}])=>{const g=se([]),p=se(0),v=Be();ye(i.topItemsIndexes,g);const y=Wt(oe(_t(f,b,Ae(l,ia),Ae(o),Ae(r),Ae(c),u,Ae(g),Ae(t),Ae(n),e),Ce(([E,k,,C,,,,,,,M])=>{const _=M&&M.length!==C;return E&&!k&&!_}),fe(([,,[E,k],C,M,_,F,V,H,I,O])=>{const $=M,{offsetTree:D,sizeTree:P}=$,j=Ft(p);if(C===0)return{...wf,totalCount:C};if(E===0&&k===0)return j===0?{...wf,totalCount:C}:Sw(j,_,M,H,I,O||[]);if(it(P))return j>0?null:el(NL(bf(_,C),$,O),[],C,I,$,H);const N=[];if(V.length>0){const re=V[0],te=V[V.length-1];let ee=0;for(const B of Ys(P,re,te)){const q=B.value,X=Math.max(B.start,re),Q=Math.min(B.end,te);for(let z=X;z<=Q;z++)N.push({data:O?.[z],index:z,offset:ee,size:q}),ee+=q}}if(!F)return el([],N,C,I,$,H);const U=V.length>0?V[V.length-1]+1:0,R=SL(D,E,k,U);if(R.length===0)return null;const Z=C-1,G=Ks([],re=>{for(const te of R){const ee=te.value;let B=ee.offset,q=te.start;const X=ee.size;if(ee.offset<E){q+=Math.floor((E-ee.offset+I)/(X+I));const z=q-te.start;B+=z*X+z*I}q<U&&(B+=(U-q)*X,q=U);const Q=Math.min(te.end,Z);for(let z=q;z<=Q&&!(B>=k);z++)re.push({data:O?.[z],index:z,offset:B,size:X}),B+=X+I}});return el(G,N,C,I,$,H)}),Ce(E=>E!==null),ft()),wf);ye(oe(e,Ce(sf),fe(E=>E?.length)),o),ye(oe(y,fe(E=>E.topListHeight)),d),ye(d,s),ye(oe(y,fe(E=>[E.top,E.bottom])),a),ye(oe(y,fe(E=>E.items)),v);const x=on(oe(y,Ce(({items:E})=>E.length>0),je(o,e),Ce(([{items:E},k])=>E[E.length-1].originalIndex===k-1),fe(([,E,k])=>[E-1,k]),ft(ia),fe(([E])=>E))),T=on(oe(y,Sr(200),Ce(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),fe(({items:E})=>E[0].index),ft())),w=on(oe(y,Ce(({items:E})=>E.length>0),fe(({items:E})=>{let k=0,C=E.length-1;for(;E[k].type==="group"&&k<C;)k++;for(;E[C].type==="group"&&C>k;)C--;return{endIndex:E[C].index,startIndex:E[k].index}}),ft(dw)));return{endReached:x,initialItemCount:p,itemsRendered:v,listState:y,rangeChanged:w,startReached:T,topItemsIndexes:g,...h}},dt(Bn,gw,xf,la,sa,da,Er,mf),{singleton:!0}),Ew=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Be(),a=Wt(oe(_t(n,e,r,t,o),fe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return ye(Ae(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Kt,eo),{singleton:!0}),FL=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Wt(oe(_t(n,e,t),Ce(([o])=>o),fe(([,o,i])=>Math.max(0,o-i)),Sr(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Kt,Ew),{singleton:!0});function kw(e){return e?e==="smooth"?"smooth":"auto":!1}const LL=(e,t)=>typeof e=="function"?kw(e(t)):t&&kw(e),VL=Ke(([{listRefresh:e,totalCount:t,fixedItemSize:n},{atBottomState:r,isAtBottom:o},{scrollToIndex:i},{scrolledToInitialItem:a},{didMount:s,propsReady:l},{log:c},{scrollingInProgress:u}])=>{const d=se(!1),h=Be();let f=null;function b(p){Ve(i,{align:"end",behavior:p,index:"LAST"})}nt(oe(_t(oe(Ae(t),Qo(1)),s),je(Ae(d),o,a,u),fe(([[p,v],y,x,T,w])=>{let E=v&&T,k="auto";return E&&(k=LL(y,x||w),E=E&&!!k),{followOutputBehavior:k,shouldFollow:E,totalCount:p}}),Ce(({shouldFollow:p})=>p)),({followOutputBehavior:p,totalCount:v})=>{f&&(f(),f=null),Ft(n)?requestAnimationFrame(()=>{Ft(c)("following output to ",{totalCount:v},Jt.DEBUG),b(p)}):f=$n(e,()=>{Ft(c)("following output to ",{totalCount:v},Jt.DEBUG),b(p),f=null})});function g(p){const v=$n(r,y=>{p&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Ft(c)("scrolling to bottom due to increased size",{},Jt.DEBUG),b("auto"))});setTimeout(v,100)}return nt(oe(_t(Ae(d),t,l),Ce(([p,,v])=>p&&v),zn(({value:p},[,v])=>({refreshed:p===v,value:v}),{refreshed:!1,value:0}),Ce(({refreshed:p})=>p),je(d,t)),([,p])=>{Ft(a)&&g(p!==!1)}),nt(h,()=>{g(Ft(d)!==!1)}),nt(_t(Ae(d),r),([p,v])=>{p&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")}),{autoscrollToBottom:h,followOutput:d}},dt(Bn,da,sa,la,Er,Tr,Kt)),$L=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(ye(oe(s,je(i),Ce(([,l])=>l!==0),je(o,r,t,n,e),fe(([[,l],c,u,d,h,f=[]])=>Sw(l,c,u,d,h,f))),a),{}),dt(Bn,la,eo,Er),{singleton:!0}),jL=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return nt(oe(e,je(r),Ce(([,o])=>o!==0),fe(([,o])=>({top:o}))),o=>{$n(oe(n,Qo(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ve(t,o)})})}),{initialScrollTop:r}},dt(Er,Kt,eo),{singleton:!0}),zL=({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,RL=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Be();return ye(oe(u,je(t,l,n,i,o,r,s),je(e),fe(([[d,h,f,b,g,p,v,y],x])=>{const{align:T,behavior:w,calculateViewLocation:E=zL,done:k,...C}=d,M=hw(d,h,b-1),_=aa(M,h.offsetTree,x)+g+p,F=_+Tn(h.sizeTree,M)[1],V=y+p,H=y+f-v,I=E({itemBottom:F,itemTop:_,locationParams:{align:T,behavior:w,...C},viewportBottom:H,viewportTop:V});return I?k&&$n(oe(a,Ce(O=>!O),Qo(Ft(a)?1:2)),k):k&&k(),I}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(Bn,Kt,sa,eo,Tr),{singleton:!0}),Cw=Ke(([{scrollVelocity:e}])=>{const t=se(!1),n=Be(),r=se(!1);return ye(oe(e,je(r,t,n),Ce(([o,i])=>!!i),fe(([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}),ft()),t),nt(oe(_t(t,e,n),je(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(da),{singleton:!0}),Sf=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Be(),r=Be(),o=Be(),i=se(!1),a=se(void 0);return ye(oe(_t(n,r),fe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),ye(oe(t,je(r),fe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Kt)),BL=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Be(),u=se(void 0),d=se(null),h=se(null);return ye(s,d),ye(l,h),nt(oe(c,je(t,r,a,d,h,n)),([f,b,g,p,v,y,x])=>{const T=EL(b.sizeTree);p&&v!==null&&y!==null&&(g=v.scrollTop-y.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),ye(oe(u,Ce(sf),fe(HL)),o),ye(oe(i,je(u),Ce(([,f])=>f!==void 0),ft(),fe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Bn,Kt,la,Er,Sf));function HL(e){return{align:"start",index:0,offset:e.scrollTop}}const WL=Ke(([{topItemsIndexes:e}])=>{const t=se(0);return ye(oe(t,Ce(n=>n>=0),fe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(eo));function Aw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const qL=Aw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UL=Ke(([{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:h},{log:f},{recalcInProgress:b}])=>{const g=on(oe(l,je(a),zn(([,v,y,x],[{bottom:T,items:w,offsetBottom:E,totalCount:k},C])=>{const M=T+E;let _=0;return y===k&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(_=M-x,_!==0&&(_+=C))),[_,w,k,M]},[0,[],0,0]),Ce(([v])=>v!==0),je(r,s,n,o,f,b),Ce(([,v,y,x,,,T])=>!T&&!x&&v!==0&&y===ca),fe(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Jt.DEBUG),v))));function p(v){v>0?(Ve(t,{behavior:"auto",top:-v}),Ve(e,0)):(Ve(e,0),Ve(t,{behavior:"auto",top:-v}))}return nt(oe(g,je(e,i)),([v,y,x])=>{x&&qL()?Ve(e,y-v):p(-v)}),nt(oe(_t(Wt(i,!1),e,b),Ce(([v,y,x])=>!v&&!x&&y!==0),fe(([v,y])=>y),Sr(1)),p),ye(oe(d,fe(v=>({top:-v}))),t),nt(oe(c,je(h,u),fe(([v,{groupIndices:y,lastSize:x,sizeTree:T},w])=>{function E(k){return k*(x+w)}if(y.length===0)return E(v);{let k=0;const C=oa(T,0);let M=0,_=0;for(;M<v;){M++,k+=C;let F=y.length===_+1?1/0:y[_+1]-y[_]-1;M+F>v&&(k-=C,F=v-M+1),M+=F,k+=E(F),_++}return k}})),v=>{Ve(e,v),requestAnimationFrame(()=>{Ve(t,{top:v}),requestAnimationFrame(()=>{Ve(e,0),Ve(b,!1)})})}),{deviation:e}},dt(Kt,da,eo,Bn,Tr,mf)),KL=Ke(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),dt(xf,$L,Er,Cw,Ew,jL,FL,Sf,RL,Tr)),Pw=Ke(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:h,initialTopMostItemIndex:f,scrolledToInitialItem:b},g,p,v,{listState:y,topItemsIndexes:x,...T},{scrollToIndex:w},E,{topItemCount:k},{groupCounts:C},M])=>(ye(T.rangeChanged,M.scrollSeekRangeChanged),ye(oe(M.windowViewportRect,fe(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:C,initialItemFinalLocationReached:h,initialTopMostItemIndex:f,scrolledToInitialItem:b,sizeRanges:s,topItemCount:k,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...T,...M,...g,sizes:l,...p}),dt(Bn,la,Kt,BL,VL,eo,sa,UL,WL,gw,KL));function YL(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 tl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Tf(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(p,v){p.propsReady&&Ve(p.propsReady,!1);for(const y of r){const x=p[t.required[y]];Ve(x,v[y])}for(const y of o)if(y in v){const x=p[t.optional[y]];Ve(x,v[y])}p.propsReady&&Ve(p.propsReady,!0)}function c(p){return i.reduce((v,y)=>(v[y]=x=>{const T=p[t.methods[y]];Ve(T,x)},v),{})}function u(p){return a.reduce((v,y)=>(v[y]=uL(p[t.events[y]]),v),{})}const d=S.forwardRef((p,v)=>{const{children:y,...x}=p,[T]=S.useState(()=>Ks(fL(e),k=>{l(k,x)})),[w]=S.useState(J0(u,T));tl(()=>{for(const k of a)k in x&&nt(w[k],x[k]);return()=>{Object.values(w).map(lf)}},[x,w,T]),tl(()=>{l(T,x)}),S.useImperativeHandle(v,Q0(c(T)));const E=n;return m.jsx(s.Provider,{value:T,children:n?m.jsx(E,{...YL([...r,...o,...a],x),children:y}):y})}),h=p=>{const v=S.useContext(s);return S.useCallback(y=>{Ve(v[p],y)},[v,p])},f=p=>{const v=S.useContext(s)[p],y=S.useCallback(x=>nt(v,x),[v]);return S.useSyncExternalStore(y,()=>Ft(v),()=>Ft(v))},b=p=>{const v=S.useContext(s)[p],[y,x]=S.useState(J0(Ft,v));return tl(()=>nt(v,T=>{T!==y&&x(Q0(T))}),[v,y]),y},g=S.version.startsWith("18")?f:b;return{Component:d,useEmitter:(p,v)=>{const y=S.useContext(s)[p];tl(()=>nt(y,v),[v,y])},useEmitterValue:g,usePublisher:h}}const nl=S.createContext(void 0),Iw=S.createContext(void 0),_w=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Ef(e){return"self"in e}function GL(e){return"body"in e}function Ow(e,t,n,r=Xo,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(h=>{let f,b,g;const p=h.target;if(GL(p)||Ef(p)){const y=Ef(p)?p:p.defaultView;g=i?y.scrollX:y.scrollY,f=i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,b=i?y.innerWidth:y.innerHeight}else g=i?p.scrollLeft:p.scrollTop,f=i?p.scrollWidth:p.scrollHeight,b=i?p.offsetWidth:p.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:b})};h.suppressFlushSync?v():ao.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-b)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const h=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",c,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(h){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const b=h.behavior==="smooth";let g,p,v;Ef(f)?(p=Math.max(En(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(p=f[i?"scrollWidth":"scrollHeight"],g=En(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const y=p-g;if(h.top=Math.ceil(Math.max(Math.min(y,h.top),0)),yw(g,p)||h.top===v){e({scrollHeight:p,scrollTop:v,viewportHeight:g}),b&&t(!0);return}b?(s.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(h={behavior:h.behavior,left:h.top}),f.scrollTo(h)}function d(h){i&&(h={behavior:h.behavior,left:h.top}),a.current.scrollBy(h)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const kf="-webkit-sticky",Mw="sticky",Cf=Aw(()=>{if(typeof document>"u")return Mw;const e=document.createElement("div");return e.style.position=kf,e.style.position===kf?kf:Mw});function Af(e){return e}const ZL=Ke(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(Af),i=se("div"),a=se(Xo),s=(l,c=null)=>Wt(oe(r,fe(u=>u[l]),ft()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),XL=Ke(([e,t])=>({...e,...t}),dt(Pw,ZL)),QL=({height:e})=>m.jsx("div",{style:{height:e}}),JL={overflowAnchor:"none",position:Cf(),zIndex:1},Dw={overflowAnchor:"none"},eV={...Dw,display:"inline-block",height:"100%"},Nw=S.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=gn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=gn("windowScrollContainerState"),a=gn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),h=Ie("itemSize"),f=Ie("log"),b=gn("gap"),g=Ie("horizontalDirection"),{callbackRef:p}=rw(n,h,d,e?Xo:s,f,b,o,g,Ie("skipAnimationFrameInResizeObserver")),[v,y]=S.useState(0);_f("deviation",I=>{v!==I&&y(I)});const x=Ie("EmptyPlaceholder"),T=Ie("ScrollSeekPlaceholder")||QL,w=Ie("ListComponent"),E=Ie("ItemComponent"),k=Ie("GroupComponent"),C=Ie("computeItemKey"),M=Ie("isSeeking"),_=Ie("groupIndices").length>0,F=Ie("alignToBottom"),V=Ie("initialItemFinalLocationReached"),H=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?m.jsx(x,{...lt(x,c)}):m.jsx(w,{...lt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:p,style:H,children:(e?t.topItems:t.items).map(I=>{const O=I.originalIndex,$=C(O+t.firstItemIndex,I.data,c);return M?S.createElement(T,{...lt(T,c),height:I.size,index:I.index,key:$,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?S.createElement(k,{...lt(k,c),"data-index":O,"data-item-index":I.index,"data-known-size":I.size,key:$,style:JL},u(I.index,c)):S.createElement(E,{...lt(E,c),...Fw(E,I.data),"data-index":O,"data-item-group-index":I.groupIndex,"data-item-index":I.index,"data-known-size":I.size,key:$,style:g?eV:Dw},_?l(I.index,I.groupIndex,I.data,c):l(I.index,I.data,c))})})}),tV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},nV={outline:"none",overflowX:"auto",position:"relative"},ei=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),rV={position:Cf(),top:0,width:"100%",zIndex:1};function lt(e,t){if(typeof e!="string")return{context:t}}function Fw(e,t){return{item:typeof e=="string"?void 0:t}}const oV=S.memo(function(){const e=Ie("HeaderComponent"),t=gn("headerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),iV=S.memo(function(){const e=Ie("FooterComponent"),t=gn("footerHeight"),n=Ie("HeaderFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null});function Pf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:f,scrollToCallback:b}=Ow(a,l,s,c,void 0,d);return e("scrollTo",b),e("scrollBy",h),m.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?nV:tV,...o},tabIndex:0,...i,...lt(s,u),children:r})})}function If({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),h=t("context"),f=S.useRef(null),b=t("scrollerRef"),{scrollByCallback:g,scrollerRef:p,scrollToCallback:v}=Ow(a,l,s,b,d);return _w(()=>{var y;return p.current=d||((y=f.current)==null?void 0:y.ownerDocument.defaultView),()=>{p.current=null}},[p,d]),e("windowScrollTo",v),e("scrollBy",g),m.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...lt(s,h),children:r})})}const aV=({children:e})=>{const t=S.useContext(nl),n=gn("viewportHeight"),r=gn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=S.useMemo(()=>na(n,l=>En(l,i?"width":"height")),[n,i]),s=Rn(a,!0,Ie("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:s,style:ei(o),children:e})},sV=({children:e})=>{const t=S.useContext(nl),n=gn("windowViewportRect"),r=gn("fixedItemHeight"),o=Ie("customScrollParent"),i=uf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("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:ei(a),children:e})},lV=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...rV,marginTop:`${n}px`},o=Ie("context");return m.jsx(t,{style:r,...lt(t,o),children:e})},cV=S.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?fV:dV,a=r||t?sV:aV;return m.jsxs(i,{...e,...lt(i,o),children:[n&&m.jsx(lV,{children:m.jsx(Nw,{showTopList:!0})}),m.jsxs(a,{children:[m.jsx(oV,{}),m.jsx(Nw,{}),m.jsx(iV,{})]})]})}),{Component:uV,useEmitter:_f,useEmitterValue:Ie,usePublisher:gn}=Tf(XL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",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"}},cV),dV=Pf({useEmitter:_f,useEmitterValue:Ie,usePublisher:gn}),fV=If({useEmitter:_f,useEmitterValue:Ie,usePublisher:gn}),Of=uV,pV=Ke(()=>{const e=se(c=>m.jsxs("td",{children:["Item $",c]})),t=se(null),n=se(c=>m.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=se(null),o=se(null),i=se({}),a=se(Af),s=se(Xo),l=(c,u=null)=>Wt(oe(i,fe(d=>d[c]),ft()),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")}}),hV=Ke(([e,t])=>({...e,...t}),dt(Pw,pV)),mV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{height:e}})}),gV=({height:e})=>m.jsx("tr",{children:m.jsx("td",{style:{border:0,height:e,padding:0}})}),vV={overflowAnchor:"none"},Lw={position:Cf(),zIndex:2,overflowAnchor:"none"},Vw=S.memo(function({showTopList:e=!1}){const t=De("listState"),n=De("computeItemKey"),r=De("firstItemIndex"),o=De("context"),i=De("isSeeking"),a=De("fixedHeaderHeight"),s=De("groupIndices").length>0,l=De("itemContent"),c=De("groupContent"),u=De("ScrollSeekPlaceholder")||mV,d=De("GroupComponent"),h=De("TableRowComponent"),f=(e?t.topItems:[]).reduce((g,p,v)=>(v===0?g.push(p.size):g.push(g[v-1]+p.size),g),[]),b=(e?t.topItems:t.items).map(g=>{const p=g.originalIndex,v=n(p+r,g.data,o),y=e?p===0?0:f[p-1]:0;return i?S.createElement(u,{...lt(u,o),height:g.size,index:g.index,key:v,type:g.type||"item"}):g.type==="group"?S.createElement(d,{...lt(d,o),"data-index":p,"data-item-index":g.index,"data-known-size":g.size,key:v,style:{...Lw,top:a}},c(g.index,o)):S.createElement(h,{...lt(h,o),...Fw(h,g.data),"data-index":p,"data-item-index":g.index,"data-known-size":g.size,"data-item-group-index":g.groupIndex,key:v,style:e?{...Lw,top:a+y}:vV},s?l(g.index,g.groupIndex,g.data,o):l(g.index,g.data,o))});return m.jsx(m.Fragment,{children:b})}),yV=S.memo(function(){const e=De("listState"),t=De("topItemsIndexes").length>0,n=kn("sizeRanges"),r=De("useWindowScroll"),o=De("customScrollParent"),i=kn("windowScrollContainerState"),a=kn("scrollContainerState"),s=o||r?i:a,l=De("trackItemSizes"),c=De("itemSize"),u=De("log"),{callbackRef:d,ref:h}=rw(n,c,l,s,u,void 0,o,!1,De("skipAnimationFrameInResizeObserver")),[f,b]=S.useState(0);Mf("deviation",_=>{f!==_&&(h.current.style.marginTop=`${_}px`,b(_))});const g=De("EmptyPlaceholder"),p=De("FillerRow")||gV,v=De("TableBodyComponent"),y=De("paddingTopAddition"),x=De("statefulTotalCount"),T=De("context");if(x===0&&g)return m.jsx(g,{...lt(g,T)});const w=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),E=e.offsetTop+y+f-w,k=e.offsetBottom,C=E>0?m.jsx(p,{context:T,height:E},"padding-top"):null,M=k>0?m.jsx(p,{context:T,height:k},"padding-bottom"):null;return m.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...lt(v,T),children:[C,t&&m.jsx(Vw,{showTopList:!0}),m.jsx(Vw,{}),M]})}),bV=({children:e})=>{const t=S.useContext(nl),n=kn("viewportHeight"),r=kn("fixedItemHeight"),o=Rn(S.useMemo(()=>na(n,i=>En(i,"height")),[n]),!0,De("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),m.jsx("div",{"data-viewport-type":"element",ref:o,style:ei(!1),children:e})},xV=({children:e})=>{const t=S.useContext(nl),n=kn("windowViewportRect"),r=kn("fixedItemHeight"),o=De("customScrollParent"),i=uf(n,o,De("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:ei(!1),children:e})},wV=S.memo(function(e){const t=De("useWindowScroll"),n=De("customScrollParent"),r=kn("fixedHeaderHeight"),o=kn("fixedFooterHeight"),i=De("fixedHeaderContent"),a=De("fixedFooterContent"),s=De("context"),l=Rn(S.useMemo(()=>na(r,v=>En(v,"height")),[r]),!0,De("skipAnimationFrameInResizeObserver")),c=Rn(S.useMemo(()=>na(o,v=>En(v,"height")),[o]),!0,De("skipAnimationFrameInResizeObserver")),u=n||t?EV:TV,d=n||t?xV:bV,h=De("TableComponent"),f=De("TableHeadComponent"),b=De("TableFooterComponent"),g=i?m.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...lt(f,s),children:i()},"TableHead"):null,p=a?m.jsx(b,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...lt(b,s),children:a()},"TableFoot"):null;return m.jsx(u,{...e,...lt(u,s),children:m.jsx(d,{children:m.jsxs(h,{style:{borderSpacing:0,overflowAnchor:"none"},...lt(h,s),children:[g,m.jsx(yV,{},"TableBody"),p]})})})}),{Component:SV,useEmitter:Mf,useEmitterValue:De,usePublisher:kn}=Tf(hV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",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"}},wV),TV=Pf({useEmitter:Mf,useEmitterValue:De,usePublisher:kn}),EV=If({useEmitter:Mf,useEmitterValue:De,usePublisher:kn}),kV=SV,$w={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},CV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:jw,floor:rl,max:fa,min:Df,round:zw}=Math;function Rw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function AV(e){return{...CV,items:e}}function ol(e,t){return e&&e.width===t.width&&e.height===t.height}function PV(e,t){return e&&e.column===t.column&&e.row===t.row}const IV=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},h,f,{didMount:b,propsReady:g},{customScrollParent:p,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T},w])=>{const E=se(0),k=se(0),C=se($w),M=se({height:0,width:0}),_=se({height:0,width:0}),F=Be(),V=Be(),H=se(0),I=se(null),O=se({column:0,row:0}),$=Be(),D=Be(),P=se(!1),j=se(0),N=se(!0),U=se(!1),R=se(!1);nt(oe(b,je(j),Ce(([B,q])=>!!q)),()=>{Ve(N,!1)}),nt(oe(_t(b,N,_,M,j,U),Ce(([B,q,X,Q,,z])=>B&&!q&&X.height!==0&&Q.height!==0&&!z)),([,,,,B])=>{Ve(U,!0),yf(1,()=>{Ve(F,B)}),$n(oe(c),()=>{Ve(t,[0,0]),Ve(N,!0)})}),ye(oe(D,Ce(B=>B!=null&&B.scrollTop>0),jn(0)),k),nt(oe(b,je(D),Ce(([,B])=>B!=null)),([,B])=>{B&&(Ve(M,B.viewport),Ve(_,B.item),Ve(O,B.gap),B.scrollTop>0&&(Ve(P,!0),$n(oe(c,Qo(1)),q=>{Ve(P,!1)}),Ve(l,{top:B.scrollTop})))}),ye(oe(M,fe(({height:B})=>B)),d),ye(oe(_t(Ae(M,ol),Ae(_,ol),Ae(O,(B,q)=>B&&B.column===q.column&&B.row===q.row),Ae(c)),fe(([B,q,X,Q])=>({gap:X,item:q,scrollTop:Q,viewport:B}))),$),ye(oe(_t(Ae(E),r,Ae(O,PV),Ae(_,ol),Ae(M,ol),Ae(I),Ae(k),Ae(P),Ae(N),Ae(j)),Ce(([,,,,,,,B])=>!B),fe(([B,[q,X],Q,z,ae,le,be,,we,Se])=>{const{column:Pe,row:Te}=Q,{height:ve,width:Re}=z,{width:de}=ae;if(be===0&&(B===0||de===0))return $w;if(Re===0){const xt=bf(Se,B),Yt=xt+Math.max(be-1,0);return AV(Rw(xt,Yt,le))}const Y=Bw(de,Re,Pe);let L,J;we?q===0&&X===0&&be>0?(L=0,J=be-1):(L=Y*rl((q+Te)/(ve+Te)),J=Y*jw((X+Te)/(ve+Te))-1,J=Df(B-1,fa(J,Y-1)),L=Df(J,fa(0,L))):(L=0,J=-1);const ce=Rw(L,J,le),{bottom:xe,top:Ne}=Hw(ae,Q,z,ce),Ye=jw(B/Y),Lt=Ye*ve+(Ye-1)*Te-xe;return{bottom:xe,itemHeight:ve,items:ce,itemWidth:Re,offsetBottom:Lt,offsetTop:Ne,top:Ne}})),C),ye(oe(I,Ce(B=>B!==null),fe(B=>B.length)),E),ye(oe(_t(M,_,C,O),Ce(([B,q,{items:X}])=>X.length>0&&q.height!==0&&B.height!==0),fe(([B,q,{items:X},Q])=>{const{bottom:z,top:ae}=Hw(B,Q,q,X);return[ae,z]}),ft(ia)),t);const Z=se(!1);ye(oe(c,je(Z),fe(([B,q])=>q||B!==0)),Z);const G=on(oe(_t(C,E),Ce(([{items:B}])=>B.length>0),je(Z),Ce(([[B,q],X])=>{const Q=B.items[B.items.length-1].index===q-1;return(X||B.bottom>0&&B.itemHeight>0&&B.offsetBottom===0&&B.items.length===q)&&Q}),fe(([[,B]])=>B-1),ft())),re=on(oe(Ae(C),Ce(({items:B})=>B.length>0&&B[0].index===0),jn(0),ft())),te=on(oe(Ae(C),je(P),Ce(([{items:B},q])=>B.length>0&&!q),fe(([{items:B}])=>({endIndex:B[B.length-1].index,startIndex:B[0].index})),ft(dw),Sr(0)));ye(te,f.scrollSeekRangeChanged),ye(oe(F,je(M,_,E,O),fe(([B,q,X,Q,z])=>{const ae=vw(B),{align:le,behavior:be,offset:we}=ae;let Se=ae.index;Se==="LAST"&&(Se=Q-1),Se=fa(0,Se,Df(Q-1,Se));let Pe=Nf(q,z,X,Se);return le==="end"?Pe=zw(Pe-q.height+X.height):le==="center"&&(Pe=zw(Pe-q.height/2+X.height/2)),we&&(Pe+=we),{behavior:be,top:Pe}})),l);const ee=Wt(oe(C,fe(B=>B.offsetBottom+B.bottom)),0);return ye(oe(T,fe(B=>({height:B.visibleHeight,width:B.visibleWidth}))),M),{customScrollParent:p,data:I,deviation:H,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:_,overscan:n,restoreStateFrom:D,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:E,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:T,...f,gridState:C,horizontalDirection:R,initialTopMostItemIndex:j,totalListHeight:ee,...h,endReached:G,propsReady:g,rangeChanged:te,startReached:re,stateChanged:$,stateRestoreInProgress:P,...w}},dt(xf,Kt,da,Cw,Er,Sf,Tr));function Bw(e,t,n){return fa(1,rl((e+n)/(rl(t)+n)))}function Hw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Nf(e,t,n,r[0].index);return{bottom:Nf(e,t,n,r[r.length-1].index)+o,top:i}}function Nf(e,t,n,r){const o=Bw(e.width,n.width,t.column),i=rl(r/o),a=i*n.height+fa(0,i-1)*t.row;return a>0?a+t.row:a}const _V=Ke(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(Af),a=se("div"),s=se(Xo),l=(d,h=null)=>Wt(oe(t,fe(f=>f[d]),ft()),h),c=se(!1),u=se(!1);return ye(Ae(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")}}),OV=Ke(([e,t])=>({...e,...t}),dt(IV,_V)),MV=S.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),o=pt("computeItemKey"),i=pt("isSeeking"),a=vn("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),c=pt("ScrollSeekPlaceholder"),u=pt("context"),d=vn("itemDimensions"),h=vn("gap"),f=pt("log"),b=pt("stateRestoreInProgress"),g=vn("reportReadyState"),p=Rn(S.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const x=v.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}h({column:qw("column-gap",getComputedStyle(v).columnGap,f),row:qw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,h,f]),!0,!1);return _w(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),b?null:m.jsx(l,{className:t,ref:p,...lt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const y=o(v.index,v.data,u);return i?m.jsx(c,{...lt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},y):S.createElement(s,{...lt(s,u),className:n,"data-index":v.index,key:y},r(v.index,v.data,u))})})}),DV=S.memo(function(){const e=pt("HeaderComponent"),t=vn("headerHeight"),n=pt("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),NV=S.memo(function(){const e=pt("FooterComponent"),t=vn("footerHeight"),n=pt("headerFooterTag"),r=Rn(S.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=pt("context");return e?m.jsx(n,{ref:r,children:m.jsx(e,{...lt(e,o)})}):null}),FV=({children:e})=>{const t=S.useContext(Iw),n=vn("itemDimensions"),r=vn("viewportDimensions"),o=Rn(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:ei(!1),children:e})},LV=({children:e})=>{const t=S.useContext(Iw),n=vn("windowViewportRect"),r=vn("itemDimensions"),o=pt("customScrollParent"),i=uf(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:ei(!1),children:e})},VV=S.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?jV:$V,o=n||t?LV:FV,i=pt("context");return m.jsx(r,{...e,...lt(r,i),children:m.jsxs(o,{children:[m.jsx(DV,{}),m.jsx(MV,{}),m.jsx(NV,{})]})})}),{useEmitter:Ww,useEmitterValue:pt,usePublisher:vn}=Tf(OV,{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"}},VV),$V=Pf({useEmitter:Ww,useEmitterValue:pt,usePublisher:vn}),jV=If({useEmitter:Ww,useEmitterValue:pt,usePublisher:vn});function qw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Ff=()=>{const e=S.useContext(No);return e?e.tweaks:ss},Uw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>m.jsxs("span",{className:ke("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:m.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?m.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?m.jsx(af,{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(my,{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 max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?m.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[m.jsx(uy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),m.jsx(LI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),pa=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:h="",name:f,title:b,componentName:g,placeholder:p,hideLeft:v=!1,required:y,disabled:x,reportStatus:T},w)=>{const E=Ff(),k=T!==void 0?T:E.input.iconFeedback,C=d??f,M=Et(),_=e??M.inputOptionalLabel;return m.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:ke("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[m.jsxs("label",{form:u,htmlFor:C,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[m.jsx(Uw,{info:s,hideLeft:v,reportStatus:k,title:b,placeholder:p,children:_||n?m.jsxs(S.Fragment,{children:[y?null:m.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:_}),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 ${h}`,children:[t?m.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?m.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",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})]})}),zV=e=>m.jsx(S.Fragment,{children:e.children}),RV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},BV=[],HV=S.forwardRef(function(t,n){return m.jsx(Je.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg",children:m.jsx(Xn,{children:t.children})})}),WV=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Je.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),qV={List:HV,Item:WV},ti=44,UV=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:h=!1,required:f=!1,dynamicOption:b=!1,...g},p)=>{const v=S.useRef(null),y=S.useRef(null),x=S.useRef(null),T=g.value??g.defaultValue??"",w=Et(),[E,k]=S.useState(()=>Math.min(320,ti*o.length)),[C,M]=S.useState(!1),[_,F]=S.useState(""),[V,H]=S.useState(T),[I,O]=S.useState(()=>o.find(Y=>Y.value===T)?.label??T),[$,D]=S.useState(null),P=S.useRef(BV),j=tf(C,"block-only"),N=b&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,U=()=>ao.flushSync(()=>M(!0)),R=_?Jd(N,"value",[{key:"value",value:_},{key:"label",value:_}]):N,Z=()=>{M(!1),k(0)},G=R.filter(Y=>Y.hidden!==!0),re=b?void 0:`^(${o.map(Y=>`${rd(Y.value)}${Y.label?"|"+rd(Y.label):""}`).join("|")})$`,{x:te,y:ee,strategy:B,refs:q,context:X}=tr({open:C,transform:!0,onOpenChange:M,placement:"bottom-start",whileElementsMounted:Ro,middleware:[Xi(4),n0({padding:10,elementContext:"reference",apply(Y){const J=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=yi(q.reference.current,window.innerHeight),xe=Math.min(J<ti?ce:J,ce,Y.availableHeight),Ne=G.length===0?ti:Math.min(xe,ce,J),Ye=`${y.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ye,maxWidth:Ye,height:Ne})}})]}),Q=L0(X,RV),{getReferenceProps:z,getFloatingProps:ae,getItemProps:le}=nr([xr(X,{role:"listbox"}),br(X),Bs(X,{cols:0,listRef:P,loop:!0,virtual:!0,allowEscape:!0,activeIndex:$,selectedIndex:$,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(g.value){const Y=o.find(L=>L.value===g.value);Y&&(O(Y.label??Y.value),H(g.value))}},[g.value,o.length]),S.useEffect(()=>{if(!C)return k(0);const Y=q.reference;if(Y.current===null)return;const L=yi(Y.current,window.innerHeight);setTimeout(()=>k(Math.min(L,G.length*ti)),100)},[_,C,q.reference,G.length]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return vi(Y)},[]);const be=(Y,L)=>{H(Y.value);const J=q.reference.current;if(!J)return;J?.setAttribute("data-value",Y.value),J.value=Y.value;const ce=new Event("change",{bubbles:!1,cancelable:!0});J.dispatchEvent(ce),g.onChange&&g.onChange(ce),O(Y.label??""),Z(),F(""),D(L)},we=Y=>{const L=Y.target.value;return F(L),!C&&L===""?M(!0):(Y.target.name=g.name||"",L?M(!0):g.onChange?.(Y))},Se=()=>{U(),F(""),q.reference.current?.focus()},Pe=()=>{D(Y=>Y===null?0:Y),U(),F("")},Te=()=>{q.reference.current?.setAttribute("data-value",""),F(""),H(""),O(""),Yh(q.reference.current),Z()},ve=g.id||g.name,Re=`${ve}-shadow`,de=G.length===0;return m.jsxs(pa,{...g,left:e,error:t,ref:y,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:h,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:Re,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Se,children:[m.jsx(Nu,{size:20}),m.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),V?m.jsx("button",{type:"button",onClick:Te,className:"p-2 transition-colors link:text-danger md:p-1",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",...z({...g,onFocus:Pe,pattern:re,onChange:we,id:Re,name:Re,ref:q.setReference,onClick:Y=>Y.currentTarget.focus(),onKeyDown(Y){if(Y.key==="Escape")return Y.currentTarget.blur(),Z();if(C){if(Y.key==="ArrowDown"){let L=$e.number($)?$+1:0;return L>G.length-1&&(L=0),x.current?.scrollIntoView({index:L}),D(L)}if(Y.key==="ArrowUp"){let L=$e.number($)?$-1:G.length-1;return L<0&&(L=G.length-1),x.current?.scrollIntoView({index:L}),D(L)}if(Y.key==="Enter"){if($!==null&&G[$])return Y.preventDefault(),be(G[$],$);if(G.length===1)return Y.preventDefault(),be(G[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":ve,"data-target":ve,required:f,value:C?_:o.length===0?"":I||V,"aria-autocomplete":"list",autoComplete:"off",className:ke("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:ve,name:ve,type:"hidden","data-origin":ve,ref:p,required:f,defaultValue:g.value||V||void 0}),m.jsx(yr,{preserveTabOrder:!0,children:C?m.jsx(Qr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs(Je.div,{...ae({ref:Kn(j,q.setFloating),style:{...Q.styles,left:te,top:ee??0,position:B}}),initial:!1,"data-floating":"true",animate:{height:de?"auto":E},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!C)return k(0);const L=q.floating.current.querySelectorAll("li").item(0),J=(L?L.getBoundingClientRect().height:ti)*G.length;return ao.flushSync(()=>k(J+10))},children:[de?m.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,m.jsx(Of,{overscan:40,ref:x,hidden:de,data:G,style:{height:E-10},defaultItemHeight:ti,components:qV,scrollerRef:Y=>void(v.current=Y),className:"max-h-[calc(100%-2px)] overscroll-contain rounded-lg border-floating bg-floating-background p-0 text-foreground",itemContent:(Y,L)=>{const J=L.Render??zV,ce=V===L.value||V===L.label,xe=$===Y,Ne=L.label??L.value;return m.jsx("button",{"data-value":L.value,...le({ref:Ye=>void(P.current[Y]=Ye),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":L.disabled,onClick:()=>be(L,Y),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ce?"bg-primary-hover text-primary-foreground":""} ${xe?"bg-floating-hover text-floating-foreground":""}`}),children:m.jsx(J,{...g,label:L.label,value:L.value,children:Ne})})}})]})}):null})]})}),Lf=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:ke("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:ke("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:ke("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Kw=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:h,optionalText:f,type:b="text",labelClassName:g,feedback:p=null,hideLeft:v=!1,loading:y,...x},T)=>{const w=e,E=x.id??x.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const C=k.current,M=vi(k.current),_=r?.(C),F=V=>{const H=V;if(H.key==="Enter"&&C.enterKeyHint==="next"){const I=C.getAttribute("data-next");if(I){const O=document.getElementById(I);if(O)return O.focus(),void H.preventDefault()}}};return C.addEventListener("keydown",F),()=>{_?.(),M(),C.removeEventListener("keydown",F)}},[]),m.jsx(pa,{...n,info:i,left:a,error:l,right:c,loading:y,form:x.form,name:x.name,feedback:p,hideLeft:v,title:x.title,container:ke(u,n.container),rightLabel:d,disabled:x.disabled,interactive:h,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:m.jsx(w,{...n,...x,id:E,name:E,type:b,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Kn(T,k),className:ke("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",x.className)})})}),ha=Kw(Gy,"input",{type:"text"}),Yw=new Date(1970,11,31),Vf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Gw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},KV={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},$f=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},YV=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=td(t),l=S.useId(),c=Et(),u=S.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,h]=S.useState(e||void 0),[f,b]=S.useState(!1),g=$f(u,Yw).flatMap(k=>$e.keyof(Vf,k.type)?Vf[k.type](k.value):[]),p=$f(u,Yw).reduce((k,C)=>k+($e.keyof(Gw,C.type)?Gw[C.type](C.value):""),""),[v,y]=S.useState(d?$f(u,d).reduce((k,C)=>k+($e.keyof(Vf,C.type)?KV[C.type](d,C.value):""),""):""),x=k=>{const C=k.target.value;if(y(C),g.length===C.length&&g.every((_,F)=>{const V=C.charAt(F);return typeof _=="string"?V===_:_.test(V)})){const _=Io(QO(C,p,new Date));return h(_),r?.(_)}return h(void 0),r?.(void 0)},T=k=>(h(k),r?.(k),y(k?Q_(k,p):"")),w=$u(d),E=w?d.toISOString():void 0;return m.jsx(ha,{...i,mask:g,value:v,id:void 0,name:void 0,"data-value":E,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??p,right:m.jsxs(S.Fragment,{children:[m.jsx("input",{"data-origin":i.name,defaultValue:E,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),m.jsx(Go,{open:f,onChange:b,trigger:m.jsxs("span",{"aria-labelledby":l,children:[m.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),m.jsx(NI,{})]}),buttonProps:{"aria-describedby":l},children:m.jsx(yb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),GV=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],ZV=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],XV=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],QV=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Zw=(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},Xw=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},JV=e=>typeof e=="number"?Math.log(e):Xw(e)*Math.log(10),e$=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t};function t$(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,...t};const n=t.bits?t.binary?QV:XV:t.binary?ZV:GV,r=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Zw(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?JV(e)/Math.log(1024):Xw(e)/3),n.length-1);e=e$(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));const l=Zw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var il={exports:{}},al={exports:{}},Ze={};/** @license React v16.13.1
223
223
  * react-is.production.min.js
224
224
  *
225
225
  * Copyright (c) Facebook, Inc. and its affiliates.
226
226
  *
227
227
  * This source code is licensed under the MIT license found in the
228
228
  * LICENSE file in the root directory of this source tree.
229
- */var Qw;function n$(){if(Qw)return Ge;Qw=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case b:case f:case a:return w;default:return T}}case n:return T}}}function E(w){return x(w)===c}return Ge.AsyncMode=l,Ge.ConcurrentMode=c,Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=b,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(w){return E(w)||x(w)===l},Ge.isConcurrentMode=E,Ge.isContextConsumer=function(w){return x(w)===s},Ge.isContextProvider=function(w){return x(w)===a},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return x(w)===u},Ge.isFragment=function(w){return x(w)===r},Ge.isLazy=function(w){return x(w)===b},Ge.isMemo=function(w){return x(w)===f},Ge.isPortal=function(w){return x(w)===n},Ge.isProfiler=function(w){return x(w)===i},Ge.isStrictMode=function(w){return x(w)===o},Ge.isSuspense=function(w){return x(w)===d},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===p||w.$$typeof===v||w.$$typeof===y||w.$$typeof===g)},Ge.typeOf=x,Ge}var Ze={};/** @license React v16.13.1
229
+ */var Qw;function n$(){if(Qw)return Ze;Qw=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case b:case f:case a:return w;default:return E}}case n:return E}}}function T(w){return x(w)===c}return Ze.AsyncMode=l,Ze.ConcurrentMode=c,Ze.ContextConsumer=s,Ze.ContextProvider=a,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=r,Ze.Lazy=b,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=i,Ze.StrictMode=o,Ze.Suspense=d,Ze.isAsyncMode=function(w){return T(w)||x(w)===l},Ze.isConcurrentMode=T,Ze.isContextConsumer=function(w){return x(w)===s},Ze.isContextProvider=function(w){return x(w)===a},Ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ze.isForwardRef=function(w){return x(w)===u},Ze.isFragment=function(w){return x(w)===r},Ze.isLazy=function(w){return x(w)===b},Ze.isMemo=function(w){return x(w)===f},Ze.isPortal=function(w){return x(w)===n},Ze.isProfiler=function(w){return x(w)===i},Ze.isStrictMode=function(w){return x(w)===o},Ze.isSuspense=function(w){return x(w)===d},Ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===p||w.$$typeof===v||w.$$typeof===y||w.$$typeof===g)},Ze.typeOf=x,Ze}var Xe={};/** @license React v16.13.1
230
230
  * react-is.development.js
231
231
  *
232
232
  * Copyright (c) Facebook, Inc. and its affiliates.
233
233
  *
234
234
  * This source code is licensed under the MIT license found in the
235
235
  * LICENSE file in the root directory of this source tree.
236
- */var Jw;function r$(){return Jw||(Jw=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===i||j===o||j===d||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===b||j.$$typeof===f||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===p||j.$$typeof===v||j.$$typeof===y||j.$$typeof===g)}function E(j){if(typeof j=="object"&&j!==null){var Y=j.$$typeof;switch(Y){case t:var Q=j.type;switch(Q){case l:case c:case r:case i:case o:case d:return Q;default:var ue=Q&&Q.$$typeof;switch(ue){case s:case u:case b:case f:case a:return ue;default:return Y}}case n:return Y}}}var w=l,T=c,k=s,C=a,M=t,O=u,F=r,L=b,H=f,I=n,_=i,V=o,N=d,P=!1;function $(j){return P||(P=!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.")),D(j)||E(j)===l}function D(j){return E(j)===c}function W(j){return E(j)===s}function R(j){return E(j)===a}function Z(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function X(j){return E(j)===u}function oe(j){return E(j)===r}function te(j){return E(j)===b}function ee(j){return E(j)===f}function B(j){return E(j)===n}function K(j){return E(j)===i}function G(j){return E(j)===o}function J(j){return E(j)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=T,Ze.ContextConsumer=k,Ze.ContextProvider=C,Ze.Element=M,Ze.ForwardRef=O,Ze.Fragment=F,Ze.Lazy=L,Ze.Memo=H,Ze.Portal=I,Ze.Profiler=_,Ze.StrictMode=V,Ze.Suspense=N,Ze.isAsyncMode=$,Ze.isConcurrentMode=D,Ze.isContextConsumer=W,Ze.isContextProvider=R,Ze.isElement=Z,Ze.isForwardRef=X,Ze.isFragment=oe,Ze.isLazy=te,Ze.isMemo=ee,Ze.isPortal=B,Ze.isProfiler=K,Ze.isStrictMode=G,Ze.isSuspense=J,Ze.isValidElementType=x,Ze.typeOf=E}()),Ze}var e1;function t1(){return e1||(e1=1,process.env.NODE_ENV==="production"?sl.exports=n$():sl.exports=r$()),sl.exports}/*
236
+ */var Jw;function r$(){return Jw||(Jw=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,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===i||z===o||z===d||z===h||typeof z=="object"&&z!==null&&(z.$$typeof===b||z.$$typeof===f||z.$$typeof===a||z.$$typeof===s||z.$$typeof===u||z.$$typeof===p||z.$$typeof===v||z.$$typeof===y||z.$$typeof===g)}function T(z){if(typeof z=="object"&&z!==null){var ae=z.$$typeof;switch(ae){case t:var le=z.type;switch(le){case l:case c:case r:case i:case o:case d:return le;default:var be=le&&le.$$typeof;switch(be){case s:case u:case b:case f:case a:return be;default:return ae}}case n:return ae}}}var w=l,E=c,k=s,C=a,M=t,_=u,F=r,V=b,H=f,I=n,O=i,$=o,D=d,P=!1;function j(z){return P||(P=!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.")),N(z)||T(z)===l}function N(z){return T(z)===c}function U(z){return T(z)===s}function R(z){return T(z)===a}function Z(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function G(z){return T(z)===u}function re(z){return T(z)===r}function te(z){return T(z)===b}function ee(z){return T(z)===f}function B(z){return T(z)===n}function q(z){return T(z)===i}function X(z){return T(z)===o}function Q(z){return T(z)===d}Xe.AsyncMode=w,Xe.ConcurrentMode=E,Xe.ContextConsumer=k,Xe.ContextProvider=C,Xe.Element=M,Xe.ForwardRef=_,Xe.Fragment=F,Xe.Lazy=V,Xe.Memo=H,Xe.Portal=I,Xe.Profiler=O,Xe.StrictMode=$,Xe.Suspense=D,Xe.isAsyncMode=j,Xe.isConcurrentMode=N,Xe.isContextConsumer=U,Xe.isContextProvider=R,Xe.isElement=Z,Xe.isForwardRef=G,Xe.isFragment=re,Xe.isLazy=te,Xe.isMemo=ee,Xe.isPortal=B,Xe.isProfiler=q,Xe.isStrictMode=X,Xe.isSuspense=Q,Xe.isValidElementType=x,Xe.typeOf=T}()),Xe}var e1;function t1(){return e1||(e1=1,process.env.NODE_ENV==="production"?al.exports=n$():al.exports=r$()),al.exports}/*
237
237
  object-assign
238
238
  (c) Sindre Sorhus
239
239
  @license MIT
240
- */var jf,n1;function o$(){if(n1)return jf;n1=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 jf=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 h=0;h<c.length;h++)n.call(s,c[h])&&(l[c[h]]=s[c[h]])}}return l},jf}var zf,r1;function Rf(){if(r1)return zf;r1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zf=e,zf}var Bf,o1;function i1(){return o1||(o1=1,Bf=Function.call.bind(Object.prototype.hasOwnProperty)),Bf}var Hf,a1;function i$(){if(a1)return Hf;a1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rf(),n={},r=i1();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 h=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 h.name="Invariant Violation",h}d=i[u](a,u,l,s,null,t)}catch(b){d=b}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 f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Hf=o,Hf}var Wf,s1;function a$(){if(s1)return Wf;s1=1;var e=t1(),t=o$(),n=Rf(),r=i1(),o=i$(),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 Wf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var W=D&&(c&&D[c]||D[u]);if(typeof W=="function")return W}var h="<<anonymous>>",f={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:y(),arrayOf:x,element:E(),elementType:w(),instanceOf:T,node:O(),objectOf:C,oneOf:k,oneOfType:M,shape:L,exact:H};function b(D,W){return D===W?D!==0||1/D===1/W:D!==D&&W!==W}function g(D,W){this.message=D,this.data=W&&typeof W=="object"?W:{},this.stack=""}g.prototype=Error.prototype;function p(D){if(process.env.NODE_ENV!=="production")var W={},R=0;function Z(oe,te,ee,B,K,G,J){if(B=B||h,G=G||ee,J!==n){if(l){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Y=B+":"+ee;!W[Y]&&R<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+B+"`. 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."),W[Y]=!0,R++)}}return te[ee]==null?oe?te[ee]===null?new g("The "+K+" `"+G+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new g("The "+K+" `"+G+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:D(te,ee,B,K,G)}var X=Z.bind(null,!1);return X.isRequired=Z.bind(null,!0),X}function v(D){function W(R,Z,X,oe,te,ee){var B=R[Z],K=V(B);if(K!==D){var G=N(B);return new g("Invalid "+oe+" `"+te+"` of type "+("`"+G+"` supplied to `"+X+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return p(W)}function y(){return p(a)}function x(D){function W(R,Z,X,oe,te){if(typeof D!="function")return new g("Property `"+te+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var ee=R[Z];if(!Array.isArray(ee)){var B=V(ee);return new g("Invalid "+oe+" `"+te+"` of type "+("`"+B+"` supplied to `"+X+"`, expected an array."))}for(var K=0;K<ee.length;K++){var G=D(ee,K,X,oe,te+"["+K+"]",n);if(G instanceof Error)return G}return null}return p(W)}function E(){function D(W,R,Z,X,oe){var te=W[R];if(!s(te)){var ee=V(te);return new g("Invalid "+X+" `"+oe+"` of type "+("`"+ee+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return p(D)}function w(){function D(W,R,Z,X,oe){var te=W[R];if(!e.isValidElementType(te)){var ee=V(te);return new g("Invalid "+X+" `"+oe+"` of type "+("`"+ee+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return p(D)}function T(D){function W(R,Z,X,oe,te){if(!(R[Z]instanceof D)){var ee=D.name||h,B=$(R[Z]);return new g("Invalid "+oe+" `"+te+"` of type "+("`"+B+"` supplied to `"+X+"`, expected ")+("instance of `"+ee+"`."))}return null}return p(W)}function k(D){if(!Array.isArray(D))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 W(R,Z,X,oe,te){for(var ee=R[Z],B=0;B<D.length;B++)if(b(ee,D[B]))return null;var K=JSON.stringify(D,function(J,j){var Y=N(j);return Y==="symbol"?String(j):j});return new g("Invalid "+oe+" `"+te+"` of value `"+String(ee)+"` "+("supplied to `"+X+"`, expected one of "+K+"."))}return p(W)}function C(D){function W(R,Z,X,oe,te){if(typeof D!="function")return new g("Property `"+te+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var ee=R[Z],B=V(ee);if(B!=="object")return new g("Invalid "+oe+" `"+te+"` of type "+("`"+B+"` supplied to `"+X+"`, expected an object."));for(var K in ee)if(r(ee,K)){var G=D(ee,K,X,oe,te+"."+K,n);if(G instanceof Error)return G}return null}return p(W)}function M(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<D.length;W++){var R=D[W];if(typeof R!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(R)+" at index "+W+"."),a}function Z(X,oe,te,ee,B){for(var K=[],G=0;G<D.length;G++){var J=D[G],j=J(X,oe,te,ee,B,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&K.push(j.data.expectedType)}var Y=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+ee+" `"+B+"` supplied to "+("`"+te+"`"+Y+"."))}return p(Z)}function O(){function D(W,R,Z,X,oe){return I(W[R])?null:new g("Invalid "+X+" `"+oe+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return p(D)}function F(D,W,R,Z,X){return new g((D||"React class")+": "+W+" type `"+R+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function L(D){function W(R,Z,X,oe,te){var ee=R[Z],B=V(ee);if(B!=="object")return new g("Invalid "+oe+" `"+te+"` of type `"+B+"` "+("supplied to `"+X+"`, expected `object`."));for(var K in D){var G=D[K];if(typeof G!="function")return F(X,oe,te,K,N(G));var J=G(ee,K,X,oe,te+"."+K,n);if(J)return J}return null}return p(W)}function H(D){function W(R,Z,X,oe,te){var ee=R[Z],B=V(ee);if(B!=="object")return new g("Invalid "+oe+" `"+te+"` of type `"+B+"` "+("supplied to `"+X+"`, expected `object`."));var K=t({},R[Z],D);for(var G in K){var J=D[G];if(r(D,G)&&typeof J!="function")return F(X,oe,te,G,N(J));if(!J)return new g("Invalid "+oe+" `"+te+"` key `"+G+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(R[Z],null," ")+`
241
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var j=J(ee,G,X,oe,te+"."+G,n);if(j)return j}return null}return p(W)}function I(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(I);if(D===null||s(D))return!0;var W=d(D);if(W){var R=W.call(D),Z;if(W!==D.entries){for(;!(Z=R.next()).done;)if(!I(Z.value))return!1}else for(;!(Z=R.next()).done;){var X=Z.value;if(X&&!I(X[1]))return!1}}else return!1;return!0;default:return!1}}function _(D,W){return D==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function V(D){var W=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":_(W,D)?"symbol":W}function N(D){if(typeof D>"u"||D===null)return""+D;var W=V(D);if(W==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return W}function P(D){var W=N(D);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function $(D){return!D.constructor||!D.constructor.name?h:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Wf}var qf,l1;function s$(){if(l1)return qf;l1=1;var e=Rf();function t(){}function n(){}return n.resetWarningCache=t,qf=function(){function r(a,s,l,c,u,d){if(d!==e){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}}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},qf}var c1;function l$(){if(c1)return al.exports;if(c1=1,process.env.NODE_ENV!=="production"){var e=t1(),t=!0;al.exports=a$()(e.isElement,t)}else al.exports=s$()();return al.exports}var c$=l$();const it=Vp(c$),u$=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 ti(e,t,n){const r=d$(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&u1(r,"path",i),u1(r,"relativePath",i),r}function d$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=u$.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function u1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const f$=[".DS_Store","Thumbs.db"];function p$(e){return Ur(this,void 0,void 0,function*(){return ll(e)&&h$(e.dataTransfer)?y$(e.dataTransfer,e.type):m$(e)?g$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?v$(e):[]})}function h$(e){return ll(e)}function m$(e){return ll(e)&&ll(e.target)}function ll(e){return typeof e=="object"&&e!==null}function g$(e){return Uf(e.target.files).map(t=>ti(t))}function v$(e){return Ur(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ti(n))})}function y$(e,t){return Ur(this,void 0,void 0,function*(){if(e.items){const n=Uf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(b$));return d1(f1(r))}return d1(Uf(e.files).map(n=>ti(n)))})}function d1(e){return e.filter(t=>f$.indexOf(t.name)===-1)}function Uf(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 b$(e){if(typeof e.webkitGetAsEntry!="function")return p1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?h1(t):p1(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function p1(e,t){return Ur(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,ti(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ti(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function x$(e){return Ur(this,void 0,void 0,function*(){return e.isDirectory?h1(e):w$(e)})}function h1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>Ur(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(x$));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function w$(e){return Ur(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ti(r,e.fullPath);t(o)},r=>{n(r)})})})}var cl={},m1;function S$(){return m1||(m1=1,cl.__esModule=!0,cl.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}),cl}var T$=S$();const Kf=Vp(T$);function g1(e){return C$(e)||k$(e)||x1(e)||E$()}function E$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
240
+ */var jf,n1;function o$(){if(n1)return jf;n1=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 jf=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 h=0;h<c.length;h++)n.call(s,c[h])&&(l[c[h]]=s[c[h]])}}return l},jf}var zf,r1;function Rf(){if(r1)return zf;r1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zf=e,zf}var Bf,o1;function i1(){return o1||(o1=1,Bf=Function.call.bind(Object.prototype.hasOwnProperty)),Bf}var Hf,a1;function i$(){if(a1)return Hf;a1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rf(),n={},r=i1();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 h=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 h.name="Invariant Violation",h}d=i[u](a,u,l,s,null,t)}catch(b){d=b}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 f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Hf=o,Hf}var Wf,s1;function a$(){if(s1)return Wf;s1=1;var e=t1(),t=o$(),n=Rf(),r=i1(),o=i$(),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 Wf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(N){var U=N&&(c&&N[c]||N[u]);if(typeof U=="function")return U}var h="<<anonymous>>",f={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:y(),arrayOf:x,element:T(),elementType:w(),instanceOf:E,node:_(),objectOf:C,oneOf:k,oneOfType:M,shape:V,exact:H};function b(N,U){return N===U?N!==0||1/N===1/U:N!==N&&U!==U}function g(N,U){this.message=N,this.data=U&&typeof U=="object"?U:{},this.stack=""}g.prototype=Error.prototype;function p(N){if(process.env.NODE_ENV!=="production")var U={},R=0;function Z(re,te,ee,B,q,X,Q){if(B=B||h,X=X||ee,Q!==n){if(l){var z=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 z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=B+":"+ee;!U[ae]&&R<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+B+"`. 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."),U[ae]=!0,R++)}}return te[ee]==null?re?te[ee]===null?new g("The "+q+" `"+X+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new g("The "+q+" `"+X+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:N(te,ee,B,q,X)}var G=Z.bind(null,!1);return G.isRequired=Z.bind(null,!0),G}function v(N){function U(R,Z,G,re,te,ee){var B=R[Z],q=$(B);if(q!==N){var X=D(B);return new g("Invalid "+re+" `"+te+"` of type "+("`"+X+"` supplied to `"+G+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return p(U)}function y(){return p(a)}function x(N){function U(R,Z,G,re,te){if(typeof N!="function")return new g("Property `"+te+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var ee=R[Z];if(!Array.isArray(ee)){var B=$(ee);return new g("Invalid "+re+" `"+te+"` of type "+("`"+B+"` supplied to `"+G+"`, expected an array."))}for(var q=0;q<ee.length;q++){var X=N(ee,q,G,re,te+"["+q+"]",n);if(X instanceof Error)return X}return null}return p(U)}function T(){function N(U,R,Z,G,re){var te=U[R];if(!s(te)){var ee=$(te);return new g("Invalid "+G+" `"+re+"` of type "+("`"+ee+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return p(N)}function w(){function N(U,R,Z,G,re){var te=U[R];if(!e.isValidElementType(te)){var ee=$(te);return new g("Invalid "+G+" `"+re+"` of type "+("`"+ee+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return p(N)}function E(N){function U(R,Z,G,re,te){if(!(R[Z]instanceof N)){var ee=N.name||h,B=j(R[Z]);return new g("Invalid "+re+" `"+te+"` of type "+("`"+B+"` supplied to `"+G+"`, expected ")+("instance of `"+ee+"`."))}return null}return p(U)}function k(N){if(!Array.isArray(N))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 U(R,Z,G,re,te){for(var ee=R[Z],B=0;B<N.length;B++)if(b(ee,N[B]))return null;var q=JSON.stringify(N,function(Q,z){var ae=D(z);return ae==="symbol"?String(z):z});return new g("Invalid "+re+" `"+te+"` of value `"+String(ee)+"` "+("supplied to `"+G+"`, expected one of "+q+"."))}return p(U)}function C(N){function U(R,Z,G,re,te){if(typeof N!="function")return new g("Property `"+te+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var ee=R[Z],B=$(ee);if(B!=="object")return new g("Invalid "+re+" `"+te+"` of type "+("`"+B+"` supplied to `"+G+"`, expected an object."));for(var q in ee)if(r(ee,q)){var X=N(ee,q,G,re,te+"."+q,n);if(X instanceof Error)return X}return null}return p(U)}function M(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var U=0;U<N.length;U++){var R=N[U];if(typeof R!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(R)+" at index "+U+"."),a}function Z(G,re,te,ee,B){for(var q=[],X=0;X<N.length;X++){var Q=N[X],z=Q(G,re,te,ee,B,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&q.push(z.data.expectedType)}var ae=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+ee+" `"+B+"` supplied to "+("`"+te+"`"+ae+"."))}return p(Z)}function _(){function N(U,R,Z,G,re){return I(U[R])?null:new g("Invalid "+G+" `"+re+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return p(N)}function F(N,U,R,Z,G){return new g((N||"React class")+": "+U+" type `"+R+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function V(N){function U(R,Z,G,re,te){var ee=R[Z],B=$(ee);if(B!=="object")return new g("Invalid "+re+" `"+te+"` of type `"+B+"` "+("supplied to `"+G+"`, expected `object`."));for(var q in N){var X=N[q];if(typeof X!="function")return F(G,re,te,q,D(X));var Q=X(ee,q,G,re,te+"."+q,n);if(Q)return Q}return null}return p(U)}function H(N){function U(R,Z,G,re,te){var ee=R[Z],B=$(ee);if(B!=="object")return new g("Invalid "+re+" `"+te+"` of type `"+B+"` "+("supplied to `"+G+"`, expected `object`."));var q=t({},R[Z],N);for(var X in q){var Q=N[X];if(r(N,X)&&typeof Q!="function")return F(G,re,te,X,D(Q));if(!Q)return new g("Invalid "+re+" `"+te+"` key `"+X+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(R[Z],null," ")+`
241
+ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var z=Q(ee,X,G,re,te+"."+X,n);if(z)return z}return null}return p(U)}function I(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(I);if(N===null||s(N))return!0;var U=d(N);if(U){var R=U.call(N),Z;if(U!==N.entries){for(;!(Z=R.next()).done;)if(!I(Z.value))return!1}else for(;!(Z=R.next()).done;){var G=Z.value;if(G&&!I(G[1]))return!1}}else return!1;return!0;default:return!1}}function O(N,U){return N==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function $(N){var U=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":O(U,N)?"symbol":U}function D(N){if(typeof N>"u"||N===null)return""+N;var U=$(N);if(U==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return U}function P(N){var U=D(N);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function j(N){return!N.constructor||!N.constructor.name?h:N.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Wf}var qf,l1;function s$(){if(l1)return qf;l1=1;var e=Rf();function t(){}function n(){}return n.resetWarningCache=t,qf=function(){function r(a,s,l,c,u,d){if(d!==e){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}}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},qf}var c1;function l$(){if(c1)return il.exports;if(c1=1,process.env.NODE_ENV!=="production"){var e=t1(),t=!0;il.exports=a$()(e.isElement,t)}else il.exports=s$()();return il.exports}var c$=l$();const at=Vp(c$),u$=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 ni(e,t,n){const r=d$(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&u1(r,"path",i),u1(r,"relativePath",i),r}function d$(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=u$.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function u1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const f$=[".DS_Store","Thumbs.db"];function p$(e){return Ur(this,void 0,void 0,function*(){return sl(e)&&h$(e.dataTransfer)?y$(e.dataTransfer,e.type):m$(e)?g$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?v$(e):[]})}function h$(e){return sl(e)}function m$(e){return sl(e)&&sl(e.target)}function sl(e){return typeof e=="object"&&e!==null}function g$(e){return Uf(e.target.files).map(t=>ni(t))}function v$(e){return Ur(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ni(n))})}function y$(e,t){return Ur(this,void 0,void 0,function*(){if(e.items){const n=Uf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(b$));return d1(f1(r))}return d1(Uf(e.files).map(n=>ni(n)))})}function d1(e){return e.filter(t=>f$.indexOf(t.name)===-1)}function Uf(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 b$(e){if(typeof e.webkitGetAsEntry!="function")return p1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?h1(t):p1(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function p1(e,t){return Ur(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,ni(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ni(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function x$(e){return Ur(this,void 0,void 0,function*(){return e.isDirectory?h1(e):w$(e)})}function h1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>Ur(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(x$));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function w$(e){return Ur(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ni(r,e.fullPath);t(o)},r=>{n(r)})})})}var ll={},m1;function S$(){return m1||(m1=1,ll.__esModule=!0,ll.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}),ll}var T$=S$();const Kf=Vp(T$);function g1(e){return C$(e)||k$(e)||x1(e)||E$()}function E$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
242
242
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function C$(e){if(Array.isArray(e))return Yf(e)}function v1(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 y1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(r){b1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ma(e,t){return I$(e)||P$(e,t)||x1(e,t)||A$()}function A$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
243
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x1(e,t){if(e){if(typeof e=="string")return Yf(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 Yf(e,t)}}function Yf(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 P$(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 I$(e){if(Array.isArray(e))return e}var _$=typeof Kf=="function"?Kf:Kf.default,O$="file-invalid-type",M$="file-too-large",D$="file-too-small",N$="too-many-files",F$=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:O$,message:"File type must be ".concat(r)}},w1=function(t){return{code:M$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},S1=function(t){return{code:D$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},L$={code:N$,message:"Too many files"};function T1(e,t){var n=e.type==="application/x-moz-file"||_$(e,t);return[n,n?null:F$(t)]}function E1(e,t,n){if(to(e.size))if(to(t)&&to(n)){if(e.size>n)return[!1,w1(n)];if(e.size<t)return[!1,S1(t)]}else{if(to(t)&&e.size<t)return[!1,S1(t)];if(to(n)&&e.size>n)return[!1,w1(n)]}return[!0,null]}function to(e){return e!=null}function V$(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=T1(l,n),u=ma(c,1),d=u[0],h=E1(l,r,o),f=ma(h,1),b=f[0],g=s?s(l):null;return d&&b&&!g})}function ul(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function dl(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 k1(e){e.preventDefault()}function $$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function j$(e){return e.indexOf("Edge/")!==-1}function z$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return $$(e)||j$(e)}function Hn(){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),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!ul(r)&&s&&s.apply(void 0,[r].concat(i)),ul(r)})}}function R$(){return"showOpenFilePicker"in window}function B$(e){if(to(e)){var t=Object.entries(e).filter(function(n){var r=ma(n,2),o=r[0],i=r[1],a=!0;return C1(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.')),a=!1),(!Array.isArray(i)||!i.every(A1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ma(r,2),i=o[0],a=o[1];return y1(y1({},n),{},b1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function H$(e){if(to(e))return Object.entries(e).reduce(function(t,n){var r=ma(n,2),o=r[0],i=r[1];return[].concat(g1(t),[o],g1(i))},[]).filter(function(t){return C1(t)||A1(t)}).join(",")}function W$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function q$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function C1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function A1(e){return/^.*\.[\w]+$/.test(e)}var U$=["children"],K$=["open"],Y$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],G$=["refKey","onChange","onClick"];function Z$(e){return J$(e)||Q$(e)||P1(e)||X$()}function X$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
243
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x1(e,t){if(e){if(typeof e=="string")return Yf(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 Yf(e,t)}}function Yf(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 P$(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 I$(e){if(Array.isArray(e))return e}var _$=typeof Kf=="function"?Kf:Kf.default,O$="file-invalid-type",M$="file-too-large",D$="file-too-small",N$="too-many-files",F$=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:O$,message:"File type must be ".concat(r)}},w1=function(t){return{code:M$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},S1=function(t){return{code:D$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},L$={code:N$,message:"Too many files"};function T1(e,t){var n=e.type==="application/x-moz-file"||_$(e,t);return[n,n?null:F$(t)]}function E1(e,t,n){if(to(e.size))if(to(t)&&to(n)){if(e.size>n)return[!1,w1(n)];if(e.size<t)return[!1,S1(t)]}else{if(to(t)&&e.size<t)return[!1,S1(t)];if(to(n)&&e.size>n)return[!1,w1(n)]}return[!0,null]}function to(e){return e!=null}function V$(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=T1(l,n),u=ma(c,1),d=u[0],h=E1(l,r,o),f=ma(h,1),b=f[0],g=s?s(l):null;return d&&b&&!g})}function cl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ul(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 k1(e){e.preventDefault()}function $$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function j$(e){return e.indexOf("Edge/")!==-1}function z$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return $$(e)||j$(e)}function Hn(){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),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!cl(r)&&s&&s.apply(void 0,[r].concat(i)),cl(r)})}}function R$(){return"showOpenFilePicker"in window}function B$(e){if(to(e)){var t=Object.entries(e).filter(function(n){var r=ma(n,2),o=r[0],i=r[1],a=!0;return C1(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.')),a=!1),(!Array.isArray(i)||!i.every(A1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ma(r,2),i=o[0],a=o[1];return y1(y1({},n),{},b1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function H$(e){if(to(e))return Object.entries(e).reduce(function(t,n){var r=ma(n,2),o=r[0],i=r[1];return[].concat(g1(t),[o],g1(i))},[]).filter(function(t){return C1(t)||A1(t)}).join(",")}function W$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function q$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function C1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function A1(e){return/^.*\.[\w]+$/.test(e)}var U$=["children"],K$=["open"],Y$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],G$=["refKey","onChange","onClick"];function Z$(e){return J$(e)||Q$(e)||P1(e)||X$()}function X$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
244
244
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function J$(e){if(Array.isArray(e))return Zf(e)}function Gf(e,t){return nj(e)||tj(e,t)||P1(e,t)||ej()}function ej(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P1(e,t){if(e){if(typeof e=="string")return Zf(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 Zf(e,t)}}function Zf(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 tj(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 nj(e){if(Array.isArray(e))return e}function I1(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 vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(n),!0).forEach(function(r){Xf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fl(e,t){if(e==null)return{};var n=rj(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 rj(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 Qf=S.forwardRef(function(e,t){var n=e.children,r=fl(e,U$),o=O1(r),i=o.open,a=fl(o,K$);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},a),{},{open:i})))});Qf.displayName="Dropzone";var _1={disabled:!1,getFilesFromEvent:p$,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};Qf.defaultProps=_1,Qf.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var Jf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function O1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},_1),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,h=t.onDrop,f=t.onDropAccepted,b=t.onDropRejected,g=t.onFileDialogCancel,p=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,E=t.noClick,w=t.noKeyboard,T=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,M=t.validator,O=S.useMemo(function(){return H$(n)},[n]),F=S.useMemo(function(){return B$(n)},[n]),L=S.useMemo(function(){return typeof p=="function"?p:M1},[p]),H=S.useMemo(function(){return typeof g=="function"?g:M1},[g]),I=S.useRef(null),_=S.useRef(null),V=S.useReducer(oj,Jf),N=Gf(V,2),P=N[0],$=N[1],D=P.isFocused,W=P.isFileDialogActive,R=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&R$()),Z=function(){!R.current&&W&&setTimeout(function(){if(_.current){var ne=_.current.files;ne.length||($({type:"closeDialog"}),H())}},300)};S.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[_,W,H,R]);var X=S.useRef([]),oe=function(ne){I.current&&I.current.contains(ne.target)||(ne.preventDefault(),X.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",k1,!1),document.addEventListener("drop",oe,!1)),function(){x&&(document.removeEventListener("dragover",k1),document.removeEventListener("drop",oe))}},[I,x]),S.useEffect(function(){return!r&&y&&I.current&&I.current.focus(),function(){}},[I,y,r]);var te=S.useCallback(function(z){C?C(z):console.error(z)},[C]),ee=S.useCallback(function(z){z.preventDefault(),z.persist(),Te(z),X.current=[].concat(Z$(X.current),[z.target]),dl(z)&&Promise.resolve(o(z)).then(function(ne){if(!(ul(z)&&!k)){var me=ne.length,Se=me>0&&V$({files:ne,accept:O,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:M}),ze=me>0&&!Se;$({isDragAccept:Se,isDragReject:ze,isDragActive:!0,type:"setDraggedFiles"}),c&&c(z)}}).catch(function(ne){return te(ne)})},[o,c,te,k,O,a,i,s,l,M]),B=S.useCallback(function(z){z.preventDefault(),z.persist(),Te(z);var ne=dl(z);if(ne&&z.dataTransfer)try{z.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(z),!1},[d,k]),K=S.useCallback(function(z){z.preventDefault(),z.persist(),Te(z);var ne=X.current.filter(function(Se){return I.current&&I.current.contains(Se)}),me=ne.indexOf(z.target);me!==-1&&ne.splice(me,1),X.current=ne,!(ne.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),dl(z)&&u&&u(z))},[I,u,k]),G=S.useCallback(function(z,ne){var me=[],Se=[];z.forEach(function(ze){var lt=T1(ze,O),Lt=Gf(lt,2),xt=Lt[0],Yt=Lt[1],qn=E1(ze,a,i),Cn=Gf(qn,2),An=Cn[0],q=Cn[1],U=M?M(ze):null;if(xt&&An&&!U)me.push(ze);else{var Ne=[Yt,q];U&&(Ne=Ne.concat(U)),Se.push({file:ze,errors:Ne.filter(function(Xe){return Xe})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(ze){Se.push({file:ze,errors:[L$]})}),me.splice(0)),$({acceptedFiles:me,fileRejections:Se,isDragReject:Se.length>0,type:"setFiles"}),h&&h(me,Se,ne),Se.length>0&&b&&b(Se,ne),me.length>0&&f&&f(me,ne)},[$,s,O,a,i,l,h,f,b,M]),J=S.useCallback(function(z){z.preventDefault(),z.persist(),Te(z),X.current=[],dl(z)&&Promise.resolve(o(z)).then(function(ne){ul(z)&&!k||G(ne,z)}).catch(function(ne){return te(ne)}),$({type:"reset"})},[o,G,te,k]),j=S.useCallback(function(){if(R.current){$({type:"openDialog"}),L();var z={multiple:s,types:F};window.showOpenFilePicker(z).then(function(ne){return o(ne)}).then(function(ne){G(ne,null),$({type:"closeDialog"})}).catch(function(ne){W$(ne)?(H(ne),$({type:"closeDialog"})):q$(ne)?(R.current=!1,_.current?(_.current.value=null,_.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(ne)});return}_.current&&($({type:"openDialog"}),L(),_.current.value=null,_.current.click())},[$,L,H,v,G,te,F,s]),Y=S.useCallback(function(z){!I.current||!I.current.isEqualNode(z.target)||(z.key===" "||z.key==="Enter"||z.keyCode===32||z.keyCode===13)&&(z.preventDefault(),j())},[I,j]),Q=S.useCallback(function(){$({type:"focus"})},[]),ue=S.useCallback(function(){$({type:"blur"})},[]),ve=S.useCallback(function(){E||(z$()?setTimeout(j,0):j())},[E,j]),xe=function(ne){return r?null:ne},Ee=function(ne){return w?null:xe(ne)},we=function(ne){return T?null:xe(ne)},Te=function(ne){k&&ne.stopPropagation()},We=S.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.refKey,me=ne===void 0?"ref":ne,Se=z.role,ze=z.onKeyDown,lt=z.onFocus,Lt=z.onBlur,xt=z.onClick,Yt=z.onDragEnter,qn=z.onDragOver,Cn=z.onDragLeave,An=z.onDrop,q=fl(z,Y$);return vt(vt(Xf({onKeyDown:Ee(Hn(ze,Y)),onFocus:Ee(Hn(lt,Q)),onBlur:Ee(Hn(Lt,ue)),onClick:xe(Hn(xt,ve)),onDragEnter:we(Hn(Yt,ee)),onDragOver:we(Hn(qn,B)),onDragLeave:we(Hn(Cn,K)),onDrop:we(Hn(An,J)),role:typeof Se=="string"&&Se!==""?Se:"presentation"},me,I),!r&&!w?{tabIndex:0}:{}),q)}},[I,Y,Q,ue,ve,ee,B,K,J,w,T,r]),fe=S.useCallback(function(z){z.stopPropagation()},[]),ae=S.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.refKey,me=ne===void 0?"ref":ne,Se=z.onChange,ze=z.onClick,lt=fl(z,G$),Lt=Xf({accept:O,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:xe(Hn(Se,J)),onClick:xe(Hn(ze,fe)),tabIndex:-1},me,_);return vt(vt({},Lt),lt)}},[_,n,s,J,r]);return vt(vt({},P),{},{isFocused:D&&!r,getRootProps:We,getInputProps:ae,rootRef:I,inputRef:_,open:xe(j)})}function oj(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},Jf),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},Jf);default:return e}}function M1(){}const D1=S.createContext([null,()=>{}]),ij=()=>S.useContext(D1),aj=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,sj={csv:$u,xls:$u,mov:fy,mp4:fy,xlsx:$u,pdf:dy,txt:dy,json:$I,mp3:DI},lj=e=>{const[,t]=ij(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:aj(l),size:t$(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=sj[e.file.name.split(".").at(-1)]??py,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(ko,{size:16})})})]})},cj=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(lj,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),N1=e=>{const t=Et(),n=e.dragging?jI:zI;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})]})]})},uj=e=>e.isDragActive?m.jsx(N1,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(cj,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(S.Fragment,{children:e.idle}),dj=m.jsx(N1,{dragging:!1}),fj=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]})},pj=({idle:e=dj,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Et(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(p=>p.concat(g))},{getRootProps:h,getInputProps:f,isDragActive:b}=O1({onDrop:d});return m.jsxs(D1.Provider,{value:a,children:[m.jsx(rf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(fj,{item:a[0]}):null}),m.jsxs("div",{...h(),"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",{...f(o),name:o.name,id:o.name}),m.jsx(uj,{File:n,onDeleteFile:t,isDragActive:b,idle:e,files:c})]})]})},hj=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})},F1=40,mj=e=>m.jsx(S.Fragment,{children:e.children}),gj={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},L1=[],vj=S.forwardRef(function(t,n){return m.jsx(Qe.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:m.jsx(Xn,{children:t.children})})}),yj=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Qe.li,{...r,ref:o,className:"last:rounded-t-lg"})}),bj={List:vj,Item:yj},xj=e=>{const t=Et(),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(Ca,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},wj=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:h=!1,required:f=!1,dynamicOption:b=!1,onChangeOptions:g,...p},v)=>{const y=S.useMemo(()=>new wn(r.map(ae=>[ae.value,ae])),[r]),x=S.useRef(null),E=S.useRef(null),w=p.value??p.defaultValue??L1,T=Et(),[k,C]=S.useState(0),[M,O]=S.useState(!1),[F,L]=S.useState(""),[H,I]=S.useState(()=>{const ae=new wn;return w.forEach(z=>{const ne=y.get(z);return ne?ae.set(z,ne):void 0}),ae}),_=S.useMemo(()=>Array.from(H.keys()),[H]),[V,N]=S.useState(()=>{const ae=new Set(w);return r.reduce((z,ne)=>ae.has(ne.value)?[...z,ne.label??ne.value]:z,[])??w}),[P,$]=S.useState(null),D=S.useRef(L1),W=b&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,R=F.length===0?W:Jd(W,"value",[{key:"value",value:F},{key:"label",value:F}]),Z=tf(M,"block-only"),X=R.filter(ae=>ae.hidden!==!0),oe=X.length===0,{x:te,y:ee,strategy:B,refs:K,context:G}=tr({open:M,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:zo,middleware:[Xi(4),n0({padding:10,elementContext:"reference",apply(ae){const ne=ae.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,me=yi(K.reference.current,window.innerHeight),Se=Math.min(ne<F1?me:ne,me,ae.availableHeight),ze=X.length===0?F1:Math.min(Se,me,ne),lt=`${x.current.getBoundingClientRect().width}px`;Object.assign(ae.elements.floating.style,{width:lt,maxWidth:lt,height:ze})}})]}),J=L0(G,gj),{getReferenceProps:j,getFloatingProps:Y,getItemProps:Q}=nr([xr(G,{role:"listbox"}),br(G),Hs(G,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ae=>$(z=>ae??z)})]);S.useEffect(()=>{if(!M)return C(0);const ae=K.reference;if(ae.current===null)return;const z=yi(ae.current,window.innerHeight);setTimeout(()=>C(Math.min(z,X.length*40)),100)},[F,M,K.reference]),S.useEffect(()=>{p.value&&I(new wn(p.value.map(ae=>[ae,y.get(ae)])))},[p.value,y]),S.useEffect(()=>{const ae=K.reference.current;if(ae)return vi(ae)},[]);const ue=(ae,z)=>{const ne=H.clone(ze=>ze.has(ae.value)?ze.remove(ae.value):ze.set(ae.value,ae));I(ne);const me=K.reference.current;if(!me)return;const Se=ne.map(ze=>ze.value);me?.setAttribute("data-value",JSON.stringify(Se)),g&&g(Se),N(ze=>ze.concat(ae.label??"")),L(""),$(z)},ve=ae=>{const z=ae.target.value;return L(z),!M&&z===""?O(!0):(ae.target.name=p.name||"",z?O(!0):void 0)},xe=()=>{O(!0),L(""),K.reference.current?.focus()},Ee=()=>{O(!0),L("")},we=()=>{K.reference.current?.setAttribute("data-value","[]"),L(""),O(!1),I(new wn),g?.([])},Te=p.id||p.name,We=H.map((ae,z)=>m.jsx(Ca,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),ue(ae,z)},children:m.jsx(ko,{size:14})}),children:ae.label??ae.value},`MultiSelect-${ae.value}-x`)),fe={height:oe?"0":H.size===0?k-49:k-86};return m.jsxs(pa,{...p,left:e,error:t,ref:x,form:p.form,name:p.name,feedback:d,hideLeft:h,required:f,title:p.title,container:o,rightLabel:i,interactive:a,id:p.name||p.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:p.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:xe,children:[m.jsx(Fu,{size:20}),m.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),H?m.jsx("button",{type:"button",onClick:we,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",{...j({...p,onFocus:Ee,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":_.join(","),className:Ce("input 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",p.className),children:[_.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:p.placeholder}),m.jsx(xj,{label:c,children:We})]}),m.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:v,required:f,defaultValue:p.value||_||void 0}),m.jsx(yr,{preserveTabOrder:!0,children:M?m.jsx(Gd,{lockScroll:!0,children:m.jsx(Qr,{modal:!0,guards:!0,returnFocus:!1,context:G,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...Y({ref:K.setFloating,style:{...J.styles,top:ee??0,position:B,left:te,height:k-(_.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[m.jsx("input",{autoFocus:!0,value:F,onChange:ve,title:p.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:ae=>{if(ae.key==="ArrowDown"){let z=P+1;return z>X.length-1&&(z=0),E.current?.scrollIntoView({index:z}),$(z)}if(ae.key==="ArrowUp"){let z=P-1;return z<0&&(z=X.length-1),E.current?.scrollIntoView({index:z}),$(z)}if(ae.key==="Escape")return ae.currentTarget.blur(),O(!1);if(ae.key==="Enter"){if(P!==null&&X[P])return ae.preventDefault(),ue(X[P],P);if(X.length===1)return ae.preventDefault(),ue(X[0],0)}}}),oe?m.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,oe?null:m.jsx(Qe.div,{initial:!1,"data-floating":"true",ref:Z,animate:{height:oe?"auto":k},style:fe,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!M)return C(0);const z=K.floating.current.querySelectorAll("li").item(0),ne=(z?z.getBoundingClientRect().height:40)*X.length;return hi.flushSync(()=>C(ne+2))},children:m.jsx(Of,{ref:E,hidden:oe,data:X,components:bj,style:fe,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ae,z)=>{const ne=z.Render??mj,me=H.has(z.value)||H.has(z.label??""),Se=P===ae,ze=z.label??z.value;return m.jsxs("button",{"data-value":z.value,...Q({ref:lt=>void(D.current[ae]=lt),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":z.disabled,onClick:()=>ue(z,ae)}),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 ${me||Se?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx(Lf,{onChange:od,checked:me,"aria-checked":me,onClick:lt=>{lt.stopPropagation(),ue(z,ae)}}),m.jsx(ne,{...p,label:z.label,value:z.value,children:ze})]})}})}),m.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:H.size===0?m.jsx(Ca,{theme:"muted",size:"small",children:T.autocompleteEmpty}):We})]})})}):null})]})}),Sj=({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:Ce("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]}),no=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:h,left:f,error:b,...g},p)=>{const v=Et(),y=S.useRef(null),x=g.id??g.name;S.useImperativeHandle(p,()=>y.current),S.useEffect(()=>{if(y.current===null)return;const w=new AbortController,T=y.current,k=vi(y.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{k(),w.abort()}},[]);const E=()=>y.current?.focus();return m.jsx(pa,{info:n,left:f,error:b,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:m.jsxs("label",{htmlFor:x,children:[h,m.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(Fu,{size:20}),m.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:m.jsxs("select",{...g,id:x,name:x,required:e,ref:Kn(p,y),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Ce("input select group 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",g.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>S.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})}),Tj=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"));Ve.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Ve.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(af,{title:"",ref:r,as:PN,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},Ej=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(No()),s=r||o||[];return m.jsxs(kN,{...i,defaultValue:r,value:o,className:Ce("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(CN,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(AN,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>m.jsx(Tj,{tooltip:t??!1},`${a.current}-${c}`))]})},kj=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=ir(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},b=u.current;return b.addEventListener("change",f),()=>b?.removeEventListener("change",f)}},[]);const h=()=>{const f=!u.current?.checked;l(f),o?.onCheck?.(f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:Ce("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:f=>l(f.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:h,"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})]})}),Cj=e=>{const[t,n]=mI();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:kI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Aj=Kw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
- `);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)}),Pj=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},Ij={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"})})},_j=e=>{const t=S.useRef(null),n=Pj(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(ha,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(Of,{height:n,useWindowScroll:!0,data:e.source,components:Ij,itemContent:(r,o)=>m.jsx(S.Fragment,{children:m.jsx(Lf,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(ka,{children:m.jsx(Lu,{})})}),m.jsx("div",{})]})};var Oj=Object.defineProperty,V1=Object.getOwnPropertySymbols,Mj=Object.prototype.hasOwnProperty,Dj=Object.prototype.propertyIsEnumerable,$1=(e,t,n)=>t in e?Oj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nj=(e,t)=>{for(var n in t||(t={}))Mj.call(t,n)&&$1(e,n,t[n]);if(V1)for(var n of V1(t))Dj.call(t,n)&&$1(e,n,t[n]);return e},ep=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Fj=(e,t,n,r)=>hl(ep,e,t,n,r),ni=e=>typeof e=="object",kr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ni(e)&&!ni(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=>kr(e[r],t[r]))},Lj=(e,t)=>(ni(e)||Array.isArray(e))&&t?e[t]:e,Vj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,pl=e=>/[0-9.]+/.test(e),j1=e=>["string","number"].includes(typeof e),z1=e=>e==null||e?.length===0||e==="",R1={eq:kr,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:z1,notEmpty:e=>!z1(e),in:(e,t)=>ep(t,n=>kr(e,n)),notIn:(e,t)=>B1(t,n=>!kr(e,n))},$j=e=>{if(e in R1)return R1[e];throw new Error("Linq - Symbol not found")},ri=(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},hl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=$j(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},jj=(e,t,n,r)=>hl(ri,e,t,n,r),B1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},zj=(e,t,n,r)=>hl(B1,e,t,n,r),H1=e=>{if(e===null)return null;const t=Nj({},e);return Object.keys(t).forEach(n=>t[n]=ni(e[n])?H1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},W1=(e,t)=>{if(ni(t)){for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1},Rj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Bj=e=>ri(e,(t,n,r)=>ni(t)?n===r.findIndex(o=>kr(o,t)):n===r.indexOf(t)),Hj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},q1=(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())},Wj=(e,t)=>q1(e,n=>n[t]),U1=(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},qj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Uj=(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 pl(e)&&pl(t)?r.map(a=>Number.parseInt(a)):r},tp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&pl(e)&&pl(t)){const o=[],[i,a]=qj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Uj(e,t,r)},Kj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?tp(r,o,1):tp(r,i,Number.parseInt(o,10))}return j1(e)&&j1(t)?tp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},np=(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},K1=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},Yj=(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)},Gj=(e,t,n,r)=>hl(Yj,e,t,n,r),Y1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Vj(t))},G1=(e=>(e.Asc="asc",e.Desc="desc",e))(G1||{}),Zj=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),Xj=(e,t)=>e.sort(Zj(t)),Qj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ri(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Jj=class _p{constructor(t=[]){this.array=t}static Range(...t){return Kj(...t)}static New(t){return new _p(t)}Where(t,n,r){return this.array=jj(this.array,t,n,r),this}Some(t,n,r){return Fj(this.array,t,n,r)}All(t,n,r){return zj(this.array,t,n,r)}Reverse(){return this.array=K1(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=Gj(this.array,t,n,r),this}Distinct(){return this.array=Bj(this.array),this}First(t){return t===void 0?this.array[0]:Hj(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?np((n,r)=>n+r,0,this.array):np((n,r)=>n+Lj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Wj(this.array,t)}GroupWith(t){return q1(this.array,t)}Except(t){return ri(this.array,n=>!W1(t,n))}Intersect(t){return ri(this.array,n=>W1(t,n))}OrderBy(t,n){let r;return r=t?Y1(this.array,t):this.array.toSorted(),this.array=n==="desc"?K1(r):r,this}Includes(t){return ep(this.array,n=>kr(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 np(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(U1(this.array,n=>[t,n]))}Zip(t,n){return U1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ri(this.array,t).length}Get(t){return this.array[t]}Clone(){return new _p(H1(this.array))}ToObject(t){return Rj(this.array,t)}Sort(t){return Array.isArray(t)?Xj(this.array,t):Y1(this.array,t)}Unique(t){return Qj(this.array,t)}},Z1=Jj,rp={},X1;function ez(){return X1||(X1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(p,v)=>{try{Object.keys(p).forEach(v)}catch(y){window.console.log(y)}},n=p=>p==null,r=p=>{const v=typeof p;return v==="string"||v==="number"||v==="boolean"||n(p)},o=(p,v)=>{const y=v.getItem(p);try{return JSON.parse(y)}catch{return y??null}},i=p=>Object.keys(p).reduce((v,y)=>({...v,[y]:o(y,p)}),{}),a=p=>p instanceof Date?p:typeof p=="number"?new Date(new Date*1+p*864e5):p,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(p=>p.split("=")).reduce((p,v)=>(p[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),p),{}),c=new Set,u=()=>{const p=l();c.forEach(v=>v(p))},d=[{name:"expires",parse:p=>`expires=${a(p.expires??s)}`},{name:"maxAge",parse:p=>p.maxAge?`max-age=${a(p.expires??s)}`:""},{name:"path",parse:p=>`path=${p.path??"/"}`},{name:"sameSite",parse:p=>`samesite=${p.sameSite??"strict"}`},{name:"useSecure",parse:p=>`${p.useSecure??!0?"secure":""}`},{name:"domain",parse:p=>{const v=p.domain??"";return v===""?"":`domain=${p.multiDomain?".":""}${v}`}},{name:"partitioned",parse:p=>p.partitioned?"Partitioned":""}],h={json:l,listener:p=>(c.add(p),()=>c.delete(p)),clearListeners:()=>c.clear(),has:p=>document.cookie.split(";").some(v=>v.trim().startsWith(`${p}=`)),deleteAll:()=>{document.cookie.split(";").forEach(p=>{document.cookie=p.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:p=>{const v=h.json()[p];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:p=>{document.cookie=`${encodeURIComponent(p)}=;expires=${new Date().toUTCString()}`,u()},set:(p,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),E=d.reduce((w,T)=>{const k=T.parse(y);return k===""?w:w.concat(k)},[`${encodeURIComponent(p)}=${x}`]).join(";");document.cookie=E,u()}},f=p=>{const v=new Set,y=x=>{p().removeItem(x);const E=i(p());v.forEach(w=>w(E))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(p()):p(),has:x=>{const E=p().getItem(x);return!n(E)},deleteAll:()=>{t(p(),y),v.forEach(x=>x(p()))},get:x=>o(x,p()),set:(x,E)=>{p().setItem(x,JSON.stringify(E)),v.forEach(w=>w(p()))}}},b=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=g,e.SessionStorage=b,e.createStorage=f}(rp)),rp}var ga=ez();const op=e=>e.headerLabel??e.thead??e.id,ip=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var oi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(oi||{});const ap=e=>e.type==="number"?e.valueAsNumber:e.value,tz=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},nz={},rz=(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})},oz=(e,t,n=nz)=>{const r=dr()?null:ga.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=os({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:rz(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return dr()||ga.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},iz=e=>{const t=ir(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]},az=()=>dr()?void 0:document.querySelector('[data-component="modal-body"]'),sp=(e,t,n,r={})=>{const o=e.id,i=e.type??oi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:No(),operation:l,label:op(e),name:o,type:i,value:"",...r}},lp=()=>{const e=Et(),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(()=>({[oi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[oi.Boolean]:[t.is,t.isNot],[oi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},sz=e=>{const t=Et(),n=lp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,sp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>{if(c!==h.id)return h;const f=e.cols.find(b=>u===b.id);return sp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},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=ap(l.target);e.set(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return m.jsx(S.Fragment,{children:m.jsx(Yo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(BI,{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(no,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(no,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(ha,{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(Ua,{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(Vu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},lz=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=lp(),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=ap(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(no,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(ha,{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(Ua,{className:"text-danger",size:14})})]})},cz=({item:e,onPointerDown:t})=>{const n=qa(0);return m.jsxs(ay,{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(RI,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},uz=e=>{const t=Et(),n=ip(e.cols),r=yI(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,h=c.options.item(d)?.label||"";i(h);const f=new Z1(e.rows).GroupBy(u),b=e.cols.find(g=>g.id===u);e.setGroups(TT(f).map((g,p)=>{const v=f[g];return{...b,groupId:No(),groupKey:u,index:p,rows:v,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(S.Fragment,{children:m.jsxs(Yo,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(KI,{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(no,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(ka,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(Ua,{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(mC,{children:m.jsx(oy,{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(cz,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},dz=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),fz=(e,t)=>e.toSorted(dz(t)),Q1=(e,t,n)=>({label:t,id:No(),type:n,value:e.id}),pz=e=>{const t=Et(),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,Q1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},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(Yo,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(cy,{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(no,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(no,{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(Ua,{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(Vu,{size:14})," ",t.tableSortAddButton]})})]})})})},hz=e=>{const t=Et(),[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=Q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=op(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(MI,{size:14}):null,n==="desc"?m.jsx(OI,{size:14}):null,n==="undefined"?m.jsx(cy,{size:14}):null]})},mz=e=>m.jsx("header",{className:"min-w-full mb-1",children:m.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[m.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[m.jsx("span",{children:m.jsx(sz,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(pz,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(uz,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[m.jsxs("span",{children:[m.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","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 whitespace-pre p-0",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=ap(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function gz(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 vz=e=>{const t=S.useId(),n=Et(),r=S.useMemo(()=>gz(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 px-1 py-4 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(un,{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(un,{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(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},yz=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})})},bz=(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=nd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,h=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?m.jsx(yz,{children:m.jsx(h,{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?ef:c?m.jsx(S.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(S.Fragment,{children:Ve.nil(l)?"":l})}))})})},xz={top:0,left:0,right:0,bottom:-1},wz=e=>{const t=Ff(),n=Et(),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=lp(),l=o?WI:qI,c=S.useRef(null),u=g=>{const p=g.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==p))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const p=new AbortController;return g.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:p.signal}),()=>p.abort()},[]),h=e.sorters.find(g=>e.header.id===g.value),f=h?.type?h.type===G1.Asc?"ascending":"descending":"none",b=op(e.header);return m.jsxs(ay,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative 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 px-2 py-4 ${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(Yo,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",b]}),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:b})]}),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(lz,{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(sp(e.header,s.options,s.operations))),children:[m.jsx(Vu,{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(hz,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(Qe.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:xz,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-table-border hover:bg-primary active:bg-primary",onClick:g=>void g.currentTarget.focus(),onKeyDown:g=>{if(g.key==="ArrowLeft"||g.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const p=c.current.getBoundingClientRect().width,y=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(p+y)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(g,p)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,y=p.delta.x;c.current.style.width=`${Math.abs(v+y)}px`}})]})},Sz=e=>{const[t,n]=iz(e.setCols);return m.jsx(oy,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(Xn,{children:e.headers.map((r,o)=>m.jsx(wz,{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}`))})})},J1=S.createContext({}),Tz=()=>S.useContext(J1),Ez=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(Xn,{children:n.children})})),kz=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),Cz=S.forwardRef(({context:e,...t},n)=>{const r=Tz(),o={...t?.style,top:Ve.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 shadow-shadow-card group:sticky"})}),Az=S.forwardRef(({context:e,item:t,...n},r)=>m.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})),Pz=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),Iz={TableHead:Cz,Table:kz,TableBody:Ez,TableRow:Az,TableFoot:Pz},_z=[0,0,0,0,0,0,0,0,0,0],Oz=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?ef:m.jsx(bb,{})}),Mz=()=>m.jsx(S.Fragment,{}),Dz=()=>m.jsx(S.Fragment,{}),Nz=[],eS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const h=S.useRef(null),[f,b]=S.useState(!1),g=ir(a),p=ir(d.loadingMore),v=S.useMemo(()=>{if(d.loading)return _z;if(u)return d.rows;const E=new Z1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:E.Where(w.name,w.operation.symbol,w.value)),r.length===0?E.Select():fz(E.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(h.current===null)return()=>{};const E=h.current,w=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&p.current?(g.current?.(),void b(!0)):b(!1));return w.observe(E),()=>w.disconnect()},[p,g]);const y=v.length===0,x={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return m.jsxs("div",{className:"min-w-full",children:[m.jsxs("div",{className:`group h-full w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[m.jsx(kV,{context:x,components:Iz,totalCount:v.length,itemContent:y?Mz:bz,data:y?Nz:v,useWindowScroll:!s,fixedFooterContent:f?Dz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(Sz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),y?m.jsx(Oz,{loading:d.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:h,className:"w-full h-0.5"})]}),c!==null?m.jsx(vz,{...c}):null]})},Fz=(e,t)=>typeof t=="function"?t(e):t,ml=(e,t,n)=>e===t?void 0:n?.(t),Lz=e=>{const t=Ff(),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(()=>ip(e.cols),[e.cols]),[i,a]=os({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:Fz(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),ml(l?.filters??[],s.filters??[],e.setFilters),ml(l?.sorters??[],s.sorters??[],e.setSorters),ml(l?.groups??[],s.groups??[],e.setGroups),ml(l?.cols??[],s.cols??[],e.setCols),s)]});return m.jsxs(J1.Provider,{value:n,children:[r?m.jsx(mz,{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(eS,{...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(eS,{...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}`))})]})},Vz=["INPUT","SELECT"],tS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{Vz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var cp,nS;function up(){if(nS)return cp;nS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return cp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},cp}var dp,rS;function oS(){if(rS)return dp;rS=1;var e=up(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var p=[],v=0;v<256;++v)p.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return p}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var E=[],w=0;w<x.length;++w)typeof x[w]<"u"&&E.push(x[w]);y.obj[y.prop]=E}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},E=0;E<v.length;++E)typeof v[E]<"u"&&(x[E]=v[E]);return x},a=function p(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var E=v;return n(v)&&!n(y)&&(E=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,T){if(t.call(v,T)){var k=v[T];k&&typeof k=="object"&&w&&typeof w=="object"?v[T]=p(k,w,x):v.push(w)}else v[T]=w}),v):Object.keys(y).reduce(function(w,T){var k=y[T];return t.call(w,T)?w[T]=p(w[T],k,x):w[T]=k,w},E)},s=function(v,y){return Object.keys(y).reduce(function(x,E){return x[E]=y[E],x},v)},l=function(p,v,y){var x=p.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,E,w){if(v.length===0)return v;var T=v;if(typeof v=="symbol"?T=Symbol.prototype.toString.call(v):typeof v!="string"&&(T=String(v)),x==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(H){return"%26%23"+parseInt(H.slice(2),16)+"%3B"});for(var k="",C=0;C<T.length;C+=c){for(var M=T.length>=c?T.slice(C,C+c):T,O=[],F=0;F<M.length;++F){var L=M.charCodeAt(F);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||w===e.RFC1738&&(L===40||L===41)){O[O.length]=M.charAt(F);continue}if(L<128){O[O.length]=r[L];continue}if(L<2048){O[O.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){O[O.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}F+=1,L=65536+((L&1023)<<10|M.charCodeAt(F)&1023),O[O.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}k+=O.join("")}return k},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],E=0;E<y.length;++E)for(var w=y[E],T=w.obj[w.prop],k=Object.keys(T),C=0;C<k.length;++C){var M=k[C],O=T[M];typeof O=="object"&&O!==null&&x.indexOf(O)===-1&&(y.push({obj:T,prop:M}),x.push(O))}return o(y),v},h=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},b=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],E=0;E<v.length;E+=1)x.push(y(v[E]));return x}return y(v)};return dp={arrayToObject:i,assign:s,combine:b,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:h,maybeMap:g,merge:a},dp}var fp,iS;function $z(){if(iS)return fp;iS=1;var e=yT(),t=oS(),n=up(),r=Object.prototype.hasOwnProperty,o={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,v){return p+"["+v+"]"},repeat:function(p){return p}},i=Array.isArray,a=Array.prototype.push,s=function(g,p){a.apply(g,i(p)?p:[p])},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(p){return l.call(p)},skipNulls:!1,strictNullHandling:!1},d=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},h={},f=function g(p,v,y,x,E,w,T,k,C,M,O,F,L,H,I,_,V,N){for(var P=p,$=N,D=0,W=!1;($=$.get(h))!==void 0&&!W;){var R=$.get(p);if(D+=1,typeof R<"u"){if(R===D)throw new RangeError("Cyclic object value");W=!0}typeof $.get(h)>"u"&&(D=0)}if(typeof M=="function"?P=M(v,P):P instanceof Date?P=L(P):y==="comma"&&i(P)&&(P=t.maybeMap(P,function(ue){return ue instanceof Date?L(ue):ue})),P===null){if(w)return C&&!_?C(v,u.encoder,V,"key",H):v;P=""}if(d(P)||t.isBuffer(P)){if(C){var Z=_?v:C(v,u.encoder,V,"key",H);return[I(Z)+"="+I(C(P,u.encoder,V,"value",H))]}return[I(v)+"="+I(String(P))]}var X=[];if(typeof P>"u")return X;var oe;if(y==="comma"&&i(P))_&&C&&(P=t.maybeMap(P,C)),oe=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(M))oe=M;else{var te=Object.keys(P);oe=O?te.sort(O):te}var ee=k?String(v).replace(/\./g,"%2E"):String(v),B=x&&i(P)&&P.length===1?ee+"[]":ee;if(E&&i(P)&&P.length===0)return B+"[]";for(var K=0;K<oe.length;++K){var G=oe[K],J=typeof G=="object"&&G&&typeof G.value<"u"?G.value:P[G];if(!(T&&J===null)){var j=F&&k?String(G).replace(/\./g,"%2E"):String(G),Y=i(P)?typeof y=="function"?y(B,j):B:B+(F?"."+j:"["+j+"]");N.set(p,D);var Q=e();Q.set(h,N),s(X,g(J,Y,y,x,E,w,T,k,y==="comma"&&_&&i(P)?null:C,M,O,F,L,H,I,_,V,Q))}}return X},b=function(p){if(!p)return u;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.encodeDotInKeys<"u"&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=p.charset||u.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof p.format<"u"){if(!r.call(n.formatters,p.format))throw new TypeError("Unknown format option provided.");y=p.format}var x=n.formatters[y],E=u.filter;(typeof p.filter=="function"||i(p.filter))&&(E=p.filter);var w;if(p.arrayFormat in o?w=p.arrayFormat:"indices"in p?w=p.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof p.allowDots>"u"?p.encodeDotInKeys===!0?!0:u.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?u.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:u.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:u.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:u.encodeValuesOnly,filter:E,format:y,formatter:x,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:u.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:u.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:u.strictNullHandling}};return fp=function(g,p){var v=g,y=b(p),x,E;typeof y.filter=="function"?(E=y.filter,v=E("",v)):i(y.filter)&&(E=y.filter,x=E);var w=[];if(typeof v!="object"||v===null)return"";var T=o[y.arrayFormat],k=T==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var C=e(),M=0;M<x.length;++M){var O=x[M],F=v[O];y.skipNulls&&F===null||s(w,f(F,O,T,k,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}var L=w.join(y.delimiter),H=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?H+="utf8=%26%2310003%3B&":H+="utf8=%E2%9C%93&"),L.length>0?H+L:""},fp}var pp,aS;function jz(){if(aS)return pp;aS=1;var e=oS(),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(h){return h.replace(/&#(\d+);/g,function(f,b){return String.fromCharCode(parseInt(b,10))})},i=function(h,f,b){if(h&&typeof h=="string"&&f.comma&&h.indexOf(",")>-1)return h.split(",");if(f.throwOnLimitExceeded&&b>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return h},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,b){var g={__proto__:null},p=b.ignoreQueryPrefix?f.replace(/^\?/,""):f;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=b.parameterLimit===1/0?void 0:b.parameterLimit,y=p.split(b.delimiter,b.throwOnLimitExceeded?v+1:v);if(b.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,E,w=b.charset;if(b.charsetSentinel)for(E=0;E<y.length;++E)y[E].indexOf("utf8=")===0&&(y[E]===s?w="utf-8":y[E]===a&&(w="iso-8859-1"),x=E,E=y.length);for(E=0;E<y.length;++E)if(E!==x){var T=y[E],k=T.indexOf("]="),C=k===-1?T.indexOf("="):k+1,M,O;C===-1?(M=b.decoder(T,r.decoder,w,"key"),O=b.strictNullHandling?null:""):(M=b.decoder(T.slice(0,C),r.decoder,w,"key"),O=e.maybeMap(i(T.slice(C+1),b,n(g[M])?g[M].length:0),function(L){return b.decoder(L,r.decoder,w,"value")})),O&&b.interpretNumericEntities&&w==="iso-8859-1"&&(O=o(String(O))),T.indexOf("[]=")>-1&&(O=n(O)?[O]:O);var F=t.call(g,M);F&&b.duplicates==="combine"?g[M]=e.combine(g[M],O):(!F||b.duplicates==="last")&&(g[M]=O)}return g},c=function(h,f,b,g){var p=0;if(h.length>0&&h[h.length-1]==="[]"){var v=h.slice(0,-1).join("");p=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,b,p),x=h.length-1;x>=0;--x){var E,w=h[x];if(w==="[]"&&b.parseArrays)E=b.allowEmptyArrays&&(y===""||b.strictNullHandling&&y===null)?[]:e.combine([],y);else{E=b.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,k=b.decodeDotInKeys?T.replace(/%2E/g,"."):T,C=parseInt(k,10);!b.parseArrays&&k===""?E={0:y}:!isNaN(C)&&w!==k&&String(C)===k&&C>=0&&b.parseArrays&&C<=b.arrayLimit?(E=[],E[C]=y):k!=="__proto__"&&(E[k]=y)}y=E}return y},u=function(f,b,g,p){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,E=g.depth>0&&y.exec(v),w=E?v.slice(0,E.index):v,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var k=0;g.depth>0&&(E=x.exec(v))!==null&&k<g.depth;){if(k+=1,!g.plainObjects&&t.call(Object.prototype,E[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(E[1])}if(E){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+v.slice(E.index)+"]")}return c(T,b,g,p)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:p,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:b,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return pp=function(h,f){var b=d(f);if(h===""||h===null||typeof h>"u")return b.plainObjects?{__proto__:null}:{};for(var g=typeof h=="string"?l(h,b):h,p=b.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],E=u(x,g[x],b,typeof h=="string");p=e.merge(p,E,b)}return b.allowSparse===!0?p:e.compact(p)},pp}var hp,sS;function zz(){if(sS)return hp;sS=1;var e=$z(),t=jz(),n=up();return hp={formats:n,parse:t,stringify:e},hp}var Rz=zz(),He;(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})(He||(He={}));var lS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(lS||(lS={}));const ge=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return Number.isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=He.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 rr 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 rr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.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()}}rr.create=e=>new rr(e);const mp=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.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}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.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 se.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 se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let Bz=mp;function Hz(){return Bz}const Wz=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 ce(e,t){const n=Hz(),r=Wz({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mp?void 0:mp].filter(o=>!!o)});e.common.issues.push(r)}class sn{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 _e;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 sn.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 _e;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 _e=Object.freeze({status:"aborted"}),va=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),cS=e=>e.status==="aborted",uS=e=>e.status==="dirty",ii=e=>e.status==="valid",gl=e=>typeof Promise<"u"&&e instanceof Promise;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ye||(ye={}));class Ar{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 dS=(e,t)=>{if(ii(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 rr(e.common.issues);return this._error=n,this._error}}};function je(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 Be{get description(){return this._def.description}_getType(t){return Cr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sn,ctx:{common:t.parent.common,data:t.data,parsedType:Cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(gl(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:Cr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return dS(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ii(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=>ii(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:Cr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(gl(o)?o:Promise.resolve(o));return dS(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:se.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 ci({schema:this,typeName:Oe.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 Ir.create(this,this._def)}nullable(){return ui.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this)}promise(){return xl.create(this,this._def)}or(t){return yl.create([this,t],this._def)}and(t){return bl.create(this,t,this._def)}transform(t){return new ci({...je(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new yp({...je(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new pR({typeName:Oe.ZodBranded,type:this,...je(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new bp({...je(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return xp.create(this,t)}readonly(){return wp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qz=/^c[^\s-]{8,}$/i,Uz=/^[0-9a-z]+$/,Kz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yz=/^[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,Gz=/^[a-z0-9_-]{21}$/i,Zz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Xz=/^[-+]?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)?)??$/,Qz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Jz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gp;const eR=/^(?:(?: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])$/,tR=/^(?:(?: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])$/,nR=/^(([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]))$/,rR=/^(([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])$/,oR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fS="((\\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])))",aR=new RegExp(`^${fS}$`);function pS(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 sR(e){return new RegExp(`^${pS(e)}$`)}function lR(e){let t=`${fS}T${pS(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 cR(e,t){return!!((t==="v4"||!t)&&eR.test(e)||(t==="v6"||!t)&&nR.test(e))}function uR(e,t){if(!Zz.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 dR(e,t){return!!((t==="v4"||!t)&&tR.test(e)||(t==="v6"||!t)&&rR.test(e))}class ro extends Be{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const i=this._getOrReturnCtx(t);return ce(i,{code:se.invalid_type,expected:ge.string,received:i.parsedType}),_e}const r=new sn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:se.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),ce(o,{code:se.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?ce(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Qz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")gp||(gp=new RegExp(Jz,"u")),gp.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Gz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Uz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Kz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ulid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ce(o,{validation:"url",code:se.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),ce(o,{validation:"regex",code:se.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),ce(o,{code:se.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),ce(o,{code:se.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:se.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?lR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:se.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?aR.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:se.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?sR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:se.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:se.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?cR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:se.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?uR(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:se.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?dR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:se.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?oR.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:se.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?iR.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:se.invalid_string,message:i.message}),r.dirty()):He.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:se.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new ro({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.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,...ye.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,...ye.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ye.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new ro({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ro({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ro({...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}}ro.create=e=>new ro({checks:[],typeName:Oe.ZodString,coerce:e?.coerce??!1,...je(e)});function fR(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 ai extends Be{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)!==ge.number){const i=this._getOrReturnCtx(t);return ce(i,{code:se.invalid_type,expected:ge.number,received:i.parsedType}),_e}let r;const o=new sn;for(const i of this._def.checks)i.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:se.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),ce(r,{code:se.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),ce(r,{code:se.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?fR(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:se.not_finite,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ai({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ai({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.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"&&He.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)}}ai.create=e=>new ai({checks:[],typeName:Oe.ZodNumber,coerce:e?.coerce||!1,...je(e)});class ya extends Be{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)!==ge.bigint)return this._getInvalidInput(t);let r;const o=new sn;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),ce(r,{code:se.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),ce(r,{code:se.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),ce(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):He.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:se.invalid_type,expected:ge.bigint,received:n.parsedType}),_e}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.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:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.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:Oe.ZodBigInt,coerce:e?.coerce??!1,...je(e)});class hS extends Be{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),_e}return yn(t.data)}}hS.create=e=>new hS({typeName:Oe.ZodBoolean,coerce:e?.coerce||!1,...je(e)});class vl extends Be{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const i=this._getOrReturnCtx(t);return ce(i,{code:se.invalid_type,expected:ge.date,received:i.parsedType}),_e}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:se.invalid_date}),_e}const r=new sn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:se.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),ce(o,{code:se.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):He.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.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}}vl.create=e=>new vl({checks:[],coerce:e?.coerce||!1,typeName:Oe.ZodDate,...je(e)});class mS extends Be{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),_e}return yn(t.data)}}mS.create=e=>new mS({typeName:Oe.ZodSymbol,...je(e)});class gS extends Be{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),_e}return yn(t.data)}}gS.create=e=>new gS({typeName:Oe.ZodUndefined,...je(e)});class vS extends Be{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return ce(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),_e}return yn(t.data)}}vS.create=e=>new vS({typeName:Oe.ZodNull,...je(e)});class yS extends Be{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}yS.create=e=>new yS({typeName:Oe.ZodAny,...je(e)});class bS extends Be{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}bS.create=e=>new bS({typeName:Oe.ZodUnknown,...je(e)});class Pr extends Be{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),_e}}Pr.create=e=>new Pr({typeName:Oe.ZodNever,...je(e)});class xS extends Be{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),_e}return yn(t.data)}}xS.create=e=>new xS({typeName:Oe.ZodVoid,...je(e)});class Wn extends Be{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ge.array)return ce(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),_e;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(n,{code:a?se.too_big:se.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&&(ce(n,{code:se.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&&(ce(n,{code:se.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 Ar(n,a,n.path,s)))).then(a=>sn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ar(n,a,n.path,s)));return sn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Wn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Wn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Wn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...je(t)});function si(e){if(e instanceof Mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ir.create(si(r))}return new Mt({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:si(e.element)}):e instanceof Ir?Ir.create(si(e.unwrap())):e instanceof ui?ui.create(si(e.unwrap())):e instanceof oo?oo.create(e.items.map(t=>si(t))):e}class Mt extends Be{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=He.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ge.object){const c=this._getOrReturnCtx(t);return ce(c,{code:se.invalid_type,expected:ge.object,received:c.parsedType}),_e}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Pr&&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 Ar(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Pr){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&&(ce(o,{code:se.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 Ar(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>sn.mergeObjectSync(r,c)):sn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new Mt({...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:ye.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Mt({...this._def,catchall:t})}pick(t){const n={};for(const r of He.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of He.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}deepPartial(){return si(this)}partial(t){const n={};for(const r of He.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Mt({...this._def,shape:()=>n})}required(t){const n={};for(const r of He.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ir;)i=i._def.innerType;n[r]=i}return new Mt({...this._def,shape:()=>n})}keyof(){return ES(He.objectKeys(this.shape))}}Mt.create=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:Oe.ZodObject,...je(t)}),Mt.strictCreate=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:Oe.ZodObject,...je(t)}),Mt.lazycreate=(e,t)=>new Mt({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:Oe.ZodObject,...je(t)});class yl extends Be{_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 rr(s.ctx.common.issues));return ce(n,{code:se.invalid_union,unionErrors:a}),_e}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 rr(l));return ce(n,{code:se.invalid_union,unionErrors:s}),_e}}get options(){return this._def.options}}yl.create=(e,t)=>new yl({options:e,typeName:Oe.ZodUnion,...je(t)});function vp(e,t){const n=Cr(e),r=Cr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const o=He.objectKeys(t),i=He.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=vp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===ge.array&&r===ge.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=vp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class bl extends Be{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(cS(i)||cS(a))return _e;const s=vp(i.value,a.value);return s.valid?((uS(i)||uS(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:se.invalid_intersection_types}),_e)};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}))}}bl.create=(e,t,n)=>new bl({left:e,right:t,typeName:Oe.ZodIntersection,...je(n)});class oo extends Be{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return ce(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return ce(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:se.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 Ar(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>sn.mergeArray(n,a)):sn.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:Oe.ZodTuple,rest:null,...je(t)})};class wS extends Be{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!==ge.map)return ce(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),_e;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ar(r,s,r.path,[c,"key"])),value:i._parse(new Ar(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 _e;(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 _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}wS.create=(e,t,n)=>new wS({valueType:t,keyType:e,typeName:Oe.ZodMap,...je(n)});class ba extends Be{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return ce(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),_e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(r,{code:se.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&&(ce(r,{code:se.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 _e;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 Ar(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new ba({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new ba({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ba.create=(e,t)=>new ba({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...je(t)});class SS extends Be{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})}}SS.create=(e,t)=>new SS({getter:e,typeName:Oe.ZodLazy,...je(t)});class TS extends Be{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}TS.create=(e,t)=>new TS({value:e,typeName:Oe.ZodLiteral,...je(t)});function ES(e,t){return new li({values:e,typeName:Oe.ZodEnum,...je(t)})}class li extends Be{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:He.joinValues(r),received:n.parsedType,code:se.invalid_type}),_e}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 ce(n,{received:n.data,code:se.invalid_enum_value,options:r}),_e}return yn(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 li.create(t,{...this._def,...n})}exclude(t,n=this._def){return li.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}li.create=ES;class kS extends Be{_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const o=He.objectValues(n);return ce(r,{expected:He.joinValues(o),received:r.parsedType,code:se.invalid_type}),_e}if(this._cache||(this._cache=new Set(He.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=He.objectValues(n);return ce(r,{received:r.data,code:se.invalid_enum_value,options:o}),_e}return yn(t.data)}get enum(){return this._def.values}}kS.create=(e,t)=>new kS({values:e,typeName:Oe.ZodNativeEnum,...je(t)});class xl extends Be{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return ce(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),_e;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return yn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}xl.create=(e,t)=>new xl({type:e,typeName:Oe.ZodPromise,...je(t)});class ci extends Be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.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=>{ce(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 _e;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?_e:l.status==="dirty"||n.value==="dirty"?va(l.value):l});{if(n.value==="aborted")return _e;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?_e:s.status==="dirty"||n.value==="dirty"?va(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"?_e:(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"?_e:(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(!ii(a))return _e;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=>ii(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):_e);He.assertNever(o)}}ci.create=(e,t,n)=>new ci({schema:e,typeName:Oe.ZodEffects,effect:t,...je(n)}),ci.createWithPreprocess=(e,t,n)=>new ci({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...je(n)});class Ir extends Be{_parse(t){return this._getType(t)===ge.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ir.create=(e,t)=>new Ir({innerType:e,typeName:Oe.ZodOptional,...je(t)});class ui extends Be{_parse(t){return this._getType(t)===ge.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ui.create=(e,t)=>new ui({innerType:e,typeName:Oe.ZodNullable,...je(t)});class yp extends Be{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}yp.create=(e,t)=>new yp({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...je(t)});class bp extends Be{_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 gl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new rr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}bp.create=(e,t)=>new bp({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...je(t)});class CS extends Be{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}CS.create=e=>new CS({typeName:Oe.ZodNaN,...je(e)});class pR extends Be{_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 xp extends Be{_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"?_e:i.status==="dirty"?(n.dirty(),va(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"?_e: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 xp({in:t,out:n,typeName:Oe.ZodPipeline})}}class wp extends Be{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ii(o)&&(o.value=Object.freeze(o.value)),o);return gl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}wp.create=(e,t)=>new wp({innerType:e,typeName:Oe.ZodReadonly,...je(t)});var Oe;(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"})(Oe||(Oe={})),Pr.create,Wn.create,yl.create,bl.create,oo.create,li.create,xl.create,Ir.create,ui.create;const hR=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},mR=(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]}}},AS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),ln=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):AS(t),o=structuredClone(e);return mR(o,r,n),o},gR=(e,t)=>e.localeCompare(t),di={},PS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return IS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=PS(e._def.innerType);return t==="ZodArray"?n??[]:n}},IS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,PS(n)])),_S=(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]=_S(i,o):n[r]=o||i)}return n},vR={sort:gR,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},OS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return Rz.parse(n.toString(),vR)},_r=(e,t)=>AS(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Or=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Sp=e=>{const t=e.dataset.target;if(!t)return Or(e);const n=document.querySelector(`[data-origin="${t}"]`);return Or(n||e)},yR={state:{},loading:!1,useOnChange:!1},MS=e=>e.dataset.target||e.name,bR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ga.LocalStorage.get(t);return hR(n)?n:{}},clear:()=>void ga.LocalStorage.delete(t),set:n=>ga.LocalStorage.set(t,n)}},xR=(e,t,n=yR)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>Ve.function(n?.state)?n.state():n?.state??IS(e)??{}),l=S.useCallback(x=>{const E=x.target,w=x.currentTarget;if(E.dataset.optional==="true")return;const k=MS(E),C=Sp(E)||(w?Or(w):""),M=_r(k,e);if(E.setAttribute("data-initialized","true"),M){const O=M.safeParse(C),F=O.success?void 0:O.error.issues[0]?.message??"";o(L=>ln(L??{},k,F))}},[e]),c=S.useCallback(x=>E=>{const w=E.currentTarget,T=Object.values(i.current).reduce((C,M)=>{const O=M.element,F=M.schema.safeParse(Or(O));if(O.dataset.ignore==="ignore"||F.success)return C;const L=F.error.issues[0]?.message;O.setAttribute("data-initialized","true");const H=O.dataset.name||O.name||"";return ln(C,H,L)},{}),k=Ve.empty(T)?null:T;o(k),console.error(k),x?.({form:w,errors:k||{}})},[]),u=(x,E=di)=>{const w=_r(x,e),T=k=>{if(!ju(k))return;s(M=>ln(M,x,k.toISOString())),o(M=>ln(M,x,void 0));const C=i.current[x].element;if(C){const M=C.getAttribute("data-origin"),O=document.querySelector(`input[data-target="${M}"]`);O&&O.setCustomValidity("")}E?.onChange?.(k)};return{...E,loading:n.loading,name:x,id:x,onChange:T,form:t,date:Ve.string(a[x])?new Date(a[x]):a[x],required:E.required??!w.isOptional(),error:In(r,x),ref:k=>{k!==null&&(i.current[x]={element:k,schema:w})}}},d=(x,E=di)=>{const w=_r(x,e);return{...E,name:x,id:x,onChange:k=>{const C=k.target.value;s(M=>ln(M,x,C)),E?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),value:In(a,x,void 0)??"",required:E.required??!w.isOptional(),ref:k=>k!==null?i.current[x]={element:k,schema:w}:void 0}},h=(x,E=di)=>{const w=_r(x,e);return{...E,name:x,id:x,onChange:k=>{const C=k.target.checked;s(M=>ln(M??{},x,C)),E?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:E.required??!w.isOptional(),ref:k=>k!==null?void(i.current[x]={element:k,schema:w}):void 0}},f=(x,E=di)=>{const w=_r(x,e),T=k=>{k.persist?.();const C=k.target.value;E?.onChange?.(k),s(M=>ln(M,x,C))};return{...E,loading:n.loading,name:x,id:x,onChange:T,form:t,onInvalid:l,error:In(r,x,void 0),required:E.required??!w.isOptional(),value:In(a,x,void 0)||E?.value||"",type:Ve.instance(w,ai)?"number":E?.type??"text",ref:k=>k===null?void 0:i.current[x]={element:k,schema:w}}},b=(x,E=di)=>{const w=_r(x,e);return{...E,name:x,id:x,onChangeOptions:k=>{s(C=>ln(C,x,k))},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:E.required??!w.isOptional(),value:In(a,x,void 0)||E?.value||[],ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}},g=(x,E=di)=>{const w=_r(x,e),T=w._def.typeName==="ZodNumber";return{...E,name:x,id:x,onChange:C=>{C.persist?.();const M=T?C.target.valueAsNumber:C.target.value;E?.onChange?.(C),s(O=>ln(O,x,M))},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:E.required??!w.isOptional(),type:T?"number":E?.type??"text",value:In(a,x,void 0)||E?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}};S.useEffect(()=>{const x=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,k=w.schema.safeParse(Or(T)),C=L=>{const H=MS(L.target);if(!H)return!1;const I=L.target,_=Sp(L.target)||(L.relatedTarget?Or(L.relatedTarget):""),V=w.schema.safeParse(_);if(I.setAttribute("value",_),V.success)return T.setCustomValidity&&T.setCustomValidity(""),o(N=>{if(Ve.null(N))return null;const P=ln(N,H,void 0);return Ve.empty(N)||Ve.nil(N)||Ve.empty(P)?null:P}),!1;if(T.required){const N=V.error.issues[0]?.message||"";T.setCustomValidity&&T.setCustomValidity(N),o(P=>{if(Ve.null(P))return null;const $=ln(P,H,N||void 0);return Ve.empty($)?null:$})}return!1},M=new AbortController,O=T.getAttribute("data-trigger")||"blur";T.addEventListener(O,C,{signal:M.signal});const F=T.dataset.shadow?!1:T.required?!k.success:!1;return{input:w,hasInitialError:F,unsubscribe:()=>M.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const p=x=>E=>{E.preventDefault();const w=E.currentTarget;let T=OS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(F=>{if(F.tagName==="SELECT"){const L=F;T=ln(T,L.name,L.value)}if(F.tagName==="INPUT"){const L=F,H=Sp(L)||(L?Or(L):"");T=ln(T,L.dataset.target||L.name,H)}});const C=_S(T,a),M=e.safeParse(C),O=()=>{tS(w),n.interceptor?.clear()};if(M.success){const F=JSON.stringify(M.data);return w.setAttribute("data-json",F),n.interceptor?.clear(),x?.(E,{form:w,event:E,reset:O,setErrors:o,errors:[],success:!0,data:M.data,json:M.data})}return console.group("useForm error"),console.info(M),console.info(M.error.issues),console.error(M.error),console.groupEnd(),w.reportValidity(),x?.(E,{form:w,json:T,event:E,reset:O,setErrors:o,data:T,success:!1,errors:M.error.issues.map(F=>({message:F.message,path:F.path.map(L=>String(L))}))})},v=x=>nd(a,x)||"",y=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:h,onSubmit:p,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,multiselect:b,disabled:r!==null}},wR=e=>e?JSON.parse(e.getAttribute("data-json")):{},SR=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},DS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},NS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","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"},FS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},TR={name:"dark",zIndex:FS,rounded:DS,spacing:NS,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)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",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(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",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,70%,14%)"},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%)"}}}},ER={rounded:DS,spacing:NS,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 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:FS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",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(221, 20%, 97%)",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%)"}}}},kR=TR,CR=ER,AR=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...ls,...e.tweaks},parser:e.parser||is.hsla,map:{...ss,...e.map}}),[e]);return m.jsx(Do.Provider,{value:t,children:e.children})},PR=()=>{const e=S.useContext(Do);return e?e.parser:is.hsla};re.Alert=ZI,re.AnimatedList=_F,re.AnimatedListItem=OF,re.Autocomplete=UV,re.Button=ka,re.Calendar=yb,re.Card=ad,re.Checkbox=Lf,re.ColType=oi,re.Collapse=vy,re.CommandPalette=JF,re.ComponentsProvider=AR,re.Context=Do,re.DatePicker=YV,re.Dict=wn,re.Dropdown=Yo,re.Empty=bb,re.Expand=eL,re.FileUpload=pj,re.Form=hj,re.Input=ha,re.InputFeedback=Uw,re.InputField=pa,re.Menu=rL,re.MenuItem=nL,re.Modal=rf,re.MultiSelect=wj,re.Notifications=r2,re.Polymorph=un,re.Progress=o2,re.Radiobox=Sj,re.RenderOnView=cE,re.Select=no,re.Slider=Ej,re.Stats=i2,re.Switch=kj,re.Tab=c2,re.Table=Lz,re.Tabs=s2,re.Tag=Ca,re.TaskList=Cj,re.Textarea=Aj,re.Timeline=u2,re.TimelineItem=Es,re.Toolbar=oL,re.Tooltip=af,re.TransferList=_j,re.createColumns=tz,re.createCssProperties=LM,re.createDesignTokens=ab,re.createFormStorage=bR,re.createOptionCols=ip,re.createStyles=DM,re.createTheme=FM,re.createTokenStyles=VM,re.css=Ce,re.defaultDarkTheme=kR,re.defaultLightTheme=CR,re.defaultTranslations=ss,re.defaultTweaks=ls,re.dispatchInput=Yh,re.formReset=tS,re.formToJson=OS,re.getCoords=iE,re.getJsonForm=wR,re.getModalScrollerRef=az,re.getRemainingSize=yi,re.getSchemaShape=_r,re.hasVerticalScroll=Gh,re.initializeInputDataset=vi,re.isMobile=fb,re.isReactComponent=oE,re.isReactFC=bc,re.isSsr=dr,re.mergeRefs=Kn,re.negate=$M,re.noop=od,re.parsers=is,re.path=nd,re.reduceTokens=ur,re.safeRegex=rd,re.splitInto=db,re.useColorParser=PR,re.useForm=xR,re.useLocale=td,re.useNotification=t2,re.usePrevious=SR,re.useReactive=Ix,re.useStableRef=ir,re.useSwipe=lb,re.useTablePreferences=oz,re.useTranslations=Et,re.uuid=No,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
245
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P1(e,t){if(e){if(typeof e=="string")return Zf(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 Zf(e,t)}}function Zf(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 tj(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 nj(e){if(Array.isArray(e))return e}function I1(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 vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(n),!0).forEach(function(r){Xf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dl(e,t){if(e==null)return{};var n=rj(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 rj(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 Qf=S.forwardRef(function(e,t){var n=e.children,r=dl(e,U$),o=O1(r),i=o.open,a=dl(o,K$);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},a),{},{open:i})))});Qf.displayName="Dropzone";var _1={disabled:!1,getFilesFromEvent:p$,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};Qf.defaultProps=_1,Qf.propTypes={children:at.func,accept:at.objectOf(at.arrayOf(at.string)),multiple:at.bool,preventDropOnDocument:at.bool,noClick:at.bool,noKeyboard:at.bool,noDrag:at.bool,noDragEventsBubbling:at.bool,minSize:at.number,maxSize:at.number,maxFiles:at.number,disabled:at.bool,getFilesFromEvent:at.func,onFileDialogCancel:at.func,onFileDialogOpen:at.func,useFsAccessApi:at.bool,autoFocus:at.bool,onDragEnter:at.func,onDragLeave:at.func,onDragOver:at.func,onDrop:at.func,onDropAccepted:at.func,onDropRejected:at.func,onError:at.func,validator:at.func};var Jf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function O1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},_1),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,h=t.onDrop,f=t.onDropAccepted,b=t.onDropRejected,g=t.onFileDialogCancel,p=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,C=t.onError,M=t.validator,_=S.useMemo(function(){return H$(n)},[n]),F=S.useMemo(function(){return B$(n)},[n]),V=S.useMemo(function(){return typeof p=="function"?p:M1},[p]),H=S.useMemo(function(){return typeof g=="function"?g:M1},[g]),I=S.useRef(null),O=S.useRef(null),$=S.useReducer(oj,Jf),D=Gf($,2),P=D[0],j=D[1],N=P.isFocused,U=P.isFileDialogActive,R=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&R$()),Z=function(){!R.current&&U&&setTimeout(function(){if(O.current){var J=O.current.files;J.length||(j({type:"closeDialog"}),H())}},300)};S.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[O,U,H,R]);var G=S.useRef([]),re=function(J){I.current&&I.current.contains(J.target)||(J.preventDefault(),G.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",k1,!1),document.addEventListener("drop",re,!1)),function(){x&&(document.removeEventListener("dragover",k1),document.removeEventListener("drop",re))}},[I,x]),S.useEffect(function(){return!r&&y&&I.current&&I.current.focus(),function(){}},[I,y,r]);var te=S.useCallback(function(L){C?C(L):console.error(L)},[C]),ee=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L),G.current=[].concat(Z$(G.current),[L.target]),ul(L)&&Promise.resolve(o(L)).then(function(J){if(!(cl(L)&&!k)){var ce=J.length,xe=ce>0&&V$({files:J,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:M}),Ne=ce>0&&!xe;j({isDragAccept:xe,isDragReject:Ne,isDragActive:!0,type:"setDraggedFiles"}),c&&c(L)}}).catch(function(J){return te(J)})},[o,c,te,k,_,a,i,s,l,M]),B=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L);var J=ul(L);if(J&&L.dataTransfer)try{L.dataTransfer.dropEffect="copy"}catch{}return J&&d&&d(L),!1},[d,k]),q=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L);var J=G.current.filter(function(xe){return I.current&&I.current.contains(xe)}),ce=J.indexOf(L.target);ce!==-1&&J.splice(ce,1),G.current=J,!(J.length>0)&&(j({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ul(L)&&u&&u(L))},[I,u,k]),X=S.useCallback(function(L,J){var ce=[],xe=[];L.forEach(function(Ne){var Ye=T1(Ne,_),Lt=Gf(Ye,2),xt=Lt[0],Yt=Lt[1],qn=E1(Ne,a,i),Cn=Gf(qn,2),An=Cn[0],W=Cn[1],K=M?M(Ne):null;if(xt&&An&&!K)ce.push(Ne);else{var Fe=[Yt,W];K&&(Fe=Fe.concat(K)),xe.push({file:Ne,errors:Fe.filter(function(Qe){return Qe})})}}),(!s&&ce.length>1||s&&l>=1&&ce.length>l)&&(ce.forEach(function(Ne){xe.push({file:Ne,errors:[L$]})}),ce.splice(0)),j({acceptedFiles:ce,fileRejections:xe,isDragReject:xe.length>0,type:"setFiles"}),h&&h(ce,xe,J),xe.length>0&&b&&b(xe,J),ce.length>0&&f&&f(ce,J)},[j,s,_,a,i,l,h,f,b,M]),Q=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L),G.current=[],ul(L)&&Promise.resolve(o(L)).then(function(J){cl(L)&&!k||X(J,L)}).catch(function(J){return te(J)}),j({type:"reset"})},[o,X,te,k]),z=S.useCallback(function(){if(R.current){j({type:"openDialog"}),V();var L={multiple:s,types:F};window.showOpenFilePicker(L).then(function(J){return o(J)}).then(function(J){X(J,null),j({type:"closeDialog"})}).catch(function(J){W$(J)?(H(J),j({type:"closeDialog"})):q$(J)?(R.current=!1,O.current?(O.current.value=null,O.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(J)});return}O.current&&(j({type:"openDialog"}),V(),O.current.value=null,O.current.click())},[j,V,H,v,X,te,F,s]),ae=S.useCallback(function(L){!I.current||!I.current.isEqualNode(L.target)||(L.key===" "||L.key==="Enter"||L.keyCode===32||L.keyCode===13)&&(L.preventDefault(),z())},[I,z]),le=S.useCallback(function(){j({type:"focus"})},[]),be=S.useCallback(function(){j({type:"blur"})},[]),we=S.useCallback(function(){T||(z$()?setTimeout(z,0):z())},[T,z]),Se=function(J){return r?null:J},Pe=function(J){return w?null:Se(J)},Te=function(J){return E?null:Se(J)},ve=function(J){k&&J.stopPropagation()},Re=S.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=L.refKey,ce=J===void 0?"ref":J,xe=L.role,Ne=L.onKeyDown,Ye=L.onFocus,Lt=L.onBlur,xt=L.onClick,Yt=L.onDragEnter,qn=L.onDragOver,Cn=L.onDragLeave,An=L.onDrop,W=dl(L,Y$);return vt(vt(Xf({onKeyDown:Pe(Hn(Ne,ae)),onFocus:Pe(Hn(Ye,le)),onBlur:Pe(Hn(Lt,be)),onClick:Se(Hn(xt,we)),onDragEnter:Te(Hn(Yt,ee)),onDragOver:Te(Hn(qn,B)),onDragLeave:Te(Hn(Cn,q)),onDrop:Te(Hn(An,Q)),role:typeof xe=="string"&&xe!==""?xe:"presentation"},ce,I),!r&&!w?{tabIndex:0}:{}),W)}},[I,ae,le,be,we,ee,B,q,Q,w,E,r]),de=S.useCallback(function(L){L.stopPropagation()},[]),Y=S.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=L.refKey,ce=J===void 0?"ref":J,xe=L.onChange,Ne=L.onClick,Ye=dl(L,G$),Lt=Xf({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:Se(Hn(xe,Q)),onClick:Se(Hn(Ne,de)),tabIndex:-1},ce,O);return vt(vt({},Lt),Ye)}},[O,n,s,Q,r]);return vt(vt({},P),{},{isFocused:N&&!r,getRootProps:Re,getInputProps:Y,rootRef:I,inputRef:O,open:Se(z)})}function oj(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},Jf),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},Jf);default:return e}}function M1(){}const D1=S.createContext([null,()=>{}]),ij=()=>S.useContext(D1),aj=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,sj={csv:Vu,xls:Vu,mov:fy,mp4:fy,xlsx:Vu,pdf:dy,txt:dy,json:$I,mp3:DI},lj=e=>{const[,t]=ij(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:aj(l),size:t$(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=sj[e.file.name.split(".").at(-1)]??py,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(Co,{size:16})})})]})},cj=e=>m.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>m.jsx(lj,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),N1=e=>{const t=Et(),n=e.dragging?jI:zI;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})]})]})},uj=e=>e.isDragActive?m.jsx(N1,{files:e.files,dragging:!0}):e.files.length>0?m.jsx(cj,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):m.jsx(S.Fragment,{children:e.idle}),dj=m.jsx(N1,{dragging:!1}),fj=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]})},pj=({idle:e=dj,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Et(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r?.(g),l(p=>p.concat(g))},{getRootProps:h,getInputProps:f,isDragActive:b}=O1({onDrop:d});return m.jsxs(D1.Provider,{value:a,children:[m.jsx(rf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?m.jsx(fj,{item:a[0]}):null}),m.jsxs("div",{...h(),"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",{...f(o),name:o.name,id:o.name}),m.jsx(uj,{File:n,onDeleteFile:t,isDragActive:b,idle:e,files:c})]})]})},hj=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return m.jsx("form",{...e,onSubmit:t})},F1=40,mj=e=>m.jsx(S.Fragment,{children:e.children}),gj={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},L1=[],vj=S.forwardRef(function(t,n){return m.jsx(Je.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:m.jsx(Xn,{children:t.children})})}),yj=S.forwardRef(function({item:t,context:n,...r},o){return m.jsx(Je.li,{...r,ref:o,className:"last:rounded-t-lg"})}),bj={List:vj,Item:yj},xj=e=>{const t=Et(),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(Ca,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},wj=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:h=!1,required:f=!1,dynamicOption:b=!1,onChangeOptions:g,...p},v)=>{const y=S.useMemo(()=>new wn(r.map(Y=>[Y.value,Y])),[r]),x=S.useRef(null),T=S.useRef(null),w=p.value??p.defaultValue??L1,E=Et(),[k,C]=S.useState(0),[M,_]=S.useState(!1),[F,V]=S.useState(""),[H,I]=S.useState(()=>{const Y=new wn;return w.forEach(L=>{const J=y.get(L);return J?Y.set(L,J):void 0}),Y}),O=S.useMemo(()=>Array.from(H.keys()),[H]),[$,D]=S.useState(()=>{const Y=new Set(w);return r.reduce((L,J)=>Y.has(J.value)?[...L,J.label??J.value]:L,[])??w}),[P,j]=S.useState(null),N=S.useRef(L1),U=b&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,R=F.length===0?U:Jd(U,"value",[{key:"value",value:F},{key:"label",value:F}]),Z=tf(M,"block-only"),G=R.filter(Y=>Y.hidden!==!0),re=G.length===0,{x:te,y:ee,strategy:B,refs:q,context:X}=tr({open:M,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Ro,middleware:[Xi(4),n0({padding:10,elementContext:"reference",apply(Y){const J=Y.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ce=yi(q.reference.current,window.innerHeight),xe=Math.min(J<F1?ce:J,ce,Y.availableHeight),Ne=G.length===0?F1:Math.min(xe,ce,J),Ye=`${x.current.getBoundingClientRect().width}px`;Object.assign(Y.elements.floating.style,{width:Ye,maxWidth:Ye,height:Ne})}})]}),Q=L0(X,gj),{getReferenceProps:z,getFloatingProps:ae,getItemProps:le}=nr([xr(X,{role:"listbox"}),br(X),Bs(X,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Y=>j(L=>Y??L)})]);S.useEffect(()=>{if(!M)return C(0);const Y=q.reference;if(Y.current===null)return;const L=yi(Y.current,window.innerHeight);setTimeout(()=>C(Math.min(L,G.length*40)),100)},[F,M,q.reference]),S.useEffect(()=>{p.value&&I(new wn(p.value.map(Y=>[Y,y.get(Y)])))},[p.value,y]),S.useEffect(()=>{const Y=q.reference.current;if(Y)return vi(Y)},[]);const be=(Y,L)=>{const J=H.clone(Ne=>Ne.has(Y.value)?Ne.remove(Y.value):Ne.set(Y.value,Y));I(J);const ce=q.reference.current;if(!ce)return;const xe=J.map(Ne=>Ne.value);ce?.setAttribute("data-value",JSON.stringify(xe)),g&&g(xe),D(Ne=>Ne.concat(Y.label??"")),V(""),j(L)},we=Y=>{const L=Y.target.value;return V(L),!M&&L===""?_(!0):(Y.target.name=p.name||"",L?_(!0):void 0)},Se=()=>{_(!0),V(""),q.reference.current?.focus()},Pe=()=>{_(!0),V("")},Te=()=>{q.reference.current?.setAttribute("data-value","[]"),V(""),_(!1),I(new wn),g?.([])},ve=p.id||p.name,Re=H.map((Y,L)=>m.jsx(Ca,{size:"small",icon:m.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:J=>{J.preventDefault(),J.stopPropagation(),be(Y,L)},children:m.jsx(Co,{size:14})}),children:Y.label??Y.value},`MultiSelect-${Y.value}-x`)),de={height:re?"0":H.size===0?k-49:k-86};return m.jsxs(pa,{...p,left:e,error:t,ref:x,form:p.form,name:p.name,feedback:d,hideLeft:h,required:f,title:p.title,container:o,rightLabel:i,interactive:a,id:p.name||p.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:p.placeholder,right:m.jsxs("span",{className:"flex items-center gap-0.5",children:[n,m.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Se,children:[m.jsx(Nu,{size:20}),m.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),H?m.jsx("button",{type:"button",onClick:Te,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",{...z({...p,onFocus:Pe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:q.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),className:ke("input 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",p.className),children:[O.length>0?null:m.jsx("li",{className:"text-input-placeholder",children:p.placeholder}),m.jsx(xj,{label:c,children:Re})]}),m.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:v,required:f,defaultValue:p.value||O||void 0}),m.jsx(yr,{preserveTabOrder:!0,children:M?m.jsx(Gd,{lockScroll:!0,children:m.jsx(Qr,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:m.jsxs("div",{...ae({ref:q.setFloating,style:{...Q.styles,top:ee??0,position:B,left:te,height:k-(O.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[m.jsx("input",{autoFocus:!0,value:F,onChange:we,title:p.title,placeholder:E.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:Y=>{if(Y.key==="ArrowDown"){let L=P+1;return L>G.length-1&&(L=0),T.current?.scrollIntoView({index:L}),j(L)}if(Y.key==="ArrowUp"){let L=P-1;return L<0&&(L=G.length-1),T.current?.scrollIntoView({index:L}),j(L)}if(Y.key==="Escape")return Y.currentTarget.blur(),_(!1);if(Y.key==="Enter"){if(P!==null&&G[P])return Y.preventDefault(),be(G[P],P);if(G.length===1)return Y.preventDefault(),be(G[0],0)}}}),re?m.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:m.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||E.autocompleteEmpty})}):null,re?null:m.jsx(Je.div,{initial:!1,"data-floating":"true",ref:Z,animate:{height:re?"auto":k},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!M)return C(0);const L=q.floating.current.querySelectorAll("li").item(0),J=(L?L.getBoundingClientRect().height:40)*G.length;return ao.flushSync(()=>C(J+2))},children:m.jsx(Of,{ref:T,hidden:re,data:G,components:bj,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Y,L)=>{const J=L.Render??mj,ce=H.has(L.value)||H.has(L.label??""),xe=P===Y,Ne=L.label??L.value;return m.jsxs("button",{"data-value":L.value,...le({ref:Ye=>void(N.current[Y]=Ye),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":L.disabled,onClick:()=>be(L,Y)}),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 ${ce||xe?"bg-floating-hover text-floating-foreground":""}`,children:[m.jsx(Lf,{onChange:od,checked:ce,"aria-checked":ce,onClick:Ye=>{Ye.stopPropagation(),be(L,Y)}}),m.jsx(J,{...p,label:L.label,value:L.value,children:Ne})]})}})}),m.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:H.size===0?m.jsx(Ca,{theme:"muted",size:"small",children:E.autocompleteEmpty}):Re})]})})}):null})]})}),Sj=({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:ke("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]}),no=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:h,left:f,error:b,...g},p)=>{const v=Et(),y=S.useRef(null),x=g.id??g.name;S.useImperativeHandle(p,()=>y.current),S.useEffect(()=>{if(y.current===null)return;const w=new AbortController,E=y.current,k=vi(y.current);return E.addEventListener("change",()=>E.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{k(),w.abort()}},[]);const T=()=>y.current?.focus();return m.jsx(pa,{info:n,left:f,error:b,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:m.jsxs("label",{htmlFor:x,children:[h,m.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[m.jsx(Nu,{size:20}),m.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:m.jsxs("select",{...g,id:x,name:x,required:e,ref:Kn(p,y),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:ke("input select group 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",g.className),children:[m.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>S.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})}),Tj=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"));$e.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n($e.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),m.jsx(af,{title:"",ref:r,as:PN,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},Ej=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Fo()),s=r||o||[];return m.jsxs(kN,{...i,defaultValue:r,value:o,className:ke("relative flex h-5 w-full touch-none select-none items-center",n),children:[m.jsx(CN,{className:"relative h-2 rounded-full grow bg-background",children:m.jsx(AN,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>m.jsx(Tj,{tooltip:t??!1},`${a.current}-${c}`))]})},kj=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=ir(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},b=u.current;return b.addEventListener("change",f),()=>b?.removeEventListener("change",f)}},[]);const h=()=>{const f=!u.current?.checked;l(f),o?.onCheck?.(f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return m.jsxs("fieldset",{className:ke("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:f=>l(f.target.checked)}),m.jsx("button",{type:"button",role:"switch",onClick:h,"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})]})}),Cj=e=>{const[t,n]=mI();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:kI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),m.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Aj=Kw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
+ `);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)}),Pj=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},Ij={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"})})},_j=e=>{const t=S.useRef(null),n=Pj(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(ha,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),m.jsx(Of,{height:n,useWindowScroll:!0,data:e.source,components:Ij,itemContent:(r,o)=>m.jsx(S.Fragment,{children:m.jsx(Lf,{children:m.jsx(e.Item,{data:o})})})})]})]}),m.jsx("div",{children:m.jsx(ka,{children:m.jsx(Fu,{})})}),m.jsx("div",{})]})};var Oj=Object.defineProperty,V1=Object.getOwnPropertySymbols,Mj=Object.prototype.hasOwnProperty,Dj=Object.prototype.propertyIsEnumerable,$1=(e,t,n)=>t in e?Oj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nj=(e,t)=>{for(var n in t||(t={}))Mj.call(t,n)&&$1(e,n,t[n]);if(V1)for(var n of V1(t))Dj.call(t,n)&&$1(e,n,t[n]);return e},ep=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Fj=(e,t,n,r)=>pl(ep,e,t,n,r),ri=e=>typeof e=="object",kr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ri(e)&&!ri(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=>kr(e[r],t[r]))},Lj=(e,t)=>(ri(e)||Array.isArray(e))&&t?e[t]:e,Vj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,fl=e=>/[0-9.]+/.test(e),j1=e=>["string","number"].includes(typeof e),z1=e=>e==null||e?.length===0||e==="",R1={eq:kr,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:z1,notEmpty:e=>!z1(e),in:(e,t)=>ep(t,n=>kr(e,n)),notIn:(e,t)=>B1(t,n=>!kr(e,n))},$j=e=>{if(e in R1)return R1[e];throw new Error("Linq - Symbol not found")},oi=(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},pl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=$j(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},jj=(e,t,n,r)=>pl(oi,e,t,n,r),B1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},zj=(e,t,n,r)=>pl(B1,e,t,n,r),H1=e=>{if(e===null)return null;const t=Nj({},e);return Object.keys(t).forEach(n=>t[n]=ri(e[n])?H1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},W1=(e,t)=>{if(ri(t)){for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1},Rj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Bj=e=>oi(e,(t,n,r)=>ri(t)?n===r.findIndex(o=>kr(o,t)):n===r.indexOf(t)),Hj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},q1=(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())},Wj=(e,t)=>q1(e,n=>n[t]),U1=(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},qj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Uj=(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 fl(e)&&fl(t)?r.map(a=>Number.parseInt(a)):r},tp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&fl(e)&&fl(t)){const o=[],[i,a]=qj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Uj(e,t,r)},Kj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?tp(r,o,1):tp(r,i,Number.parseInt(o,10))}return j1(e)&&j1(t)?tp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},np=(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},K1=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},Yj=(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)},Gj=(e,t,n,r)=>pl(Yj,e,t,n,r),Y1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Vj(t))},G1=(e=>(e.Asc="asc",e.Desc="desc",e))(G1||{}),Zj=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),Xj=(e,t)=>e.sort(Zj(t)),Qj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:oi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Jj=class _p{constructor(t=[]){this.array=t}static Range(...t){return Kj(...t)}static New(t){return new _p(t)}Where(t,n,r){return this.array=jj(this.array,t,n,r),this}Some(t,n,r){return Fj(this.array,t,n,r)}All(t,n,r){return zj(this.array,t,n,r)}Reverse(){return this.array=K1(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=Gj(this.array,t,n,r),this}Distinct(){return this.array=Bj(this.array),this}First(t){return t===void 0?this.array[0]:Hj(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?np((n,r)=>n+r,0,this.array):np((n,r)=>n+Lj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Wj(this.array,t)}GroupWith(t){return q1(this.array,t)}Except(t){return oi(this.array,n=>!W1(t,n))}Intersect(t){return oi(this.array,n=>W1(t,n))}OrderBy(t,n){let r;return r=t?Y1(this.array,t):this.array.toSorted(),this.array=n==="desc"?K1(r):r,this}Includes(t){return ep(this.array,n=>kr(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 np(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(U1(this.array,n=>[t,n]))}Zip(t,n){return U1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:oi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new _p(H1(this.array))}ToObject(t){return Rj(this.array,t)}Sort(t){return Array.isArray(t)?Xj(this.array,t):Y1(this.array,t)}Unique(t){return Qj(this.array,t)}},Z1=Jj,rp={},X1;function ez(){return X1||(X1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(p,v)=>{try{Object.keys(p).forEach(v)}catch(y){window.console.log(y)}},n=p=>p==null,r=p=>{const v=typeof p;return v==="string"||v==="number"||v==="boolean"||n(p)},o=(p,v)=>{const y=v.getItem(p);try{return JSON.parse(y)}catch{return y??null}},i=p=>Object.keys(p).reduce((v,y)=>({...v,[y]:o(y,p)}),{}),a=p=>p instanceof Date?p:typeof p=="number"?new Date(new Date*1+p*864e5):p,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(p=>p.split("=")).reduce((p,v)=>(p[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),p),{}),c=new Set,u=()=>{const p=l();c.forEach(v=>v(p))},d=[{name:"expires",parse:p=>`expires=${a(p.expires??s)}`},{name:"maxAge",parse:p=>p.maxAge?`max-age=${a(p.expires??s)}`:""},{name:"path",parse:p=>`path=${p.path??"/"}`},{name:"sameSite",parse:p=>`samesite=${p.sameSite??"strict"}`},{name:"useSecure",parse:p=>`${p.useSecure??!0?"secure":""}`},{name:"domain",parse:p=>{const v=p.domain??"";return v===""?"":`domain=${p.multiDomain?".":""}${v}`}},{name:"partitioned",parse:p=>p.partitioned?"Partitioned":""}],h={json:l,listener:p=>(c.add(p),()=>c.delete(p)),clearListeners:()=>c.clear(),has:p=>document.cookie.split(";").some(v=>v.trim().startsWith(`${p}=`)),deleteAll:()=>{document.cookie.split(";").forEach(p=>{document.cookie=p.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:p=>{const v=h.json()[p];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:p=>{document.cookie=`${encodeURIComponent(p)}=;expires=${new Date().toUTCString()}`,u()},set:(p,v,y={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((w,E)=>{const k=E.parse(y);return k===""?w:w.concat(k)},[`${encodeURIComponent(p)}=${x}`]).join(";");document.cookie=T,u()}},f=p=>{const v=new Set,y=x=>{p().removeItem(x);const T=i(p());v.forEach(w=>w(T))};return{delete:y,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(p()):p(),has:x=>{const T=p().getItem(x);return!n(T)},deleteAll:()=>{t(p(),y),v.forEach(x=>x(p()))},get:x=>o(x,p()),set:(x,T)=>{p().setItem(x,JSON.stringify(T)),v.forEach(w=>w(p()))}}},b=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=g,e.SessionStorage=b,e.createStorage=f}(rp)),rp}var ga=ez();const op=e=>e.headerLabel??e.thead??e.id,ip=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ii=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ii||{});const ap=e=>e.type==="number"?e.valueAsNumber:e.value,tz=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},nz={},rz=(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})},oz=(e,t,n=nz)=>{const r=dr()?null:ga.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Ju({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:rz(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return dr()||ga.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},iz=e=>{const t=ir(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]},az=()=>dr()?void 0:document.querySelector('[data-component="modal-body"]'),sp=(e,t,n,r={})=>{const o=e.id,i=e.type??ii.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Fo(),operation:l,label:op(e),name:o,type:i,value:"",...r}},lp=()=>{const e=Et(),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(()=>({[ii.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ii.Boolean]:[t.is,t.isNot],[ii.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},sz=e=>{const t=Et(),n=lp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,sp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>{if(c!==h.id)return h;const f=e.cols.find(b=>u===b.id);return sp(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},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=ap(l.target);e.set(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return m.jsx(S.Fragment,{children:m.jsx(Go,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:m.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[m.jsx(BI,{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(no,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),m.jsx(no,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),m.jsx(ha,{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(Ua,{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(Lu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},lz=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=lp(),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=ap(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(no,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),m.jsx(ha,{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(Ua,{className:"text-danger",size:14})})]})},cz=({item:e,onPointerDown:t})=>{const n=qa(0);return m.jsxs(ay,{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(RI,{size:14})}),m.jsx("span",{children:e.groupName})]},e.groupId)},uz=e=>{const t=Et(),n=ip(e.cols),r=yI(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,h=c.options.item(d)?.label||"";i(h);const f=new Z1(e.rows).GroupBy(u),b=e.cols.find(g=>g.id===u);e.setGroups(TT(f).map((g,p)=>{const v=f[g];return{...b,groupId:Fo(),groupKey:u,index:p,rows:v,groupName:g}}))},s=()=>e.setGroups([]);return m.jsx(S.Fragment,{children:m.jsxs(Go,{arrow:!1,title:t.tableGroupLabel,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(KI,{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(no,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),m.jsx(ka,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:m.jsx(Ua,{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(mC,{children:m.jsx(oy,{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(cz,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},dz=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),fz=(e,t)=>e.toSorted(dz(t)),Q1=(e,t,n)=>({label:t,id:Fo(),type:n,value:e.id}),pz=e=>{const t=Et(),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,Q1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},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(Go,{title:t.tableSortDropdownTitle,trigger:m.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[m.jsx(cy,{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(no,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),m.jsx(no,{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(Ua,{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(Lu,{size:14})," ",t.tableSortAddButton]})})]})})})},hz=e=>{const t=Et(),[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=Q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=op(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(MI,{size:14}):null,n==="desc"?m.jsx(OI,{size:14}):null,n==="undefined"?m.jsx(cy,{size:14}):null]})},mz=e=>m.jsx("header",{className:"min-w-full mb-1",children:m.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[m.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[m.jsx("span",{children:m.jsx(sz,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),m.jsx("span",{children:m.jsx(pz,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),m.jsx("span",{children:m.jsx(uz,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),m.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>m.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[m.jsxs("span",{children:[m.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","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 whitespace-pre p-0",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=ap(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function gz(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 vz=e=>{const t=S.useId(),n=Et(),r=S.useMemo(()=>gz(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 px-1 py-4 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(un,{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(un,{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(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},yz=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})})},bz=(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=nd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,h=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?m.jsx(yz,{children:m.jsx(h,{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?ef:c?m.jsx(S.Fragment,{children:m.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):m.jsx(S.Fragment,{children:$e.nil(l)?"":l})}))})})},xz={top:0,left:0,right:0,bottom:-1},wz=e=>{const t=Ff(),n=Et(),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=lp(),l=o?WI:qI,c=S.useRef(null),u=g=>{const p=g.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==p))},d=S.useCallback(g=>{if(g===null)return;c.current=g;const p=new AbortController;return g.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:p.signal}),()=>p.abort()},[]),h=e.sorters.find(g=>e.header.id===g.value),f=h?.type?h.type===G1.Asc?"ascending":"descending":"none",b=op(e.header);return m.jsxs(ay,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative 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 px-2 py-4 ${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(Go,{arrow:!0,trigger:m.jsxs("span",{children:[m.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",b]}),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:b})]}),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(lz,{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(sp(e.header,s.options,s.operations))),children:[m.jsx(Lu,{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(hz,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:m.jsx(Je.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:xz,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-table-border hover:bg-primary active:bg-primary",onClick:g=>void g.currentTarget.focus(),onKeyDown:g=>{if(g.key==="ArrowLeft"||g.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const p=c.current.getBoundingClientRect().width,y=(g.shiftKey?50:10)*(g.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(p+y)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(g,p)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,y=p.delta.x;c.current.style.width=`${Math.abs(v+y)}px`}})]})},Sz=e=>{const[t,n]=iz(e.setCols);return m.jsx(oy,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:m.jsx(Xn,{children:e.headers.map((r,o)=>m.jsx(wz,{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}`))})})},J1=S.createContext({}),Tz=()=>S.useContext(J1),Ez=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(Xn,{children:n.children})})),kz=S.forwardRef(({context:e,className:t="",...n},r)=>m.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),Cz=S.forwardRef(({context:e,...t},n)=>{const r=Tz(),o={...t?.style,top:$e.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 shadow-shadow-card group:sticky"})}),Az=S.forwardRef(({context:e,item:t,...n},r)=>m.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})),Pz=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),Iz={TableHead:Cz,Table:kz,TableBody:Ez,TableRow:Az,TableFoot:Pz},_z=[0,0,0,0,0,0,0,0,0,0],Oz=e=>m.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?ef:m.jsx(bb,{})}),Mz=()=>m.jsx(S.Fragment,{}),Dz=()=>m.jsx(S.Fragment,{}),Nz=[],eS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const h=S.useRef(null),[f,b]=S.useState(!1),g=ir(a),p=ir(d.loadingMore),v=S.useMemo(()=>{if(d.loading)return _z;if(u)return d.rows;const T=new Z1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:T.Where(w.name,w.operation.symbol,w.value)),r.length===0?T.Select():fz(T.Select(),r)},[d.loading,d.rows,u,t,r]);S.useEffect(()=>{if(h.current===null)return()=>{};const T=h.current,w=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&p.current?(g.current?.(),void b(!0)):b(!1));return w.observe(T),()=>w.disconnect()},[p,g]);const y=v.length===0,x={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return m.jsxs("div",{className:"min-w-full",children:[m.jsxs("div",{className:`group h-full w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[m.jsx(kV,{context:x,components:Iz,totalCount:v.length,itemContent:y?Mz:bz,data:y?Nz:v,useWindowScroll:!s,fixedFooterContent:f?Dz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>m.jsx(Sz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),y?m.jsx(Oz,{loading:d.loading}):null,m.jsx("div",{"aria-hidden":"true",ref:h,className:"w-full h-0.5"})]}),c!==null?m.jsx(vz,{...c}):null]})},Fz=(e,t)=>typeof t=="function"?t(e):t,hl=(e,t,n)=>e===t?void 0:n?.(t),Lz=e=>{const t=Ff(),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(()=>ip(e.cols),[e.cols]),[i,a]=Ju({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:Fz(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 m.jsxs(J1.Provider,{value:n,children:[r?m.jsx(mz,{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(eS,{...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(eS,{...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}`))})]})},Vz=["INPUT","SELECT"],tS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{Vz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var cp,nS;function up(){if(nS)return cp;nS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return cp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},cp}var dp,rS;function oS(){if(rS)return dp;rS=1;var e=up(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var p=[],v=0;v<256;++v)p.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return p}(),o=function(v){for(;v.length>1;){var y=v.pop(),x=y.obj[y.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);y.obj[y.prop]=T}}},i=function(v,y){for(var x=y&&y.plainObjects?{__proto__:null}:{},T=0;T<v.length;++T)typeof v[T]<"u"&&(x[T]=v[T]);return x},a=function p(v,y,x){if(!y)return v;if(typeof y!="object"&&typeof y!="function"){if(n(v))v.push(y);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,y))&&(v[y]=!0);else return[v,y];return v}if(!v||typeof v!="object")return[v].concat(y);var T=v;return n(v)&&!n(y)&&(T=i(v,x)),n(v)&&n(y)?(y.forEach(function(w,E){if(t.call(v,E)){var k=v[E];k&&typeof k=="object"&&w&&typeof w=="object"?v[E]=p(k,w,x):v.push(w)}else v[E]=w}),v):Object.keys(y).reduce(function(w,E){var k=y[E];return t.call(w,E)?w[E]=p(w[E],k,x):w[E]=k,w},T)},s=function(v,y){return Object.keys(y).reduce(function(x,T){return x[T]=y[T],x},v)},l=function(p,v,y){var x=p.replace(/\+/g," ");if(y==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,y,x,T,w){if(v.length===0)return v;var E=v;if(typeof v=="symbol"?E=Symbol.prototype.toString.call(v):typeof v!="string"&&(E=String(v)),x==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(H){return"%26%23"+parseInt(H.slice(2),16)+"%3B"});for(var k="",C=0;C<E.length;C+=c){for(var M=E.length>=c?E.slice(C,C+c):E,_=[],F=0;F<M.length;++F){var V=M.charCodeAt(F);if(V===45||V===46||V===95||V===126||V>=48&&V<=57||V>=65&&V<=90||V>=97&&V<=122||w===e.RFC1738&&(V===40||V===41)){_[_.length]=M.charAt(F);continue}if(V<128){_[_.length]=r[V];continue}if(V<2048){_[_.length]=r[192|V>>6]+r[128|V&63];continue}if(V<55296||V>=57344){_[_.length]=r[224|V>>12]+r[128|V>>6&63]+r[128|V&63];continue}F+=1,V=65536+((V&1023)<<10|M.charCodeAt(F)&1023),_[_.length]=r[240|V>>18]+r[128|V>>12&63]+r[128|V>>6&63]+r[128|V&63]}k+=_.join("")}return k},d=function(v){for(var y=[{obj:{o:v},prop:"o"}],x=[],T=0;T<y.length;++T)for(var w=y[T],E=w.obj[w.prop],k=Object.keys(E),C=0;C<k.length;++C){var M=k[C],_=E[M];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(y.push({obj:E,prop:M}),x.push(_))}return o(y),v},h=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},b=function(v,y){return[].concat(v,y)},g=function(v,y){if(n(v)){for(var x=[],T=0;T<v.length;T+=1)x.push(y(v[T]));return x}return y(v)};return dp={arrayToObject:i,assign:s,combine:b,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:h,maybeMap:g,merge:a},dp}var fp,iS;function $z(){if(iS)return fp;iS=1;var e=yT(),t=oS(),n=up(),r=Object.prototype.hasOwnProperty,o={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,v){return p+"["+v+"]"},repeat:function(p){return p}},i=Array.isArray,a=Array.prototype.push,s=function(g,p){a.apply(g,i(p)?p:[p])},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(p){return l.call(p)},skipNulls:!1,strictNullHandling:!1},d=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},h={},f=function g(p,v,y,x,T,w,E,k,C,M,_,F,V,H,I,O,$,D){for(var P=p,j=D,N=0,U=!1;(j=j.get(h))!==void 0&&!U;){var R=j.get(p);if(N+=1,typeof R<"u"){if(R===N)throw new RangeError("Cyclic object value");U=!0}typeof j.get(h)>"u"&&(N=0)}if(typeof M=="function"?P=M(v,P):P instanceof Date?P=V(P):y==="comma"&&i(P)&&(P=t.maybeMap(P,function(be){return be instanceof Date?V(be):be})),P===null){if(w)return C&&!O?C(v,u.encoder,$,"key",H):v;P=""}if(d(P)||t.isBuffer(P)){if(C){var Z=O?v:C(v,u.encoder,$,"key",H);return[I(Z)+"="+I(C(P,u.encoder,$,"value",H))]}return[I(v)+"="+I(String(P))]}var G=[];if(typeof P>"u")return G;var re;if(y==="comma"&&i(P))O&&C&&(P=t.maybeMap(P,C)),re=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(M))re=M;else{var te=Object.keys(P);re=_?te.sort(_):te}var ee=k?String(v).replace(/\./g,"%2E"):String(v),B=x&&i(P)&&P.length===1?ee+"[]":ee;if(T&&i(P)&&P.length===0)return B+"[]";for(var q=0;q<re.length;++q){var X=re[q],Q=typeof X=="object"&&X&&typeof X.value<"u"?X.value:P[X];if(!(E&&Q===null)){var z=F&&k?String(X).replace(/\./g,"%2E"):String(X),ae=i(P)?typeof y=="function"?y(B,z):B:B+(F?"."+z:"["+z+"]");D.set(p,N);var le=e();le.set(h,D),s(G,g(Q,ae,y,x,T,w,E,k,y==="comma"&&O&&i(P)?null:C,M,_,F,V,H,I,O,$,le))}}return G},b=function(p){if(!p)return u;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.encodeDotInKeys<"u"&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=p.charset||u.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=n.default;if(typeof p.format<"u"){if(!r.call(n.formatters,p.format))throw new TypeError("Unknown format option provided.");y=p.format}var x=n.formatters[y],T=u.filter;(typeof p.filter=="function"||i(p.filter))&&(T=p.filter);var w;if(p.arrayFormat in o?w=p.arrayFormat:"indices"in p?w=p.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof p.allowDots>"u"?p.encodeDotInKeys===!0?!0:u.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:u.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?u.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:u.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:u.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:y,formatter:x,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:u.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:u.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:u.strictNullHandling}};return fp=function(g,p){var v=g,y=b(p),x,T;typeof y.filter=="function"?(T=y.filter,v=T("",v)):i(y.filter)&&(T=y.filter,x=T);var w=[];if(typeof v!="object"||v===null)return"";var E=o[y.arrayFormat],k=E==="comma"&&y.commaRoundTrip;x||(x=Object.keys(v)),y.sort&&x.sort(y.sort);for(var C=e(),M=0;M<x.length;++M){var _=x[M],F=v[_];y.skipNulls&&F===null||s(w,f(F,_,E,k,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}var V=w.join(y.delimiter),H=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?H+="utf8=%26%2310003%3B&":H+="utf8=%E2%9C%93&"),V.length>0?H+V:""},fp}var pp,aS;function jz(){if(aS)return pp;aS=1;var e=oS(),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(h){return h.replace(/&#(\d+);/g,function(f,b){return String.fromCharCode(parseInt(b,10))})},i=function(h,f,b){if(h&&typeof h=="string"&&f.comma&&h.indexOf(",")>-1)return h.split(",");if(f.throwOnLimitExceeded&&b>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return h},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,b){var g={__proto__:null},p=b.ignoreQueryPrefix?f.replace(/^\?/,""):f;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=b.parameterLimit===1/0?void 0:b.parameterLimit,y=p.split(b.delimiter,b.throwOnLimitExceeded?v+1:v);if(b.throwOnLimitExceeded&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,T,w=b.charset;if(b.charsetSentinel)for(T=0;T<y.length;++T)y[T].indexOf("utf8=")===0&&(y[T]===s?w="utf-8":y[T]===a&&(w="iso-8859-1"),x=T,T=y.length);for(T=0;T<y.length;++T)if(T!==x){var E=y[T],k=E.indexOf("]="),C=k===-1?E.indexOf("="):k+1,M,_;C===-1?(M=b.decoder(E,r.decoder,w,"key"),_=b.strictNullHandling?null:""):(M=b.decoder(E.slice(0,C),r.decoder,w,"key"),_=e.maybeMap(i(E.slice(C+1),b,n(g[M])?g[M].length:0),function(V){return b.decoder(V,r.decoder,w,"value")})),_&&b.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),E.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var F=t.call(g,M);F&&b.duplicates==="combine"?g[M]=e.combine(g[M],_):(!F||b.duplicates==="last")&&(g[M]=_)}return g},c=function(h,f,b,g){var p=0;if(h.length>0&&h[h.length-1]==="[]"){var v=h.slice(0,-1).join("");p=Array.isArray(f)&&f[v]?f[v].length:0}for(var y=g?f:i(f,b,p),x=h.length-1;x>=0;--x){var T,w=h[x];if(w==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(y===""||b.strictNullHandling&&y===null)?[]:e.combine([],y);else{T=b.plainObjects?{__proto__:null}:{};var E=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,k=b.decodeDotInKeys?E.replace(/%2E/g,"."):E,C=parseInt(k,10);!b.parseArrays&&k===""?T={0:y}:!isNaN(C)&&w!==k&&String(C)===k&&C>=0&&b.parseArrays&&C<=b.arrayLimit?(T=[],T[C]=y):k!=="__proto__"&&(T[k]=y)}y=T}return y},u=function(f,b,g,p){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&y.exec(v),w=T?v.slice(0,T.index):v,E=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(w)}for(var k=0;g.depth>0&&(T=x.exec(v))!==null&&k<g.depth;){if(k+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;E.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+v.slice(T.index)+"]")}return c(E,b,g,p)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:p,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:b,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return pp=function(h,f){var b=d(f);if(h===""||h===null||typeof h>"u")return b.plainObjects?{__proto__:null}:{};for(var g=typeof h=="string"?l(h,b):h,p=b.plainObjects?{__proto__:null}:{},v=Object.keys(g),y=0;y<v.length;++y){var x=v[y],T=u(x,g[x],b,typeof h=="string");p=e.merge(p,T,b)}return b.allowSparse===!0?p:e.compact(p)},pp}var hp,sS;function zz(){if(sS)return hp;sS=1;var e=$z(),t=jz(),n=up();return hp={formats:n,parse:t,stringify:e},hp}var Rz=zz(),We;(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})(We||(We={}));var lS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(lS||(lS={}));const me=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cr=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(e)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(e)?me.array:e===null?me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?me.promise:typeof Map<"u"&&e instanceof Map?me.map:typeof Set<"u"&&e instanceof Set?me.set:typeof Date<"u"&&e instanceof Date?me.date:me.object;default:return me.unknown}},ie=We.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 rr 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 rr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,We.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()}}rr.create=e=>new rr(e);const mp=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===me.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,We.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${We.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.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}"`:We.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.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 ie.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 ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,We.assertNever(e)}return{message:n}};let Bz=mp;function Hz(){return Bz}const Wz=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 ue(e,t){const n=Hz(),r=Wz({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mp?void 0:mp].filter(o=>!!o)});e.common.issues.push(r)}class sn{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 _e;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 sn.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 _e;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 _e=Object.freeze({status:"aborted"}),va=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),cS=e=>e.status==="aborted",uS=e=>e.status==="dirty",ai=e=>e.status==="valid",ml=e=>typeof Promise<"u"&&e instanceof Promise;var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ge||(ge={}));class Ar{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 dS=(e,t)=>{if(ai(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 rr(e.common.issues);return this._error=n,this._error}}};function ze(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 He{get description(){return this._def.description}_getType(t){return Cr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sn,ctx:{common:t.parent.common,data:t.data,parsedType:Cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ml(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:Cr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return dS(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ai(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=>ai(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:Cr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ml(o)?o:Promise.resolve(o));return dS(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:ie.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 ui({schema:this,typeName:Oe.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 Ir.create(this,this._def)}nullable(){return di.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this)}promise(){return bl.create(this,this._def)}or(t){return vl.create([this,t],this._def)}and(t){return yl.create(this,t,this._def)}transform(t){return new ui({...ze(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new yp({...ze(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new pR({typeName:Oe.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new bp({...ze(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return xp.create(this,t)}readonly(){return wp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qz=/^c[^\s-]{8,}$/i,Uz=/^[0-9a-z]+$/,Kz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yz=/^[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,Gz=/^[a-z0-9_-]{21}$/i,Zz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Xz=/^[-+]?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)?)??$/,Qz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Jz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gp;const eR=/^(?:(?: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])$/,tR=/^(?:(?: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])$/,nR=/^(([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]))$/,rR=/^(([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])$/,oR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fS="((\\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])))",aR=new RegExp(`^${fS}$`);function pS(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 sR(e){return new RegExp(`^${pS(e)}$`)}function lR(e){let t=`${fS}T${pS(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 cR(e,t){return!!((t==="v4"||!t)&&eR.test(e)||(t==="v6"||!t)&&nR.test(e))}function uR(e,t){if(!Zz.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 dR(e,t){return!!((t==="v4"||!t)&&tR.test(e)||(t==="v6"||!t)&&rR.test(e))}class ro extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){const i=this._getOrReturnCtx(t);return ue(i,{code:ie.invalid_type,expected:me.string,received:i.parsedType}),_e}const r=new sn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:ie.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),ue(o,{code:ie.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?ue(o,{code:ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Qz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")gp||(gp=new RegExp(Jz,"u")),gp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Gz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Uz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Kz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:ie.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),ue(o,{validation:"regex",code:ie.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),ue(o,{code:ie.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),ue(o,{code:ie.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ie.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?lR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ie.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?aR.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ie.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?sR(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:ie.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?cR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?uR(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?dR(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?oR.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?iR.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:ie.invalid_string,message:i.message}),r.dirty()):We.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ie.invalid_string,...ge.errToObj(r)})}_addCheck(t){return new ro({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ge.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,...ge.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,...ge.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ge.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ge.errToObj(n)})}nonempty(t){return this.min(1,ge.errToObj(t))}trim(){return new ro({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ro({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ro({...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}}ro.create=e=>new ro({checks:[],typeName:Oe.ZodString,coerce:e?.coerce??!1,...ze(e)});function fR(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 si extends He{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)!==me.number){const i=this._getOrReturnCtx(t);return ue(i,{code:ie.invalid_type,expected:me.number,received:i.parsedType}),_e}let r;const o=new sn;for(const i of this._def.checks)i.kind==="int"?We.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:ie.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),ue(r,{code:ie.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),ue(r,{code:ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?fR(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:ie.not_finite,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new si({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.toString(o)}]})}_addCheck(t){return new si({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.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"&&We.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)}}si.create=e=>new si({checks:[],typeName:Oe.ZodNumber,coerce:e?.coerce||!1,...ze(e)});class ya extends He{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)!==me.bigint)return this._getInvalidInput(t);let r;const o=new sn;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),ue(r,{code:ie.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),ue(r,{code:ie.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),ue(r,{code:ie.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):We.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ie.invalid_type,expected:me.bigint,received:n.parsedType}),_e}gte(t,n){return this.setLimit("min",t,!0,ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ge.toString(n))}setLimit(t,n,r,o){return new ya({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ge.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:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ge.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:Oe.ZodBigInt,coerce:e?.coerce??!1,...ze(e)});class hS extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:ie.invalid_type,expected:me.boolean,received:r.parsedType}),_e}return yn(t.data)}}hS.create=e=>new hS({typeName:Oe.ZodBoolean,coerce:e?.coerce||!1,...ze(e)});class gl extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){const i=this._getOrReturnCtx(t);return ue(i,{code:ie.invalid_type,expected:me.date,received:i.parsedType}),_e}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:ie.invalid_date}),_e}const r=new sn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:ie.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),ue(o,{code:ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):We.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new gl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ge.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}}gl.create=e=>new gl({checks:[],coerce:e?.coerce||!1,typeName:Oe.ZodDate,...ze(e)});class mS extends He{_parse(t){if(this._getType(t)!==me.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:ie.invalid_type,expected:me.symbol,received:r.parsedType}),_e}return yn(t.data)}}mS.create=e=>new mS({typeName:Oe.ZodSymbol,...ze(e)});class gS extends He{_parse(t){if(this._getType(t)!==me.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ie.invalid_type,expected:me.undefined,received:r.parsedType}),_e}return yn(t.data)}}gS.create=e=>new gS({typeName:Oe.ZodUndefined,...ze(e)});class vS extends He{_parse(t){if(this._getType(t)!==me.null){const r=this._getOrReturnCtx(t);return ue(r,{code:ie.invalid_type,expected:me.null,received:r.parsedType}),_e}return yn(t.data)}}vS.create=e=>new vS({typeName:Oe.ZodNull,...ze(e)});class yS extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}yS.create=e=>new yS({typeName:Oe.ZodAny,...ze(e)});class bS extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}bS.create=e=>new bS({typeName:Oe.ZodUnknown,...ze(e)});class Pr extends He{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:ie.invalid_type,expected:me.never,received:n.parsedType}),_e}}Pr.create=e=>new Pr({typeName:Oe.ZodNever,...ze(e)});class xS extends He{_parse(t){if(this._getType(t)!==me.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:ie.invalid_type,expected:me.void,received:r.parsedType}),_e}return yn(t.data)}}xS.create=e=>new xS({typeName:Oe.ZodVoid,...ze(e)});class Wn extends He{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==me.array)return ue(n,{code:ie.invalid_type,expected:me.array,received:n.parsedType}),_e;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?ie.too_big:ie.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&&(ue(n,{code:ie.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&&(ue(n,{code:ie.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 Ar(n,a,n.path,s)))).then(a=>sn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Ar(n,a,n.path,s)));return sn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Wn({...this._def,minLength:{value:t,message:ge.toString(n)}})}max(t,n){return new Wn({...this._def,maxLength:{value:t,message:ge.toString(n)}})}length(t,n){return new Wn({...this._def,exactLength:{value:t,message:ge.toString(n)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...ze(t)});function li(e){if(e instanceof Mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ir.create(li(r))}return new Mt({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:li(e.element)}):e instanceof Ir?Ir.create(li(e.unwrap())):e instanceof di?di.create(li(e.unwrap())):e instanceof oo?oo.create(e.items.map(t=>li(t))):e}class Mt extends He{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=We.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==me.object){const c=this._getOrReturnCtx(t);return ue(c,{code:ie.invalid_type,expected:me.object,received:c.parsedType}),_e}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Pr&&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 Ar(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Pr){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&&(ue(o,{code:ie.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 Ar(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>sn.mergeObjectSync(r,c)):sn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new Mt({...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:ge.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Mt({...this._def,catchall:t})}pick(t){const n={};for(const r of We.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of We.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Mt({...this._def,shape:()=>n})}deepPartial(){return li(this)}partial(t){const n={};for(const r of We.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Mt({...this._def,shape:()=>n})}required(t){const n={};for(const r of We.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ir;)i=i._def.innerType;n[r]=i}return new Mt({...this._def,shape:()=>n})}keyof(){return ES(We.objectKeys(this.shape))}}Mt.create=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:Oe.ZodObject,...ze(t)}),Mt.strictCreate=(e,t)=>new Mt({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:Oe.ZodObject,...ze(t)}),Mt.lazycreate=(e,t)=>new Mt({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:Oe.ZodObject,...ze(t)});class vl extends He{_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 rr(s.ctx.common.issues));return ue(n,{code:ie.invalid_union,unionErrors:a}),_e}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 rr(l));return ue(n,{code:ie.invalid_union,unionErrors:s}),_e}}get options(){return this._def.options}}vl.create=(e,t)=>new vl({options:e,typeName:Oe.ZodUnion,...ze(t)});function vp(e,t){const n=Cr(e),r=Cr(t);if(e===t)return{valid:!0,data:e};if(n===me.object&&r===me.object){const o=We.objectKeys(t),i=We.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=vp(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===me.array&&r===me.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=vp(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===me.date&&r===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class yl extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(cS(i)||cS(a))return _e;const s=vp(i.value,a.value);return s.valid?((uS(i)||uS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:ie.invalid_intersection_types}),_e)};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}))}}yl.create=(e,t,n)=>new yl({left:e,right:t,typeName:Oe.ZodIntersection,...ze(n)});class oo extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.array)return ue(r,{code:ie.invalid_type,expected:me.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return ue(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:ie.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 Ar(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>sn.mergeArray(n,a)):sn.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:Oe.ZodTuple,rest:null,...ze(t)})};class wS extends He{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!==me.map)return ue(r,{code:ie.invalid_type,expected:me.map,received:r.parsedType}),_e;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Ar(r,s,r.path,[c,"key"])),value:i._parse(new Ar(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 _e;(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 _e;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}wS.create=(e,t,n)=>new wS({valueType:t,keyType:e,typeName:Oe.ZodMap,...ze(n)});class ba extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.set)return ue(r,{code:ie.invalid_type,expected:me.set,received:r.parsedType}),_e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:ie.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&&(ue(r,{code:ie.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 _e;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 Ar(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new ba({...this._def,minSize:{value:t,message:ge.toString(n)}})}max(t,n){return new ba({...this._def,maxSize:{value:t,message:ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ba.create=(e,t)=>new ba({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...ze(t)});class SS extends He{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})}}SS.create=(e,t)=>new SS({getter:e,typeName:Oe.ZodLazy,...ze(t)});class TS extends He{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}TS.create=(e,t)=>new TS({value:e,typeName:Oe.ZodLiteral,...ze(t)});function ES(e,t){return new ci({values:e,typeName:Oe.ZodEnum,...ze(t)})}class ci extends He{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:We.joinValues(r),received:n.parsedType,code:ie.invalid_type}),_e}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 ue(n,{received:n.data,code:ie.invalid_enum_value,options:r}),_e}return yn(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 ci.create(t,{...this._def,...n})}exclude(t,n=this._def){return ci.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ci.create=ES;class kS extends He{_parse(t){const n=We.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==me.string&&r.parsedType!==me.number){const o=We.objectValues(n);return ue(r,{expected:We.joinValues(o),received:r.parsedType,code:ie.invalid_type}),_e}if(this._cache||(this._cache=new Set(We.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=We.objectValues(n);return ue(r,{received:r.data,code:ie.invalid_enum_value,options:o}),_e}return yn(t.data)}get enum(){return this._def.values}}kS.create=(e,t)=>new kS({values:e,typeName:Oe.ZodNativeEnum,...ze(t)});class bl extends He{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==me.promise&&n.common.async===!1)return ue(n,{code:ie.invalid_type,expected:me.promise,received:n.parsedType}),_e;const r=n.parsedType===me.promise?n.data:Promise.resolve(n.data);return yn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}bl.create=(e,t)=>new bl({type:e,typeName:Oe.ZodPromise,...ze(t)});class ui extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.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=>{ue(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 _e;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?_e:l.status==="dirty"||n.value==="dirty"?va(l.value):l});{if(n.value==="aborted")return _e;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?_e:s.status==="dirty"||n.value==="dirty"?va(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"?_e:(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"?_e:(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(!ai(a))return _e;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=>ai(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):_e);We.assertNever(o)}}ui.create=(e,t,n)=>new ui({schema:e,typeName:Oe.ZodEffects,effect:t,...ze(n)}),ui.createWithPreprocess=(e,t,n)=>new ui({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...ze(n)});class Ir extends He{_parse(t){return this._getType(t)===me.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ir.create=(e,t)=>new Ir({innerType:e,typeName:Oe.ZodOptional,...ze(t)});class di extends He{_parse(t){return this._getType(t)===me.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}di.create=(e,t)=>new di({innerType:e,typeName:Oe.ZodNullable,...ze(t)});class yp extends He{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===me.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}yp.create=(e,t)=>new yp({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class bp extends He{_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 ml(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new rr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}bp.create=(e,t)=>new bp({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class CS extends He{_parse(t){if(this._getType(t)!==me.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:ie.invalid_type,expected:me.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}CS.create=e=>new CS({typeName:Oe.ZodNaN,...ze(e)});class pR extends He{_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 xp extends He{_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"?_e:i.status==="dirty"?(n.dirty(),va(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"?_e: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 xp({in:t,out:n,typeName:Oe.ZodPipeline})}}class wp extends He{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ai(o)&&(o.value=Object.freeze(o.value)),o);return ml(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}wp.create=(e,t)=>new wp({innerType:e,typeName:Oe.ZodReadonly,...ze(t)});var Oe;(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"})(Oe||(Oe={})),Pr.create,Wn.create,vl.create,yl.create,oo.create,ci.create,bl.create,Ir.create,di.create;const hR=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},mR=(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]}}},AS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),ln=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):AS(t),o=structuredClone(e);return mR(o,r,n),o},gR=(e,t)=>e.localeCompare(t),fi={},PS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return IS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=PS(e._def.innerType);return t==="ZodArray"?n??[]:n}},IS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,PS(n)])),_S=(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]=_S(i,o):n[r]=o||i)}return n},vR={sort:gR,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},OS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return Rz.parse(n.toString(),vR)},_r=(e,t)=>AS(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Or=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Sp=e=>{const t=e.dataset.target;if(!t)return Or(e);const n=document.querySelector(`[data-origin="${t}"]`);return Or(n||e)},yR={state:{},loading:!1,useOnChange:!1},MS=e=>e.dataset.target||e.name,bR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ga.LocalStorage.get(t);return hR(n)?n:{}},clear:()=>void ga.LocalStorage.delete(t),set:n=>ga.LocalStorage.set(t,n)}},xR=(e,t,n=yR)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>$e.function(n?.state)?n.state():n?.state??IS(e)??{}),l=S.useCallback(x=>{const T=x.target,w=x.currentTarget;if(T.dataset.optional==="true")return;const k=MS(T),C=Sp(T)||(w?Or(w):""),M=_r(k,e);if(T.setAttribute("data-initialized","true"),M){const _=M.safeParse(C),F=_.success?void 0:_.error.issues[0]?.message??"";o(V=>ln(V??{},k,F))}},[e]),c=S.useCallback(x=>T=>{const w=T.currentTarget,E=Object.values(i.current).reduce((C,M)=>{const _=M.element,F=M.schema.safeParse(Or(_));if(_.dataset.ignore==="ignore"||F.success)return C;const V=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const H=_.dataset.name||_.name||"";return ln(C,H,V)},{}),k=$e.empty(E)?null:E;o(k),console.error(k),x?.({form:w,errors:k||{}})},[]),u=(x,T=fi)=>{const w=_r(x,e),E=k=>{if(!$u(k))return;s(M=>ln(M,x,k.toISOString())),o(M=>ln(M,x,void 0));const C=i.current[x].element;if(C){const M=C.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${M}"]`);_&&_.setCustomValidity("")}T?.onChange?.(k)};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,date:$e.string(a[x])?new Date(a[x]):a[x],required:T.required??!w.isOptional(),error:In(r,x),ref:k=>{k!==null&&(i.current[x]={element:k,schema:w})}}},d=(x,T=fi)=>{const w=_r(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.value;s(M=>ln(M,x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),value:In(a,x,void 0)??"",required:T.required??!w.isOptional(),ref:k=>k!==null?i.current[x]={element:k,schema:w}:void 0}},h=(x,T=fi)=>{const w=_r(x,e);return{...T,name:x,id:x,onChange:k=>{const C=k.target.checked;s(M=>ln(M??{},x,C)),T?.onChange?.(k)},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),ref:k=>k!==null?void(i.current[x]={element:k,schema:w}):void 0}},f=(x,T=fi)=>{const w=_r(x,e),E=k=>{k.persist?.();const C=k.target.value;T?.onChange?.(k),s(M=>ln(M,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:E,form:t,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),value:In(a,x,void 0)||T?.value||"",type:$e.instance(w,si)?"number":T?.type??"text",ref:k=>k===null?void 0:i.current[x]={element:k,schema:w}}},b=(x,T=fi)=>{const w=_r(x,e);return{...T,name:x,id:x,onChangeOptions:k=>{s(C=>ln(C,x,k))},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),value:In(a,x,void 0)||T?.value||[],ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:w})}},g=(x,T=fi)=>{const w=_r(x,e),E=w._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const M=E?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),s(_=>ln(_,x,M))},form:t,loading:n.loading,onInvalid:l,error:In(r,x,void 0),required:T.required??!w.isOptional(),type:E?"number":T?.type??"text",value:In(a,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}};S.useEffect(()=>{const x=Object.values(i.current).map(w=>{const E=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,k=w.schema.safeParse(Or(E)),C=V=>{const H=MS(V.target);if(!H)return!1;const I=V.target,O=Sp(V.target)||(V.relatedTarget?Or(V.relatedTarget):""),$=w.schema.safeParse(O);if(I.setAttribute("value",O),$.success)return E.setCustomValidity&&E.setCustomValidity(""),o(D=>{if($e.null(D))return null;const P=ln(D,H,void 0);return $e.empty(D)||$e.nil(D)||$e.empty(P)?null:P}),!1;if(E.required){const D=$.error.issues[0]?.message||"";E.setCustomValidity&&E.setCustomValidity(D),o(P=>{if($e.null(P))return null;const j=ln(P,H,D||void 0);return $e.empty(j)?null:j})}return!1},M=new AbortController,_=E.getAttribute("data-trigger")||"blur";E.addEventListener(_,C,{signal:M.signal});const F=E.dataset.shadow?!1:E.required?!k.success:!1;return{input:w,hasInitialError:F,unsubscribe:()=>M.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const p=x=>T=>{T.preventDefault();const w=T.currentTarget;let E=OS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(F=>{if(F.tagName==="SELECT"){const V=F;E=ln(E,V.name,V.value)}if(F.tagName==="INPUT"){const V=F,H=Sp(V)||(V?Or(V):"");E=ln(E,V.dataset.target||V.name,H)}});const C=_S(E,a),M=e.safeParse(C),_=()=>{tS(w),n.interceptor?.clear()};if(M.success){const F=JSON.stringify(M.data);return w.setAttribute("data-json",F),n.interceptor?.clear(),x?.(T,{form:w,event:T,reset:_,setErrors:o,errors:[],success:!0,data:M.data,json:M.data})}return console.group("useForm error"),console.info(M),console.info(M.error.issues),console.error(M.error),console.groupEnd(),w.reportValidity(),x?.(T,{form:w,json:E,event:T,reset:_,setErrors:o,data:E,success:!1,errors:M.error.issues.map(F=>({message:F.message,path:F.path.map(V=>String(V))}))})},v=x=>nd(a,x)||"",y=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:h,onSubmit:p,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,multiselect:b,disabled:r!==null}},wR=e=>e?JSON.parse(e.getAttribute("data-json")):{},SR=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},DS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},NS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","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"},FS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},TR={name:"dark",zIndex:FS,rounded:DS,spacing:NS,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)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",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(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",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,70%,14%)"},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%)"}}}},ER={rounded:DS,spacing:NS,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 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:FS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",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(221, 20%, 97%)",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%)"}}}},kR=TR,CR=ER,AR=e=>{const t=S.useMemo(()=>({locale:e.locale,tweaks:{...ss,...e.tweaks},parser:e.parser||os.hsla,map:{...as,...e.map}}),[e]);return m.jsx(No.Provider,{value:t,children:e.children})},PR=()=>{const e=S.useContext(No);return e?e.parser:os.hsla};ne.Alert=ZI,ne.AnimatedList=_F,ne.AnimatedListItem=OF,ne.Autocomplete=UV,ne.Button=ka,ne.Calendar=yb,ne.Card=ad,ne.Checkbox=Lf,ne.ColType=ii,ne.Collapse=vy,ne.CommandPalette=JF,ne.ComponentsProvider=AR,ne.Context=No,ne.DatePicker=YV,ne.Dict=wn,ne.Dropdown=Go,ne.Empty=bb,ne.Expand=eL,ne.FileUpload=pj,ne.Form=hj,ne.Input=ha,ne.InputFeedback=Uw,ne.InputField=pa,ne.Menu=rL,ne.MenuItem=nL,ne.Modal=rf,ne.MultiSelect=wj,ne.Notifications=r2,ne.Polymorph=un,ne.Progress=o2,ne.Radiobox=Sj,ne.RenderOnView=cE,ne.Select=no,ne.Slider=Ej,ne.Stats=i2,ne.Switch=kj,ne.Tab=c2,ne.Table=Lz,ne.Tabs=s2,ne.Tag=Ca,ne.TaskList=Cj,ne.Textarea=Aj,ne.Timeline=u2,ne.TimelineItem=Ts,ne.Toolbar=oL,ne.Tooltip=af,ne.TransferList=_j,ne.createColumns=tz,ne.createCssProperties=LM,ne.createDesignTokens=ab,ne.createFormStorage=bR,ne.createOptionCols=ip,ne.createStyles=DM,ne.createTheme=FM,ne.createTokenStyles=VM,ne.css=ke,ne.defaultDarkTheme=kR,ne.defaultLightTheme=CR,ne.defaultTranslations=as,ne.defaultTweaks=ss,ne.dispatchInput=Yh,ne.formReset=tS,ne.formToJson=OS,ne.getCoords=iE,ne.getJsonForm=wR,ne.getModalScrollerRef=az,ne.getRemainingSize=yi,ne.getSchemaShape=_r,ne.hasVerticalScroll=Gh,ne.initializeInputDataset=vi,ne.isMobile=fb,ne.isReactComponent=oE,ne.isReactFC=yc,ne.isSsr=dr,ne.mergeRefs=Kn,ne.negate=$M,ne.noop=od,ne.parsers=os,ne.path=nd,ne.reduceTokens=ur,ne.safeRegex=rd,ne.splitInto=db,ne.useColorParser=PR,ne.useForm=xR,ne.useLocale=td,ne.useNotification=t2,ne.usePrevious=SR,ne.useReactive=Ix,ne.useStableRef=ir,ne.useSwipe=lb,ne.useTablePreferences=oz,ne.useTranslations=Et,ne.uuid=Fo,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
247
247
  //# sourceMappingURL=index.umd.js.map