@g4rcez/components 2.1.2 → 2.2.1

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,9 +1,9 @@
1
- (function(ie,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ie=typeof globalThis<"u"?globalThis:ie||self,S(ie.components={},ie.React,ie["react/jsx-runtime"],ie.ReactDOM))})(this,(function(ie,S,g,Fi){"use strict";function Bh(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=Bh(S),jn=Bh(Fi);function Hh(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=Hh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hh(e))&&(r&&(r+=" "),r+=t);return r}const qh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Uh=Wh,Io=(e,t)=>n=>{var r;if(t?.variants==null)return Uh(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=qh(u)||qh(d);return o[c][f]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[h,m]=v;return Array.isArray(m)?m.includes({...i,...s}[h]):{...i,...s}[h]===m})?[...c,d,f]:c},[]);return Uh(e,a,l,n?.class,n?.className)};var Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function YE(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 vc,Kh;function Ao(){return Kh||(Kh=1,vc=TypeError),vc}const KE=YE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var yc,Zh;function Za(){if(Zh)return yc;Zh=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,h=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,E=String.prototype.toUpperCase,T=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$=Object.getOwnPropertySymbols,D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(q){return q.__proto__}:null);function C(q,Z){if(q===1/0||q===-1/0||q!==q||q&&q>-1e3&&q<1e3||I.call(/e/,Z))return Z;var Pe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof q=="number"){var Ue=q<0?-_(-q):_(q);if(Ue!==q){var Ze=String(Ue),Ne=x.call(Z,Ze.length+1);return b.call(Ze,Pe,"$&_")+"."+b.call(b.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(Z,Pe,"$&_")}var V=KE,z=V.custom,R=oe(z)?z:null,W={__proto__:null,double:'"',single:"'"},U={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};yc=function q(Z,Pe,Ue,Ze){var Ne=Pe||{};if(ne(Ne,"quoteStyle")&&!ne(W,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ne(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=ne(Ne,"customInspect")?Ne.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ne(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ne(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mt=Ne.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return ue(Z,Ne);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var it=String(Z);return mt?C(Z,it):it}if(typeof Z=="bigint"){var gn=String(Z)+"n";return mt?C(Z,gn):gn}var Ur=typeof Ne.depth>"u"?5:Ne.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=Ur&&Ur>0&&typeof Z=="object")return te(Z)?"[Array]":"[Object]";var Gr=ht(Ne,Ue);if(typeof Ze>"u")Ze=[];else if(ve(Ze,Z)>=0)return"[Circular]";function En(Ni,gc,mH){if(gc&&(Ze=P.call(Ze),Ze.push(gc)),mH){var GE={depth:Ne.depth};return ne(Ne,"quoteStyle")&&(GE.quoteStyle=Ne.quoteStyle),q(Ni,GE,Ue+1,Ze)}return q(Ni,Ne,Ue+1,Ze)}if(typeof Z=="function"&&!Y(Z)){var Mi=pe(Z),Di=$e(Z,En);return"[Function"+(Mi?": "+Mi:" (anonymous)")+"]"+(Di.length>0?" { "+k.call(Di,", ")+" }":"")}if(oe(Z)){var BE=O?b.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):D.call(Z);return typeof Z=="object"&&!O?ke(BE):BE}if(le(Z)){for(var Ka="<"+T.call(String(Z.nodeName)),Fh=Z.attributes||[],mc=0;mc<Fh.length;mc++)Ka+=" "+Fh[mc].name+"="+H(ee(Fh[mc].value),"double",Ne);return Ka+=">",Z.childNodes&&Z.childNodes.length&&(Ka+="..."),Ka+="</"+T.call(String(Z.nodeName))+">",Ka}if(te(Z)){if(Z.length===0)return"[]";var Lh=$e(Z,En);return Gr&&!pt(Lh)?"["+$t(Lh,Gr)+"]":"[ "+k.call(Lh,", ")+" ]"}if(Q(Z)){var Vh=$e(Z,En);return!("cause"in Error.prototype)&&"cause"in Z&&!j.call(Z,"cause")?"{ ["+String(Z)+"] "+k.call(w.call("[cause]: "+En(Z.cause),Vh),", ")+" }":Vh.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+k.call(Vh,", ")+" }"}if(typeof Z=="object"&&ot){if(R&&typeof Z[R]=="function"&&V)return V(Z,{depth:Ur-Ue});if(ot!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(Ae(Z)){var HE=[];return r&&r.call(Z,function(Ni,gc){HE.push(En(gc,Z,!0)+" => "+En(Ni,Z))}),Ke("Map",n.call(Z),HE,Gr)}if(L(Z)){var WE=[];return s&&s.call(Z,function(Ni){WE.push(En(Ni,Z))}),Ke("Set",a.call(Z),WE,Gr)}if(me(Z))return De("WeakMap");if(X(Z))return De("WeakSet");if(K(Z))return De("WeakRef");if(B(Z))return ke(En(Number(Z)));if(J(Z))return ke(En(F.call(Z)));if(ae(Z))return ke(v.call(Z));if(de(Z))return ke(En(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Gh<"u"&&Z===Gh)return"{ [object globalThis] }";if(!G(Z)&&!Y(Z)){var $h=$e(Z,En),qE=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,zh=Z instanceof Object?"":"null prototype",UE=!qE&&N&&Object(Z)===Z&&N in Z?x.call(fe(Z),8,-1):zh?"Object":"",hH=qE||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",jh=hH+(UE||zh?"["+k.call(w.call([],UE||[],zh||[]),": ")+"] ":"");return $h.length===0?jh+"{}":Gr?jh+"{"+$t($h,Gr)+"}":jh+"{ "+k.call($h,", ")+" }"}return String(Z)};function H(q,Z,Pe){var Ue=Pe.quoteStyle||Z,Ze=W[Ue];return Ze+q+Ze}function ee(q){return b.call(String(q),/"/g,"&quot;")}function re(q){return!N||!(typeof q=="object"&&(N in q||typeof q[N]<"u"))}function te(q){return fe(q)==="[object Array]"&&re(q)}function G(q){return fe(q)==="[object Date]"&&re(q)}function Y(q){return fe(q)==="[object RegExp]"&&re(q)}function Q(q){return fe(q)==="[object Error]"&&re(q)}function de(q){return fe(q)==="[object String]"&&re(q)}function B(q){return fe(q)==="[object Number]"&&re(q)}function ae(q){return fe(q)==="[object Boolean]"&&re(q)}function oe(q){if(O)return q&&typeof q=="object"&&q instanceof Symbol;if(typeof q=="symbol")return!0;if(!q||typeof q!="object"||!D)return!1;try{return D.call(q),!0}catch{}return!1}function J(q){if(!q||typeof q!="object"||!F)return!1;try{return F.call(q),!0}catch{}return!1}var se=Object.prototype.hasOwnProperty||function(q){return q in this};function ne(q,Z){return se.call(q,Z)}function fe(q){return h.call(q)}function pe(q){if(q.name)return q.name;var Z=y.call(m.call(q),/^function\s*([\w$]+)/);return Z?Z[1]:null}function ve(q,Z){if(q.indexOf)return q.indexOf(Z);for(var Pe=0,Ue=q.length;Pe<Ue;Pe++)if(q[Pe]===Z)return Pe;return-1}function Ae(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 me(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 K(q){if(!p||!q||typeof q!="object")return!1;try{return p.call(q),!0}catch{}return!1}function L(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 X(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 le(q){return!q||typeof q!="object"?!1:typeof HTMLElement<"u"&&q instanceof HTMLElement?!0:typeof q.nodeName=="string"&&typeof q.getAttribute=="function"}function ue(q,Z){if(q.length>Z.maxStringLength){var Pe=q.length-Z.maxStringLength,Ue="... "+Pe+" more character"+(Pe>1?"s":"");return ue(x.call(q,0,Z.maxStringLength),Z)+Ue}var Ze=U[Z.quoteStyle||"single"];Ze.lastIndex=0;var Ne=b.call(b.call(q,Ze,"\\$1"),/[\x00-\x1f]/g,Ee);return H(Ne,"single",Z)}function Ee(q){var Z=q.charCodeAt(0),Pe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Pe?"\\"+Pe:"\\x"+(Z<16?"0":"")+E.call(Z.toString(16))}function ke(q){return"Object("+q+")"}function De(q){return q+" { ? }"}function Ke(q,Z,Pe,Ue){var Ze=Ue?$t(Pe,Ue):k.call(Pe,", ");return q+" ("+Z+") {"+Ze+"}"}function pt(q){for(var Z=0;Z<q.length;Z++)if(ve(q[Z],`
2
- `)>=0)return!1;return!0}function ht(q,Z){var Pe;if(q.indent===" ")Pe=" ";else if(typeof q.indent=="number"&&q.indent>0)Pe=k.call(Array(q.indent+1)," ");else return null;return{base:Pe,prev:k.call(Array(Z+1),Pe)}}function $t(q,Z){if(q.length===0)return"";var Pe=`
3
- `+Z.prev+Z.base;return Pe+k.call(q,","+Pe)+`
4
- `+Z.prev}function $e(q,Z){var Pe=te(q),Ue=[];if(Pe){Ue.length=q.length;for(var Ze=0;Ze<q.length;Ze++)Ue[Ze]=ne(q,Ze)?Z(q[Ze],q):""}var Ne=typeof $=="function"?$(q):[],ot;if(O){ot={};for(var mt=0;mt<Ne.length;mt++)ot["$"+Ne[mt]]=Ne[mt]}for(var it in q)ne(q,it)&&(Pe&&String(Number(it))===it&&it<q.length||O&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(Z(it,q)+": "+Z(q[it],q)):Ue.push(it+": "+Z(q[it],q))));if(typeof $=="function")for(var gn=0;gn<Ne.length;gn++)j.call(q,Ne[gn])&&Ue.push("["+Z(Ne[gn])+"]: "+Z(q[Ne[gn]],q));return Ue}return yc}var bc,Xh;function ZE(){if(Xh)return bc;Xh=1;var e=Za(),t=Ao(),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 bc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=a(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},bc}var xc,Qh;function Jh(){return Qh||(Qh=1,xc=Object),xc}var wc,em;function XE(){return em||(em=1,wc=Error),wc}var Sc,tm;function QE(){return tm||(tm=1,Sc=EvalError),Sc}var Tc,nm;function JE(){return nm||(nm=1,Tc=RangeError),Tc}var Ec,rm;function ek(){return rm||(rm=1,Ec=ReferenceError),Ec}var kc,om;function tk(){return om||(om=1,kc=SyntaxError),kc}var Cc,im;function nk(){return im||(im=1,Cc=URIError),Cc}var Ic,am;function rk(){return am||(am=1,Ic=Math.abs),Ic}var Ac,sm;function ok(){return sm||(sm=1,Ac=Math.floor),Ac}var Pc,lm;function ik(){return lm||(lm=1,Pc=Math.max),Pc}var Oc,cm;function ak(){return cm||(cm=1,Oc=Math.min),Oc}var _c,um;function sk(){return um||(um=1,_c=Math.pow),_c}var Mc,dm;function lk(){return dm||(dm=1,Mc=Math.round),Mc}var Dc,fm;function ck(){return fm||(fm=1,Dc=Number.isNaN||function(t){return t!==t}),Dc}var Nc,pm;function uk(){if(pm)return Nc;pm=1;var e=ck();return Nc=function(n){return e(n)||n===0?n:n<0?-1:1},Nc}var Fc,hm;function dk(){return hm||(hm=1,Fc=Object.getOwnPropertyDescriptor),Fc}var Lc,mm;function gm(){if(mm)return Lc;mm=1;var e=dk();if(e)try{e([],"length")}catch{e=null}return Lc=e,Lc}var Vc,vm;function fk(){if(vm)return Vc;vm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Vc=e,Vc}var $c,ym;function pk(){return ym||(ym=1,$c=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}),$c}var zc,bm;function hk(){if(bm)return zc;bm=1;var e=typeof Symbol<"u"&&Symbol,t=pk();return zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},zc}var jc,xm;function wm(){return xm||(xm=1,jc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jc}var Rc,Sm;function Tm(){if(Sm)return Rc;Sm=1;var e=Jh();return Rc=e.getPrototypeOf||null,Rc}var Bc,Em;function mk(){if(Em)return Bc;Em=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Bc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),v=[],h=0;h<p;h++)v[h]="$"+h;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Bc}var Hc,km;function Xa(){if(km)return Hc;km=1;var e=mk();return Hc=Function.prototype.bind||e,Hc}var Wc,Cm;function qc(){return Cm||(Cm=1,Wc=Function.prototype.call),Wc}var Uc,Im;function Am(){return Im||(Im=1,Uc=Function.prototype.apply),Uc}var Gc,Pm;function gk(){return Pm||(Pm=1,Gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Gc}var Yc,Om;function vk(){if(Om)return Yc;Om=1;var e=Xa(),t=Am(),n=qc(),r=gk();return Yc=r||e.call(n,t),Yc}var Kc,_m;function Mm(){if(_m)return Kc;_m=1;var e=Xa(),t=Ao(),n=qc(),r=vk();return Kc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Kc}var Zc,Dm;function yk(){if(Dm)return Zc;Dm=1;var e=Mm(),t=gm(),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 Zc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Zc}var Xc,Nm;function bk(){if(Nm)return Xc;Nm=1;var e=wm(),t=Tm(),n=yk();return Xc=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,Xc}var Qc,Fm;function xk(){if(Fm)return Qc;Fm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Xa();return Qc=n.call(e,t),Qc}var Jc,Lm;function eu(){if(Lm)return Jc;Lm=1;var e,t=Jh(),n=XE(),r=QE(),o=JE(),i=ek(),a=tk(),s=Ao(),l=nk(),c=rk(),u=ok(),d=ik(),f=ak(),p=sk(),v=lk(),h=uk(),m=Function,y=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},x=gm(),b=fk(),E=function(){throw new s},T=x?(function(){try{return arguments.callee,E}catch{try{return x(arguments,"callee").get}catch{return E}}})():E,I=hk()(),w=bk(),k=Tm(),P=wm(),_=Am(),F=qc(),$={},D=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":$,"%AsyncGenerator%":$,"%AsyncGeneratorFunction%":$,"%AsyncIteratorPrototype%":$,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":$,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":D,"%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%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":h,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(Y){var N=w(w(Y));O["%Error.prototype%"]=N}var j=function Y(Q){var de;if(Q==="%AsyncFunction%")de=y("async function () {}");else if(Q==="%GeneratorFunction%")de=y("function* () {}");else if(Q==="%AsyncGeneratorFunction%")de=y("async function* () {}");else if(Q==="%AsyncGenerator%"){var B=Y("%AsyncGeneratorFunction%");B&&(de=B.prototype)}else if(Q==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(de=w(ae.prototype))}return O[Q]=de,de},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=Xa(),V=xk(),z=C.call(F,Array.prototype.concat),R=C.call(_,Array.prototype.splice),W=C.call(F,String.prototype.replace),U=C.call(F,String.prototype.slice),H=C.call(F,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,te=function(Q){var de=U(Q,0,1),B=U(Q,-1);if(de==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&de!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ae=[];return W(Q,ee,function(oe,J,se,ne){ae[ae.length]=se?W(ne,re,"$1"):J||oe}),ae},G=function(Q,de){var B=Q,ae;if(V(M,B)&&(ae=M[B],B="%"+ae[0]+"%"),V(O,B)){var oe=O[B];if(oe===$&&(oe=j(B)),typeof oe>"u"&&!de)throw new s("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:ae,name:B,value:oe}}throw new a("intrinsic "+Q+" does not exist!")};return Jc=function(Q,de){if(typeof Q!="string"||Q.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new s('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Q)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=te(Q),ae=B.length>0?B[0]:"",oe=G("%"+ae+"%",de),J=oe.name,se=oe.value,ne=!1,fe=oe.alias;fe&&(ae=fe[0],R(B,z([0,1],fe)));for(var pe=1,ve=!0;pe<B.length;pe+=1){var Ae=B[pe],me=U(Ae,0,1),K=U(Ae,-1);if((me==='"'||me==="'"||me==="`"||K==='"'||K==="'"||K==="`")&&me!==K)throw new a("property names with quotes must have matching quotes");if((Ae==="constructor"||!ve)&&(ne=!0),ae+="."+Ae,J="%"+ae+"%",V(O,J))se=O[J];else if(se!=null){if(!(Ae in se)){if(!de)throw new s("base intrinsic for "+Q+" exists, but the property is not available.");return}if(x&&pe+1>=B.length){var L=x(se,Ae);ve=!!L,ve&&"get"in L&&!("originalValue"in L.get)?se=L.get:se=se[Ae]}else ve=V(se,Ae),se=se[Ae];ve&&!ne&&(O[J]=se)}}return se},Jc}var tu,Vm;function $m(){if(Vm)return tu;Vm=1;var e=eu(),t=Mm(),n=t([e("%String.prototype.indexOf%")]);return tu=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},tu}var nu,zm;function jm(){if(zm)return nu;zm=1;var e=eu(),t=$m(),n=Za(),r=Ao(),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 nu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var v=l(d,p);return c(d)===0&&(d=void 0),v}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,v){d||(d=new o),a(d,p,v)}};return f},nu}var ru,Rm;function wk(){if(Rm)return ru;Rm=1;var e=eu(),t=$m(),n=Za(),r=jm(),o=Ao(),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 ru=i?function(){var d,f,p={assert:function(v){if(!p.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&f)return f.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):f&&f.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!f&&f.has(v)},set:function(v,h){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,h)):r&&(f||(f=r()),f.set(v,h))}};return p}:r,ru}var ou,Bm;function Hm(){if(Bm)return ou;Bm=1;var e=Ao(),t=Za(),n=ZE(),r=jm(),o=wk(),i=o||r||n;return ou=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},ou}var Wm=e=>Array.isArray(e),iu=e=>e===void 0,au=e=>e===null,Sk=Function.bind.call(Function.call,Object.prototype.toString),Tk=e=>!!e&&Sk(e)==="[object Error]"||e instanceof Error,qm=(e,t)=>e instanceof t,Ek=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},kk=e=>Object.prototype.toString.call(e)==="[object Date]"&&qm(e,Date),Re={array:Wm,date:kk,empty:e=>au(e)||iu(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:qm,isError:Tk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>au(e)||iu(e),null:au,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wm(e)&&typeof e=="object",primitive:Ek,string:e=>typeof e=="string",undefined:iu},Ck=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},Ik=e=>e.replace(/[^0-9]/g,"");const Ak=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Pk=(e,t)=>({classGroupId:e,validator:t}),Um=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qa="-",Gm=[],Ok="arbitrary..",_k=e=>{const t=Dk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Mk(a);const s=a.split(Qa),l=s[0]===""&&s.length>1?1:0;return Ym(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?Ak(c,l):l:c||Gm}return n[a]||Gm}}},Ym=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Ym(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Qa):e.slice(t).join(Qa),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},Mk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Ok+r:void 0})(),Dk=e=>{const{theme:t,classGroups:n}=e;return Nk(n,t)},Nk=(e,t)=>{const n=Um();for(const r in e){const o=e[r];su(o,n,r,t)}return n},su=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Fk(a,t,n,r)}},Fk=(e,t,n,r)=>{if(typeof e=="string"){Lk(e,t,n);return}if(typeof e=="function"){Vk(e,t,n,r);return}$k(e,t,n,r)},Lk=(e,t,n)=>{const r=e===""?t:Km(t,e);r.classGroupId=n},Vk=(e,t,n,r)=>{if(zk(e)){su(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Pk(n,e))},$k=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];su(l,Km(t,s),n,r)}},Km=(e,t)=>{let n=e;const r=t.split(Qa),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=Um(),n.nextPart.set(a,s)),n=s}return n},zk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},lu="!",Zm=":",Rk=[],Xm=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Bk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let h=0;h<u;h++){const m=o[h];if(a===0&&s===0){if(m===Zm){i.push(o.slice(l,h)),l=h+1;continue}if(m==="/"){c=h;continue}}m==="["?a++:m==="]"?a--:m==="("?s++:m===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(lu)?(f=d.slice(0,-1),p=!0):d.startsWith(lu)&&(f=d.slice(1),p=!0);const v=c&&c>l?c-l:void 0;return Xm(i,p,f,v)};if(t){const o=t+Zm,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):Xm(Rk,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Hk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},Wk=e=>({cache:jk(e.cacheSize),parseClassName:Bk(e),sortModifiers:Hk(e),..._k(e)}),qk=/\s+/,Uk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(qk);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:h}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!h,y=r(m?v.substring(0,h):v);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const x=f.length===0?"":f.length===1?f[0]:i(f).join(":"),b=p?x+lu:x,E=b+y;if(a.indexOf(E)>-1)continue;a.push(E);const T=o(y,m);for(let I=0;I<T.length;++I){const w=T[I];a.push(b+w)}l=u+(l.length>0?" "+l:l)}return l},Gk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Qm(n))&&(o&&(o+=" "),o+=r);return o},Qm=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qm(e[r]))&&(n&&(n+=" "),n+=t);return n},Yk=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Wk(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=Uk(l,n);return o(l,u),u};return i=a,(...l)=>i(Gk(...l))},Kk=[],zt=e=>{const t=n=>n[e]||Kk;return t.isThemeGetter=!0,t},Jm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zk=/^\d+\/\d+$/,Xk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qk=/\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$/,Jk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=e=>Zk.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),vr=e=>!!e&&Number.isInteger(Number(e)),cu=e=>e.endsWith("%")&&We(e.slice(0,-1)),ar=e=>Xk.test(e),nC=()=>!0,rC=e=>Qk.test(e)&&!Jk.test(e),tg=()=>!1,oC=e=>eC.test(e),iC=e=>tC.test(e),aC=e=>!xe(e)&&!we(e),sC=e=>Oo(e,ag,tg),xe=e=>Jm.test(e),Yr=e=>Oo(e,sg,rC),uu=e=>Oo(e,fC,We),ng=e=>Oo(e,og,tg),lC=e=>Oo(e,ig,iC),Ja=e=>Oo(e,lg,oC),we=e=>eg.test(e),Li=e=>_o(e,sg),cC=e=>_o(e,pC),rg=e=>_o(e,og),uC=e=>_o(e,ag),dC=e=>_o(e,ig),es=e=>_o(e,lg,!0),Oo=(e,t,n)=>{const r=Jm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_o=(e,t,n=!1)=>{const r=eg.exec(e);return r?r[1]?t(r[1]):n:!1},og=e=>e==="position"||e==="percentage",ig=e=>e==="image"||e==="url",ag=e=>e==="length"||e==="size"||e==="bg-size",sg=e=>e==="length",fC=e=>e==="number",pC=e=>e==="family-name",lg=e=>e==="shadow",hC=Yk(()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),o=zt("tracking"),i=zt("leading"),a=zt("breakpoint"),s=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),d=zt("inset-shadow"),f=zt("text-shadow"),p=zt("drop-shadow"),v=zt("blur"),h=zt("perspective"),m=zt("aspect"),y=zt("ease"),x=zt("animate"),b=()=>["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"],T=()=>[...E(),we,xe],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[we,xe,l],P=()=>[Po,"full","auto",...k()],_=()=>[vr,"none","subgrid",we,xe],F=()=>["auto",{span:["full",vr,we,xe]},vr,we,xe],$=()=>[vr,"auto",we,xe],D=()=>["auto","min","max","fr",we,xe],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...k()],M=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,we,xe],V=()=>[...E(),rg,ng,{position:[we,xe]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",uC,sC,{size:[we,xe]}],W=()=>[cu,Li,Yr],U=()=>["","none","full",c,we,xe],H=()=>["",We,Li,Yr],ee=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[We,cu,rg,ng],G=()=>["","none",v,we,xe],Y=()=>["none",We,we,xe],Q=()=>["none",We,we,xe],de=()=>[We,we,xe],B=()=>[Po,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[nC],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[aC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",We],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,xe,we,m]}],container:["container"],columns:[{columns:[We,xe,we,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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:T()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[vr,"auto",we,xe]}],basis:[{basis:[Po,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Po,"auto","initial","none",xe]}],grow:[{grow:["",We,we,xe]}],shrink:[{shrink:["",We,we,xe]}],order:[{order:[vr,"first","last","none",we,xe]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Li,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,we,uu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cu,xe]}],"font-family":[{font:[cC,xe,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,we,xe]}],"line-clamp":[{"line-clamp":[We,"none",we,uu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",we,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",we,Yr]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[We,"auto",we,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,xe]}],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",we,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vr,we,xe],radial:["",we,xe],conic:[vr,we,xe]},dC,lC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,we,xe]}],"outline-w":[{outline:["",We,Li,Yr]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,es,Ja]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,es,Ja]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[We,Yr]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,es,Ja]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[We,we,xe]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[we,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,xe]}],filter:[{filter:["","none",we,xe]}],blur:[{blur:G()}],brightness:[{brightness:[We,we,xe]}],contrast:[{contrast:[We,we,xe]}],"drop-shadow":[{"drop-shadow":["","none",p,es,Ja]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",We,we,xe]}],"hue-rotate":[{"hue-rotate":[We,we,xe]}],invert:[{invert:["",We,we,xe]}],saturate:[{saturate:[We,we,xe]}],sepia:[{sepia:["",We,we,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,xe]}],"backdrop-blur":[{"backdrop-blur":G()}],"backdrop-brightness":[{"backdrop-brightness":[We,we,xe]}],"backdrop-contrast":[{"backdrop-contrast":[We,we,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,we,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,we,xe]}],"backdrop-invert":[{"backdrop-invert":["",We,we,xe]}],"backdrop-opacity":[{"backdrop-opacity":[We,we,xe]}],"backdrop-saturate":[{"backdrop-saturate":[We,we,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",We,we,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",we,xe]}],ease:[{ease:["linear","initial",y,we,xe]}],delay:[{delay:[We,we,xe]}],animate:[{animate:["none",x,we,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,we,xe]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[we,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,xe]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[We,Li,Yr,uu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),sr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},mC=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),du=e=>Re.function(e),Oe=(...e)=>hC(Wh(e)),cg=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)},ug=e=>e.scrollHeight>e.clientHeight,$i=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},gC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},ln=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),vC={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},yC=Io("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"}}}),bC=Io("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:vC,defaultVariants:{theme:"primary",size:"default"}}),ts=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return g.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(bC({size:a,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:yC({theme:n})}):null,r,s.children]})}),xC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Mt.apply(this,arguments)};function fu(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 pu(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 zi=function(e){return e.replace(new RegExp(" ","g")," ")},dg=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)},wC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},fg=function(e,t,n){var r=e.length-2,o=wC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},pg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ns=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},SC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},hu=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},TC=function(e){return e==="money"||e==="currency"},EC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Mt(Mt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},rs=function(e,t){var n=dg(pg(e),t.fraction.length),r="".concat(t.currency).concat(fg(n,t.group,t.decimal));return zi(r)},kC=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=fu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var v=EC(r,i,s);return v.currency=zi("".concat(v.currency.trim()," ")),v.literal=zi(v.literal.trim()),v},[r,i]),f=function(v){var h=rs(v.target.value,d),m=ns(h);v.target.value=h,v.target.setAttribute("data-number",m.toString()),l?.(v),m!==0&&(u.current.selectionEnd=h.length)};S.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var h=rs(v,d),m=ns(h);u.current.value=h,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});l?.(Mt(Mt({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=h.length)}}},[d]);var p=c.defaultValue?rs(c.defaultValue,d):void 0;return S.createElement("input",Mt({},c,{value:typeof c.value=="string"?rs(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),CC=1,IC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},AC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Mt(Mt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},os=function(e,t){var n=dg(pg(e),t.fraction.length),r="".concat(fg(n,t.group,t.decimal)," ").concat(t.percentSign);return zi(r)},PC=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=fu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=pu(S.useState(function(){var y,x;return(x=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var y,x=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(os(x,d))},[a.value]);var d=S.useMemo(function(){var y=AC(r);return y.percentSign=zi("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-CC,p=function(y){var x,b=s.current;b&&(b.setSelectionRange(f,f),y&&((x=a.onFocus)===null||x===void 0||x.call(a,y)))},v=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,E=x.selectionEnd,T=b!==E,I=f<b;!T&&I&&p()}i?.(y)},h=function(y){var x=os(y.target.value,d),b=ns(x);u(x),y.target.value=x,y.target.setAttribute("data-number",b.toString()),o?.(y)};S.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var x=os(y,d),b=ns(x);u(x),s.current.value=x,s.current.setAttribute("data-number",b.toString());var E=new InputEvent("change",{});o?.(Mt(Mt({},E),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=a.defaultValue?os(a.defaultValue,d):void 0;return S.createElement("input",Mt({},a,{defaultValue:m,inputMode:"decimal",onChange:h,onFocus:p,onKeyUp:v,ref:s,type:"text"}))}),ji={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},OC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=is[i];a===void 0?r.push(i.replace(ji.dots,"\\.").replace(ji.openParenthesis,"\\(").replace(ji.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ji.leadingBars,"\\")},Ri=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return mu(o,n);var i=OC(o);return n?"^".concat(i,"$"):i},_C=function(e){return e.replace(ji.escape,"\\$&")},mu=function(e,t){var n=e.map(function(r){return typeof r=="string"?_C(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},is={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]/}},MC=/\d/,hg="(dd) 9dddd-dddd",mg="(dd) dddd-dddd",gg="ddd.ddd.ddd-dd",vg="dd.ddd.ddd/dddd-dd",as=function(e){return e.replace(/\D/g,"")},DC=["2",/[0-3]/,":",/[0-5]/,/\d/],NC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:gg,isoDate:"dddd-dd-dd",cnpj:vg,telephone:mg,cellphone:hg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return as(e).length<=11?gg:vg},int:function(e){return e===void 0&&(e=""),MC.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=as(e);return t.length<11?mg:hg},time:function(e){var t=as(e),n=t[0];return n==="2"?DC:NC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Mt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ri(e,"",!0),infinity:n.infinity},n)},Zt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:as}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function yg(e,t,n,r){var o,i;r===void 0&&(r=is);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=a[c];if(d===void 0){s+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(s+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return s}var bg=function(e){return e},FC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ri(e,n,t));return r.test(n)};function LC(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var VC=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=fu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=S.useRef(null);S.useImperativeHandle(t,function(){return v.current});var h=hu(s),m=hu(d),y=hu(u),x=S.useRef(FC(u,i,p.value||p.defaultValue)),b=f??"input",E=pu(S.useState(""),2),T=E[0],I=E[1],w=LC(T),k=S.useCallback(function(N,j){var M,C,V=(M=N??j)!==null&&M!==void 0?M:"";if(u===void 0)return V;var z=(C=V?.toString())!==null&&C!==void 0?C:"";return yg(z,typeof u=="function"?u(z):u,a??bg,c??is)},[a,u,c]),P=pu(S.useState(function(){return k(p.value,p.defaultValue)}),2),_=P[0],F=P[1],$=k(p.defaultValue,p.defaultValue),D=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(_);return Array.isArray(N)?mu(N,i):Ri(u,_,i)}return typeof u=="string"?Ri(u,_,i):mu(u,i)},[l,_,i,u]);S.useEffect(function(){if(p.value!==void 0){var N=k(p.value,p.defaultValue);F(N),v.current!==null&&(v.current.value=N)}},[p.value,u,a,p.defaultValue]);var O=function(N){var j,M,C,V,z,R=N.currentTarget,W=N.target.value;if(y.current===void 0)return F(W),(j=m.current)===null||j===void 0||j.call(m,W),(M=h.current)===null||M===void 0||M.call(h,N),d?.(W);var U=new RegExp(Ri(y.current,W,i)),H=(C=R.selectionEnd)!==null&&C!==void 0?C:0,ee=function(Q,de,B){if(Q.type!=="number")return Q.setSelectionRange(de,B)};if(r&&x.current&&W.length>=_.length)return R.value=_,ee(R,H-1,H-1);var re=!1;W.length<w.length&&(x.current=!1,re=!0),U.test(W)&&(x.current=!0);var te=H,G=W[te-1],Y=yg(W,typeof y.current=="function"?y.current(W):y.current,a??bg,c??is);for(R.value=Y,F(Y);te<Y.length&&Y.charAt(te-1)!==G;)te+=1;re?ee(R,H,H):ee(R,te,te),N.target.value=Y,I(Y),(V=m.current)===null||V===void 0||V.call(m,Y),(z=h.current)===null||z===void 0||z.call(h,N)};return S.createElement(b,Mt({},p,{ref:v,pattern:D,onChange:O,defaultValue:xg(p.defaultValue)?$:void 0,value:xg(p.value)?k(p.value,p.value):p.value}))}),xg=function(e){return typeof e=="string"},wg=S.forwardRef(function(e,t){return TC(e.mask)?S.createElement(kC,Mt({},e,{mask:void 0,ref:t})):IC(e.mask)?S.createElement(PC,Mt({},e,{mask:void 0,ref:t})):S.createElement(VC,Mt({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(wg,Mt({},e,t))}};on(Zt.cellTelephone),on(Zt.cellphone),on(Zt.cep),on(Zt.cnpj),on(Zt.color),on(Zt.cpf),on(Zt.cpfCnpj),on(Zt.creditCard),on(Zt.date),on(Zt.int),on(Zt.isoDate),on(Zt.telephone),on(Zt.time),on(Zt.uuid);var Sg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&SC(Zt,t.mask)?Zt[t.mask]:{mask:t.mask}},[t.mask]),o=Mt(Mt({},t),r);return S.createElement(wg,Mt({},o,{ref:n}))});const $C=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Tg=e=>{const t=zC(e);return t.charAt(0).toUpperCase()+t.slice(1)},Eg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),jC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var RC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const BC=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...RC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Eg("lucide",o),...!i&&!jC(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const at=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(BC,{ref:i,iconNode:t,className:Eg(`lucide-${$C(Tg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Tg(e),n};const HC=at("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const WC=at("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const kg=at("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const qC=at("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const UC=at("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const gu=at("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const GC=at("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const vu=at("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Cg=at("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const YC=at("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const KC=at("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const ZC=at("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Ig=at("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Ag=at("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Pg=at("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const XC=at("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const QC=at("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const yu=at("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const JC=at("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const bu=at("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const eI=at("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const tI=at("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const xu=at("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const nI=at("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const rI=at("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const wu=at("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ss=at("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const oI=at("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const iI=at("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Mo=at("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ls={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>)`},yr=(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(yr(a,t,n,s))},[]),Og=(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]:Og(a,t,n,s)}},{}),_g={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},cs=(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)},aI={default:e=>cs(e,{result:_g.default}),dark:e=>cs(e,{result:_g.dark})},Do=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},sI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Su=(e,t)=>{const n=yr(e.colors,Do(t?.colors)),r=yr(e.spacing,Do(t?.spacing)),o=yr(e.rounded,Do(t?.rounded)),i=yr(e.shadow,Do(t?.rounded)),a=yr(e.zIndex,Do(t?.zIndex??sI)),s=e.custom?yr(e.custom,Do(t?.customTokens)):[];return n.concat(r,o,s,a,i)},lI=(e,t)=>cs(Su(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),cI=(e,t)=>Su(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),uI=(e,t)=>cs(Su(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),us={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>g.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},ds={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Kr=S.createContext({parser:ls.hsla,tweaks:ds,floatingRef:void 0,map:us,locale:void 0}),Pt=()=>{const e=S.useContext(Kr);return e?e.map:us},Tu=()=>{const e=S.useContext(Kr);return e?e.tweaks:ds};function fs(){return typeof window<"u"}function br(e){return ps(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(ps(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ps(e){return fs()?e instanceof Node||e instanceof qt(e).Node:!1}function tt(e){return fs()?e instanceof Element||e instanceof qt(e).Element:!1}function Ot(e){return fs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Bi(e){return!fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const dI=new Set(["inline","contents"]);function Hi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!dI.has(o)}const fI=new Set(["table","td","th"]);function pI(e){return fI.has(br(e))}const hI=[":popover-open",":modal"];function hs(e){return hI.some(t=>{try{return e.matches(t)}catch{return!1}})}const mI=["transform","translate","scale","rotate","perspective"],gI=["transform","translate","scale","rotate","perspective","filter"],vI=["paint","layout","strict","content"];function Eu(e){const t=ms(),n=tt(e)?cn(e):e;return mI.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)||gI.some(r=>(n.willChange||"").includes(r))||vI.some(r=>(n.contain||"").includes(r))}function yI(e){let t=cr(e);for(;Ot(t)&&!lr(t);){if(Eu(t))return t;if(hs(t))return null;t=cr(t)}return null}function ms(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const bI=new Set(["html","body","#document"]);function lr(e){return bI.has(br(e))}function cn(e){return qt(e).getComputedStyle(e)}function gs(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(br(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||Bn(e);return Bi(t)?t.host:t}function Mg(e){const t=cr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&Hi(t)?t:Mg(t)}function xr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=ku(a);return t.concat(a,a.visualViewport||[],Hi(o)?o:[],s&&n?xr(s):[])}return t.concat(o,xr(o,[],n))}function ku(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const xI=["top","right","bottom","left"],Dg=["start","end"],Ng=xI.reduce((e,t)=>e.concat(t,t+"-"+Dg[0],t+"-"+Dg[1]),[]),wr=Math.min,un=Math.max,vs=Math.round,No=Math.floor,Hn=e=>({x:e,y:e}),wI={left:"right",right:"left",bottom:"top",top:"bottom"},SI={start:"end",end:"start"};function Cu(e,t,n){return un(e,wr(t,n))}function Zr(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function kn(e){return e.split("-")[1]}function Fg(e){return e==="x"?"y":"x"}function Iu(e){return e==="y"?"height":"width"}const TI=new Set(["top","bottom"]);function ur(e){return TI.has(Wn(e))?"y":"x"}function Au(e){return Fg(ur(e))}function Lg(e,t,n){n===void 0&&(n=!1);const r=kn(e),o=Au(e),i=Iu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bs(a)),[a,bs(a)]}function EI(e){const t=bs(e);return[ys(e),t,ys(t)]}function ys(e){return e.replace(/start|end/g,t=>SI[t])}const Vg=["left","right"],$g=["right","left"],kI=["top","bottom"],CI=["bottom","top"];function II(e,t,n){switch(e){case"top":case"bottom":return n?t?$g:Vg:t?Vg:$g;case"left":case"right":return t?kI:CI;default:return[]}}function AI(e,t,n,r){const o=kn(e);let i=II(Wn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(ys)))),i}function bs(e){return e.replace(/left|right|bottom|top/g,t=>wI[t])}function PI(e){return{top:0,right:0,bottom:0,left:0,...e}}function zg(e){return typeof e!="number"?PI(e):{top:e,right:e,bottom:e,left:e}}function xs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var OI=["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])"],ws=OI.join(","),jg=typeof Element>"u",Fo=jg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!jg&&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},Ts=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},_I=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Rg=function(t,n,r){if(Ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ws));return n&&Fo.call(t,ws)&&o.unshift(t),o=o.filter(r),o},Bg=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ts(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=Fo.call(a,ws);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ts(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Hg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_I(t))&&!Hg(t)?0:t.tabIndex},MI=function(t,n){var r=Wg(t);return r<0&&n&&!Hg(t)?0:r},DI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},qg=function(t){return t.tagName==="INPUT"},NI=function(t){return qg(t)&&t.type==="hidden"},FI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},LI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},VI=function(t){if(!t.name)return!0;var n=t.form||Ss(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=LI(o,t.form);return!i||i===t},$I=function(t){return qg(t)&&t.type==="radio"},zI=function(t){return $I(t)&&!VI(t)},jI=function(t){var n,r=t&&Ss(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=Ss(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},Ug=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},RI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fo.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=Ss(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ug(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(jI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ug(t);return!1},BI=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 Fo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Pu=function(t,n){return!(n.disabled||Ts(n)||NI(n)||RI(n,t)||FI(n)||BI(n))},Ou=function(t,n){return!(zI(n)||Wg(n)<0||!Pu(t,n))},HI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},WI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=MI(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(DI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Es=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bg([t],n.includeContainer,{filter:Ou.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:HI}):r=Rg(t,n.includeContainer,Ou.bind(null,n)),WI(r)},qI=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bg([t],n.includeContainer,{filter:Pu.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Rg(t,n.includeContainer,Pu.bind(null,n)),r},Gg=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fo.call(t,ws)===!1?!1:Ou(n,t)};function _u(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Yg(){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 Kg(){return/apple/i.test(navigator.vendor)}function Mu(){const e=/android/i;return e.test(_u())||e.test(Yg())}function UI(){return _u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Zg(){return Yg().includes("jsdom/")}const Xg="data-floating-ui-focusable",GI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Du="ArrowLeft",Nu="ArrowRight",YI="ArrowUp",KI="ArrowDown";function qn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fu(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 ZI(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function Lu(e){return Ot(e)&&e.matches(GI)}function Vu(e){return e?e.getAttribute("role")==="combobox"&&Lu(e):!1}function XI(e){if(!e||Zg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ks(e){return e?e.hasAttribute(Xg)?e:e.querySelector("["+Xg+"]")||e:null}function Xr(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Xr(e,o.id,n)])}function QI(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Xr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Qg(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Gt(e){e.preventDefault(),e.stopPropagation()}function JI(e){return"nativeEvent"in e}function Jg(e){return e.mozInputSource===0&&e.isTrusted?!0:Mu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ev(e){return Zg()?!1:!Mu()&&e.width===0&&e.height===0||Mu()&&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 Lo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var eA=typeof document<"u",tA=function(){},nt=eA?S.useLayoutEffect:tA;const nA={...A};function Wt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const rA=nA.useInsertionEffect||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return rA(()=>{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 Cs(e,t,n){return Math.floor(e/t)!==n}function Wi(e,t){return t<0||t>=e.current.length}function $u(e,t){return Xt(e,{disabledIndices:t})}function tv(e,t){return Xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&Is(e,a,o));return a}function oA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===YI){if(d&&Gt(n),u===-1)f=c;else if(f=Xt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const p=u%a,v=c%a,h=c-(v-p);v===p?f=c:f=v>p?h:h-a}Wi(e,f)&&(f=u)}if(n.key===KI&&(d&&Gt(n),u===-1?f=l:(f=Xt(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Xt(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Wi(e,f)&&(f=u)),r==="both"){const p=No(u/a);n.key===(i?Du:Nu)&&(d&&Gt(n),u%a!==a-1?(f=Xt(e,{startingIndex:u,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s})),Cs(f,a,p)&&(f=u)),n.key===(i?Nu:Du)&&(d&&Gt(n),u%a!==0?(f=Xt(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Cs(f,a,p)&&(f=u));const v=No(c/a)===p;Wi(e,f)&&(o&&v?f=n.key===(i?Nu:Du)?c:Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}):f=u)}return f}function iA(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function aA(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 sA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Is(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 qi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nv(e,t){const n=Es(e,qi()),r=n.length;if(r===0)return;const o=qn(Ut(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function rv(e){return nv(Ut(e).body,1)||e}function ov(e){return nv(Ut(e).body,-1)||e}function Ui(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function lA(e){Es(e,qi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function iv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function av(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),a=Au(t),s=Iu(a),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kn(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const cA=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}=av(c,r,l),f=r,p={},v=0;for(let h=0;h<s.length;h++){const{name:m,fn:y}=s[h],{x,y:b,data:E,reset:T}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,p={...p,[m]:{...p[m],...E}},T&&v<=50&&(v++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=av(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function As(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Zr(t,e),v=zg(p),m=s[f?d==="floating"?"reference":"floating":d],y=xs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},T=xs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-T.top+v.top)/E.y,bottom:(T.bottom-y.bottom+v.bottom)/E.y,left:(y.left-T.left+v.left)/E.x,right:(T.right-y.right+v.right)/E.x}}const uA=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}=Zr(e,t)||{};if(c==null)return{};const d=zg(u),f={x:n,y:r},p=Au(o),v=Iu(p),h=await a.getDimensions(c),m=p==="y",y=m?"top":"left",x=m?"bottom":"right",b=m?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[p]-f[p]-i.floating[v],T=f[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=I?I[b]:0;(!w||!await(a.isElement==null?void 0:a.isElement(I)))&&(w=s.floating[b]||i.floating[v]);const k=E/2-T/2,P=w/2-h[v]/2-1,_=wr(d[y],P),F=wr(d[x],P),$=_,D=w-h[v]-F,O=w/2-h[v]/2+k,N=Cu($,O,D),j=!l.arrow&&kn(o)!=null&&O!==N&&i.reference[v]/2-(O<$?_:F)-h[v]/2<0,M=j?O<$?O-$:O-D:0;return{[p]:f[p]+M,data:{[p]:N,centerOffset:O-N-M,...j&&{alignmentOffset:M}},reset:j}}});function dA(e,t,n){return(e?[...n.filter(o=>kn(o)===e),...n.filter(o=>kn(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?kn(o)===e||(t?ys(o)!==o:!1):!0)}const fA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ng,autoAlignment:p=!0,...v}=Zr(e,t),h=d!==void 0||f===Ng?dA(d||null,p,f):f,m=await As(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,x=h[y];if(x==null)return{};const b=Lg(x,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==x)return{reset:{placement:h[0]}};const E=[m[Wn(x)],m[b[0]],m[b[1]]],T=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:E}],I=h[y+1];if(I)return{data:{index:y+1,overflows:T},reset:{placement:I}};const w=T.map(_=>{const F=kn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce(($,D)=>$+D,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,kn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==s?{data:{index:y+1,overflows:T},reset:{placement:P}}:{}}}},pA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...m}=Zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),x=ur(s),b=Wn(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(b||!h?[bs(s)]:EI(s)),I=v!=="none";!f&&I&&T.push(...AI(s,h,v,E));const w=[s,...T],k=await As(t,m),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[y]),d){const O=Lg(o,a,E);P.push(k[O[0]],k[O[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(O=>O<=0)){var F,$;const O=(((F=i.flip)==null?void 0:F.index)||0)+1,N=w[O];if(N&&(!(d==="alignment"?x!==ur(N):!1)||_.every(C=>ur(C.placement)===x?C.overflows[0]>0:!0)))return{data:{index:O,overflows:_},reset:{placement:N}};let j=($=_.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:$.placement;if(!j)switch(p){case"bestFit":{var D;const M=(D=_.filter(C=>{if(I){const V=ur(C.placement);return V===x||V==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((C,V)=>C[1]-V[1])[0])==null?void 0:D[0];M&&(j=M);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}},hA=new Set(["left","top"]);async function mA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wn(n),s=kn(n),l=ur(n)==="y",c=hA.has(a)?-1:1,u=i&&l?-1:1,d=Zr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const gA=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 mA(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}}}}},vA=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:m=>{let{x:y,y:x}=m;return{x:y,y:x}}},...l}=Zr(e,t),c={x:n,y:r},u=await As(t,l),d=ur(Wn(o)),f=Fg(d);let p=c[f],v=c[d];if(i){const m=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=p+u[m],b=p-u[y];p=Cu(x,p,b)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=v+u[m],b=v-u[y];v=Cu(x,v,b)}const h=s.fn({...t,[f]:p,[d]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},yA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Zr(e,t),u=await As(t,c),d=Wn(o),f=kn(o),p=ur(o)==="y",{width:v,height:h}=i.floating;let m,y;d==="top"||d==="bottom"?(m=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,m=f==="end"?"top":"bottom");const x=h-u.top-u.bottom,b=v-u.left-u.right,E=wr(h-u[m],x),T=wr(v-u[y],b),I=!t.middlewareData.shift;let w=E,k=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),I&&!f){const _=un(u.left,0),F=un(u.right,0),$=un(u.top,0),D=un(u.bottom,0);p?k=v-2*(_!==0||F!==0?_+F:un(u.left,u.right)):w=h-2*($!==0||D!==0?$+D:un(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const P=await a.getDimensions(s.floating);return v!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function sv(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=vs(n)!==i||vs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function zu(e){return tt(e)?e:e.contextElement}function Vo(e){const t=zu(e);if(!Ot(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sv(t);let a=(i?vs(n.width):n.width)/r,s=(i?vs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const bA=Hn(0);function lv(e){const t=qt(e);return!ms()||!t.visualViewport?bA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let a=Hn(1);t&&(r?tt(r)&&(a=Vo(r)):a=Vo(e));const s=xA(i,n,r)?lv(i):Hn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=qt(i),p=r&&tt(r)?qt(r):r;let v=f,h=ku(v);for(;h&&r&&p!==v;){const m=Vo(h),y=h.getBoundingClientRect(),x=cn(h),b=y.left+(h.clientLeft+parseFloat(x.paddingLeft))*m.x,E=y.top+(h.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=E,v=qt(h),h=ku(v)}}return xs({width:u,height:d,x:l,y:c})}function Ps(e,t){const n=gs(e).scrollLeft;return t?t.left+n:Qr(Bn(e)).left+n}function cv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ps(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function wA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Bn(r),s=t?hs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Ot(r);if((d||!d&&!i)&&((br(r)!=="body"||Hi(a))&&(l=gs(r)),Ot(r))){const p=Qr(r);c=Vo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!i?cv(a,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function SA(e){return Array.from(e.getClientRects())}function TA(e){const t=Bn(e),n=gs(e),r=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ps(e);const s=-n.scrollTop;return cn(r).direction==="rtl"&&(a+=un(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const uv=25;function EA(e,t){const n=qt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=ms();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ps(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-p);v<=uv&&(i-=v)}else c<=uv&&(i+=c);return{width:i,height:a,x:s,y:l}}const kA=new Set(["absolute","fixed"]);function CA(e,t){const n=Qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?Vo(e):Hn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function dv(e,t,n){let r;if(t==="viewport")r=EA(e,n);else if(t==="document")r=TA(Bn(e));else if(tt(t))r=CA(t,n);else{const o=lv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xs(r)}function fv(e,t){const n=cr(e);return n===t||!tt(n)||lr(n)?!1:cn(n).position==="fixed"||fv(n,t)}function IA(e,t){const n=t.get(e);if(n)return n;let r=xr(e,[],!1).filter(s=>tt(s)&&br(s)!=="body"),o=null;const i=cn(e).position==="fixed";let a=i?cr(e):e;for(;tt(a)&&!lr(a);){const s=cn(a),l=Eu(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&kA.has(o.position)||Hi(a)&&!l&&fv(e,a))?r=r.filter(u=>u!==a):o=s,a=cr(a)}return t.set(e,r),r}function AA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?hs(t)?[]:IA(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=dv(t,u,o);return c.top=un(d.top,c.top),c.right=wr(d.right,c.right),c.bottom=wr(d.bottom,c.bottom),c.left=un(d.left,c.left),c},dv(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PA(e){const{width:t,height:n}=sv(e);return{width:t,height:n}}function OA(e,t,n){const r=Ot(t),o=Bn(t),i=n==="fixed",a=Qr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Ps(o)}if(r||!r&&!i)if((br(t)!=="body"||Hi(o))&&(s=gs(t)),r){const p=Qr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?cv(o,s):Hn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function ju(e){return cn(e).position==="static"}function pv(e,t){if(!Ot(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function hv(e,t){const n=qt(e);if(hs(e))return n;if(!Ot(e)){let o=cr(e);for(;o&&!lr(o);){if(tt(o)&&!ju(o))return o;o=cr(o)}return n}let r=pv(e,t);for(;r&&pI(r)&&ju(r);)r=pv(r,t);return r&&lr(r)&&ju(r)&&!Eu(r)?n:r||yI(e)||n}const _A=async function(e){const t=this.getOffsetParent||hv,n=this.getDimensions,r=await n(e.floating);return{reference:OA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MA(e){return cn(e).direction==="rtl"}const DA={convertOffsetParentRelativeRectToViewportRelativeRect:wA,getDocumentElement:Bn,getClippingRect:AA,getOffsetParent:hv,getElementRects:_A,getClientRects:SA,getDimensions:PA,getScale:Vo,isElement:tt,isRTL:MA};function mv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NA(e,t){let n=null,r;const o=Bn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const v=No(d),h=No(o.clientWidth-(u+f)),m=No(o.clientHeight-(d+p)),y=No(u),b={rootMargin:-v+"px "+-h+"px "+-m+"px "+-y+"px",threshold:un(0,wr(1,l))||1};let E=!0;function T(I){const w=I[0].intersectionRatio;if(w!==l){if(!E)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!mv(c,e.getBoundingClientRect())&&a(),E=!1}try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return a(!0),i}function Jr(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=zu(e),u=o||i?[...c?xr(c):[],...xr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?NA(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,h=l?Qr(e):null;l&&m();function m(){const y=Qr(e);h&&!mv(h,y)&&n(),h=y,v=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const FA=gA,LA=fA,VA=vA,$A=pA,zA=yA,gv=uA,jA=(e,t,n)=>{const r=new Map,o={platform:DA,...n},i={...o.platform,_c:r};return cA(e,t,{...o,platform:i})};var RA=typeof document<"u",BA=function(){},Os=RA?S.useLayoutEffect:BA;function _s(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(!_s(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)&&!_s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yv(e,t){const n=vv(e);return Math.round(t*n)/n}function Ru(e){const t=A.useRef(e);return Os(()=>{t.current=e}),t}function HA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=A.useState(r);_s(f,r)||p(r);const[v,h]=A.useState(null),[m,y]=A.useState(null),x=A.useCallback(C=>{C!==I.current&&(I.current=C,h(C))},[]),b=A.useCallback(C=>{C!==w.current&&(w.current=C,y(C))},[]),E=i||v,T=a||m,I=A.useRef(null),w=A.useRef(null),k=A.useRef(u),P=l!=null,_=Ru(l),F=Ru(o),$=Ru(c),D=A.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};F.current&&(C.platform=F.current),jA(I.current,w.current,C).then(V=>{const z={...V,isPositioned:$.current!==!1};O.current&&!_s(k.current,z)&&(k.current=z,jn.flushSync(()=>{d(z)}))})},[f,t,n,F,$]);Os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const O=A.useRef(!1);Os(()=>(O.current=!0,()=>{O.current=!1}),[]),Os(()=>{if(E&&(I.current=E),T&&(w.current=T),E&&T){if(_.current)return _.current(E,T,D);D()}},[E,T,D,_,P]);const N=A.useMemo(()=>({reference:I,floating:w,setReference:x,setFloating:b}),[x,b]),j=A.useMemo(()=>({reference:E,floating:T}),[E,T]),M=A.useMemo(()=>{const C={position:n,left:0,top:0};if(!j.floating)return C;const V=yv(j.floating,u.x),z=yv(j.floating,u.y);return s?{...C,transform:"translate("+V+"px, "+z+"px)",...vv(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,s,j.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:D,refs:N,elements:j,floatingStyles:M}),[u,D,N,j,M])}const WA=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?gv({element:r.current,padding:o}).fn(n):{}:r?gv({element:r,padding:o}).fn(n):{}}}},$o=(e,t)=>({...FA(e),options:[e,t]}),Ms=(e,t)=>({...VA(e),options:[e,t]}),Ds=(e,t)=>({...$A(e),options:[e,t]}),bv=(e,t)=>({...zA(e),options:[e,t]}),qA=(e,t)=>({...LA(e),options:[e,t]}),Bu=(e,t)=>({...WA(e),options:[e,t]});function UA(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 xv=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function GA(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(UA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(xv.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function wv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(xv),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var f;const p=t!==void 0;a.current[s]=p?t:(f=d?.textContent)!=null?f:null}},[s,i,a,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const YA="data-floating-ui-focusable",Sv="active",Tv="selected",Gi="ArrowLeft",Yi="ArrowRight",Ev="ArrowUp",Ns="ArrowDown",KA={...A};let kv=!1,ZA=0;const Cv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ZA++;function XA(){const[e,t]=A.useState(()=>kv?Cv():void 0);return nt(()=>{e==null&&t(Cv())},[]),A.useEffect(()=>{kv=!0},[]),e}const Ki=KA.useId||XA;let Zi;process.env.NODE_ENV!=="production"&&(Zi=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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.warn(o)}}function QA(){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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.error(o)}}const Hu=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:v,...h}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Fs("The `ref` prop is required for `FloatingArrow`."));const y=Ki(),[x,b]=A.useState(!1);if(nt(()=>{if(!o)return;cn(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const[E,T]=r.split("-"),I=E==="top"||E==="bottom";let w=d;(I&&a!=null&&a.x||!I&&a!=null&&a.y)&&(w=null);const k=u*2,P=k/2,_=s/2*(c/-8+1),F=l/2*c/4,$=!!p,D=w&&T==="end"?"bottom":"top";let O=w&&T==="end"?"right":"left";w&&x&&(O=T==="end"?"left":"right");const N=i?.x!=null?w||i.x:"",j=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",C={top:$?"rotate(180deg)":"",left:$?"rotate(90deg)":"rotate(-90deg)",bottom:$?"":"rotate(180deg)",right:$?"rotate(-90deg)":"rotate(90deg)"}[E];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:$?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[O]:N,[D]:j,[E]:I||$?"100%":"calc(100% - "+k/2+"px)",transform:[C,v].filter(V=>!!V).join(" "),...h},children:[k>0&&g.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:M}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:M}),g.jsx("clipPath",{id:y,children:g.jsx("rect",{x:-P,y:P*($?-1:1),width:s+k,height:s})})]})});function Iv(){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 Av=A.createContext(null),Pv=A.createContext(null),Sr=()=>{var e;return((e=A.useContext(Av))==null?void 0:e.id)||null},Tr=()=>A.useContext(Pv);function JA(e){const t=Ki(),n=Tr(),o=Sr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function eP(e){const{children:t,id:n}=e,r=Sr();return g.jsx(Av.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function tP(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(()=>Iv());return g.jsx(Pv.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function eo(e){return"data-floating-ui-"+e}function Yt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Ov=eo("safe-polygon");function Wu(e,t,n){if(n&&!Lo(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 qu(e){return typeof e=="function"?e():e}function _v(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Tr(),v=Sr(),h=Wt(c),m=Wt(l),y=Wt(n),x=Wt(d),b=A.useRef(),E=A.useRef(-1),T=A.useRef(),I=A.useRef(-1),w=A.useRef(!0),k=A.useRef(!1),P=A.useRef(()=>{}),_=A.useRef(!1),F=kt(()=>{var M;const C=(M=o.current.openEvent)==null?void 0:M.type;return C?.includes("mouse")&&C!=="mousedown"});A.useEffect(()=>{if(!s)return;function M(C){let{open:V}=C;V||(Yt(E),Yt(I),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!h.current||!n)return;function M(V){F()&&r(!1,V,"hover")}const C=Ut(a.floating).documentElement;return C.addEventListener("mouseleave",M),()=>{C.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,h,F]);const $=A.useCallback(function(M,C,V){C===void 0&&(C=!0),V===void 0&&(V="hover");const z=Wu(m.current,"close",b.current);z&&!T.current?(Yt(E),E.current=window.setTimeout(()=>r(!1,M,V),z)):C&&(Yt(E),r(!1,M,V))},[m,r]),D=kt(()=>{P.current(),T.current=void 0}),O=kt(()=>{if(k.current){const M=Ut(a.floating).body;M.style.pointerEvents="",M.removeAttribute(Ov),k.current=!1}}),N=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function M(W){if(Yt(E),w.current=!1,u&&!Lo(b.current)||qu(x.current)>0&&!Wu(m.current,"open"))return;const U=Wu(m.current,"open",b.current);U?E.current=window.setTimeout(()=>{y.current||r(!0,W,"hover")},U):n||r(!0,W,"hover")}function C(W){if(N()){O();return}P.current();const U=Ut(a.floating);if(Yt(I),_.current=!1,h.current&&o.current.floatingContext){n||Yt(E),T.current=h.current({...o.current.floatingContext,tree:p,x:W.clientX,y:W.clientY,onClose(){O(),D(),N()||$(W,!0,"safe-polygon")}});const ee=T.current;U.addEventListener("mousemove",ee),P.current=()=>{U.removeEventListener("mousemove",ee)};return}(b.current!=="touch"||!Ht(a.floating,W.relatedTarget))&&$(W)}function V(W){N()||o.current.floatingContext&&(h.current==null||h.current({...o.current.floatingContext,tree:p,x:W.clientX,y:W.clientY,onClose(){O(),D(),N()||$(W)}})(W))}function z(){Yt(E)}function R(W){N()||$(W,!1)}if(tt(a.domReference)){const W=a.domReference,U=a.floating;return n&&W.addEventListener("mouseleave",V),f&&W.addEventListener("mousemove",M,{once:!0}),W.addEventListener("mouseenter",M),W.addEventListener("mouseleave",C),U&&(U.addEventListener("mouseleave",V),U.addEventListener("mouseenter",z),U.addEventListener("mouseleave",R)),()=>{n&&W.removeEventListener("mouseleave",V),f&&W.removeEventListener("mousemove",M),W.removeEventListener("mouseenter",M),W.removeEventListener("mouseleave",C),U&&(U.removeEventListener("mouseleave",V),U.removeEventListener("mouseenter",z),U.removeEventListener("mouseleave",R))}}},[a,s,e,u,f,$,D,O,r,n,y,p,m,h,o,N,x]),nt(()=>{var M;if(s&&n&&(M=h.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){k.current=!0;const V=a.floating;if(tt(a.domReference)&&V){var C;const z=Ut(a.floating).body;z.setAttribute(Ov,"");const R=a.domReference,W=p==null||(C=p.nodesRef.current.find(U=>U.id===v))==null||(C=C.context)==null?void 0:C.elements.floating;return W&&(W.style.pointerEvents=""),z.style.pointerEvents="none",R.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{z.style.pointerEvents="",R.style.pointerEvents="",V.style.pointerEvents=""}}}},[s,n,v,a,p,h,F]),nt(()=>{n||(b.current=void 0,_.current=!1,D(),O())},[n,D,O]),A.useEffect(()=>()=>{D(),Yt(E),Yt(I),O()},[s,a.domReference,D,O]);const j=A.useMemo(()=>{function M(C){b.current=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:V}=C;function z(){!w.current&&!y.current&&r(!0,V,"hover")}u&&!Lo(b.current)||n||qu(x.current)===0||_.current&&C.movementX**2+C.movementY**2<2||(Yt(I),b.current==="touch"?z():(_.current=!0,I.current=window.setTimeout(z,qu(x.current))))}}},[u,r,n,y,x]);return A.useMemo(()=>s?{reference:j}:{},[s,j])}let Mv=0;function to(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Mv);const i=()=>e?.focus({preventScroll:n});o?i():Mv=requestAnimationFrame(i)}function Uu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function nP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function rP(e){return e?.ownerDocument||document}const zo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Dv(e){return e==="inert"?zo.inert:e==="aria-hidden"?zo["aria-hidden"]:zo.none}let Ls=new WeakSet,Vs={},Gu=0;const oP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Nv=e=>e&&(e.host||Nv(e.parentNode)),iP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Nv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function aP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=iP(t,e),s=new Set,l=new Set(a),c=[];Vs[o]||(Vs[o]=new WeakMap);const u=Vs[o];a.forEach(d),f(t),s.clear();function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(br(v)!=="script")if(s.has(v))f(v);else{const h=i?v.getAttribute(i):null,m=h!==null&&h!=="false",y=Dv(i),x=(y.get(v)||0)+1,b=(u.get(v)||0)+1;y.set(v,x),u.set(v,b),c.push(v),x===1&&m&&Ls.add(v),b===1&&v.setAttribute(o,""),!m&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Gu++,()=>{c.forEach(p=>{const v=Dv(i),m=(v.get(p)||0)-1,y=(u.get(p)||0)-1;v.set(p,m),u.set(p,y),m||(!Ls.has(p)&&i&&p.removeAttribute(i),Ls.delete(p)),y||p.removeAttribute(o)}),Gu--,Gu||(zo.inert=new WeakMap,zo["aria-hidden"]=new WeakMap,zo.none=new WeakMap,Ls=new WeakSet,Vs={})}}function Fv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=rP(e[0]).body;return aP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),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},zs=A.forwardRef(function(t,n){const[r,o]=A.useState();nt(()=>{Kg()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[eo("focus-guard")]:"",style:$s};return g.jsx("span",{...t,...i})}),Lv=A.createContext(null),Vv=eo("portal");function sP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ki(),o=$v(),[i,a]=A.useState(null),s=A.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),nt(()=>{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(Vv,""),l.appendChild(c),s.current=c,a(c)},[t,r]),nt(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!ps(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(Vv,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function dr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=sP({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=a?.modal,p=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function h(m){i&&Ui(m)&&(m.type==="focusin"?iv:lA)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,f]),A.useEffect(()=>{i&&(p||iv(i))},[p,i]),g.jsxs(Lv.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&g.jsx(zs,{"data-type":"outside",ref:l,onFocus:h=>{if(Ui(h,i)){var m;(m=u.current)==null||m.focus()}else{const y=a?a.domReference:null,x=ov(y);x?.focus()}}}),v&&i&&g.jsx("span",{"aria-owns":i.id,style:$s}),i&&jn.createPortal(t,i),v&&i&&g.jsx(zs,{"data-type":"outside",ref:c,onFocus:h=>{if(Ui(h,i)){var m;(m=d.current)==null||m.focus()}else{const y=a?a.domReference:null,x=rv(y);x?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,h.nativeEvent,"focus-out")}}})]})}const $v=()=>A.useContext(Lv);function zv(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const lP=20;let Er=[];function Yu(){Er=Er.filter(e=>e.isConnected)}function cP(e){Yu(),e&&br(e)!=="body"&&(Er.push(e),Er.length>lP&&(Er=Er.slice(-20)))}function jv(){return Yu(),Er[Er.length-1]}function uP(e){const t=qi();return Gg(e,t)?e:Es(e,t)[0]||e}function Rv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=qi(),i=qI(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Gg(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 dP=A.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:$s})});function no(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:h,events:m,dataRef:y,elements:{domReference:x,floating:b}}=t,E=kt(()=>{var B;return(B=y.current.floatingContext)==null?void 0:B.nodeId}),T=kt(p),I=typeof a=="number"&&a<0,w=Vu(x)&&I,k=oP(),P=k?i:!0,_=!P||k&&f,F=Wt(o),$=Wt(a),D=Wt(s),O=Tr(),N=$v(),j=A.useRef(null),M=A.useRef(null),C=A.useRef(!1),V=A.useRef(!1),z=A.useRef(-1),R=A.useRef(-1),W=N!=null,U=ks(b),H=kt(function(B){return B===void 0&&(B=U),B?Es(B,qi()):[]}),ee=kt(B=>{const ae=H(B);return F.current.map(oe=>x&&oe==="reference"?x:U&&oe==="floating"?U:ae).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function B(oe){if(oe.key==="Tab"){Ht(U,qn(Ut(U)))&&H().length===0&&!w&&Gt(oe);const J=ee(),se=Un(oe);F.current[0]==="reference"&&se===x&&(Gt(oe),oe.shiftKey?to(J[J.length-1]):to(J[1])),F.current[1]==="floating"&&se===U&&oe.shiftKey&&(Gt(oe),to(J[0]))}}const ae=Ut(U);return ae.addEventListener("keydown",B),()=>{ae.removeEventListener("keydown",B)}},[r,x,U,c,F,w,H,ee]),A.useEffect(()=>{if(r||!b)return;function B(ae){const oe=Un(ae),se=H().indexOf(oe);se!==-1&&(z.current=se)}return b.addEventListener("focusin",B),()=>{b.removeEventListener("focusin",B)}},[r,b,H]),A.useEffect(()=>{if(r||!d)return;function B(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(se){const ne=se.relatedTarget,fe=se.currentTarget,pe=Un(se);queueMicrotask(()=>{const ve=E(),Ae=!(Ht(x,ne)||Ht(b,ne)||Ht(ne,b)||Ht(N?.portalNode,ne)||ne!=null&&ne.hasAttribute(eo("focus-guard"))||O&&(Xr(O.nodesRef.current,ve).find(me=>{var K,L;return Ht((K=me.context)==null?void 0:K.elements.floating,ne)||Ht((L=me.context)==null?void 0:L.elements.domReference,ne)})||Qg(O.nodesRef.current,ve).find(me=>{var K,L,X;return[(K=me.context)==null?void 0:K.elements.floating,ks((L=me.context)==null?void 0:L.elements.floating)].includes(ne)||((X=me.context)==null?void 0:X.elements.domReference)===ne})));if(fe===x&&U&&Rv(U,F),l&&fe!==x&&!(pe!=null&&pe.isConnected)&&qn(Ut(U))===Ut(U).body){Ot(U)&&U.focus();const me=z.current,K=H(),L=K[me]||K[K.length-1]||U;Ot(L)&&L.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&ne&&Ae&&!V.current&&ne!==jv()&&(C.current=!0,h(!1,se,"focus-out"))})}const oe=!!(!O&&N);function J(){Yt(R),y.current.insideReactTree=!0,R.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(b&&Ot(x))return x.addEventListener("focusout",ae),x.addEventListener("pointerdown",B),b.addEventListener("focusout",ae),oe&&b.addEventListener("focusout",J,!0),()=>{x.removeEventListener("focusout",ae),x.removeEventListener("pointerdown",B),b.removeEventListener("focusout",ae),oe&&b.removeEventListener("focusout",J,!0)}},[r,x,b,U,c,O,N,h,d,l,H,w,E,F,y]);const re=A.useRef(null),te=A.useRef(null),G=zv([re,N?.beforeInsideRef]),Y=zv([te,N?.afterInsideRef]);A.useEffect(()=>{var B,ae;if(r||!b)return;const oe=Array.from((N==null||(B=N.portalNode)==null?void 0:B.querySelectorAll("["+eo("portal")+"]"))||[]),se=(ae=(O?Qg(O.nodesRef.current,E()):[]).find(pe=>{var ve;return Vu(((ve=pe.context)==null?void 0:ve.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,ne=[b,se,...oe,...T(),j.current,M.current,re.current,te.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,F.current.includes("reference")||w?x:null].filter(pe=>pe!=null),fe=c||w?Fv(ne,!_,_):Fv(ne);return()=>{fe()}},[r,x,b,c,F,N,w,P,_,O,E,T]),nt(()=>{if(r||!Ot(U))return;const B=Ut(U),ae=qn(B);queueMicrotask(()=>{const oe=ee(U),J=$.current,se=(typeof J=="number"?oe[J]:J.current)||U,ne=Ht(U,ae);!I&&!ne&&v&&to(se,{preventScroll:se===U})})},[r,v,U,I,ee,$]),nt(()=>{if(r||!U)return;const B=Ut(U),ae=qn(B);cP(ae);function oe(ne){let{reason:fe,event:pe,nested:ve}=ne;if(["hover","safe-polygon"].includes(fe)&&pe.type==="mouseleave"&&(C.current=!0),fe==="outside-press")if(ve)C.current=!1;else if(Jg(pe)||ev(pe))C.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?C.current=!1:C.current=!0}}m.on("openchange",oe);const J=B.createElement("span");J.setAttribute("tabindex","-1"),J.setAttribute("aria-hidden","true"),Object.assign(J.style,$s),W&&x&&x.insertAdjacentElement("afterend",J);function se(){if(typeof D.current=="boolean"){const ne=x||jv();return ne&&ne.isConnected?ne:J}return D.current.current||J}return()=>{m.off("openchange",oe);const ne=qn(B),fe=Ht(b,ne)||O&&Xr(O.nodesRef.current,E(),!1).some(ve=>{var Ae;return Ht((Ae=ve.context)==null?void 0:Ae.elements.floating,ne)}),pe=se();queueMicrotask(()=>{const ve=uP(pe);D.current&&!C.current&&Ot(ve)&&(!(ve!==ne&&ne!==B.body)||fe)&&ve.focus({preventScroll:!0}),J.remove()})}},[r,b,U,D,y,m,O,W,x,E]),A.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(Yu)}),[r]),nt(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:h,domReference:x}),()=>{N.setFocusManagerState(null)}},[r,N,c,v,h,d,x]),nt(()=>{r||U&&Rv(U,F)},[r,U,F]);function Q(B){return r||!u||!c?null:g.jsx(dP,{ref:B==="start"?j:M,onClick:ae=>h(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const de=!r&&P&&(c?!w:!0)&&(W||c);return g.jsxs(g.Fragment,{children:[de&&g.jsx(zs,{"data-type":"inside",ref:G,onFocus:B=>{if(c){const oe=ee();to(o[0]==="reference"?oe[0]:oe[oe.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(C.current=!1,Ui(B,N.portalNode)){const oe=rv(x);oe?.focus()}else{var ae;(ae=N.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Q("start"),n,Q("end"),de&&g.jsx(zs,{"data-type":"inside",ref:Y,onFocus:B=>{if(c)to(ee()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(C.current=!0),Ui(B,N.portalNode)){const oe=ov(x);oe?.focus()}else{var ae;(ae=N.afterOutsideRef.current)==null||ae.focus()}}})]})}let js=0;const Bv="--floating-ui-scrollbar-width";function fP(){const e=_u(),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(Bv,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(Bv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Hv=()=>{};const Ku=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return js++,js===1&&(Hv=fP()),()=>{js--,js===0&&Hv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function Wv(e){return Ot(e.target)&&e.target.tagName==="BUTTON"}function pP(e){return Ot(e.target)&&e.target.tagName==="A"}function qv(e){return Lu(e)}function jo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(h){f.current=h.pointerType},onMouseDown(h){const m=f.current;h.button===0&&s!=="click"&&(Lo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const m=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Lo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){f.current=void 0,!(h.defaultPrevented||!u||Wv(h))&&(h.key===" "&&!qv(i)&&(h.preventDefault(),p.current=!0),!pP(h)&&h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||Wv(h)||qv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:v}:{},[a,v])}function hP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,f=a.x,p=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=s&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Uv(e){return e!=null&&e.clientX!=null}function mP(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=A.useRef(!1),f=A.useRef(null),[p,v]=A.useState(),[h,m]=A.useState([]),y=kt((I,w)=>{d.current||r.current.openEvent&&!Uv(r.current.openEvent)||a.setPositionReference(hP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),x=kt(I=>{c!=null||u!=null||(n?f.current||m([]):y(I.clientX,I.clientY))}),b=Lo(p)?o:n,E=A.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const I=qt(o);function w(k){const P=Un(k);Ht(o,P)?(I.removeEventListener("mousemove",w),f.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||Uv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);A.useEffect(()=>E(),[E,h]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),nt(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const T=A.useMemo(()=>{function I(w){let{pointerType:k}=w;v(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:x,onMouseEnter:x}},[x]);return A.useMemo(()=>s?{reference:T}:{},[s,T])}const gP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},vP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Gv=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 kr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,h=Tr(),m=kt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?m:l,x=A.useRef(!1),{escapeKey:b,outsidePress:E}=Gv(p),{escapeKey:T,outsidePress:I}=Gv(v),w=A.useRef(!1),k=kt(O=>{var N;if(!n||!a||!s||O.key!=="Escape"||w.current)return;const j=(N=i.current.floatingContext)==null?void 0:N.nodeId,M=h?Xr(h.nodesRef.current,j):[];if(!b&&(O.stopPropagation(),M.length>0)){let C=!0;if(M.forEach(V=>{var z;if((z=V.context)!=null&&z.open&&!V.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,JI(O)?O.nativeEvent:O,"escape-key")}),P=kt(O=>{var N;const j=()=>{var M;k(O),(M=Un(O))==null||M.removeEventListener("keydown",j)};(N=Un(O))==null||N.addEventListener("keydown",j)}),_=kt(O=>{var N;const j=i.current.insideReactTree;i.current.insideReactTree=!1;const M=x.current;if(x.current=!1,c==="click"&&M||j||typeof y=="function"&&!y(O))return;const C=Un(O),V="["+eo("inert")+"]",z=Ut(o.floating).querySelectorAll(V);let R=tt(C)?C:null;for(;R&&!lr(R);){const ee=cr(R);if(lr(ee)||!tt(ee))break;R=ee}if(z.length&&tt(C)&&!ZI(C)&&!Ht(C,o.floating)&&Array.from(z).every(ee=>!Ht(R,ee)))return;if(Ot(C)&&D){const ee=lr(C),re=cn(C),te=/auto|scroll/,G=ee||te.test(re.overflowX),Y=ee||te.test(re.overflowY),Q=G&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,de=Y&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,B=re.direction==="rtl",ae=de&&(B?O.offsetX<=C.offsetWidth-C.clientWidth:O.offsetX>C.clientWidth),oe=Q&&O.offsetY>C.clientHeight;if(ae||oe)return}const W=(N=i.current.floatingContext)==null?void 0:N.nodeId,U=h&&Xr(h.nodesRef.current,W).some(ee=>{var re;return Fu(O,(re=ee.context)==null?void 0:re.elements.floating)});if(Fu(O,o.floating)||Fu(O,o.domReference)||U)return;const H=h?Xr(h.nodesRef.current,W):[];if(H.length>0){let ee=!0;if(H.forEach(re=>{var te;if((te=re.context)!=null&&te.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,O,"outside-press")}),F=kt(O=>{var N;const j=()=>{var M;_(O),(M=Un(O))==null||M.removeEventListener(c,j)};(N=Un(O))==null||N.addEventListener(c,j)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=E;let O=-1;function N(z){r(!1,z,"ancestor-scroll")}function j(){window.clearTimeout(O),w.current=!0}function M(){O=window.setTimeout(()=>{w.current=!1},ms()?5:0)}const C=Ut(o.floating);s&&(C.addEventListener("keydown",T?P:k,T),C.addEventListener("compositionstart",j),C.addEventListener("compositionend",M)),y&&C.addEventListener(c,I?F:_,I);let V=[];return f&&(tt(o.domReference)&&(V=xr(o.domReference)),tt(o.floating)&&(V=V.concat(xr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(xr(o.reference.contextElement)))),V=V.filter(z=>{var R;return z!==((R=C.defaultView)==null?void 0:R.visualViewport)}),V.forEach(z=>{z.addEventListener("scroll",N,{passive:!0})}),()=>{s&&(C.removeEventListener("keydown",T?P:k,T),C.removeEventListener("compositionstart",j),C.removeEventListener("compositionend",M)),y&&C.removeEventListener(c,I?F:_,I),V.forEach(z=>{z.removeEventListener("scroll",N)}),window.clearTimeout(O)}},[i,o,s,y,c,n,r,f,a,b,E,k,T,P,_,I,F]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const $=A.useMemo(()=>({onKeyDown:k,...u&&{[gP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[k,r,u,d]),D=A.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[vP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return A.useMemo(()=>a?{reference:$,floating:D}:{},[a,$,D])}function yP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ki(),i=A.useRef({}),[a]=A.useState(()=>Iv()),s=Sr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&QA("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=kt((p,v,h)=>{i.current.openEvent=p?v:void 0,a.emit("openchange",{open:p,event:v,reason:h,nested:s}),n?.(p,v,h)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=yP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Tr();nt(()=>{u&&(d.current=u)},[u]);const p=HA({...e,elements:{...o,...s&&{reference:s}}}),v=A.useCallback(b=>{const E=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(E),p.refs.setReference(E)},[p.refs]),h=A.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(p.refs.reference.current)||p.refs.reference.current===null||b!==null&&!tt(b))&&p.refs.setReference(b)},[p.refs]),m=A.useMemo(()=>({...p.refs,setReference:h,setPositionReference:v,domReference:d}),[p.refs,h,v]),y=A.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=A.useMemo(()=>({...p,...r,refs:m,elements:y,nodeId:t}),[p,m,y,t,r]);return nt(()=>{r.dataRef.current.floatingContext=x;const b=f?.nodesRef.current.find(E=>E.id===t);b&&(b.context=x)}),A.useMemo(()=>({...p,context:x,refs:m,elements:y}),[p,m,y,x])}function Zu(){return UI()&&Kg()}function bP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const p=qt(a.domReference);function v(){!n&&Ot(a.domReference)&&a.domReference===qn(Ut(a.domReference))&&(c.current=!0)}function h(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",v),Zu()&&(p.addEventListener("keydown",h,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",v),Zu()&&(p.removeEventListener("keydown",h,!0),p.removeEventListener("pointerdown",m,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function p(v){let{reason:h}=v;(h==="reference-press"||h==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,s]),A.useEffect(()=>()=>{Yt(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const v=Un(p.nativeEvent);if(l&&tt(v)){if(Zu()&&!p.relatedTarget){if(!d.current&&!Lu(v))return}else if(!XI(v))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const v=p.relatedTarget,h=p.nativeEvent,m=tt(v)&&v.hasAttribute(eo("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=qn(a.domReference?a.domReference.ownerDocument:document);!v&&x===a.domReference||Ht((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||Ht(a.domReference,x)||m||r(!1,h,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:f}:{},[s,f])}function Xu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Sv]:a,[Tv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[YA]:""},...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&&[Sv,Tv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var f,p=arguments.length,v=new Array(p),h=0;h<p;h++)v[h]=arguments[h];return(f=r.get(c))==null?void 0:f.map(m=>m(...v)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=A.useCallback(s=>Xu(s,e,"reference"),t),i=A.useCallback(s=>Xu(s,e,"floating"),n),a=A.useCallback(s=>Xu(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const xP="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===Ev||e===Ns,e===Gi||e===Yi)}function Qu(e,t,n){return Rs(t,e===Ns,n?e===Gi:e===Yi)||e==="Enter"||e===" "||e===""}function Yv(e,t,n){return Rs(t,n?e===Gi:e===Yi,e===Ns)}function Kv(e,t,n,r){const o=n?e===Yi:e===Gi,i=e===Ev;return t==="both"||t==="horizontal"&&r&&r>1?e===xP: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:f=!1,nested:p=!1,rtl:v=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:b=void 0,orientation:E="vertical",parentOrientation:T,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Fs("`useListNavigation` looping must be enabled to allow escaping."),h||Fs("`useListNavigation` must be virtual to allow escaping.")),E==="vertical"&&I>1&&Fs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=ks(o.floating),$=Wt(F),D=Sr(),O=Tr();nt(()=>{e.dataRef.current.orientation=E},[e,E]);const N=kt(()=>{l(C.current===-1?null:C.current)}),j=Vu(o.domReference),M=A.useRef(m),C=A.useRef(u??-1),V=A.useRef(null),z=A.useRef(!0),R=A.useRef(N),W=A.useRef(!!o.floating),U=A.useRef(n),H=A.useRef(!1),ee=A.useRef(!1),re=Wt(b),te=Wt(n),G=Wt(w),Y=Wt(u),[Q,de]=A.useState(),[B,ae]=A.useState(),oe=kt(()=>{function me(le){if(h){var ue;(ue=le.id)!=null&&ue.endsWith("-fui-option")&&(le.id=i+"-"+Math.random().toString(16).slice(2,10)),de(le.id),O?.events.emit("virtualfocus",le),k&&(k.current=le)}else to(le,{sync:H.current,preventScroll:!0})}const K=a.current[C.current],L=ee.current;K&&me(K),(H.current?le=>le():requestAnimationFrame)(()=>{const le=a.current[C.current]||K;if(!le)return;K||me(le);const ue=G.current;ue&&se&&(L||!z.current)&&(le.scrollIntoView==null||le.scrollIntoView(typeof ue=="boolean"?{block:"nearest",inline:"nearest"}:ue))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ee.current=!0,C.current=u,N()):W.current&&(C.current=-1,R.current()))},[c,n,o.floating,u,N]),nt(()=>{if(c&&n&&o.floating)if(s==null){if(H.current=!1,Y.current!=null)return;if(W.current&&(C.current=-1,oe()),(!U.current||!W.current)&&M.current&&(V.current!=null||M.current===!0&&V.current==null)){let me=0;const K=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(K),me++):(C.current=V.current==null||Qu(V.current,E,v)||p?$u(a,re.current):tv(a,re.current),V.current=null,N())};K()}}else Wi(a,s)||(C.current=s,oe(),ee.current=!1)},[c,n,o.floating,s,Y,p,a,E,v,N,oe,re]),nt(()=>{var me;if(!c||o.floating||!O||h||!W.current)return;const K=O.nodesRef.current,L=(me=K.find(ue=>ue.id===D))==null||(me=me.context)==null?void 0:me.elements.floating,X=qn(Ut(o.floating)),le=K.some(ue=>ue.context&&Ht(ue.context.elements.floating,X));L&&!le&&z.current&&L.focus({preventScroll:!0})},[c,o.floating,O,D,h]),nt(()=>{if(!c||!O||!h||D)return;function me(K){ae(K.id),k&&(k.current=K)}return O.events.on("virtualfocus",me),()=>{O.events.off("virtualfocus",me)}},[c,O,h,D,k]),nt(()=>{R.current=N,U.current=n,W.current=!!o.floating}),nt(()=>{n||(V.current=null,M.current=m)},[n,m]);const J=s!=null,se=A.useMemo(()=>{function me(L){if(!te.current)return;const X=a.current.indexOf(L);X!==-1&&C.current!==X&&(C.current=X,N())}return{onFocus(L){let{currentTarget:X}=L;H.current=!0,me(X)},onClick:L=>{let{currentTarget:X}=L;return X.focus({preventScroll:!0})},onMouseMove(L){let{currentTarget:X}=L;H.current=!0,ee.current=!1,y&&me(X)},onPointerLeave(L){let{pointerType:X}=L;if(!(!z.current||X==="touch")&&(H.current=!0,!!y&&(C.current=-1,N(),!h))){var le;(le=$.current)==null||le.focus({preventScroll:!0})}}}},[te,$,y,a,N,h]),ne=A.useCallback(()=>{var me;return T??(O==null||(me=O.nodesRef.current.find(K=>K.id===D))==null||(me=me.context)==null||(me=me.dataRef)==null?void 0:me.current.orientation)},[D,O,T]),fe=kt(me=>{if(z.current=!1,H.current=!0,me.which===229||!te.current&&me.currentTarget===$.current)return;if(p&&Kv(me.key,E,v,I)){Bs(me.key,ne())||Gt(me),r(!1,me.nativeEvent,"list-navigation"),Ot(o.domReference)&&(h?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const K=C.current,L=$u(a,b),X=tv(a,b);if(j||(me.key==="Home"&&(Gt(me),C.current=L,N()),me.key==="End"&&(Gt(me),C.current=X,N())),I>1){const le=P||Array.from({length:a.current.length},()=>({width:1,height:1})),ue=iA(le,I,_),Ee=ue.findIndex(Ke=>Ke!=null&&!Is(a,Ke,b)),ke=ue.reduce((Ke,pt,ht)=>pt!=null&&!Is(a,pt,b)?ht:Ke,-1),De=ue[oA({current:ue.map(Ke=>Ke!=null?a.current[Ke]:null)},{event:me,orientation:E,loop:f,rtl:v,cols:I,disabledIndices:sA([...(typeof b!="function"?b:null)||a.current.map((Ke,pt)=>Is(a,pt,b)?pt:void 0),void 0],ue),minIndex:Ee,maxIndex:ke,prevIndex:aA(C.current>X?L:C.current,le,ue,I,me.key===Ns?"bl":me.key===(v?Gi:Yi)?"tr":"tl"),stopEvent:!0})];if(De!=null&&(C.current=De,N()),E==="both")return}if(Bs(me.key,E)){if(Gt(me),n&&!h&&qn(me.currentTarget.ownerDocument)===me.currentTarget){C.current=Qu(me.key,E,v)?L:X,N();return}Qu(me.key,E,v)?f?C.current=K>=X?d&&K!==a.current.length?-1:L:Xt(a,{startingIndex:K,disabledIndices:b}):C.current=Math.min(X,Xt(a,{startingIndex:K,disabledIndices:b})):f?C.current=K<=L?d&&K!==-1?a.current.length:X:Xt(a,{startingIndex:K,decrement:!0,disabledIndices:b}):C.current=Math.max(L,Xt(a,{startingIndex:K,decrement:!0,disabledIndices:b})),Wi(a,C.current)&&(C.current=-1),N()}}),pe=A.useMemo(()=>h&&n&&J&&{"aria-activedescendant":B||Q},[h,n,J,B,Q]),ve=A.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...j?{}:pe,onKeyDown:fe,onPointerMove(){z.current=!0}}),[pe,fe,E,j]),Ae=A.useMemo(()=>{function me(L){m==="auto"&&Jg(L.nativeEvent)&&(M.current=!0)}function K(L){M.current=m,m==="auto"&&ev(L.nativeEvent)&&(M.current=!0)}return{...pe,onKeyDown(L){z.current=!1;const X=L.key.startsWith("Arrow"),le=["Home","End"].includes(L.key),ue=X||le,Ee=Yv(L.key,E,v),ke=Kv(L.key,E,v,I),De=Yv(L.key,ne(),v),Ke=Bs(L.key,E),pt=(p?De:Ke)||L.key==="Enter"||L.key.trim()==="";if(h&&n){const q=O?.nodesRef.current.find(Pe=>Pe.parentId==null),Z=O&&q?QI(O.nodesRef.current,q.id):null;if(ue&&Z&&k){const Pe=new KeyboardEvent("keydown",{key:L.key,bubbles:!0});if(Ee||ke){var ht,$t;const Ue=((ht=Z.context)==null?void 0:ht.elements.domReference)===L.currentTarget,Ze=ke&&!Ue?($t=Z.context)==null?void 0:$t.elements.domReference:Ee?a.current.find(Ne=>Ne?.id===Q):null;Ze&&(Gt(L),Ze.dispatchEvent(Pe),ae(void 0))}if((Ke||le)&&Z.context&&Z.context.open&&Z.parentId&&L.currentTarget!==Z.context.elements.domReference){var $e;Gt(L),($e=Z.context.elements.domReference)==null||$e.dispatchEvent(Pe);return}}return fe(L)}if(!(!n&&!x&&X)){if(pt){const q=Bs(L.key,ne());V.current=p&&q?null:L.key}if(p){De&&(Gt(L),n?(C.current=$u(a,re.current),N()):r(!0,L.nativeEvent,"list-navigation"));return}Ke&&(u!=null&&(C.current=u),Gt(L),!n&&x?r(!0,L.nativeEvent,"list-navigation"):fe(L),n&&N())}},onFocus(){n&&!h&&(C.current=-1,N())},onPointerDown:K,onPointerEnter:K,onMouseDown:me,onClick:me}},[Q,pe,I,fe,re,m,a,p,N,r,n,x,E,ne,v,u,O,h,k]);return A.useMemo(()=>c?{reference:Ae,floating:ve,item:se}:{},[c,Ae,ve,se])}const wP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Ki(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var x;return((x=ks(i.floating))==null?void 0:x.id)||a},[i.floating,a]),f=(r=wP.get(l))!=null?r:l,v=Sr()!=null,h=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,v,o,u,l]),m=A.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=A.useCallback(x=>{let{active:b,selected:E}=x;const T={role:"option",...b&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...T,"aria-selected":E}}return{}},[d,l]);return A.useMemo(()=>s?{reference:h,floating:m,item:y}:{},[s,h,m,y])}const Zv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ro(e,t){return typeof e=="function"?e(t):e}function SP(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 TP(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=SP(n,a);return!c&&s==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{jn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Xv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,f=(u?a:a.close)||0,[p,v]=A.useState(()=>({...Ro(i,c),...Ro(n,c)})),{isMounted:h,status:m}=TP(e,{duration:a}),y=Wt(n),x=Wt(r),b=Wt(o),E=Wt(i);return nt(()=>{const T=Ro(y.current,c),I=Ro(b.current,c),w=Ro(E.current,c),k=Ro(x.current,c)||Object.keys(T).reduce((P,_)=>(P[_]="",P),{});if(m==="initial"&&v(P=>({transitionProperty:P.transitionProperty,...w,...T})),m==="open"&&v({transitionProperty:Object.keys(k).map(Zv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const P=I||T;v({transitionProperty:Object.keys(P).map(Zv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,b,y,x,E,d,m,c]),{isMounted:h,styles:p}}function EP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,v=A.useRef(-1),h=A.useRef(""),m=A.useRef((n=p??a)!=null?n:-1),y=A.useRef(null),x=kt(s),b=kt(l),E=Wt(u),T=Wt(f);nt(()=>{r&&(Yt(v),y.current=null,h.current="")},[r]),nt(()=>{if(r&&h.current===""){var _;m.current=(_=p??a)!=null?_:-1}},[r,p,a]);const I=kt(_=>{_?o.current.typing||(o.current.typing=_,b(_)):o.current.typing&&(o.current.typing=_,b(_))}),w=kt(_=>{function F(j,M,C){const V=E.current?E.current(M,C):M.find(z=>z?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return V?j.indexOf(V):-1}const $=i.current;if(h.current.length>0&&h.current[0]!==" "&&(F($,$,h.current)===-1?I(!1):_.key===" "&&Gt(_)),$==null||T.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Gt(_),I(!0)),$.every(j=>{var M,C;return j?((M=j[0])==null?void 0:M.toLocaleLowerCase())!==((C=j[1])==null?void 0:C.toLocaleLowerCase()):!0})&&h.current===_.key&&(h.current="",m.current=y.current),h.current+=_.key,Yt(v),v.current=window.setTimeout(()=>{h.current="",m.current=y.current,I(!1)},d);const O=m.current,N=F($,[...$.slice((O||0)+1),...$.slice(0,(O||0)+1)],h.current);N!==-1?(x(N),y.current=N):_.key!==" "&&(h.current="",I(!1))}),k=A.useMemo(()=>({onKeyDown:w}),[w]),P=A.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&I(!1)}}),[w,I]);return A.useMemo(()=>c?{reference:k,floating:P}:{},[c,k,P])}function Qv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Qv(e,o.id,n)])}function Jv(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 kP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ey(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),v=p-l;if(a===null||s===null||v===0)return a=d,s=f,l=p,null;const h=d-a,m=f-s,x=Math.sqrt(h*h+m*m)/v;return a=d,s=f,l=p,x}const u=d=>{let{x:f,y:p,placement:v,elements:h,onClose:m,nodeId:y,tree:x}=d;return function(E){function T(){Yt(o),m()}if(Yt(o),!h.domReference||!h.floating||v==null||f==null||p==null)return;const{clientX:I,clientY:w}=E,k=[I,w],P=nP(E),_=E.type==="mouseleave",F=Uu(h.floating,P),$=Uu(h.domReference,P),D=h.domReference.getBoundingClientRect(),O=h.floating.getBoundingClientRect(),N=v.split("-")[0],j=f>O.right-O.width/2,M=p>O.bottom-O.height/2,C=kP(k,D),V=O.width>D.width,z=O.height>D.height,R=(V?D:O).left,W=(V?D:O).right,U=(z?D:O).top,H=(z?D:O).bottom;if(F&&(i=!0,!_))return;if($&&(i=!1),$&&!_){i=!0;return}if(_&&tt(E.relatedTarget)&&Uu(h.floating,E.relatedTarget)||x&&Qv(x.nodesRef.current,y).length)return;if(N==="top"&&p>=D.bottom-1||N==="bottom"&&p<=D.top+1||N==="left"&&f>=D.right-1||N==="right"&&f<=D.left+1)return T();let ee=[];switch(N){case"top":ee=[[R,D.top+1],[R,O.bottom-1],[W,O.bottom-1],[W,D.top+1]];break;case"bottom":ee=[[R,O.top+1],[R,D.bottom-1],[W,D.bottom-1],[W,O.top+1]];break;case"left":ee=[[O.right-1,H],[O.right-1,U],[D.left+1,U],[D.left+1,H]];break;case"right":ee=[[D.right-1,H],[D.right-1,U],[O.left+1,U],[O.left+1,H]];break}function re(te){let[G,Y]=te;switch(N){case"top":{const Q=[V?G+t/2:j?G+t*4:G-t*4,Y+t+1],de=[V?G-t/2:j?G+t*4:G-t*4,Y+t+1],B=[[O.left,j||V?O.bottom-t:O.top],[O.right,j?V?O.bottom-t:O.top:O.bottom-t]];return[Q,de,...B]}case"bottom":{const Q=[V?G+t/2:j?G+t*4:G-t*4,Y-t],de=[V?G-t/2:j?G+t*4:G-t*4,Y-t],B=[[O.left,j||V?O.top+t:O.bottom],[O.right,j?V?O.top+t:O.bottom:O.top+t]];return[Q,de,...B]}case"left":{const Q=[G+t+1,z?Y+t/2:M?Y+t*4:Y-t*4],de=[G+t+1,z?Y-t/2:M?Y+t*4:Y-t*4];return[...[[M||z?O.right-t:O.left,O.top],[M?z?O.right-t:O.left:O.right-t,O.bottom]],Q,de]}case"right":{const Q=[G-t,z?Y+t/2:M?Y+t*4:Y-t*4],de=[G-t,z?Y-t/2:M?Y+t*4:Y-t*4],B=[[M||z?O.left+t:O.right,O.top],[M?z?O.left+t:O.right:O.left+t,O.bottom]];return[Q,de,...B]}}}if(!Jv([I,w],ee)){if(i&&!C)return T();if(!_&&r){const te=c(E.clientX,E.clientY);if(te!==null&&te<.1)return T()}Jv([I,w],re([f,p]))?!i&&r&&(o.current=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const ty=200,CP=500,Bo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},ny=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),ry={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ju=(e,t)=>{const n=ny(t,ry.basic,e)||ny(t,ry.extend,e);return n===void 0||n===e?void 0:n},Cr=()=>typeof window>"u",ed=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),oy=(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},IP=e=>!e,Ho=()=>{},iy=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},td=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=Ho,followCursor:d=!1,...f},p){const[v,h]=S.useState(n??!1),m=S.useRef(null),y=t||"span",x=O=>{h(O),u?.(O)},{refs:b,floatingStyles:E,context:T}=Gn({placement:i,open:v,whileElementsMounted:Jr,onOpenChange:n?void 0:x,middleware:[Ms(),$o(5),qA(),Bu({padding:5,element:m}),Ds({fallbackAxisSideDirection:"start"})]}),I=kr(T,{enabled:l}),w=fr(T,{role:"tooltip",enabled:l}),k=bP(T,{enabled:l?a:!1}),P=jo(T,{enabled:l?c:!1}),_=mP(T,{enabled:!!l&&!!d}),F=_v(T,{move:!0,delay:{open:ty},enabled:l?s:!1,handleClose:c?ey():null}),{getReferenceProps:$,getFloatingProps:D}=Yn([w,I,_,a?k:void 0,s?F:void 0,c?P:void 0]);return S.useEffect(()=>h(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(y,{...$(f),ref:sr(b.setReference,p),children:r}),v&&g.jsx(dr,{children:g.jsxs(ln,{...D(),ref:b.setFloating,style:E,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(Hu,{ref:m,context:T,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),ay=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>g.jsxs("span",{className:Oe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:g.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?g.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?g.jsx(td,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:g.jsx("span",{className:"cursor-help",children:g.jsx(bu,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?g.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[g.jsx(Cg,{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}),g.jsx(YC,{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]}),Xi=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:v,componentName:h,placeholder:m,hideLeft:y=!1,required:x,disabled:b,reportStatus:E},T)=>{const I=Tu(),w=E!==void 0?E:I.input.iconFeedback,k=d??p,P=Pt(),_=e??P.inputOptionalLabel;return g.jsxs("fieldset",{ref:T,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":h,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:k,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:[g.jsx(ay,{info:s,hideLeft:y,reportStatus:w,title:v,placeholder:m,children:_||n?g.jsxs(S.Fragment,{children:[x?null:g.jsx("span",{"aria-disabled":b,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:_}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?g.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?g.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),g.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),g.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),sy=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:v="text",labelClassName:h,feedback:m=null,hideLeft:y=!1,loading:x,...b},E)=>{const T=e,I=b.id??b.name,w=S.useRef(null);return S.useEffect(()=>{if(w.current===null)return;const k=w.current,P=Vi(w.current),_=r?.(k),F=$=>{const D=$;if(D.key==="Enter"&&k.enterKeyHint==="next"){const O=k.getAttribute("data-next");if(O){const N=document.getElementById(O);if(N)return N.focus(),void D.preventDefault()}}};return k.addEventListener("keydown",F),()=>{_?.(),P(),k.removeEventListener("keydown",F)}},[]),g.jsx(Xi,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:m,hideLeft:y,title:b.title,container:Oe(u,n.container),rightLabel:d,disabled:b.disabled,interactive:f,required:b.required,componentName:t,id:b.name||b.id,optionalText:p,labelClassName:h,placeholder:b.placeholder,children:g.jsx(T,{...n,...b,id:I,name:I,type:v,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:sr(E,w),className:Oe("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",b.className)})})}),Wo=sy(Sg,"input",{type:"text"}),AP=Io("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"}}),ro=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 g.jsxs(ln,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Oe(AP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),oo=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:f,left:p,error:v,...h},m)=>{const y=Pt(),x=S.useRef(null),b=h.id??h.name;S.useImperativeHandle(m,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const T=new AbortController,I=x.current,w=Vi(x.current);return I.addEventListener("change",()=>I.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{w(),T.abort()}},[]);const E=()=>x.current?.focus();return g.jsx(Xi,{info:n,left:p,error:v,form:h.form,loading:l,name:h.name,feedback:o,hideLeft:d,required:e,title:h.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:h.name||h.id,optionalText:c,labelClassName:i,placeholder:h.placeholder,right:g.jsxs("label",{htmlFor:b,children:[f,g.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:g.jsxs("select",{...h,id:b,name:b,required:e,ref:sr(m,x),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Oe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[g.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(T=>S.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${b}-select-option-${T.value}`}))]})})});function Cn(e){return e?.ownerDocument||document}function PP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
1
+ (function(ae,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):(ae=typeof globalThis<"u"?globalThis:ae||self,S(ae.components={},ae.React,ae["react/jsx-runtime"],ae.ReactDOM))})(this,(function(ae,S,g,Fi){"use strict";function Bh(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=Bh(S),jn=Bh(Fi);function Hh(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=Hh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hh(e))&&(r&&(r+=" "),r+=t);return r}const qh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Uh=Wh,Io=(e,t)=>n=>{var r;if(t?.variants==null)return Uh(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=qh(u)||qh(d);return o[c][f]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[h,m]=v;return Array.isArray(m)?m.includes({...i,...s}[h]):{...i,...s}[h]===m})?[...c,d,f]:c},[]);return Uh(e,a,l,n?.class,n?.className)};var Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ZE(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 vc,Kh;function Ao(){return Kh||(Kh=1,vc=TypeError),vc}const XE=ZE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var yc,Zh;function Za(){if(Zh)return yc;Zh=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,h=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(U){return U.__proto__}:null);function C(U,Z){if(U===1/0||U===-1/0||U!==U||U&&U>-1e3&&U<1e3||I.call(/e/,Z))return Z;var Pe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof U=="number"){var Ge=U<0?-_(-U):_(U);if(Ge!==U){var Ze=String(Ge),Ne=x.call(Z,Ze.length+1);return b.call(Ze,Pe,"$&_")+"."+b.call(b.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(Z,Pe,"$&_")}var L=XE,$=L.custom,B=ie($)?$:null,q={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};yc=function U(Z,Pe,Ge,Ze){var Ne=Pe||{};if(te(Ne,"quoteStyle")&&!te(q,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=te(Ne,"customInspect")?Ne.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mt=Ne.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return ce(Z,Ne);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var it=String(Z);return mt?C(Z,it):it}if(typeof Z=="bigint"){var vn=String(Z)+"n";return mt?C(Z,vn):vn}var Ur=typeof Ne.depth>"u"?5:Ne.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=Ur&&Ur>0&&typeof Z=="object")return ee(Z)?"[Array]":"[Object]";var Gr=ht(Ne,Ge);if(typeof Ze>"u")Ze=[];else if(ve(Ze,Z)>=0)return"[Circular]";function kn(Ni,gc,gH){if(gc&&(Ze=P.call(Ze),Ze.push(gc)),gH){var KE={depth:Ne.depth};return te(Ne,"quoteStyle")&&(KE.quoteStyle=Ne.quoteStyle),U(Ni,KE,Ge+1,Ze)}return U(Ni,Ne,Ge+1,Ze)}if(typeof Z=="function"&&!K(Z)){var Mi=pe(Z),Di=$e(Z,kn);return"[Function"+(Mi?": "+Mi:" (anonymous)")+"]"+(Di.length>0?" { "+k.call(Di,", ")+" }":"")}if(ie(Z)){var WE=O?b.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(Z);return typeof Z=="object"&&!O?Ce(WE):WE}if(ne(Z)){for(var Ka="<"+E.call(String(Z.nodeName)),Fh=Z.attributes||[],mc=0;mc<Fh.length;mc++)Ka+=" "+Fh[mc].name+"="+W(J(Fh[mc].value),"double",Ne);return Ka+=">",Z.childNodes&&Z.childNodes.length&&(Ka+="..."),Ka+="</"+E.call(String(Z.nodeName))+">",Ka}if(ee(Z)){if(Z.length===0)return"[]";var Lh=$e(Z,kn);return Gr&&!pt(Lh)?"["+$t(Lh,Gr)+"]":"[ "+k.call(Lh,", ")+" ]"}if(X(Z)){var Vh=$e(Z,kn);return!("cause"in Error.prototype)&&"cause"in Z&&!z.call(Z,"cause")?"{ ["+String(Z)+"] "+k.call(w.call("[cause]: "+kn(Z.cause),Vh),", ")+" }":Vh.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+k.call(Vh,", ")+" }"}if(typeof Z=="object"&&ot){if(B&&typeof Z[B]=="function"&&L)return L(Z,{depth:Ur-Ge});if(ot!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(Ae(Z)){var qE=[];return r&&r.call(Z,function(Ni,gc){qE.push(kn(gc,Z,!0)+" => "+kn(Ni,Z))}),qe("Map",n.call(Z),qE,Gr)}if(j(Z)){var UE=[];return s&&s.call(Z,function(Ni){UE.push(kn(Ni,Z))}),qe("Set",a.call(Z),UE,Gr)}if(me(Z))return _e("WeakMap");if(R(Z))return _e("WeakSet");if(oe(Z))return _e("WeakRef");if(H(Z))return Ce(kn(Number(Z)));if(Q(Z))return Ce(kn(F.call(Z)));if(se(Z))return Ce(v.call(Z));if(de(Z))return Ce(kn(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Gh<"u"&&Z===Gh)return"{ [object globalThis] }";if(!Y(Z)&&!K(Z)){var $h=$e(Z,kn),GE=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,zh=Z instanceof Object?"":"null prototype",YE=!GE&&D&&Object(Z)===Z&&D in Z?x.call(fe(Z),8,-1):zh?"Object":"",mH=GE||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",jh=mH+(YE||zh?"["+k.call(w.call([],YE||[],zh||[]),": ")+"] ":"");return $h.length===0?jh+"{}":Gr?jh+"{"+$t($h,Gr)+"}":jh+"{ "+k.call($h,", ")+" }"}return String(Z)};function W(U,Z,Pe){var Ge=Pe.quoteStyle||Z,Ze=q[Ge];return Ze+U+Ze}function J(U){return b.call(String(U),/"/g,"&quot;")}function re(U){return!D||!(typeof U=="object"&&(D in U||typeof U[D]<"u"))}function ee(U){return fe(U)==="[object Array]"&&re(U)}function Y(U){return fe(U)==="[object Date]"&&re(U)}function K(U){return fe(U)==="[object RegExp]"&&re(U)}function X(U){return fe(U)==="[object Error]"&&re(U)}function de(U){return fe(U)==="[object String]"&&re(U)}function H(U){return fe(U)==="[object Number]"&&re(U)}function se(U){return fe(U)==="[object Boolean]"&&re(U)}function ie(U){if(O)return U&&typeof U=="object"&&U instanceof Symbol;if(typeof U=="symbol")return!0;if(!U||typeof U!="object"||!N)return!1;try{return N.call(U),!0}catch{}return!1}function Q(U){if(!U||typeof U!="object"||!F)return!1;try{return F.call(U),!0}catch{}return!1}var le=Object.prototype.hasOwnProperty||function(U){return U in this};function te(U,Z){return le.call(U,Z)}function fe(U){return h.call(U)}function pe(U){if(U.name)return U.name;var Z=y.call(m.call(U),/^function\s*([\w$]+)/);return Z?Z[1]:null}function ve(U,Z){if(U.indexOf)return U.indexOf(Z);for(var Pe=0,Ge=U.length;Pe<Ge;Pe++)if(U[Pe]===Z)return Pe;return-1}function Ae(U){if(!n||!U||typeof U!="object")return!1;try{n.call(U);try{a.call(U)}catch{return!0}return U instanceof Map}catch{}return!1}function me(U){if(!c||!U||typeof U!="object")return!1;try{c.call(U,c);try{d.call(U,d)}catch{return!0}return U instanceof WeakMap}catch{}return!1}function oe(U){if(!p||!U||typeof U!="object")return!1;try{return p.call(U),!0}catch{}return!1}function j(U){if(!a||!U||typeof U!="object")return!1;try{a.call(U);try{n.call(U)}catch{return!0}return U instanceof Set}catch{}return!1}function R(U){if(!d||!U||typeof U!="object")return!1;try{d.call(U,d);try{c.call(U,c)}catch{return!0}return U instanceof WeakSet}catch{}return!1}function ne(U){return!U||typeof U!="object"?!1:typeof HTMLElement<"u"&&U instanceof HTMLElement?!0:typeof U.nodeName=="string"&&typeof U.getAttribute=="function"}function ce(U,Z){if(U.length>Z.maxStringLength){var Pe=U.length-Z.maxStringLength,Ge="... "+Pe+" more character"+(Pe>1?"s":"");return ce(x.call(U,0,Z.maxStringLength),Z)+Ge}var Ze=G[Z.quoteStyle||"single"];Ze.lastIndex=0;var Ne=b.call(b.call(U,Ze,"\\$1"),/[\x00-\x1f]/g,xe);return W(Ne,"single",Z)}function xe(U){var Z=U.charCodeAt(0),Pe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Pe?"\\"+Pe:"\\x"+(Z<16?"0":"")+T.call(Z.toString(16))}function Ce(U){return"Object("+U+")"}function _e(U){return U+" { ? }"}function qe(U,Z,Pe,Ge){var Ze=Ge?$t(Pe,Ge):k.call(Pe,", ");return U+" ("+Z+") {"+Ze+"}"}function pt(U){for(var Z=0;Z<U.length;Z++)if(ve(U[Z],`
2
+ `)>=0)return!1;return!0}function ht(U,Z){var Pe;if(U.indent===" ")Pe=" ";else if(typeof U.indent=="number"&&U.indent>0)Pe=k.call(Array(U.indent+1)," ");else return null;return{base:Pe,prev:k.call(Array(Z+1),Pe)}}function $t(U,Z){if(U.length===0)return"";var Pe=`
3
+ `+Z.prev+Z.base;return Pe+k.call(U,","+Pe)+`
4
+ `+Z.prev}function $e(U,Z){var Pe=ee(U),Ge=[];if(Pe){Ge.length=U.length;for(var Ze=0;Ze<U.length;Ze++)Ge[Ze]=te(U,Ze)?Z(U[Ze],U):""}var Ne=typeof V=="function"?V(U):[],ot;if(O){ot={};for(var mt=0;mt<Ne.length;mt++)ot["$"+Ne[mt]]=Ne[mt]}for(var it in U)te(U,it)&&(Pe&&String(Number(it))===it&&it<U.length||O&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ge.push(Z(it,U)+": "+Z(U[it],U)):Ge.push(it+": "+Z(U[it],U))));if(typeof V=="function")for(var vn=0;vn<Ne.length;vn++)z.call(U,Ne[vn])&&Ge.push("["+Z(Ne[vn])+"]: "+Z(U[Ne[vn]],U));return Ge}return yc}var bc,Xh;function QE(){if(Xh)return bc;Xh=1;var e=Za(),t=Ao(),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 bc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=a(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},bc}var xc,Qh;function Jh(){return Qh||(Qh=1,xc=Object),xc}var wc,em;function JE(){return em||(em=1,wc=Error),wc}var Sc,tm;function ek(){return tm||(tm=1,Sc=EvalError),Sc}var Tc,nm;function tk(){return nm||(nm=1,Tc=RangeError),Tc}var Ec,rm;function nk(){return rm||(rm=1,Ec=ReferenceError),Ec}var kc,om;function rk(){return om||(om=1,kc=SyntaxError),kc}var Cc,im;function ok(){return im||(im=1,Cc=URIError),Cc}var Ic,am;function ik(){return am||(am=1,Ic=Math.abs),Ic}var Ac,sm;function ak(){return sm||(sm=1,Ac=Math.floor),Ac}var Pc,lm;function sk(){return lm||(lm=1,Pc=Math.max),Pc}var Oc,cm;function lk(){return cm||(cm=1,Oc=Math.min),Oc}var _c,um;function ck(){return um||(um=1,_c=Math.pow),_c}var Mc,dm;function uk(){return dm||(dm=1,Mc=Math.round),Mc}var Dc,fm;function dk(){return fm||(fm=1,Dc=Number.isNaN||function(t){return t!==t}),Dc}var Nc,pm;function fk(){if(pm)return Nc;pm=1;var e=dk();return Nc=function(n){return e(n)||n===0?n:n<0?-1:1},Nc}var Fc,hm;function pk(){return hm||(hm=1,Fc=Object.getOwnPropertyDescriptor),Fc}var Lc,mm;function gm(){if(mm)return Lc;mm=1;var e=pk();if(e)try{e([],"length")}catch{e=null}return Lc=e,Lc}var Vc,vm;function hk(){if(vm)return Vc;vm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Vc=e,Vc}var $c,ym;function mk(){return ym||(ym=1,$c=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}),$c}var zc,bm;function gk(){if(bm)return zc;bm=1;var e=typeof Symbol<"u"&&Symbol,t=mk();return zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},zc}var jc,xm;function wm(){return xm||(xm=1,jc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jc}var Rc,Sm;function Tm(){if(Sm)return Rc;Sm=1;var e=Jh();return Rc=e.getPrototypeOf||null,Rc}var Bc,Em;function vk(){if(Em)return Bc;Em=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Bc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),v=[],h=0;h<p;h++)v[h]="$"+h;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Bc}var Hc,km;function Xa(){if(km)return Hc;km=1;var e=vk();return Hc=Function.prototype.bind||e,Hc}var Wc,Cm;function qc(){return Cm||(Cm=1,Wc=Function.prototype.call),Wc}var Uc,Im;function Am(){return Im||(Im=1,Uc=Function.prototype.apply),Uc}var Gc,Pm;function yk(){return Pm||(Pm=1,Gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Gc}var Yc,Om;function bk(){if(Om)return Yc;Om=1;var e=Xa(),t=Am(),n=qc(),r=yk();return Yc=r||e.call(n,t),Yc}var Kc,_m;function Mm(){if(_m)return Kc;_m=1;var e=Xa(),t=Ao(),n=qc(),r=bk();return Kc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Kc}var Zc,Dm;function xk(){if(Dm)return Zc;Dm=1;var e=Mm(),t=gm(),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 Zc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Zc}var Xc,Nm;function wk(){if(Nm)return Xc;Nm=1;var e=wm(),t=Tm(),n=xk();return Xc=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,Xc}var Qc,Fm;function Sk(){if(Fm)return Qc;Fm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Xa();return Qc=n.call(e,t),Qc}var Jc,Lm;function eu(){if(Lm)return Jc;Lm=1;var e,t=Jh(),n=JE(),r=ek(),o=tk(),i=nk(),a=rk(),s=Ao(),l=ok(),c=ik(),u=ak(),d=sk(),f=lk(),p=ck(),v=uk(),h=fk(),m=Function,y=function(K){try{return m('"use strict"; return ('+K+").constructor;")()}catch{}},x=gm(),b=hk(),T=function(){throw new s},E=x?(function(){try{return arguments.callee,T}catch{try{return x(arguments,"callee").get}catch{return T}}})():T,I=gk()(),w=wk(),k=Tm(),P=wm(),_=Am(),F=qc(),V={},N=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":V,"%AsyncGenerator%":V,"%AsyncGeneratorFunction%":V,"%AsyncIteratorPrototype%":V,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":V,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":E,"%TypedArray%":N,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":h,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(K){var D=w(w(K));O["%Error.prototype%"]=D}var z=function K(X){var de;if(X==="%AsyncFunction%")de=y("async function () {}");else if(X==="%GeneratorFunction%")de=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")de=y("async function* () {}");else if(X==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(de=H.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=K("%AsyncGenerator%");se&&w&&(de=w(se.prototype))}return O[X]=de,de},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=Xa(),L=Sk(),$=C.call(F,Array.prototype.concat),B=C.call(_,Array.prototype.splice),q=C.call(F,String.prototype.replace),G=C.call(F,String.prototype.slice),W=C.call(F,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,ee=function(X){var de=G(X,0,1),H=G(X,-1);if(de==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&de!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return q(X,J,function(ie,Q,le,te){se[se.length]=le?q(te,re,"$1"):Q||ie}),se},Y=function(X,de){var H=X,se;if(L(M,H)&&(se=M[H],H="%"+se[0]+"%"),L(O,H)){var ie=O[H];if(ie===V&&(ie=z(H)),typeof ie>"u"&&!de)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:H,value:ie}}throw new a("intrinsic "+X+" does not exist!")};return Jc=function(X,de){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new s('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=ee(X),se=H.length>0?H[0]:"",ie=Y("%"+se+"%",de),Q=ie.name,le=ie.value,te=!1,fe=ie.alias;fe&&(se=fe[0],B(H,$([0,1],fe)));for(var pe=1,ve=!0;pe<H.length;pe+=1){var Ae=H[pe],me=G(Ae,0,1),oe=G(Ae,-1);if((me==='"'||me==="'"||me==="`"||oe==='"'||oe==="'"||oe==="`")&&me!==oe)throw new a("property names with quotes must have matching quotes");if((Ae==="constructor"||!ve)&&(te=!0),se+="."+Ae,Q="%"+se+"%",L(O,Q))le=O[Q];else if(le!=null){if(!(Ae in le)){if(!de)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(x&&pe+1>=H.length){var j=x(le,Ae);ve=!!j,ve&&"get"in j&&!("originalValue"in j.get)?le=j.get:le=le[Ae]}else ve=L(le,Ae),le=le[Ae];ve&&!te&&(O[Q]=le)}}return le},Jc}var tu,Vm;function $m(){if(Vm)return tu;Vm=1;var e=eu(),t=Mm(),n=t([e("%String.prototype.indexOf%")]);return tu=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},tu}var nu,zm;function jm(){if(zm)return nu;zm=1;var e=eu(),t=$m(),n=Za(),r=Ao(),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 nu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var v=l(d,p);return c(d)===0&&(d=void 0),v}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,v){d||(d=new o),a(d,p,v)}};return f},nu}var ru,Rm;function Tk(){if(Rm)return ru;Rm=1;var e=eu(),t=$m(),n=Za(),r=jm(),o=Ao(),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 ru=i?function(){var d,f,p={assert:function(v){if(!p.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&f)return f.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):f&&f.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!f&&f.has(v)},set:function(v,h){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,h)):r&&(f||(f=r()),f.set(v,h))}};return p}:r,ru}var ou,Bm;function Hm(){if(Bm)return ou;Bm=1;var e=Ao(),t=Za(),n=QE(),r=jm(),o=Tk(),i=o||r||n;return ou=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},ou}var Wm=e=>Array.isArray(e),iu=e=>e===void 0,au=e=>e===null,Ek=Function.bind.call(Function.call,Object.prototype.toString),kk=e=>!!e&&Ek(e)==="[object Error]"||e instanceof Error,qm=(e,t)=>e instanceof t,Ck=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Ik=e=>Object.prototype.toString.call(e)==="[object Date]"&&qm(e,Date),Re={array:Wm,date:Ik,empty:e=>au(e)||iu(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:qm,isError:kk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>au(e)||iu(e),null:au,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wm(e)&&typeof e=="object",primitive:Ck,string:e=>typeof e=="string",undefined:iu},Ak=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},Pk=e=>e.replace(/[^0-9]/g,"");const Ok=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},_k=(e,t)=>({classGroupId:e,validator:t}),Um=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qa="-",Gm=[],Mk="arbitrary..",Dk=e=>{const t=Fk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Nk(a);const s=a.split(Qa),l=s[0]===""&&s.length>1?1:0;return Ym(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?Ok(c,l):l:c||Gm}return n[a]||Gm}}},Ym=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Ym(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Qa):e.slice(t).join(Qa),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},Nk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Mk+r:void 0})(),Fk=e=>{const{theme:t,classGroups:n}=e;return Lk(n,t)},Lk=(e,t)=>{const n=Um();for(const r in e){const o=e[r];su(o,n,r,t)}return n},su=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Vk(a,t,n,r)}},Vk=(e,t,n,r)=>{if(typeof e=="string"){$k(e,t,n);return}if(typeof e=="function"){zk(e,t,n,r);return}jk(e,t,n,r)},$k=(e,t,n)=>{const r=e===""?t:Km(t,e);r.classGroupId=n},zk=(e,t,n,r)=>{if(Rk(e)){su(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(_k(n,e))},jk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];su(l,Km(t,s),n,r)}},Km=(e,t)=>{let n=e;const r=t.split(Qa),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=Um(),n.nextPart.set(a,s)),n=s}return n},Rk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Bk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},lu="!",Zm=":",Hk=[],Xm=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Wk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let h=0;h<u;h++){const m=o[h];if(a===0&&s===0){if(m===Zm){i.push(o.slice(l,h)),l=h+1;continue}if(m==="/"){c=h;continue}}m==="["?a++:m==="]"?a--:m==="("?s++:m===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(lu)?(f=d.slice(0,-1),p=!0):d.startsWith(lu)&&(f=d.slice(1),p=!0);const v=c&&c>l?c-l:void 0;return Xm(i,p,f,v)};if(t){const o=t+Zm,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):Xm(Hk,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},qk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},Uk=e=>({cache:Bk(e.cacheSize),parseClassName:Wk(e),sortModifiers:qk(e),...Dk(e)}),Gk=/\s+/,Yk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(Gk);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:h}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!h,y=r(m?v.substring(0,h):v);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const x=f.length===0?"":f.length===1?f[0]:i(f).join(":"),b=p?x+lu:x,T=b+y;if(a.indexOf(T)>-1)continue;a.push(T);const E=o(y,m);for(let I=0;I<E.length;++I){const w=E[I];a.push(b+w)}l=u+(l.length>0?" "+l:l)}return l},Kk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Qm(n))&&(o&&(o+=" "),o+=r);return o},Qm=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qm(e[r]))&&(n&&(n+=" "),n+=t);return n},Zk=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Uk(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=Yk(l,n);return o(l,u),u};return i=a,(...l)=>i(Kk(...l))},Xk=[],zt=e=>{const t=n=>n[e]||Xk;return t.isThemeGetter=!0,t},Jm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qk=/^\d+\/\d+$/,Jk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eC=/\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$/,tC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=e=>Qk.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),vr=e=>!!e&&Number.isInteger(Number(e)),cu=e=>e.endsWith("%")&&We(e.slice(0,-1)),ar=e=>Jk.test(e),oC=()=>!0,iC=e=>eC.test(e)&&!tC.test(e),tg=()=>!1,aC=e=>nC.test(e),sC=e=>rC.test(e),lC=e=>!we(e)&&!Se(e),cC=e=>Oo(e,ag,tg),we=e=>Jm.test(e),Yr=e=>Oo(e,sg,iC),uu=e=>Oo(e,hC,We),ng=e=>Oo(e,og,tg),uC=e=>Oo(e,ig,sC),Ja=e=>Oo(e,lg,aC),Se=e=>eg.test(e),Li=e=>_o(e,sg),dC=e=>_o(e,mC),rg=e=>_o(e,og),fC=e=>_o(e,ag),pC=e=>_o(e,ig),es=e=>_o(e,lg,!0),Oo=(e,t,n)=>{const r=Jm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_o=(e,t,n=!1)=>{const r=eg.exec(e);return r?r[1]?t(r[1]):n:!1},og=e=>e==="position"||e==="percentage",ig=e=>e==="image"||e==="url",ag=e=>e==="length"||e==="size"||e==="bg-size",sg=e=>e==="length",hC=e=>e==="number",mC=e=>e==="family-name",lg=e=>e==="shadow",gC=Zk(()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),o=zt("tracking"),i=zt("leading"),a=zt("breakpoint"),s=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),d=zt("inset-shadow"),f=zt("text-shadow"),p=zt("drop-shadow"),v=zt("blur"),h=zt("perspective"),m=zt("aspect"),y=zt("ease"),x=zt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Se,we],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Se,we,l],P=()=>[Po,"full","auto",...k()],_=()=>[vr,"none","subgrid",Se,we],F=()=>["auto",{span:["full",vr,Se,we]},vr,Se,we],V=()=>[vr,"auto",Se,we],N=()=>["auto","min","max","fr",Se,we],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],M=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Se,we],L=()=>[...T(),rg,ng,{position:[Se,we]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",fC,cC,{size:[Se,we]}],q=()=>[cu,Li,Yr],G=()=>["","none","full",c,Se,we],W=()=>["",We,Li,Yr],J=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[We,cu,rg,ng],Y=()=>["","none",v,Se,we],K=()=>["none",We,Se,we],X=()=>["none",We,Se,we],de=()=>[We,Se,we],H=()=>[Po,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[oC],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[lC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",We],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,we,Se,m]}],container:["container"],columns:[{columns:[We,we,Se,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[vr,"auto",Se,we]}],basis:[{basis:[Po,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Po,"auto","initial","none",we]}],grow:[{grow:["",We,Se,we]}],shrink:[{shrink:["",We,Se,we]}],order:[{order:[vr,"first","last","none",Se,we]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Li,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Se,uu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cu,we]}],"font-family":[{font:[dC,we,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Se,we]}],"line-clamp":[{"line-clamp":[We,"none",Se,uu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Se,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Se,Yr]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[We,"auto",Se,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vr,Se,we],radial:["",Se,we],conic:[vr,Se,we]},pC,uC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Se,we]}],"outline-w":[{outline:["",We,Li,Yr]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,es,Ja]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,es,Ja]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[We,Yr]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,es,Ja]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[We,Se,we]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"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":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"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":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"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":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"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":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"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":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"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":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Se,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,we]}],filter:[{filter:["","none",Se,we]}],blur:[{blur:Y()}],brightness:[{brightness:[We,Se,we]}],contrast:[{contrast:[We,Se,we]}],"drop-shadow":[{"drop-shadow":["","none",p,es,Ja]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",We,Se,we]}],"hue-rotate":[{"hue-rotate":[We,Se,we]}],invert:[{invert:["",We,Se,we]}],saturate:[{saturate:[We,Se,we]}],sepia:[{sepia:["",We,Se,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,we]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[We,Se,we]}],"backdrop-contrast":[{"backdrop-contrast":[We,Se,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Se,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Se,we]}],"backdrop-invert":[{"backdrop-invert":["",We,Se,we]}],"backdrop-opacity":[{"backdrop-opacity":[We,Se,we]}],"backdrop-saturate":[{"backdrop-saturate":[We,Se,we]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Se,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Se,we]}],ease:[{ease:["linear","initial",y,Se,we]}],delay:[{delay:[We,Se,we]}],animate:[{animate:["none",x,Se,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Se,we]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[Se,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,we]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[We,Li,Yr,uu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),sr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},vC=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),du=e=>Re.function(e),Oe=(...e)=>gC(Wh(e)),cg=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)},ug=e=>e.scrollHeight>e.clientHeight,$i=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},yC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},ln=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),bC={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},xC=Io("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"}}}),wC=Io("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:bC,defaultVariants:{theme:"primary",size:"default"}}),ts=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return g.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(wC({size:a,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:xC({theme:n})}):null,r,s.children]})}),SC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Mt.apply(this,arguments)};function fu(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 pu(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 zi=function(e){return e.replace(new RegExp(" ","g")," ")},dg=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)},TC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},fg=function(e,t,n){var r=e.length-2,o=TC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},pg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ns=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},EC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},hu=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},kC=function(e){return e==="money"||e==="currency"},CC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Mt(Mt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},rs=function(e,t){var n=dg(pg(e),t.fraction.length),r="".concat(t.currency).concat(fg(n,t.group,t.decimal));return zi(r)},IC=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=fu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var v=CC(r,i,s);return v.currency=zi("".concat(v.currency.trim()," ")),v.literal=zi(v.literal.trim()),v},[r,i]),f=function(v){var h=rs(v.target.value,d),m=ns(h);v.target.value=h,v.target.setAttribute("data-number",m.toString()),l?.(v),m!==0&&(u.current.selectionEnd=h.length)};S.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var h=rs(v,d),m=ns(h);u.current.value=h,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});l?.(Mt(Mt({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=h.length)}}},[d]);var p=c.defaultValue?rs(c.defaultValue,d):void 0;return S.createElement("input",Mt({},c,{value:typeof c.value=="string"?rs(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),AC=1,PC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},OC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Mt(Mt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},os=function(e,t){var n=dg(pg(e),t.fraction.length),r="".concat(fg(n,t.group,t.decimal)," ").concat(t.percentSign);return zi(r)},_C=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=fu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=pu(S.useState(function(){var y,x;return(x=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var y,x=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(os(x,d))},[a.value]);var d=S.useMemo(function(){var y=OC(r);return y.percentSign=zi("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-AC,p=function(y){var x,b=s.current;b&&(b.setSelectionRange(f,f),y&&((x=a.onFocus)===null||x===void 0||x.call(a,y)))},v=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,T=x.selectionEnd,E=b!==T,I=f<b;!E&&I&&p()}i?.(y)},h=function(y){var x=os(y.target.value,d),b=ns(x);u(x),y.target.value=x,y.target.setAttribute("data-number",b.toString()),o?.(y)};S.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var x=os(y,d),b=ns(x);u(x),s.current.value=x,s.current.setAttribute("data-number",b.toString());var T=new InputEvent("change",{});o?.(Mt(Mt({},T),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=a.defaultValue?os(a.defaultValue,d):void 0;return S.createElement("input",Mt({},a,{defaultValue:m,inputMode:"decimal",onChange:h,onFocus:p,onKeyUp:v,ref:s,type:"text"}))}),ji={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},MC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=is[i];a===void 0?r.push(i.replace(ji.dots,"\\.").replace(ji.openParenthesis,"\\(").replace(ji.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ji.leadingBars,"\\")},Ri=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return mu(o,n);var i=MC(o);return n?"^".concat(i,"$"):i},DC=function(e){return e.replace(ji.escape,"\\$&")},mu=function(e,t){var n=e.map(function(r){return typeof r=="string"?DC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},is={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]/}},NC=/\d/,hg="(dd) 9dddd-dddd",mg="(dd) dddd-dddd",gg="ddd.ddd.ddd-dd",vg="dd.ddd.ddd/dddd-dd",as=function(e){return e.replace(/\D/g,"")},FC=["2",/[0-3]/,":",/[0-5]/,/\d/],LC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:gg,isoDate:"dddd-dd-dd",cnpj:vg,telephone:mg,cellphone:hg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return as(e).length<=11?gg:vg},int:function(e){return e===void 0&&(e=""),NC.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=as(e);return t.length<11?mg:hg},time:function(e){var t=as(e),n=t[0];return n==="2"?FC:LC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Mt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ri(e,"",!0),infinity:n.infinity},n)},Zt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:as}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function yg(e,t,n,r){var o,i;r===void 0&&(r=is);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=a[c];if(d===void 0){s+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(s+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return s}var bg=function(e){return e},VC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ri(e,n,t));return r.test(n)};function $C(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var zC=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=fu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=S.useRef(null);S.useImperativeHandle(t,function(){return v.current});var h=hu(s),m=hu(d),y=hu(u),x=S.useRef(VC(u,i,p.value||p.defaultValue)),b=f??"input",T=pu(S.useState(""),2),E=T[0],I=T[1],w=$C(E),k=S.useCallback(function(D,z){var M,C,L=(M=D??z)!==null&&M!==void 0?M:"";if(u===void 0)return L;var $=(C=L?.toString())!==null&&C!==void 0?C:"";return yg($,typeof u=="function"?u($):u,a??bg,c??is)},[a,u,c]),P=pu(S.useState(function(){return k(p.value,p.defaultValue)}),2),_=P[0],F=P[1],V=k(p.defaultValue,p.defaultValue),N=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(_);return Array.isArray(D)?mu(D,i):Ri(u,_,i)}return typeof u=="string"?Ri(u,_,i):mu(u,i)},[l,_,i,u]);S.useEffect(function(){if(p.value!==void 0){var D=k(p.value,p.defaultValue);F(D),v.current!==null&&(v.current.value=D)}},[p.value,u,a,p.defaultValue]);var O=function(D){var z,M,C,L,$,B=D.currentTarget,q=D.target.value;if(y.current===void 0)return F(q),(z=m.current)===null||z===void 0||z.call(m,q),(M=h.current)===null||M===void 0||M.call(h,D),d?.(q);var G=new RegExp(Ri(y.current,q,i)),W=(C=B.selectionEnd)!==null&&C!==void 0?C:0,J=function(X,de,H){if(X.type!=="number")return X.setSelectionRange(de,H)};if(r&&x.current&&q.length>=_.length)return B.value=_,J(B,W-1,W-1);var re=!1;q.length<w.length&&(x.current=!1,re=!0),G.test(q)&&(x.current=!0);var ee=W,Y=q[ee-1],K=yg(q,typeof y.current=="function"?y.current(q):y.current,a??bg,c??is);for(B.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==Y;)ee+=1;re?J(B,W,W):J(B,ee,ee),D.target.value=K,I(K),(L=m.current)===null||L===void 0||L.call(m,K),($=h.current)===null||$===void 0||$.call(h,D)};return S.createElement(b,Mt({},p,{ref:v,pattern:N,onChange:O,defaultValue:xg(p.defaultValue)?V:void 0,value:xg(p.value)?k(p.value,p.value):p.value}))}),xg=function(e){return typeof e=="string"},wg=S.forwardRef(function(e,t){return kC(e.mask)?S.createElement(IC,Mt({},e,{mask:void 0,ref:t})):PC(e.mask)?S.createElement(_C,Mt({},e,{mask:void 0,ref:t})):S.createElement(zC,Mt({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(wg,Mt({},e,t))}};on(Zt.cellTelephone),on(Zt.cellphone),on(Zt.cep),on(Zt.cnpj),on(Zt.color),on(Zt.cpf),on(Zt.cpfCnpj),on(Zt.creditCard),on(Zt.date),on(Zt.int),on(Zt.isoDate),on(Zt.telephone),on(Zt.time),on(Zt.uuid);var Sg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&EC(Zt,t.mask)?Zt[t.mask]:{mask:t.mask}},[t.mask]),o=Mt(Mt({},t),r);return S.createElement(wg,Mt({},o,{ref:n}))});const jC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Tg=e=>{const t=RC(e);return t.charAt(0).toUpperCase()+t.slice(1)},Eg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),BC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var HC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const WC=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...HC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Eg("lucide",o),...!i&&!BC(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const at=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(WC,{ref:i,iconNode:t,className:Eg(`lucide-${jC(Tg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Tg(e),n};const qC=at("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const UC=at("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const kg=at("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const GC=at("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const YC=at("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const gu=at("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const KC=at("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const vu=at("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Cg=at("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ZC=at("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const XC=at("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const QC=at("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Ig=at("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Ag=at("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Pg=at("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const JC=at("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const eI=at("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const yu=at("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const tI=at("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const bu=at("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const nI=at("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const rI=at("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const xu=at("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const oI=at("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const iI=at("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const wu=at("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ss=at("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const aI=at("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const sI=at("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Mo=at("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ls={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>)`},yr=(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(yr(a,t,n,s))},[]),Og=(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]:Og(a,t,n,s)}},{}),_g={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},cs=(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)},lI={default:e=>cs(e,{result:_g.default}),dark:e=>cs(e,{result:_g.dark})},Do=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},cI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Su=(e,t)=>{const n=yr(e.colors,Do(t?.colors)),r=yr(e.spacing,Do(t?.spacing)),o=yr(e.rounded,Do(t?.rounded)),i=yr(e.shadow,Do(t?.rounded)),a=yr(e.zIndex,Do(t?.zIndex??cI)),s=e.custom?yr(e.custom,Do(t?.customTokens)):[];return n.concat(r,o,s,a,i)},uI=(e,t)=>cs(Su(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),dI=(e,t)=>Su(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),fI=(e,t)=>cs(Su(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),us={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>g.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},ds={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Kr=S.createContext({parser:ls.hsla,tweaks:ds,floatingRef:void 0,map:us,locale:void 0}),Pt=()=>{const e=S.useContext(Kr);return e?e.map:us},Tu=()=>{const e=S.useContext(Kr);return e?e.tweaks:ds};function fs(){return typeof window<"u"}function br(e){return ps(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(ps(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ps(e){return fs()?e instanceof Node||e instanceof qt(e).Node:!1}function tt(e){return fs()?e instanceof Element||e instanceof qt(e).Element:!1}function Ot(e){return fs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Bi(e){return!fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const pI=new Set(["inline","contents"]);function Hi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!pI.has(o)}const hI=new Set(["table","td","th"]);function mI(e){return hI.has(br(e))}const gI=[":popover-open",":modal"];function hs(e){return gI.some(t=>{try{return e.matches(t)}catch{return!1}})}const vI=["transform","translate","scale","rotate","perspective"],yI=["transform","translate","scale","rotate","perspective","filter"],bI=["paint","layout","strict","content"];function Eu(e){const t=ms(),n=tt(e)?cn(e):e;return vI.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)||yI.some(r=>(n.willChange||"").includes(r))||bI.some(r=>(n.contain||"").includes(r))}function xI(e){let t=cr(e);for(;Ot(t)&&!lr(t);){if(Eu(t))return t;if(hs(t))return null;t=cr(t)}return null}function ms(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wI=new Set(["html","body","#document"]);function lr(e){return wI.has(br(e))}function cn(e){return qt(e).getComputedStyle(e)}function gs(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(br(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||Bn(e);return Bi(t)?t.host:t}function Mg(e){const t=cr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&Hi(t)?t:Mg(t)}function xr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=ku(a);return t.concat(a,a.visualViewport||[],Hi(o)?o:[],s&&n?xr(s):[])}return t.concat(o,xr(o,[],n))}function ku(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const SI=["top","right","bottom","left"],Dg=["start","end"],Ng=SI.reduce((e,t)=>e.concat(t,t+"-"+Dg[0],t+"-"+Dg[1]),[]),wr=Math.min,un=Math.max,vs=Math.round,No=Math.floor,Hn=e=>({x:e,y:e}),TI={left:"right",right:"left",bottom:"top",top:"bottom"},EI={start:"end",end:"start"};function Cu(e,t,n){return un(e,wr(t,n))}function Zr(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function Cn(e){return e.split("-")[1]}function Fg(e){return e==="x"?"y":"x"}function Iu(e){return e==="y"?"height":"width"}const kI=new Set(["top","bottom"]);function ur(e){return kI.has(Wn(e))?"y":"x"}function Au(e){return Fg(ur(e))}function Lg(e,t,n){n===void 0&&(n=!1);const r=Cn(e),o=Au(e),i=Iu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bs(a)),[a,bs(a)]}function CI(e){const t=bs(e);return[ys(e),t,ys(t)]}function ys(e){return e.replace(/start|end/g,t=>EI[t])}const Vg=["left","right"],$g=["right","left"],II=["top","bottom"],AI=["bottom","top"];function PI(e,t,n){switch(e){case"top":case"bottom":return n?t?$g:Vg:t?Vg:$g;case"left":case"right":return t?II:AI;default:return[]}}function OI(e,t,n,r){const o=Cn(e);let i=PI(Wn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(ys)))),i}function bs(e){return e.replace(/left|right|bottom|top/g,t=>TI[t])}function _I(e){return{top:0,right:0,bottom:0,left:0,...e}}function zg(e){return typeof e!="number"?_I(e):{top:e,right:e,bottom:e,left:e}}function xs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var MI=["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])"],ws=MI.join(","),jg=typeof Element>"u",Fo=jg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!jg&&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},Ts=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},DI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Rg=function(t,n,r){if(Ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ws));return n&&Fo.call(t,ws)&&o.unshift(t),o=o.filter(r),o},Bg=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ts(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=Fo.call(a,ws);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ts(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Hg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||DI(t))&&!Hg(t)?0:t.tabIndex},NI=function(t,n){var r=Wg(t);return r<0&&n&&!Hg(t)?0:r},FI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},qg=function(t){return t.tagName==="INPUT"},LI=function(t){return qg(t)&&t.type==="hidden"},VI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$I=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},zI=function(t){if(!t.name)return!0;var n=t.form||Ss(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=$I(o,t.form);return!i||i===t},jI=function(t){return qg(t)&&t.type==="radio"},RI=function(t){return jI(t)&&!zI(t)},BI=function(t){var n,r=t&&Ss(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=Ss(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},Ug=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},HI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fo.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=Ss(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ug(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(BI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ug(t);return!1},WI=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 Fo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Pu=function(t,n){return!(n.disabled||Ts(n)||LI(n)||HI(n,t)||VI(n)||WI(n))},Ou=function(t,n){return!(RI(n)||Wg(n)<0||!Pu(t,n))},qI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},UI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=NI(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(FI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Es=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bg([t],n.includeContainer,{filter:Ou.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qI}):r=Rg(t,n.includeContainer,Ou.bind(null,n)),UI(r)},GI=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bg([t],n.includeContainer,{filter:Pu.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Rg(t,n.includeContainer,Pu.bind(null,n)),r},Gg=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fo.call(t,ws)===!1?!1:Ou(n,t)};function _u(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Yg(){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 Kg(){return/apple/i.test(navigator.vendor)}function Mu(){const e=/android/i;return e.test(_u())||e.test(Yg())}function YI(){return _u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Zg(){return Yg().includes("jsdom/")}const Xg="data-floating-ui-focusable",KI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Du="ArrowLeft",Nu="ArrowRight",ZI="ArrowUp",XI="ArrowDown";function qn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fu(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 QI(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function Lu(e){return Ot(e)&&e.matches(KI)}function Vu(e){return e?e.getAttribute("role")==="combobox"&&Lu(e):!1}function JI(e){if(!e||Zg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ks(e){return e?e.hasAttribute(Xg)?e:e.querySelector("["+Xg+"]")||e:null}function Xr(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Xr(e,o.id,n)])}function eA(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Xr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Qg(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Gt(e){e.preventDefault(),e.stopPropagation()}function tA(e){return"nativeEvent"in e}function Jg(e){return e.mozInputSource===0&&e.isTrusted?!0:Mu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ev(e){return Zg()?!1:!Mu()&&e.width===0&&e.height===0||Mu()&&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 Lo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var nA=typeof document<"u",rA=function(){},nt=nA?S.useLayoutEffect:rA;const oA={...A};function Wt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const iA=oA.useInsertionEffect||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return iA(()=>{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 Cs(e,t,n){return Math.floor(e/t)!==n}function Wi(e,t){return t<0||t>=e.current.length}function $u(e,t){return Xt(e,{disabledIndices:t})}function tv(e,t){return Xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&Is(e,a,o));return a}function aA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===ZI){if(d&&Gt(n),u===-1)f=c;else if(f=Xt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const p=u%a,v=c%a,h=c-(v-p);v===p?f=c:f=v>p?h:h-a}Wi(e,f)&&(f=u)}if(n.key===XI&&(d&&Gt(n),u===-1?f=l:(f=Xt(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Xt(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Wi(e,f)&&(f=u)),r==="both"){const p=No(u/a);n.key===(i?Du:Nu)&&(d&&Gt(n),u%a!==a-1?(f=Xt(e,{startingIndex:u,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s})),Cs(f,a,p)&&(f=u)),n.key===(i?Nu:Du)&&(d&&Gt(n),u%a!==0?(f=Xt(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Cs(f,a,p)&&(f=u));const v=No(c/a)===p;Wi(e,f)&&(o&&v?f=n.key===(i?Nu:Du)?c:Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}):f=u)}return f}function sA(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function lA(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 cA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Is(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 qi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nv(e,t){const n=Es(e,qi()),r=n.length;if(r===0)return;const o=qn(Ut(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function rv(e){return nv(Ut(e).body,1)||e}function ov(e){return nv(Ut(e).body,-1)||e}function Ui(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function uA(e){Es(e,qi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function iv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function av(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),a=Au(t),s=Iu(a),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Cn(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const dA=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}=av(c,r,l),f=r,p={},v=0;for(let h=0;h<s.length;h++){const{name:m,fn:y}=s[h],{x,y:b,data:T,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,p={...p,[m]:{...p[m],...T}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=av(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function As(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Zr(t,e),v=zg(p),m=s[f?d==="floating"?"reference":"floating":d],y=xs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=xs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-E.top+v.top)/T.y,bottom:(E.bottom-y.bottom+v.bottom)/T.y,left:(y.left-E.left+v.left)/T.x,right:(E.right-y.right+v.right)/T.x}}const fA=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}=Zr(e,t)||{};if(c==null)return{};const d=zg(u),f={x:n,y:r},p=Au(o),v=Iu(p),h=await a.getDimensions(c),m=p==="y",y=m?"top":"left",x=m?"bottom":"right",b=m?"clientHeight":"clientWidth",T=i.reference[v]+i.reference[p]-f[p]-i.floating[v],E=f[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=I?I[b]:0;(!w||!await(a.isElement==null?void 0:a.isElement(I)))&&(w=s.floating[b]||i.floating[v]);const k=T/2-E/2,P=w/2-h[v]/2-1,_=wr(d[y],P),F=wr(d[x],P),V=_,N=w-h[v]-F,O=w/2-h[v]/2+k,D=Cu(V,O,N),z=!l.arrow&&Cn(o)!=null&&O!==D&&i.reference[v]/2-(O<V?_:F)-h[v]/2<0,M=z?O<V?O-V:O-N:0;return{[p]:f[p]+M,data:{[p]:D,centerOffset:O-D-M,...z&&{alignmentOffset:M}},reset:z}}});function pA(e,t,n){return(e?[...n.filter(o=>Cn(o)===e),...n.filter(o=>Cn(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?Cn(o)===e||(t?ys(o)!==o:!1):!0)}const hA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ng,autoAlignment:p=!0,...v}=Zr(e,t),h=d!==void 0||f===Ng?pA(d||null,p,f):f,m=await As(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,x=h[y];if(x==null)return{};const b=Lg(x,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==x)return{reset:{placement:h[0]}};const T=[m[Wn(x)],m[b[0]],m[b[1]]],E=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:T}],I=h[y+1];if(I)return{data:{index:y+1,overflows:E},reset:{placement:I}};const w=E.map(_=>{const F=Cn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce((V,N)=>V+N,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,Cn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==s?{data:{index:y+1,overflows:E},reset:{placement:P}}:{}}}},mA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...m}=Zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),x=ur(s),b=Wn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(b||!h?[bs(s)]:CI(s)),I=v!=="none";!f&&I&&E.push(...OI(s,h,v,T));const w=[s,...E],k=await As(t,m),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[y]),d){const O=Lg(o,a,T);P.push(k[O[0]],k[O[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(O=>O<=0)){var F,V;const O=(((F=i.flip)==null?void 0:F.index)||0)+1,D=w[O];if(D&&(!(d==="alignment"?x!==ur(D):!1)||_.every(C=>ur(C.placement)===x?C.overflows[0]>0:!0)))return{data:{index:O,overflows:_},reset:{placement:D}};let z=(V=_.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:V.placement;if(!z)switch(p){case"bestFit":{var N;const M=(N=_.filter(C=>{if(I){const L=ur(C.placement);return L===x||L==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,$)=>L+$,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:N[0];M&&(z=M);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}},gA=new Set(["left","top"]);async function vA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wn(n),s=Cn(n),l=ur(n)==="y",c=gA.has(a)?-1:1,u=i&&l?-1:1,d=Zr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const yA=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 vA(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}}}}},bA=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:m=>{let{x:y,y:x}=m;return{x:y,y:x}}},...l}=Zr(e,t),c={x:n,y:r},u=await As(t,l),d=ur(Wn(o)),f=Fg(d);let p=c[f],v=c[d];if(i){const m=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=p+u[m],b=p-u[y];p=Cu(x,p,b)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=v+u[m],b=v-u[y];v=Cu(x,v,b)}const h=s.fn({...t,[f]:p,[d]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},xA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Zr(e,t),u=await As(t,c),d=Wn(o),f=Cn(o),p=ur(o)==="y",{width:v,height:h}=i.floating;let m,y;d==="top"||d==="bottom"?(m=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,m=f==="end"?"top":"bottom");const x=h-u.top-u.bottom,b=v-u.left-u.right,T=wr(h-u[m],x),E=wr(v-u[y],b),I=!t.middlewareData.shift;let w=T,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),I&&!f){const _=un(u.left,0),F=un(u.right,0),V=un(u.top,0),N=un(u.bottom,0);p?k=v-2*(_!==0||F!==0?_+F:un(u.left,u.right)):w=h-2*(V!==0||N!==0?V+N:un(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const P=await a.getDimensions(s.floating);return v!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function sv(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=vs(n)!==i||vs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function zu(e){return tt(e)?e:e.contextElement}function Vo(e){const t=zu(e);if(!Ot(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sv(t);let a=(i?vs(n.width):n.width)/r,s=(i?vs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const wA=Hn(0);function lv(e){const t=qt(e);return!ms()||!t.visualViewport?wA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let a=Hn(1);t&&(r?tt(r)&&(a=Vo(r)):a=Vo(e));const s=SA(i,n,r)?lv(i):Hn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=qt(i),p=r&&tt(r)?qt(r):r;let v=f,h=ku(v);for(;h&&r&&p!==v;){const m=Vo(h),y=h.getBoundingClientRect(),x=cn(h),b=y.left+(h.clientLeft+parseFloat(x.paddingLeft))*m.x,T=y.top+(h.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=T,v=qt(h),h=ku(v)}}return xs({width:u,height:d,x:l,y:c})}function Ps(e,t){const n=gs(e).scrollLeft;return t?t.left+n:Qr(Bn(e)).left+n}function cv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ps(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function TA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Bn(r),s=t?hs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Ot(r);if((d||!d&&!i)&&((br(r)!=="body"||Hi(a))&&(l=gs(r)),Ot(r))){const p=Qr(r);c=Vo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!i?cv(a,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function EA(e){return Array.from(e.getClientRects())}function kA(e){const t=Bn(e),n=gs(e),r=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ps(e);const s=-n.scrollTop;return cn(r).direction==="rtl"&&(a+=un(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const uv=25;function CA(e,t){const n=qt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=ms();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ps(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-p);v<=uv&&(i-=v)}else c<=uv&&(i+=c);return{width:i,height:a,x:s,y:l}}const IA=new Set(["absolute","fixed"]);function AA(e,t){const n=Qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?Vo(e):Hn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function dv(e,t,n){let r;if(t==="viewport")r=CA(e,n);else if(t==="document")r=kA(Bn(e));else if(tt(t))r=AA(t,n);else{const o=lv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xs(r)}function fv(e,t){const n=cr(e);return n===t||!tt(n)||lr(n)?!1:cn(n).position==="fixed"||fv(n,t)}function PA(e,t){const n=t.get(e);if(n)return n;let r=xr(e,[],!1).filter(s=>tt(s)&&br(s)!=="body"),o=null;const i=cn(e).position==="fixed";let a=i?cr(e):e;for(;tt(a)&&!lr(a);){const s=cn(a),l=Eu(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&IA.has(o.position)||Hi(a)&&!l&&fv(e,a))?r=r.filter(u=>u!==a):o=s,a=cr(a)}return t.set(e,r),r}function OA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?hs(t)?[]:PA(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=dv(t,u,o);return c.top=un(d.top,c.top),c.right=wr(d.right,c.right),c.bottom=wr(d.bottom,c.bottom),c.left=un(d.left,c.left),c},dv(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _A(e){const{width:t,height:n}=sv(e);return{width:t,height:n}}function MA(e,t,n){const r=Ot(t),o=Bn(t),i=n==="fixed",a=Qr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Ps(o)}if(r||!r&&!i)if((br(t)!=="body"||Hi(o))&&(s=gs(t)),r){const p=Qr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?cv(o,s):Hn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function ju(e){return cn(e).position==="static"}function pv(e,t){if(!Ot(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function hv(e,t){const n=qt(e);if(hs(e))return n;if(!Ot(e)){let o=cr(e);for(;o&&!lr(o);){if(tt(o)&&!ju(o))return o;o=cr(o)}return n}let r=pv(e,t);for(;r&&mI(r)&&ju(r);)r=pv(r,t);return r&&lr(r)&&ju(r)&&!Eu(r)?n:r||xI(e)||n}const DA=async function(e){const t=this.getOffsetParent||hv,n=this.getDimensions,r=await n(e.floating);return{reference:MA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NA(e){return cn(e).direction==="rtl"}const FA={convertOffsetParentRelativeRectToViewportRelativeRect:TA,getDocumentElement:Bn,getClippingRect:OA,getOffsetParent:hv,getElementRects:DA,getClientRects:EA,getDimensions:_A,getScale:Vo,isElement:tt,isRTL:NA};function mv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LA(e,t){let n=null,r;const o=Bn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const v=No(d),h=No(o.clientWidth-(u+f)),m=No(o.clientHeight-(d+p)),y=No(u),b={rootMargin:-v+"px "+-h+"px "+-m+"px "+-y+"px",threshold:un(0,wr(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!mv(c,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function Jr(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=zu(e),u=o||i?[...c?xr(c):[],...xr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?LA(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,h=l?Qr(e):null;l&&m();function m(){const y=Qr(e);h&&!mv(h,y)&&n(),h=y,v=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const VA=yA,$A=hA,zA=bA,jA=mA,RA=xA,gv=fA,BA=(e,t,n)=>{const r=new Map,o={platform:FA,...n},i={...o.platform,_c:r};return dA(e,t,{...o,platform:i})};var HA=typeof document<"u",WA=function(){},Os=HA?S.useLayoutEffect:WA;function _s(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(!_s(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)&&!_s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yv(e,t){const n=vv(e);return Math.round(t*n)/n}function Ru(e){const t=A.useRef(e);return Os(()=>{t.current=e}),t}function qA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=A.useState(r);_s(f,r)||p(r);const[v,h]=A.useState(null),[m,y]=A.useState(null),x=A.useCallback(C=>{C!==I.current&&(I.current=C,h(C))},[]),b=A.useCallback(C=>{C!==w.current&&(w.current=C,y(C))},[]),T=i||v,E=a||m,I=A.useRef(null),w=A.useRef(null),k=A.useRef(u),P=l!=null,_=Ru(l),F=Ru(o),V=Ru(c),N=A.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};F.current&&(C.platform=F.current),BA(I.current,w.current,C).then(L=>{const $={...L,isPositioned:V.current!==!1};O.current&&!_s(k.current,$)&&(k.current=$,jn.flushSync(()=>{d($)}))})},[f,t,n,F,V]);Os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const O=A.useRef(!1);Os(()=>(O.current=!0,()=>{O.current=!1}),[]),Os(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(_.current)return _.current(T,E,N);N()}},[T,E,N,_,P]);const D=A.useMemo(()=>({reference:I,floating:w,setReference:x,setFloating:b}),[x,b]),z=A.useMemo(()=>({reference:T,floating:E}),[T,E]),M=A.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const L=yv(z.floating,u.x),$=yv(z.floating,u.y);return s?{...C,transform:"translate("+L+"px, "+$+"px)",...vv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:$}},[n,s,z.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:N,refs:D,elements:z,floatingStyles:M}),[u,N,D,z,M])}const UA=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?gv({element:r.current,padding:o}).fn(n):{}:r?gv({element:r,padding:o}).fn(n):{}}}},$o=(e,t)=>({...VA(e),options:[e,t]}),Ms=(e,t)=>({...zA(e),options:[e,t]}),Ds=(e,t)=>({...jA(e),options:[e,t]}),bv=(e,t)=>({...RA(e),options:[e,t]}),xv=(e,t)=>({...$A(e),options:[e,t]}),Bu=(e,t)=>({...UA(e),options:[e,t]});function GA(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 wv=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function YA(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(GA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(wv.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function Sv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(wv),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var f;const p=t!==void 0;a.current[s]=p?t:(f=d?.textContent)!=null?f:null}},[s,i,a,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const KA="data-floating-ui-focusable",Tv="active",Ev="selected",Gi="ArrowLeft",Yi="ArrowRight",kv="ArrowUp",Ns="ArrowDown",ZA={...A};let Cv=!1,XA=0;const Iv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+XA++;function QA(){const[e,t]=A.useState(()=>Cv?Iv():void 0);return nt(()=>{e==null&&t(Iv())},[]),A.useEffect(()=>{Cv=!0},[]),e}const Ki=ZA.useId||QA;let Zi;process.env.NODE_ENV!=="production"&&(Zi=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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.warn(o)}}function JA(){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=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.error(o)}}const Hu=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:v,...h}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Fs("The `ref` prop is required for `FloatingArrow`."));const y=Ki(),[x,b]=A.useState(!1);if(nt(()=>{if(!o)return;cn(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&a!=null&&a.x||!I&&a!=null&&a.y)&&(w=null);const k=u*2,P=k/2,_=s/2*(c/-8+1),F=l/2*c/4,V=!!p,N=w&&E==="end"?"bottom":"top";let O=w&&E==="end"?"right":"left";w&&x&&(O=E==="end"?"left":"right");const D=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",C={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[T];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:V?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[O]:D,[N]:z,[T]:I||V?"100%":"calc(100% - "+k/2+"px)",transform:[C,v].filter(L=>!!L).join(" "),...h},children:[k>0&&g.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:M}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:M}),g.jsx("clipPath",{id:y,children:g.jsx("rect",{x:-P,y:P*(V?-1:1),width:s+k,height:s})})]})});function Av(){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 Pv=A.createContext(null),Ov=A.createContext(null),Sr=()=>{var e;return((e=A.useContext(Pv))==null?void 0:e.id)||null},Tr=()=>A.useContext(Ov);function eP(e){const t=Ki(),n=Tr(),o=Sr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function tP(e){const{children:t,id:n}=e,r=Sr();return g.jsx(Pv.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function nP(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(()=>Av());return g.jsx(Ov.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function eo(e){return"data-floating-ui-"+e}function Yt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const _v=eo("safe-polygon");function Wu(e,t,n){if(n&&!Lo(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 qu(e){return typeof e=="function"?e():e}function Mv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Tr(),v=Sr(),h=Wt(c),m=Wt(l),y=Wt(n),x=Wt(d),b=A.useRef(),T=A.useRef(-1),E=A.useRef(),I=A.useRef(-1),w=A.useRef(!0),k=A.useRef(!1),P=A.useRef(()=>{}),_=A.useRef(!1),F=kt(()=>{var M;const C=(M=o.current.openEvent)==null?void 0:M.type;return C?.includes("mouse")&&C!=="mousedown"});A.useEffect(()=>{if(!s)return;function M(C){let{open:L}=C;L||(Yt(T),Yt(I),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!h.current||!n)return;function M(L){F()&&r(!1,L,"hover")}const C=Ut(a.floating).documentElement;return C.addEventListener("mouseleave",M),()=>{C.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,h,F]);const V=A.useCallback(function(M,C,L){C===void 0&&(C=!0),L===void 0&&(L="hover");const $=Wu(m.current,"close",b.current);$&&!E.current?(Yt(T),T.current=window.setTimeout(()=>r(!1,M,L),$)):C&&(Yt(T),r(!1,M,L))},[m,r]),N=kt(()=>{P.current(),E.current=void 0}),O=kt(()=>{if(k.current){const M=Ut(a.floating).body;M.style.pointerEvents="",M.removeAttribute(_v),k.current=!1}}),D=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function M(q){if(Yt(T),w.current=!1,u&&!Lo(b.current)||qu(x.current)>0&&!Wu(m.current,"open"))return;const G=Wu(m.current,"open",b.current);G?T.current=window.setTimeout(()=>{y.current||r(!0,q,"hover")},G):n||r(!0,q,"hover")}function C(q){if(D()){O();return}P.current();const G=Ut(a.floating);if(Yt(I),_.current=!1,h.current&&o.current.floatingContext){n||Yt(T),E.current=h.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q,!0,"safe-polygon")}});const J=E.current;G.addEventListener("mousemove",J),P.current=()=>{G.removeEventListener("mousemove",J)};return}(b.current!=="touch"||!Ht(a.floating,q.relatedTarget))&&V(q)}function L(q){D()||o.current.floatingContext&&(h.current==null||h.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),N(),D()||V(q)}})(q))}function $(){Yt(T)}function B(q){D()||V(q,!1)}if(tt(a.domReference)){const q=a.domReference,G=a.floating;return n&&q.addEventListener("mouseleave",L),f&&q.addEventListener("mousemove",M,{once:!0}),q.addEventListener("mouseenter",M),q.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",L),G.addEventListener("mouseenter",$),G.addEventListener("mouseleave",B)),()=>{n&&q.removeEventListener("mouseleave",L),f&&q.removeEventListener("mousemove",M),q.removeEventListener("mouseenter",M),q.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",L),G.removeEventListener("mouseenter",$),G.removeEventListener("mouseleave",B))}}},[a,s,e,u,f,V,N,O,r,n,y,p,m,h,o,D,x]),nt(()=>{var M;if(s&&n&&(M=h.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){k.current=!0;const L=a.floating;if(tt(a.domReference)&&L){var C;const $=Ut(a.floating).body;$.setAttribute(_v,"");const B=a.domReference,q=p==null||(C=p.nodesRef.current.find(G=>G.id===v))==null||(C=C.context)==null?void 0:C.elements.floating;return q&&(q.style.pointerEvents=""),$.style.pointerEvents="none",B.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{$.style.pointerEvents="",B.style.pointerEvents="",L.style.pointerEvents=""}}}},[s,n,v,a,p,h,F]),nt(()=>{n||(b.current=void 0,_.current=!1,N(),O())},[n,N,O]),A.useEffect(()=>()=>{N(),Yt(T),Yt(I),O()},[s,a.domReference,N,O]);const z=A.useMemo(()=>{function M(C){b.current=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:L}=C;function $(){!w.current&&!y.current&&r(!0,L,"hover")}u&&!Lo(b.current)||n||qu(x.current)===0||_.current&&C.movementX**2+C.movementY**2<2||(Yt(I),b.current==="touch"?$():(_.current=!0,I.current=window.setTimeout($,qu(x.current))))}}},[u,r,n,y,x]);return A.useMemo(()=>s?{reference:z}:{},[s,z])}let Dv=0;function to(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Dv);const i=()=>e?.focus({preventScroll:n});o?i():Dv=requestAnimationFrame(i)}function Uu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function rP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function oP(e){return e?.ownerDocument||document}const zo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Nv(e){return e==="inert"?zo.inert:e==="aria-hidden"?zo["aria-hidden"]:zo.none}let Ls=new WeakSet,Vs={},Gu=0;const iP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Fv=e=>e&&(e.host||Fv(e.parentNode)),aP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Fv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function sP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=aP(t,e),s=new Set,l=new Set(a),c=[];Vs[o]||(Vs[o]=new WeakMap);const u=Vs[o];a.forEach(d),f(t),s.clear();function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(br(v)!=="script")if(s.has(v))f(v);else{const h=i?v.getAttribute(i):null,m=h!==null&&h!=="false",y=Nv(i),x=(y.get(v)||0)+1,b=(u.get(v)||0)+1;y.set(v,x),u.set(v,b),c.push(v),x===1&&m&&Ls.add(v),b===1&&v.setAttribute(o,""),!m&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Gu++,()=>{c.forEach(p=>{const v=Nv(i),m=(v.get(p)||0)-1,y=(u.get(p)||0)-1;v.set(p,m),u.set(p,y),m||(!Ls.has(p)&&i&&p.removeAttribute(i),Ls.delete(p)),y||p.removeAttribute(o)}),Gu--,Gu||(zo.inert=new WeakMap,zo["aria-hidden"]=new WeakMap,zo.none=new WeakMap,Ls=new WeakSet,Vs={})}}function Lv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=oP(e[0]).body;return sP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),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},zs=A.forwardRef(function(t,n){const[r,o]=A.useState();nt(()=>{Kg()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[eo("focus-guard")]:"",style:$s};return g.jsx("span",{...t,...i})}),Vv=A.createContext(null),$v=eo("portal");function lP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ki(),o=zv(),[i,a]=A.useState(null),s=A.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),nt(()=>{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($v,""),l.appendChild(c),s.current=c,a(c)},[t,r]),nt(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!ps(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($v,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function dr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=lP({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=a?.modal,p=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function h(m){i&&Ui(m)&&(m.type==="focusin"?iv:uA)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,f]),A.useEffect(()=>{i&&(p||iv(i))},[p,i]),g.jsxs(Vv.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&g.jsx(zs,{"data-type":"outside",ref:l,onFocus:h=>{if(Ui(h,i)){var m;(m=u.current)==null||m.focus()}else{const y=a?a.domReference:null,x=ov(y);x?.focus()}}}),v&&i&&g.jsx("span",{"aria-owns":i.id,style:$s}),i&&jn.createPortal(t,i),v&&i&&g.jsx(zs,{"data-type":"outside",ref:c,onFocus:h=>{if(Ui(h,i)){var m;(m=d.current)==null||m.focus()}else{const y=a?a.domReference:null,x=rv(y);x?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,h.nativeEvent,"focus-out")}}})]})}const zv=()=>A.useContext(Vv);function jv(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const cP=20;let Er=[];function Yu(){Er=Er.filter(e=>e.isConnected)}function uP(e){Yu(),e&&br(e)!=="body"&&(Er.push(e),Er.length>cP&&(Er=Er.slice(-20)))}function Rv(){return Yu(),Er[Er.length-1]}function dP(e){const t=qi();return Gg(e,t)?e:Es(e,t)[0]||e}function Bv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=qi(),i=GI(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Gg(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 fP=A.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:$s})});function no(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:h,events:m,dataRef:y,elements:{domReference:x,floating:b}}=t,T=kt(()=>{var H;return(H=y.current.floatingContext)==null?void 0:H.nodeId}),E=kt(p),I=typeof a=="number"&&a<0,w=Vu(x)&&I,k=iP(),P=k?i:!0,_=!P||k&&f,F=Wt(o),V=Wt(a),N=Wt(s),O=Tr(),D=zv(),z=A.useRef(null),M=A.useRef(null),C=A.useRef(!1),L=A.useRef(!1),$=A.useRef(-1),B=A.useRef(-1),q=D!=null,G=ks(b),W=kt(function(H){return H===void 0&&(H=G),H?Es(H,qi()):[]}),J=kt(H=>{const se=W(H);return F.current.map(ie=>x&&ie==="reference"?x:G&&ie==="floating"?G:se).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function H(ie){if(ie.key==="Tab"){Ht(G,qn(Ut(G)))&&W().length===0&&!w&&Gt(ie);const Q=J(),le=Un(ie);F.current[0]==="reference"&&le===x&&(Gt(ie),ie.shiftKey?to(Q[Q.length-1]):to(Q[1])),F.current[1]==="floating"&&le===G&&ie.shiftKey&&(Gt(ie),to(Q[0]))}}const se=Ut(G);return se.addEventListener("keydown",H),()=>{se.removeEventListener("keydown",H)}},[r,x,G,c,F,w,W,J]),A.useEffect(()=>{if(r||!b)return;function H(se){const ie=Un(se),le=W().indexOf(ie);le!==-1&&($.current=le)}return b.addEventListener("focusin",H),()=>{b.removeEventListener("focusin",H)}},[r,b,W]),A.useEffect(()=>{if(r||!d)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function se(le){const te=le.relatedTarget,fe=le.currentTarget,pe=Un(le);queueMicrotask(()=>{const ve=T(),Ae=!(Ht(x,te)||Ht(b,te)||Ht(te,b)||Ht(D?.portalNode,te)||te!=null&&te.hasAttribute(eo("focus-guard"))||O&&(Xr(O.nodesRef.current,ve).find(me=>{var oe,j;return Ht((oe=me.context)==null?void 0:oe.elements.floating,te)||Ht((j=me.context)==null?void 0:j.elements.domReference,te)})||Qg(O.nodesRef.current,ve).find(me=>{var oe,j,R;return[(oe=me.context)==null?void 0:oe.elements.floating,ks((j=me.context)==null?void 0:j.elements.floating)].includes(te)||((R=me.context)==null?void 0:R.elements.domReference)===te})));if(fe===x&&G&&Bv(G,F),l&&fe!==x&&!(pe!=null&&pe.isConnected)&&qn(Ut(G))===Ut(G).body){Ot(G)&&G.focus();const me=$.current,oe=W(),j=oe[me]||oe[oe.length-1]||G;Ot(j)&&j.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&te&&Ae&&!L.current&&te!==Rv()&&(C.current=!0,h(!1,le,"focus-out"))})}const ie=!!(!O&&D);function Q(){Yt(B),y.current.insideReactTree=!0,B.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(b&&Ot(x))return x.addEventListener("focusout",se),x.addEventListener("pointerdown",H),b.addEventListener("focusout",se),ie&&b.addEventListener("focusout",Q,!0),()=>{x.removeEventListener("focusout",se),x.removeEventListener("pointerdown",H),b.removeEventListener("focusout",se),ie&&b.removeEventListener("focusout",Q,!0)}},[r,x,b,G,c,O,D,h,d,l,W,w,T,F,y]);const re=A.useRef(null),ee=A.useRef(null),Y=jv([re,D?.beforeInsideRef]),K=jv([ee,D?.afterInsideRef]);A.useEffect(()=>{var H,se;if(r||!b)return;const ie=Array.from((D==null||(H=D.portalNode)==null?void 0:H.querySelectorAll("["+eo("portal")+"]"))||[]),le=(se=(O?Qg(O.nodesRef.current,T()):[]).find(pe=>{var ve;return Vu(((ve=pe.context)==null?void 0:ve.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,te=[b,le,...ie,...E(),z.current,M.current,re.current,ee.current,D?.beforeOutsideRef.current,D?.afterOutsideRef.current,F.current.includes("reference")||w?x:null].filter(pe=>pe!=null),fe=c||w?Lv(te,!_,_):Lv(te);return()=>{fe()}},[r,x,b,c,F,D,w,P,_,O,T,E]),nt(()=>{if(r||!Ot(G))return;const H=Ut(G),se=qn(H);queueMicrotask(()=>{const ie=J(G),Q=V.current,le=(typeof Q=="number"?ie[Q]:Q.current)||G,te=Ht(G,se);!I&&!te&&v&&to(le,{preventScroll:le===G})})},[r,v,G,I,J,V]),nt(()=>{if(r||!G)return;const H=Ut(G),se=qn(H);uP(se);function ie(te){let{reason:fe,event:pe,nested:ve}=te;if(["hover","safe-polygon"].includes(fe)&&pe.type==="mouseleave"&&(C.current=!0),fe==="outside-press")if(ve)C.current=!1;else if(Jg(pe)||ev(pe))C.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?C.current=!1:C.current=!0}}m.on("openchange",ie);const Q=H.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,$s),q&&x&&x.insertAdjacentElement("afterend",Q);function le(){if(typeof N.current=="boolean"){const te=x||Rv();return te&&te.isConnected?te:Q}return N.current.current||Q}return()=>{m.off("openchange",ie);const te=qn(H),fe=Ht(b,te)||O&&Xr(O.nodesRef.current,T(),!1).some(ve=>{var Ae;return Ht((Ae=ve.context)==null?void 0:Ae.elements.floating,te)}),pe=le();queueMicrotask(()=>{const ve=dP(pe);N.current&&!C.current&&Ot(ve)&&(!(ve!==te&&te!==H.body)||fe)&&ve.focus({preventScroll:!0}),Q.remove()})}},[r,b,G,N,y,m,O,q,x,T]),A.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(Yu)}),[r]),nt(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:h,domReference:x}),()=>{D.setFocusManagerState(null)}},[r,D,c,v,h,d,x]),nt(()=>{r||G&&Bv(G,F)},[r,G,F]);function X(H){return r||!u||!c?null:g.jsx(fP,{ref:H==="start"?z:M,onClick:se=>h(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const de=!r&&P&&(c?!w:!0)&&(q||c);return g.jsxs(g.Fragment,{children:[de&&g.jsx(zs,{"data-type":"inside",ref:Y,onFocus:H=>{if(c){const ie=J();to(o[0]==="reference"?ie[0]:ie[ie.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(C.current=!1,Ui(H,D.portalNode)){const ie=rv(x);ie?.focus()}else{var se;(se=D.beforeOutsideRef.current)==null||se.focus()}}}),!w&&X("start"),n,X("end"),de&&g.jsx(zs,{"data-type":"inside",ref:K,onFocus:H=>{if(c)to(J()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(C.current=!0),Ui(H,D.portalNode)){const ie=ov(x);ie?.focus()}else{var se;(se=D.afterOutsideRef.current)==null||se.focus()}}})]})}let js=0;const Hv="--floating-ui-scrollbar-width";function pP(){const e=_u(),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(Hv,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(Hv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Wv=()=>{};const Ku=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return js++,js===1&&(Wv=pP()),()=>{js--,js===0&&Wv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function qv(e){return Ot(e.target)&&e.target.tagName==="BUTTON"}function hP(e){return Ot(e.target)&&e.target.tagName==="A"}function Uv(e){return Lu(e)}function jo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(h){f.current=h.pointerType},onMouseDown(h){const m=f.current;h.button===0&&s!=="click"&&(Lo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const m=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Lo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){f.current=void 0,!(h.defaultPrevented||!u||qv(h))&&(h.key===" "&&!Uv(i)&&(h.preventDefault(),p.current=!0),!hP(h)&&h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||qv(h)||Uv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:v}:{},[a,v])}function mP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,f=a.x,p=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=s&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Gv(e){return e!=null&&e.clientX!=null}function gP(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=A.useRef(!1),f=A.useRef(null),[p,v]=A.useState(),[h,m]=A.useState([]),y=kt((I,w)=>{d.current||r.current.openEvent&&!Gv(r.current.openEvent)||a.setPositionReference(mP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),x=kt(I=>{c!=null||u!=null||(n?f.current||m([]):y(I.clientX,I.clientY))}),b=Lo(p)?o:n,T=A.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const I=qt(o);function w(k){const P=Un(k);Ht(o,P)?(I.removeEventListener("mousemove",w),f.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||Gv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);A.useEffect(()=>T(),[T,h]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),nt(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const E=A.useMemo(()=>{function I(w){let{pointerType:k}=w;v(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:x,onMouseEnter:x}},[x]);return A.useMemo(()=>s?{reference:E}:{},[s,E])}const vP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},yP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Yv=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 kr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,h=Tr(),m=kt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?m:l,x=A.useRef(!1),{escapeKey:b,outsidePress:T}=Yv(p),{escapeKey:E,outsidePress:I}=Yv(v),w=A.useRef(!1),k=kt(O=>{var D;if(!n||!a||!s||O.key!=="Escape"||w.current)return;const z=(D=i.current.floatingContext)==null?void 0:D.nodeId,M=h?Xr(h.nodesRef.current,z):[];if(!b&&(O.stopPropagation(),M.length>0)){let C=!0;if(M.forEach(L=>{var $;if(($=L.context)!=null&&$.open&&!L.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,tA(O)?O.nativeEvent:O,"escape-key")}),P=kt(O=>{var D;const z=()=>{var M;k(O),(M=Un(O))==null||M.removeEventListener("keydown",z)};(D=Un(O))==null||D.addEventListener("keydown",z)}),_=kt(O=>{var D;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=x.current;if(x.current=!1,c==="click"&&M||z||typeof y=="function"&&!y(O))return;const C=Un(O),L="["+eo("inert")+"]",$=Ut(o.floating).querySelectorAll(L);let B=tt(C)?C:null;for(;B&&!lr(B);){const J=cr(B);if(lr(J)||!tt(J))break;B=J}if($.length&&tt(C)&&!QI(C)&&!Ht(C,o.floating)&&Array.from($).every(J=>!Ht(B,J)))return;if(Ot(C)&&N){const J=lr(C),re=cn(C),ee=/auto|scroll/,Y=J||ee.test(re.overflowX),K=J||ee.test(re.overflowY),X=Y&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,de=K&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,H=re.direction==="rtl",se=de&&(H?O.offsetX<=C.offsetWidth-C.clientWidth:O.offsetX>C.clientWidth),ie=X&&O.offsetY>C.clientHeight;if(se||ie)return}const q=(D=i.current.floatingContext)==null?void 0:D.nodeId,G=h&&Xr(h.nodesRef.current,q).some(J=>{var re;return Fu(O,(re=J.context)==null?void 0:re.elements.floating)});if(Fu(O,o.floating)||Fu(O,o.domReference)||G)return;const W=h?Xr(h.nodesRef.current,q):[];if(W.length>0){let J=!0;if(W.forEach(re=>{var ee;if((ee=re.context)!=null&&ee.open&&!re.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,O,"outside-press")}),F=kt(O=>{var D;const z=()=>{var M;_(O),(M=Un(O))==null||M.removeEventListener(c,z)};(D=Un(O))==null||D.addEventListener(c,z)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=T;let O=-1;function D($){r(!1,$,"ancestor-scroll")}function z(){window.clearTimeout(O),w.current=!0}function M(){O=window.setTimeout(()=>{w.current=!1},ms()?5:0)}const C=Ut(o.floating);s&&(C.addEventListener("keydown",E?P:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",M)),y&&C.addEventListener(c,I?F:_,I);let L=[];return f&&(tt(o.domReference)&&(L=xr(o.domReference)),tt(o.floating)&&(L=L.concat(xr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(xr(o.reference.contextElement)))),L=L.filter($=>{var B;return $!==((B=C.defaultView)==null?void 0:B.visualViewport)}),L.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{s&&(C.removeEventListener("keydown",E?P:k,E),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",M)),y&&C.removeEventListener(c,I?F:_,I),L.forEach($=>{$.removeEventListener("scroll",D)}),window.clearTimeout(O)}},[i,o,s,y,c,n,r,f,a,b,T,k,E,P,_,I,F]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const V=A.useMemo(()=>({onKeyDown:k,...u&&{[vP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[k,r,u,d]),N=A.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[yP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return A.useMemo(()=>a?{reference:V,floating:N}:{},[a,V,N])}function bP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ki(),i=A.useRef({}),[a]=A.useState(()=>Av()),s=Sr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&JA("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=kt((p,v,h)=>{i.current.openEvent=p?v:void 0,a.emit("openchange",{open:p,event:v,reason:h,nested:s}),n?.(p,v,h)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=bP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Tr();nt(()=>{u&&(d.current=u)},[u]);const p=qA({...e,elements:{...o,...s&&{reference:s}}}),v=A.useCallback(b=>{const T=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(T),p.refs.setReference(T)},[p.refs]),h=A.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(p.refs.reference.current)||p.refs.reference.current===null||b!==null&&!tt(b))&&p.refs.setReference(b)},[p.refs]),m=A.useMemo(()=>({...p.refs,setReference:h,setPositionReference:v,domReference:d}),[p.refs,h,v]),y=A.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=A.useMemo(()=>({...p,...r,refs:m,elements:y,nodeId:t}),[p,m,y,t,r]);return nt(()=>{r.dataRef.current.floatingContext=x;const b=f?.nodesRef.current.find(T=>T.id===t);b&&(b.context=x)}),A.useMemo(()=>({...p,context:x,refs:m,elements:y}),[p,m,y,x])}function Zu(){return YI()&&Kg()}function xP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const p=qt(a.domReference);function v(){!n&&Ot(a.domReference)&&a.domReference===qn(Ut(a.domReference))&&(c.current=!0)}function h(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",v),Zu()&&(p.addEventListener("keydown",h,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",v),Zu()&&(p.removeEventListener("keydown",h,!0),p.removeEventListener("pointerdown",m,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function p(v){let{reason:h}=v;(h==="reference-press"||h==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,s]),A.useEffect(()=>()=>{Yt(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const v=Un(p.nativeEvent);if(l&&tt(v)){if(Zu()&&!p.relatedTarget){if(!d.current&&!Lu(v))return}else if(!JI(v))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const v=p.relatedTarget,h=p.nativeEvent,m=tt(v)&&v.hasAttribute(eo("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=qn(a.domReference?a.domReference.ownerDocument:document);!v&&x===a.domReference||Ht((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||Ht(a.domReference,x)||m||r(!1,h,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:f}:{},[s,f])}function Xu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Tv]:a,[Ev]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[KA]:""},...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&&[Tv,Ev].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var f,p=arguments.length,v=new Array(p),h=0;h<p;h++)v[h]=arguments[h];return(f=r.get(c))==null?void 0:f.map(m=>m(...v)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=A.useCallback(s=>Xu(s,e,"reference"),t),i=A.useCallback(s=>Xu(s,e,"floating"),n),a=A.useCallback(s=>Xu(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const wP="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===kv||e===Ns,e===Gi||e===Yi)}function Qu(e,t,n){return Rs(t,e===Ns,n?e===Gi:e===Yi)||e==="Enter"||e===" "||e===""}function Kv(e,t,n){return Rs(t,n?e===Gi:e===Yi,e===Ns)}function Zv(e,t,n,r){const o=n?e===Yi:e===Gi,i=e===kv;return t==="both"||t==="horizontal"&&r&&r>1?e===wP: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:f=!1,nested:p=!1,rtl:v=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:b=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Fs("`useListNavigation` looping must be enabled to allow escaping."),h||Fs("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Fs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=ks(o.floating),V=Wt(F),N=Sr(),O=Tr();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const D=kt(()=>{l(C.current===-1?null:C.current)}),z=Vu(o.domReference),M=A.useRef(m),C=A.useRef(u??-1),L=A.useRef(null),$=A.useRef(!0),B=A.useRef(D),q=A.useRef(!!o.floating),G=A.useRef(n),W=A.useRef(!1),J=A.useRef(!1),re=Wt(b),ee=Wt(n),Y=Wt(w),K=Wt(u),[X,de]=A.useState(),[H,se]=A.useState(),ie=kt(()=>{function me(ne){if(h){var ce;(ce=ne.id)!=null&&ce.endsWith("-fui-option")&&(ne.id=i+"-"+Math.random().toString(16).slice(2,10)),de(ne.id),O?.events.emit("virtualfocus",ne),k&&(k.current=ne)}else to(ne,{sync:W.current,preventScroll:!0})}const oe=a.current[C.current],j=J.current;oe&&me(oe),(W.current?ne=>ne():requestAnimationFrame)(()=>{const ne=a.current[C.current]||oe;if(!ne)return;oe||me(ne);const ce=Y.current;ce&&le&&(j||!$.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(J.current=!0,C.current=u,D()):q.current&&(C.current=-1,B.current()))},[c,n,o.floating,u,D]),nt(()=>{if(c&&n&&o.floating)if(s==null){if(W.current=!1,K.current!=null)return;if(q.current&&(C.current=-1,ie()),(!G.current||!q.current)&&M.current&&(L.current!=null||M.current===!0&&L.current==null)){let me=0;const oe=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(oe),me++):(C.current=L.current==null||Qu(L.current,T,v)||p?$u(a,re.current):tv(a,re.current),L.current=null,D())};oe()}}else Wi(a,s)||(C.current=s,ie(),J.current=!1)},[c,n,o.floating,s,K,p,a,T,v,D,ie,re]),nt(()=>{var me;if(!c||o.floating||!O||h||!q.current)return;const oe=O.nodesRef.current,j=(me=oe.find(ce=>ce.id===N))==null||(me=me.context)==null?void 0:me.elements.floating,R=qn(Ut(o.floating)),ne=oe.some(ce=>ce.context&&Ht(ce.context.elements.floating,R));j&&!ne&&$.current&&j.focus({preventScroll:!0})},[c,o.floating,O,N,h]),nt(()=>{if(!c||!O||!h||N)return;function me(oe){se(oe.id),k&&(k.current=oe)}return O.events.on("virtualfocus",me),()=>{O.events.off("virtualfocus",me)}},[c,O,h,N,k]),nt(()=>{B.current=D,G.current=n,q.current=!!o.floating}),nt(()=>{n||(L.current=null,M.current=m)},[n,m]);const Q=s!=null,le=A.useMemo(()=>{function me(j){if(!ee.current)return;const R=a.current.indexOf(j);R!==-1&&C.current!==R&&(C.current=R,D())}return{onFocus(j){let{currentTarget:R}=j;W.current=!0,me(R)},onClick:j=>{let{currentTarget:R}=j;return R.focus({preventScroll:!0})},onMouseMove(j){let{currentTarget:R}=j;W.current=!0,J.current=!1,y&&me(R)},onPointerLeave(j){let{pointerType:R}=j;if(!(!$.current||R==="touch")&&(W.current=!0,!!y&&(C.current=-1,D(),!h))){var ne;(ne=V.current)==null||ne.focus({preventScroll:!0})}}}},[ee,V,y,a,D,h]),te=A.useCallback(()=>{var me;return E??(O==null||(me=O.nodesRef.current.find(oe=>oe.id===N))==null||(me=me.context)==null||(me=me.dataRef)==null?void 0:me.current.orientation)},[N,O,E]),fe=kt(me=>{if($.current=!1,W.current=!0,me.which===229||!ee.current&&me.currentTarget===V.current)return;if(p&&Zv(me.key,T,v,I)){Bs(me.key,te())||Gt(me),r(!1,me.nativeEvent,"list-navigation"),Ot(o.domReference)&&(h?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const oe=C.current,j=$u(a,b),R=tv(a,b);if(z||(me.key==="Home"&&(Gt(me),C.current=j,D()),me.key==="End"&&(Gt(me),C.current=R,D())),I>1){const ne=P||Array.from({length:a.current.length},()=>({width:1,height:1})),ce=sA(ne,I,_),xe=ce.findIndex(qe=>qe!=null&&!Is(a,qe,b)),Ce=ce.reduce((qe,pt,ht)=>pt!=null&&!Is(a,pt,b)?ht:qe,-1),_e=ce[aA({current:ce.map(qe=>qe!=null?a.current[qe]:null)},{event:me,orientation:T,loop:f,rtl:v,cols:I,disabledIndices:cA([...(typeof b!="function"?b:null)||a.current.map((qe,pt)=>Is(a,pt,b)?pt:void 0),void 0],ce),minIndex:xe,maxIndex:Ce,prevIndex:lA(C.current>R?j:C.current,ne,ce,I,me.key===Ns?"bl":me.key===(v?Gi:Yi)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(C.current=_e,D()),T==="both")return}if(Bs(me.key,T)){if(Gt(me),n&&!h&&qn(me.currentTarget.ownerDocument)===me.currentTarget){C.current=Qu(me.key,T,v)?j:R,D();return}Qu(me.key,T,v)?f?C.current=oe>=R?d&&oe!==a.current.length?-1:j:Xt(a,{startingIndex:oe,disabledIndices:b}):C.current=Math.min(R,Xt(a,{startingIndex:oe,disabledIndices:b})):f?C.current=oe<=j?d&&oe!==-1?a.current.length:R:Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:b}):C.current=Math.max(j,Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:b})),Wi(a,C.current)&&(C.current=-1),D()}}),pe=A.useMemo(()=>h&&n&&Q&&{"aria-activedescendant":H||X},[h,n,Q,H,X]),ve=A.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:pe,onKeyDown:fe,onPointerMove(){$.current=!0}}),[pe,fe,T,z]),Ae=A.useMemo(()=>{function me(j){m==="auto"&&Jg(j.nativeEvent)&&(M.current=!0)}function oe(j){M.current=m,m==="auto"&&ev(j.nativeEvent)&&(M.current=!0)}return{...pe,onKeyDown(j){$.current=!1;const R=j.key.startsWith("Arrow"),ne=["Home","End"].includes(j.key),ce=R||ne,xe=Kv(j.key,T,v),Ce=Zv(j.key,T,v,I),_e=Kv(j.key,te(),v),qe=Bs(j.key,T),pt=(p?_e:qe)||j.key==="Enter"||j.key.trim()==="";if(h&&n){const U=O?.nodesRef.current.find(Pe=>Pe.parentId==null),Z=O&&U?eA(O.nodesRef.current,U.id):null;if(ce&&Z&&k){const Pe=new KeyboardEvent("keydown",{key:j.key,bubbles:!0});if(xe||Ce){var ht,$t;const Ge=((ht=Z.context)==null?void 0:ht.elements.domReference)===j.currentTarget,Ze=Ce&&!Ge?($t=Z.context)==null?void 0:$t.elements.domReference:xe?a.current.find(Ne=>Ne?.id===X):null;Ze&&(Gt(j),Ze.dispatchEvent(Pe),se(void 0))}if((qe||ne)&&Z.context&&Z.context.open&&Z.parentId&&j.currentTarget!==Z.context.elements.domReference){var $e;Gt(j),($e=Z.context.elements.domReference)==null||$e.dispatchEvent(Pe);return}}return fe(j)}if(!(!n&&!x&&R)){if(pt){const U=Bs(j.key,te());L.current=p&&U?null:j.key}if(p){_e&&(Gt(j),n?(C.current=$u(a,re.current),D()):r(!0,j.nativeEvent,"list-navigation"));return}qe&&(u!=null&&(C.current=u),Gt(j),!n&&x?r(!0,j.nativeEvent,"list-navigation"):fe(j),n&&D())}},onFocus(){n&&!h&&(C.current=-1,D())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:me,onClick:me}},[X,pe,I,fe,re,m,a,p,D,r,n,x,T,te,v,u,O,h,k]);return A.useMemo(()=>c?{reference:Ae,floating:ve,item:le}:{},[c,Ae,ve,le])}const SP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Ki(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var x;return((x=ks(i.floating))==null?void 0:x.id)||a},[i.floating,a]),f=(r=SP.get(l))!=null?r:l,v=Sr()!=null,h=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,v,o,u,l]),m=A.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=A.useCallback(x=>{let{active:b,selected:T}=x;const E={role:"option",...b&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return A.useMemo(()=>s?{reference:h,floating:m,item:y}:{},[s,h,m,y])}const Xv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ro(e,t){return typeof e=="function"?e(t):e}function TP(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 EP(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=TP(n,a);return!c&&s==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{jn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Qv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,f=(u?a:a.close)||0,[p,v]=A.useState(()=>({...Ro(i,c),...Ro(n,c)})),{isMounted:h,status:m}=EP(e,{duration:a}),y=Wt(n),x=Wt(r),b=Wt(o),T=Wt(i);return nt(()=>{const E=Ro(y.current,c),I=Ro(b.current,c),w=Ro(T.current,c),k=Ro(x.current,c)||Object.keys(E).reduce((P,_)=>(P[_]="",P),{});if(m==="initial"&&v(P=>({transitionProperty:P.transitionProperty,...w,...E})),m==="open"&&v({transitionProperty:Object.keys(k).map(Xv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const P=I||E;v({transitionProperty:Object.keys(P).map(Xv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,b,y,x,T,d,m,c]),{isMounted:h,styles:p}}function kP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,v=A.useRef(-1),h=A.useRef(""),m=A.useRef((n=p??a)!=null?n:-1),y=A.useRef(null),x=kt(s),b=kt(l),T=Wt(u),E=Wt(f);nt(()=>{r&&(Yt(v),y.current=null,h.current="")},[r]),nt(()=>{if(r&&h.current===""){var _;m.current=(_=p??a)!=null?_:-1}},[r,p,a]);const I=kt(_=>{_?o.current.typing||(o.current.typing=_,b(_)):o.current.typing&&(o.current.typing=_,b(_))}),w=kt(_=>{function F(z,M,C){const L=T.current?T.current(M,C):M.find($=>$?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return L?z.indexOf(L):-1}const V=i.current;if(h.current.length>0&&h.current[0]!==" "&&(F(V,V,h.current)===-1?I(!1):_.key===" "&&Gt(_)),V==null||E.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Gt(_),I(!0)),V.every(z=>{var M,C;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&h.current===_.key&&(h.current="",m.current=y.current),h.current+=_.key,Yt(v),v.current=window.setTimeout(()=>{h.current="",m.current=y.current,I(!1)},d);const O=m.current,D=F(V,[...V.slice((O||0)+1),...V.slice(0,(O||0)+1)],h.current);D!==-1?(x(D),y.current=D):_.key!==" "&&(h.current="",I(!1))}),k=A.useMemo(()=>({onKeyDown:w}),[w]),P=A.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&I(!1)}}),[w,I]);return A.useMemo(()=>c?{reference:k,floating:P}:{},[c,k,P])}function Jv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Jv(e,o.id,n)])}function ey(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 CP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ty(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),v=p-l;if(a===null||s===null||v===0)return a=d,s=f,l=p,null;const h=d-a,m=f-s,x=Math.sqrt(h*h+m*m)/v;return a=d,s=f,l=p,x}const u=d=>{let{x:f,y:p,placement:v,elements:h,onClose:m,nodeId:y,tree:x}=d;return function(T){function E(){Yt(o),m()}if(Yt(o),!h.domReference||!h.floating||v==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,k=[I,w],P=rP(T),_=T.type==="mouseleave",F=Uu(h.floating,P),V=Uu(h.domReference,P),N=h.domReference.getBoundingClientRect(),O=h.floating.getBoundingClientRect(),D=v.split("-")[0],z=f>O.right-O.width/2,M=p>O.bottom-O.height/2,C=CP(k,N),L=O.width>N.width,$=O.height>N.height,B=(L?N:O).left,q=(L?N:O).right,G=($?N:O).top,W=($?N:O).bottom;if(F&&(i=!0,!_))return;if(V&&(i=!1),V&&!_){i=!0;return}if(_&&tt(T.relatedTarget)&&Uu(h.floating,T.relatedTarget)||x&&Jv(x.nodesRef.current,y).length)return;if(D==="top"&&p>=N.bottom-1||D==="bottom"&&p<=N.top+1||D==="left"&&f>=N.right-1||D==="right"&&f<=N.left+1)return E();let J=[];switch(D){case"top":J=[[B,N.top+1],[B,O.bottom-1],[q,O.bottom-1],[q,N.top+1]];break;case"bottom":J=[[B,O.top+1],[B,N.bottom-1],[q,N.bottom-1],[q,O.top+1]];break;case"left":J=[[O.right-1,W],[O.right-1,G],[N.left+1,G],[N.left+1,W]];break;case"right":J=[[N.right-1,W],[N.right-1,G],[O.left+1,G],[O.left+1,W]];break}function re(ee){let[Y,K]=ee;switch(D){case"top":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K+t+1],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K+t+1],H=[[O.left,z||L?O.bottom-t:O.top],[O.right,z?L?O.bottom-t:O.top:O.bottom-t]];return[X,de,...H]}case"bottom":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K-t],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K-t],H=[[O.left,z||L?O.top+t:O.bottom],[O.right,z?L?O.top+t:O.bottom:O.top+t]];return[X,de,...H]}case"left":{const X=[Y+t+1,$?K+t/2:M?K+t*4:K-t*4],de=[Y+t+1,$?K-t/2:M?K+t*4:K-t*4];return[...[[M||$?O.right-t:O.left,O.top],[M?$?O.right-t:O.left:O.right-t,O.bottom]],X,de]}case"right":{const X=[Y-t,$?K+t/2:M?K+t*4:K-t*4],de=[Y-t,$?K-t/2:M?K+t*4:K-t*4],H=[[M||$?O.left+t:O.right,O.top],[M?$?O.left+t:O.right:O.left+t,O.bottom]];return[X,de,...H]}}}if(!ey([I,w],J)){if(i&&!C)return E();if(!_&&r){const ee=c(T.clientX,T.clientY);if(ee!==null&&ee<.1)return E()}ey([I,w],re([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const ny=200,IP=500,Bo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},ry=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),oy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ju=(e,t)=>{const n=ry(t,oy.basic,e)||ry(t,oy.extend,e);return n===void 0||n===e?void 0:n},Cr=()=>typeof window>"u",ed=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),iy=(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},AP=e=>!e,Ho=()=>{},ay=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},td=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=Ho,followCursor:d=!1,...f},p){const[v,h]=S.useState(n??!1),m=S.useRef(null),y=t||"span",x=O=>{h(O),u?.(O)},{refs:b,floatingStyles:T,context:E}=Gn({placement:i,open:v,whileElementsMounted:Jr,onOpenChange:n?void 0:x,middleware:[Ms(),$o(5),xv(),Bu({padding:5,element:m}),Ds({fallbackAxisSideDirection:"start"})]}),I=kr(E,{enabled:l}),w=fr(E,{role:"tooltip",enabled:l}),k=xP(E,{enabled:l?a:!1}),P=jo(E,{enabled:l?c:!1}),_=gP(E,{enabled:!!l&&!!d}),F=Mv(E,{move:!0,delay:{open:ny},enabled:l?s:!1,handleClose:c?ty():null}),{getReferenceProps:V,getFloatingProps:N}=Yn([w,I,_,a?k:void 0,s?F:void 0,c?P:void 0]);return S.useEffect(()=>h(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(y,{...V(f),ref:sr(b.setReference,p),children:r}),v&&g.jsx(dr,{children:g.jsxs(ln,{...N(),ref:b.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(Hu,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),sy=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>g.jsxs("span",{className:Oe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:g.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[a,e||o?g.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?g.jsx(td,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:g.jsx("span",{className:"cursor-help",children:g.jsx(bu,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?g.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[g.jsx(Cg,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),g.jsx(ZC,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Xi=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:v,componentName:h,placeholder:m,hideLeft:y=!1,required:x,disabled:b,reportStatus:T,hiddenLabel:E},I)=>{const w=Tu(),k=T!==void 0?T:w.input.iconFeedback,P=d??p,_=Pt(),F=e??_.inputOptionalLabel;return g.jsxs("fieldset",{ref:I,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":h,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:P,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:g.jsx(sy,{info:s,hideLeft:y,reportStatus:k,title:v,placeholder:m,children:F||n?g.jsxs(S.Fragment,{children:[x?null:g.jsx("span",{"aria-disabled":b,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:F}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?g.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,a?g.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:a}):null]})]}),g.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),g.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),ly=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:v="text",labelClassName:h,feedback:m=null,hideLeft:y=!1,loading:x,hiddenLabel:b,...T},E)=>{const I=e,w=T.id??T.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const P=k.current,_=Vi(k.current),F=r?.(P),V=N=>{const O=N;if(O.key==="Enter"&&P.enterKeyHint==="next"){const D=P.getAttribute("data-next");if(D){const z=document.getElementById(D);if(z)return z.focus(),void O.preventDefault()}}};return P.addEventListener("keydown",V),()=>{F?.(),_(),P.removeEventListener("keydown",V)}},[]),g.jsx(Xi,{...n,info:i,left:a,error:l,right:c,form:T.form,loading:x,name:T.name,feedback:m,hideLeft:y,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:b,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:h,placeholder:T.placeholder,container:Oe(u,n.container),children:g.jsx(I,{...n,...T,id:w,name:w,type:v,"data-next":s,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:sr(E,k),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),Wo=ly(Sg,"input",{type:"text"}),PP=Io("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"}}),ro=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 g.jsxs(ln,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Oe(PP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),oo=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:f,left:p,error:v,...h},m)=>{const y=Pt(),x=S.useRef(null),b=h.id??h.name;S.useImperativeHandle(m,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const E=new AbortController,I=x.current,w=Vi(x.current);return I.addEventListener("change",()=>I.setAttribute("data-selected","true"),{once:!0,signal:E.signal}),()=>{w(),E.abort()}},[]);const T=()=>x.current?.focus();return g.jsx(Xi,{info:n,left:p,error:v,form:h.form,loading:l,name:h.name,feedback:o,hideLeft:d,required:e,title:h.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:h.name||h.id,optionalText:c,labelClassName:i,placeholder:h.placeholder,right:g.jsxs("label",{htmlFor:b,children:[f,g.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:g.jsxs("select",{...h,id:b,name:b,required:e,ref:sr(m,x),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Oe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[g.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(E=>S.createElement("option",{...E,value:E.value,children:E.label??E.value,key:`${b}-select-option-${E.value}`}))]})})});function In(e){return e?.ownerDocument||document}function OP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
5
5
  `))},[r,n,e]);const{current:c}=A.useRef(t);A.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
6
- `))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||a(c)},[]);return[s,l]}const ly={};function io(e,t){const n=A.useRef(ly);return n.current===ly&&(n.current=e(t)),n}const nd=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],OP=nd&&nd!==A.useLayoutEffect?nd:e=>e();function Ge(e){const t=io(_P).current;return t.next=e,OP(t.effect),t.trampoline}function _P(){const e={next:void 0,callback:MP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function MP(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const St=typeof document<"u"?A.useLayoutEffect:()=>{};function rd(e){const t=io(DP,e).current;return t.next=e,St(t.effect),t}function DP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let od;process.env.NODE_ENV!=="production"&&(od=new Set);function NP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");od.has(t)||(od.add(t),console.warn(`Base UI: ${t}`))}}function In(){}const An=Object.freeze({}),FP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},LP="none",cy="track-press",VP="input-change",$P="focus-out",zP="keyboard",jP="drag";function qo(e,t,n,r){let o=!1,i=!1;const a=r??An;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function uy(e,t,n){const r=An;return{reason:e,event:t??new Event("base-ui"),...r}}function RP(e,t){const n=A.useRef(e),r=Ge(t);St(()=>{n.current!==e&&r(n.current)},[e,r]),St(()=>{n.current=e},[e])}const BP={...A};let dy=0;function HP(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(dy+=1,r(`${t}-${dy}`))},[n,t]),o}const fy=BP.useId;function Ws(e,t){if(fy!==void 0){const n=fy();return e??(t?`${t}-${n}`:n)}return HP(e,t)}function qs(e){return Ws(e,"base-ui")}function Ir(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function id(e,t,n,r){const o=io(py).current;return qP(o,e,t,n,r)&&hy(o,[e,t,n,r]),o.callback}function WP(e){const t=io(py).current;return UP(t,e)&&hy(t,e),t.callback}function py(){return{callback:null,cleanup:null,refs:[]}}function qP(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function UP(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function hy(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const GP=parseInt(A.version,10);function my(e){return GP>=e}function gy(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(my(19)?n?.ref:t.ref)??null}function ad(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function YP(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function KP(e,t){return typeof e=="function"?e(t):e}function ZP(e,t){return typeof e=="function"?e(t):e}const Qi={};function sd(e,t,n,r,o){let i={...ld(e,Qi)};return t&&(i=Us(i,t)),n&&(i=Us(i,n)),r&&(i=Us(i,r)),i}function XP(e){if(e.length===0)return Qi;if(e.length===1)return ld(e[0],Qi);let t={...ld(e[0],Qi)};for(let n=1;n<e.length;n+=1)t=Us(t,e[n]);return t}function Us(e,t){return vy(t)?t(e):QP(e,t)}function QP(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ad(e.style,r);break}case"className":{e[n]=yy(e.className,r);break}default:JP(n,r)?e[n]=eO(e[n],r):e[n]=r}}return e}function JP(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function vy(e){return typeof e=="function"}function ld(e,t){return vy(e)?e(t):e??Qi}function eO(e,t){return t?e?n=>{if(tO(n)){const o=n;cd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function cd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function yy(e,t){return t?e?t+" "+e:t:e}function tO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=nO(t,n);if(n.enabled===!1)return null;const i=n.state??An;return rO(e,r,o,i)}function nO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=An,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?KP(n,i):void 0,d=c?ZP(r,i):void 0,f=c?YP(i,l):An,p=c?ad(f,Array.isArray(s)?XP(s):s)??An:An;return typeof document<"u"&&(c?Array.isArray(a)?p.ref=WP([p.ref,gy(o),...a]):p.ref=id(p.ref,gy(o),a):id(null,null)),c?(u!==void 0&&(p.className=yy(p.className,u)),d!==void 0&&(p.style=ad(p.style,d)),p):An}function rO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=sd(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return oO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Ir(8))}function oO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function Pn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function by(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const Ji=typeof navigator<"u",ud=cO(),iO=dO(),aO=uO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),ud.platform==="MacIntel"&&ud.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(ud.platform);const sO=Ji&&/apple/i.test(navigator.vendor);Ji&&iO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const lO=aO.includes("jsdom/");function cO(){if(!Ji)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function uO(){if(!Ji)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function dO(){if(!Ji)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ar(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function fd(e){return e?.ownerDocument||document}function pd(e){if(!e||lO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}var fO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],hd=fO.join(","),xy=typeof Element>"u",ea=xy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gs=!xy&&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},Ys=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ys(t.parentNode));return a},pO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},hO=function(t,n,r){if(Ys(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(hd));return n&&ea.call(t,hd)&&o.unshift(t),o=o.filter(r),o},md=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ys(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=md(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=ea.call(a,hd);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ys(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=md(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},wy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||pO(t))&&!wy(t)?0:t.tabIndex},mO=function(t,n){var r=Sy(t);return r<0&&n&&!wy(t)?0:r},gO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ty=function(t){return t.tagName==="INPUT"},vO=function(t){return Ty(t)&&t.type==="hidden"},yO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},bO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xO=function(t){if(!t.name)return!0;var n=t.form||Gs(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=bO(o,t.form);return!i||i===t},wO=function(t){return Ty(t)&&t.type==="radio"},SO=function(t){return wO(t)&&!xO(t)},TO=function(t){var n,r=t&&Gs(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=Gs(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},Ey=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},EO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ea.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ea.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Gs(t);if(c&&!c.shadowRoot&&o(c)===!0)return Ey(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(TO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ey(t);return!1},kO=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 ea.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},CO=function(t,n){return!(n.disabled||vO(n)||EO(n,t)||yO(n)||kO(n))},ky=function(t,n){return!(SO(n)||Sy(n)<0||!CO(t,n))},IO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Cy=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=mO(s,a),c=a?Cy(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(gO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Iy=function(t,n){n=n||{};var r;return n.getShadowRoot?r=md([t],n.includeContainer,{filter:ky.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:IO}):r=hO(t,n.includeContainer,ky.bind(null,n)),Cy(r)};const Ay=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Py(e,t){const n=Iy(e,Ay()),r=n.length;if(r===0)return;const o=ao(fd(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function AO(e){return Py(fd(e).body,1)||e}function PO(e){return Py(fd(e).body,-1)||e}function gd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ar(n,r)}function OO(e){Iy(e,Ay()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Oy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const vd=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(vd.displayName="CompositeListContext");function _O(){return A.useContext(vd)}function MO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ge(o),a=A.useRef(0),s=io(NO).current,l=io(DO).current,[c,u]=A.useState(0),d=A.useRef(c),f=Ge((y,x)=>{l.set(y,x??null),d.current+=1,u(d.current)}),p=Ge(y=>{l.delete(y),d.current+=1,u(d.current)}),v=A.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(b=>b.isConnected).sort(FO).forEach((b,E)=>{const T=l.get(b)??{};y.set(b,{...T,index:E})}),y},[l,c]);St(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(x=>{const b=new Set,E=T=>b.has(T)?b.delete(T):b.add(T);x.forEach(T=>{T.removedNodes.forEach(E),T.addedNodes.forEach(E)}),b.size===0&&(d.current+=1,u(d.current))});return v.forEach((x,b)=>{b.parentElement&&y.observe(b.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),St(()=>{d.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),a.current=v.size),i(v)},[i,v,n,r,c]),St(()=>()=>{n.current=[]},[n]),St(()=>()=>{r&&(r.current=[])},[r]);const h=Ge(y=>(s.add(y),()=>{s.delete(y)}));St(()=>{s.forEach(y=>y(v))},[s,v]);const m=A.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:a}),[f,p,h,n,r,a]);return g.jsx(vd.Provider,{value:m,children:t})}function DO(){return new Map}function NO(){return new Set}function FO(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function LO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const _y=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:In,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(_y.displayName="FormContext");function My(){return A.useContext(_y)}const VO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Dy=A.createContext({invalid:void 0,name:void 0,validityData:{state:VO,errors:[],error:"",value:"",initialValue:null},setValidityData:In,disabled:void 0,touched:!1,setTouched:In,dirty:!1,setDirty:In,filled:!1,setFilled:In,focused:!1,setFocused:In,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=An)=>e,getInputValidationProps:(e=An)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Dy.displayName="FieldRootContext");function yd(e=!0){const t=A.useContext(Dy);if(t.setValidityData===In&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Ir(28));return t}function $O(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=My(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=yd(),f=Ge(e.getValue);St(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(v=>({...v,initialValue:p}))},[t,d,n,u.initialValue,f]),St(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:LO(u,l),validate(p=!0){let v=n;v===void 0&&(v=f()),c.current=!0,p?jn.flushSync(()=>a(v)):a(v)}})},[a,i,t,s,f,r,l,c,o,u,n]),St(()=>{const p=s.current.fields;return()=>{r&&p.delete(r)}},[s,r])}const Ny=A.createContext({controlId:void 0,setControlId:In,labelId:void 0,setLabelId:In,messageIds:[],setMessageIds:In,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Ny.displayName="LabelableContext");function Fy(){return A.useContext(Ny)}function Ly(e,t){return e-t}function zO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Ly)}function Vy(e,t,n,r,o,i){let a=e;return a=Pn(a,n,r),o&&(a=zO(i,t,Pn(a,i[t-1]||-1/0,i[t+1]||1/0))),a}function $y(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,a,s)=>(a===s.length-1||o.push(Math.abs(i-s[a+1])),o),[]);return Math.min(...r)>=t*n}const ta={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},bd=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(bd.displayName="SliderRootContext");function Ks(){const e=A.useContext(bd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Ir(62));return e}function jO(e){return"key"in e?zP:VP}function RO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?by(e,t):!1}const zy=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:a=!1,id:s,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:v=0,name:h,onValueChange:m,onValueCommitted:y,orientation:x="horizontal",step:b=1,thumbCollisionBehavior:E="push",thumbAlignment:T="center",value:I,...w}=t,k=qs(s),P=Ge(m),_=Ge(y),{clearErrors:F}=My(),{state:$,disabled:D,name:O,setTouched:N,setDirty:j,validityData:M,shouldValidateOnChange:C,validation:V}=yd(),{labelId:z}=Fy(),R=r??z,W=D||a,U=O??h,[H,ee]=PP({controlled:I,default:i??p,name:"Slider"}),re=A.useRef(null),te=A.useRef(null),G=A.useRef([]),Y=A.useRef(null),Q=A.useRef(null),de=A.useRef(-1),B=A.useRef(null),ae=A.useRef(null),oe=A.useRef("none"),J=rd(l),[se,ne]=A.useState(-1),[fe,pe]=A.useState(-1),[ve,Ae]=A.useState(!1),[me,K]=A.useState(()=>new Map),[L,X]=A.useState([void 0,void 0]),le=Ge($e=>{ne($e),$e!==-1&&pe($e)});$O({id:k,commit:V.commit,value:H,controlRef:te,name:U,getValue:()=>H}),RP(H,()=>{F(U),C()?V.commit(H):V.commit(H,!0);const $e=M.initialValue;let q;Array.isArray(H)&&Array.isArray($e)?q=!by(H,$e):q=H!==$e,j(q)});const ue=Ge($e=>{$e&&(te.current=$e)}),Ee=Array.isArray(H),ke=A.useMemo(()=>Ee?H.slice().sort(Ly):[Pn(H,p,f)],[f,p,Ee,H]),De=Ge(($e,q)=>{if(Number.isNaN($e)||RO($e,H))return;const Z=q??qo(LP,void 0,void 0,{activeThumbIndex:-1});oe.current=Z.reason;const Pe=new event.constructor(event.type,event);Object.defineProperty(Pe,"target",{writable:!0,value:{value:$e,name:U}}),Z.event=Pe,ae.current=$e,P($e,Z),!Z.isCanceled&&ee($e)}),Ke=Ge(($e,q,Z)=>{const Pe=Vy($e,q,p,f,Ee,ke);if($y(Pe,b,v)){const Ue=jO(Z);De(Pe,qo(Ue,Z.nativeEvent,void 0,{activeThumbIndex:q})),N(!0);const Ze=ae.current??Pe;_(Ze,uy(Ue,Z.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&NP("Slider `max` must be greater than `min`."),St(()=>{const $e=ao(Cn(re.current));W&&$e&&re.current?.contains($e)&&$e.blur()},[W]),W&&se!==-1&&le(-1);const pt=A.useMemo(()=>({...$,activeThumbIndex:se,disabled:W,dragging:ve,orientation:x,max:f,min:p,minStepsBetweenValues:v,step:b,values:ke}),[$,se,W,ve,f,p,v,x,b,ke]),ht=A.useMemo(()=>({active:se,controlRef:te,disabled:W,dragging:ve,validation:V,formatOptionsRef:J,handleInputChange:Ke,indicatorPosition:L,inset:T!=="center",labelId:R,largeStep:c,lastUsedThumbIndex:fe,lastChangedValueRef:ae,lastChangeReasonRef:oe,locale:u,max:f,min:p,minStepsBetweenValues:v,name:U,onValueCommitted:_,orientation:x,pressedInputRef:Y,pressedThumbCenterOffsetRef:Q,pressedThumbIndexRef:de,pressedValuesRef:B,registerFieldControlRef:ue,renderBeforeHydration:T==="edge",setActive:le,setDragging:Ae,setIndicatorPosition:X,setValue:De,state:pt,step:b,thumbCollisionBehavior:E,thumbMap:me,thumbRefs:G,values:ke}),[se,te,R,W,ve,V,J,Ke,L,c,fe,ae,oe,u,f,p,v,U,_,x,Y,Q,de,B,ue,le,Ae,X,De,pt,b,E,T,me,G,ke]),$t=an("div",t,{state:pt,ref:[n,re],props:[{"aria-labelledby":R,id:k,role:"group"},V.getValidationProps,w],stateAttributesMapping:ta});return g.jsx(bd.Provider,{value:ht,children:g.jsx(MO,{elementsRef:G,onMapChange:K,children:$t})})});process.env.NODE_ENV!=="production"&&(zy.displayName="SliderRoot");const jy=new Map;function BO(e,t){const n=JSON.stringify({locale:e,options:t}),r=jy.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return jy.set(n,o),o}function Uo(e,t,n){return e==null?"":BO(t,n).format(e)}const HO=[];function xd(e){A.useEffect(e,HO)}const Zs=null;let Ry=globalThis.requestAnimationFrame;class WO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&Ry!==requestAnimationFrame&&(Ry=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Xs=new WO;class wd{static create(){return new wd}static request(t){return Xs.request(t)}static cancel(t){return Xs.cancel(t)}currentId=Zs;request(t){this.cancel(),this.currentId=Xs.request(()=>{this.currentId=Zs,t()})}cancel=()=>{this.currentId!==Zs&&(Xs.cancel(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.cancel}function By(){const e=io(wd.create).current;return xd(e.disposeEffect),e}const Hy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Hy.displayName="DirectionContext");function Wy(){return A.useContext(Hy)?.direction??"ltr"}function qy(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function qO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Uy(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(qO(t)))}function Gy({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:a,initialValues:s}){if(e.length===0)return[];const l=e.slice(),c=i*a,u=l.length-1,d=s??e,f=r+t*c,p=o-(u-t)*c;l[t]=Pn(n,f,p);for(let v=t+1;v<=u;v+=1){const h=l[v-1]+c,m=o-(u-v)*c,y=d[v]??l[v];let x=Math.max(l[v],h);y<x&&(x=Math.max(y,h)),l[v]=Pn(x,h,m)}for(let v=t-1;v>=0;v-=1){const h=l[v+1]-c,m=r+v*c,y=d[v]??l[v];let x=Math.min(l[v],h);y>x&&(x=Math.min(y,h)),l[v]=Pn(x,m,h)}for(let v=0;v<=u;v+=1)l[v]=Number(l[v].toFixed(12));return l}function UO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const v=u[o],h=1e-7,m=u.slice(),y=m[o-1],x=m[o+1],b=y!=null?y+p:a,E=x!=null?x-p:s,T=Pn(i,b,E),I=Number(T.toFixed(12));m[o]=I;const w=i>v,k=i<v,P=w&&x!=null&&i>=x-h,_=k&&y!=null&&i<=y+h;if(!P&&!_)return{value:m,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,$=m.map((j,M)=>{if(M===o)return I;const C=d[M];return C??u[M]});let D=i;P?D=Math.max(i,m[F]):D=Math.min(i,m[F]);const O=Gy({values:m,index:F,nextValue:D,min:a,max:s,step:l,minStepsBetweenValues:c,initialValues:$}),N=P?F-1:F+1;if(N>=0&&N<O.length){const j=O[N-1],M=O[N+1];let C=j!=null?j+p:a;C=Math.max(C,a+N*p);let V=M!=null?M-p:s;V=Math.min(V,s-(O.length-1-N)*p);const z=Pn(I,C,V);O[N]=Number(z.toFixed(12))}return{value:O,thumbIndex:F,didSwap:!0}}case"push":return{value:Gy({values:u,index:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const v=u.slice(),h=v[o-1],m=v[o+1],y=h!=null?h+p:a,x=m!=null?m-p:s,b=Pn(i,y,x);return v[o]=Number(b.toFixed(12)),{value:v,thumbIndex:o,didSwap:!1}}}}const GO=2;function YO(e,t){if(!e)return{start:0,end:0};function n(i){const a=i!=null?parseFloat(i):0;return Number.isNaN(a)?0:a}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Qs(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Yy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:a,dragging:s,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:v,onValueCommitted:h,orientation:m,pressedInputRef:y,pressedThumbCenterOffsetRef:x,pressedThumbIndexRef:b,pressedValuesRef:E,registerFieldControlRef:T,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:P,state:_,step:F,thumbCollisionBehavior:$,thumbRefs:D,values:O}=Ks(),N=Wy(),j=O.length>1,M=m==="vertical",C=A.useRef(null),V=A.useRef(null),z=Ge(J=>{J&&V.current==null&&V.current==null&&(V.current=getComputedStyle(J))}),R=A.useRef(null),W=A.useRef(0),U=A.useRef(0),H=rd(O),ee=Ge(J=>{b.current!==J&&(b.current=J);const se=D.current[J];if(!se){x.current=null,y.current=null;return}y.current=se.querySelector('input[type="range"]')}),re=Ge(J=>{const se=C.current;if(!se)return null;const{width:ne,height:fe,bottom:pe,left:ve,right:Ae}=se.getBoundingClientRect(),me=YO(V.current,M),K=U.current,L=(M?fe:ne)-me.start-me.end-K*2,X=x.current??0,le=J.x-X,ue=J.y-X,Ee=M?pe-ue-me.end:(N==="rtl"?Ae-le:le-ve)-me.start,ke=Pn((Ee-K)/L,0,1);let De=(f-p)*ke+p;if(De=Uy(De,F,p),De=Pn(De,p,f),!j)return{value:De,thumbIndex:0,didSwap:!1};const Ke=b.current;if(Ke<0)return null;const pt=UO({behavior:$,values:O,currentValues:H.current??O,initialValues:E.current,pressedIndex:Ke,nextValue:De,min:p,max:f,step:F,minStepsBetweenValues:v});return $==="swap"&&pt.didSwap?ee(pt.thumbIndex):b.current=pt.thumbIndex,pt}),te=Ge(J=>{E.current=j?O.slice():null,H.current=O;const se=b.current;let ne=se;if(se>-1&&se<O.length){if(O[se]===f){let fe=se;for(;fe>0&&O[fe-1]===f;)fe-=1;ne=fe}}else{const fe=M?"y":"x";let pe;ne=-1;for(let ve=0;ve<D.current.length;ve+=1){const Ae=D.current[ve];if(tt(Ae)){const me=qy(Ae),K=Math.abs(J[fe]-me[fe]);(pe===void 0||K<=pe)&&(ne=ve,pe=K)}}}if(ne>-1&&ne!==se&&ee(ne),c){const fe=D.current[ne];if(tt(fe)){const pe=fe.getBoundingClientRect(),ve=M?"height":"width";U.current=pe[ve]/2}}}),G=Ge(J=>{D.current?.[J]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=Ge(J=>{const se=Qs(J,R);if(se==null)return;if(W.current+=1,J.type==="pointermove"&&J.buttons===0){Q(J);return}const ne=re(se);ne!=null&&$y(ne.value,F,v)&&(!s&&W.current>GO&&k(!0),P(ne.value,qo(jP,J,void 0,{activeThumbIndex:ne.thumbIndex})),H.current=Array.isArray(ne.value)?ne.value:[ne.value],ne.didSwap&&G(ne.thumbIndex))});function Q(J){w(-1),k(!1),y.current=null,x.current=null;const se=Qs(J,R),ne=se!=null?re(se):null;if(ne!=null){const fe=d.current;l.commit(u.current??ne.value),h(u.current??ne.value,uy(fe,J))}"pointerType"in J&&C.current?.hasPointerCapture(J.pointerId)&&C.current?.releasePointerCapture(J.pointerId),b.current=-1,R.current=null,E.current=null,B()}const de=Ge(J=>{if(a)return;const se=J.changedTouches[0];se!=null&&(R.current=se.identifier);const ne=Qs(J,R);if(ne!=null){te(ne);const pe=re(ne);if(pe==null)return;G(pe.thumbIndex),P(pe.value,qo(cy,J,void 0,{activeThumbIndex:pe.thumbIndex})),H.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&G(pe.thumbIndex)}W.current=0;const fe=Cn(C.current);fe.addEventListener("touchmove",Y,{passive:!0}),fe.addEventListener("touchend",Q,{passive:!0})}),B=Ge(()=>{const J=Cn(C.current);J.removeEventListener("pointermove",Y),J.removeEventListener("pointerup",Q),J.removeEventListener("touchmove",Y),J.removeEventListener("touchend",Q),E.current=null}),ae=By();return A.useEffect(()=>{const J=C.current;return J?(J.addEventListener("touchstart",de,{passive:!0}),()=>{J.removeEventListener("touchstart",de),ae.cancel(),B()}):()=>B()},[B,de,C,ae]),A.useEffect(()=>{a&&B()},[a,B]),an("div",t,{state:_,ref:[n,T,C,z],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(J){const se=C.current;if(!se||a||J.defaultPrevented||!tt(J.target)||J.button!==0)return;const ne=Qs(J,R);if(ne!=null){te(ne);const pe=re(ne);if(pe==null)return;Ar(D.current[pe.thumbIndex],ao(Cn(se)))?J.preventDefault():ae.request(()=>{G(pe.thumbIndex)}),k(!0),x.current!=null||(P(pe.value,qo(cy,J.nativeEvent,void 0,{activeThumbIndex:pe.thumbIndex})),H.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&G(pe.thumbIndex))}J.nativeEvent.pointerId&&se.setPointerCapture(J.nativeEvent.pointerId),W.current=0;const fe=Cn(C.current);fe.addEventListener("pointermove",Y,{passive:!0}),fe.addEventListener("pointerup",Q,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Yy.displayName="SliderControl");const Ky=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=Ks();return an("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Ky.displayName="SliderTrack");const Js={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function el(e,t,n){return(e-t)*100/(n-t)}const tl="ArrowUp",nl="ArrowDown",rl="ArrowLeft",ol="ArrowRight",il="Home",al="End",KO=new Set([rl,ol]),ZO=new Set([tl,nl]),XO=new Set([...KO,...ZO]);[...XO];const QO=new Set([tl,nl,rl,ol,il,al]);let JO=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function e_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=_O(),f=A.useRef(-1),[p,v]=A.useState(i??(o===JO.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),h=A.useRef(null),m=A.useCallback(y=>{if(h.current=y,p!==-1&&y!==null&&(c.current[p]=y,u)){const x=t!==void 0;u.current[p]=x?t:r?.current?.textContent??y.textContent}},[p,c,u,t,r]);return St(()=>{if(i!=null)return;const y=h.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),St(()=>{if(i==null)return l(y=>{const x=h.current?y.get(h.current)?.index:null;x!=null&&v(x)})},[i,l,v]),A.useMemo(()=>({ref:m,index:p}),[p,m])}const Zy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Zy.displayName="CSPContext");const t_={disableStyleElements:!1};function n_(){return A.useContext(Zy)??t_}function r_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Fy(),a=qs(t);return St(()=>{if(!(!n&&!t||i===In)){if(n){const s=r?.current;tt(s)&&s.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}let o_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const i_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',Xy="PageUp",Qy="PageDown",a_=new Set([tl,nl,rl,ol,il,al,Xy,Qy]);function s_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Uo(e[t],r,n)} start range`:`${Uo(e[t],r,n)} end range`:n?Uo(e[t],r,n):void 0}function Go(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const Jy=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":a,"aria-label":s,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:v,onBlur:h,onFocus:m,onKeyDown:y,tabIndex:x,...b}=t,{nonce:E}=n_(),T=qs(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:$,inset:D,labelId:O,largeStep:N,locale:j,max:M,min:C,minStepsBetweenValues:V,name:z,orientation:R,pressedInputRef:W,pressedThumbCenterOffsetRef:U,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:re,setIndicatorPosition:te,state:G,step:Y,values:Q}=Ks(),de=Wy(),B=c||P,ae=Q.length>1,oe=R==="vertical",J=de==="rtl",{setTouched:se,setFocused:ne,validationMode:fe}=yd(),pe=A.useRef(null),ve=A.useRef(null),Ae=qs(),me=r_(),K=ae?Ae:me,L=A.useMemo(()=>({inputId:K}),[K]),{ref:X,index:le}=e_({metadata:L}),ue=ae?p??le:0,Ee=ue===Q.length-1,ke=Q[ue],De=el(ke,C,M),[Ke,pt]=A.useState(!1),[ht,$t]=A.useState();xd(()=>pt(!0));const $e=w>=0&&w<Q.length?w:-1,q=Ge(()=>{const ot=k.current,mt=pe.current;if(!ot||!mt)return;const it=mt.getBoundingClientRect(),gn=ot.getBoundingClientRect(),Ur=oe?"height":"width",Gr=gn[Ur]-it[Ur],Mi=(it[Ur]/2+Gr*De/100)/gn[Ur]*100;$t(Mi),ue===0?te(Di=>[Mi,Di[1]]):Ee&&te(Di=>[Di[0],Mi])});St(()=>{D&&queueMicrotask(q)},[q,D]),St(()=>{D&&q()},[q,D,De]);const Z=A.useCallback(()=>{const ot=oe?"bottom":"insetInlineStart",mt=oe?"left":"top";let it;return ae?I===ue?it=2:$e===ue&&(it=1):I===ue&&(it=1),D?{"--position":`${ht}%`,visibility:ee&&!Ke||ht===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[mt]:"50%",translate:`${(oe||!J?-1:1)*50}% ${(oe?1:-1)*50}%`,zIndex:it}:Number.isFinite(De)?{position:"absolute",[ot]:`${De}%`,[mt]:"50%",translate:`${(oe||!J?-1:1)*50}% ${(oe?1:-1)*50}%`,zIndex:it}:Js},[I,ue,D,Ke,ht,ae,ee,J,$e,De,oe]);let Pe;R==="vertical"&&(Pe=J?"vertical-rl":"vertical-lr");const Ue=sd({"aria-label":typeof u=="function"?u(ue):s,"aria-labelledby":l??O,"aria-describedby":a,"aria-orientation":R,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(Uo(ke,j,F.current??void 0),ke,ue):s_(Q,ue,F.current??void 0,j),disabled:B,id:K,max:M,min:C,name:z,onChange(ot){$(ot.target.valueAsNumber,ue,ot)},onFocus(){re(ue),ne(!0)},onBlur(){pe.current&&(re(-1),se(!0),ne(!1),fe==="onBlur"&&_.commit(Vy(ke,ue,C,M,ae,Q)))},onKeyDown(ot){if(!a_.has(ot.key))return;QO.has(ot.key)&&ot.stopPropagation();let mt=null;const it=Uy(ke,Y,C);switch(ot.key){case tl:mt=Go(it,ot.shiftKey?N:Y,1,C,M);break;case ol:mt=Go(it,ot.shiftKey?N:Y,J?-1:1,C,M);break;case nl:mt=Go(it,ot.shiftKey?N:Y,-1,C,M);break;case rl:mt=Go(it,ot.shiftKey?N:Y,J?1:-1,C,M);break;case Xy:mt=Go(it,N,1,C,M);break;case Qy:mt=Go(it,N,-1,C,M);break;case al:mt=M,ae&&(mt=Number.isFinite(Q[ue+1])?Q[ue+1]-Y*V:M);break;case il:mt=C,ae&&(mt=Number.isFinite(Q[ue-1])?Q[ue-1]+Y*V:C);break}mt!==null&&($(mt,ue,ot),ot.preventDefault())},step:Y,style:{...Js,width:"100%",height:"100%",writingMode:Pe},tabIndex:x??void 0,type:"range",value:ke??""},_.getInputValidationProps),Ze=id(ve,_.inputRef,v);return an("div",t,{state:G,ref:[n,X,pe],props:[{[o_.index]:ue,children:g.jsxs(A.Fragment,{children:[o,g.jsx("input",{ref:Ze,...Ue}),D&&!Ke&&ee&&Ee&&g.jsx("script",{nonce:E,dangerouslySetInnerHTML:{__html:i_},suppressHydrationWarning:!0})]}),id:T,onBlur:h,onFocus:m,onPointerDown(ot){if(H.current=ue,pe.current!=null){const mt=R==="horizontal"?"x":"y",it=qy(pe.current),gn=(R==="horizontal"?ot.clientX:ot.clientY)-it[mt];U.current=gn}ve.current!=null&&W.current!==ve.current&&(W.current=ve.current)},style:Z(),suppressHydrationWarning:ee||void 0,tabIndex:-1},b],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Jy.displayName="SliderThumb");function l_(e,t,n,r,o,i){const a=n===void 0||t&&r===void 0?"hidden":void 0,s=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":a,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[s]="var(--start-position)",u[l]="var(--relative-size)",u):(u[s]=0,u[l]="var(--start-position)",u)}function c_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",s={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return s[o]=0,s[i]=`${n}%`,s;const l=r-n;return s[o]=`${n}%`,s[i]=`${l}%`,s}const eb=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:a,inset:s,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Ks(),[v,h]=A.useState(!1);xd(()=>h(!0));const m=u==="vertical",y=p.length>1,x=s?l_(m,y,a[0],a[1],d,v):c_(m,y,el(p[0],c,l),el(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:x,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(eb.displayName="SliderIndicator");const sl=e=>{const t=S.useContext(Kr);if(e)return e;if(t)return t.locale||e},u_=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),g.jsx(td,{title:"",ref:r,as:Jy,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},d_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Bo()),s=r||o||[],l=sl();return g.jsx(zy,{...i,value:o,locale:l,defaultValue:r,children:g.jsxs(Yy,{className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[g.jsx(Ky,{className:"relative h-2 rounded-full grow bg-background",children:g.jsx(eb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(s)?s.map((c,u)=>g.jsx(u_,{tooltip:t??!1},`${a.current}-${u}`)):null]})})},Pr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},f_=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=Pr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=h=>{d.current&&d.current(h)},v=u.current;return v.addEventListener("change",p),()=>v?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return g.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[g.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[g.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),g.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${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:g.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),g.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:g.jsx("span",{className:"font-medium text-foreground",children:e})})]}),g.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),na=S.createContext({});function On(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const tb=typeof window<"u",ll=tb?S.useLayoutEffect:S.useEffect,cl=S.createContext(null);function Sd(e,t){e.indexOf(t)===-1&&e.push(t)}function ra(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function p_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Kn=(e,t,n)=>n>t?t:n<e?e:n;function Td(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yo=()=>{},dn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Yo=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Td(t,n))},dn=(e,t,n)=>{if(!e)throw new Error(Td(t,n))});const pr={},nb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function rb(e){return typeof e=="object"&&e!==null}const ob=e=>/^0[^.\s]+$/u.test(e);function Ed(e){let t;return()=>(t===void 0&&(t=e()),t)}const vn=e=>e,h_=(e,t)=>n=>t(e(n)),oa=(...e)=>e.reduce(h_),Ko=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class kd{constructor(){this.subscriptions=[]}add(t){return Sd(this.subscriptions,t),()=>ra(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 _n=e=>e*1e3,yn=e=>e/1e3;function ib(e,t){return t?e*(1e3/t):0}const ab=new Set;function Cd(e,t,n){e||ab.has(t)||(console.warn(Td(t,n)),ab.add(t))}const m_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},sb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,g_=1e-7,v_=12;function y_(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=sb(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>g_&&++s<v_);return a}function ia(e,t,n,r){if(e===t&&n===r)return vn;const o=i=>y_(i,0,1,e,n);return i=>i===0||i===1?i:sb(o(i),t,r)}const lb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cb=e=>t=>1-e(1-t),ub=ia(.33,1.53,.69,.99),Id=cb(ub),db=lb(Id),fb=e=>(e*=2)<1?.5*Id(e):.5*(2-Math.pow(2,-10*(e-1))),Ad=e=>1-Math.sin(Math.acos(e)),pb=cb(Ad),hb=lb(Ad),b_=ia(.42,0,1,1),x_=ia(0,0,.58,1),mb=ia(.42,0,.58,1),gb=e=>Array.isArray(e)&&typeof e[0]!="number";function vb(e,t){return gb(e)?e[m_(0,e.length,t)]:e}const yb=e=>Array.isArray(e)&&typeof e[0]=="number",bb={linear:vn,easeIn:b_,easeInOut:mb,easeOut:x_,circIn:Ad,circInOut:hb,circOut:pb,backIn:Id,backInOut:db,backOut:ub,anticipate:fb},w_=e=>typeof e=="string",Pd=e=>{if(yb(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return ia(t,n,r,o)}else if(w_(e))return dn(bb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),bb[e];return e},ul=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function S_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const v=f&&o?n:r;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const T_=40;function xb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ul.reduce((b,E)=>(b[E]=S_(i),b),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=a,h=()=>{const b=pr.useManualTiming?o.timestamp:performance.now();n=!1,pr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,T_),1)),o.timestamp=b,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ul.reduce((b,E)=>{const T=a[E];return b[E]=(I,w=!1,k=!1)=>(n||m(),T.schedule(I,w,k)),b},{}),cancel:b=>{for(let E=0;E<ul.length;E++)a[ul[E]].cancel(b)},state:o,steps:a}}const{schedule:gt,cancel:hr,state:Kt,steps:Od}=xb(typeof requestAnimationFrame<"u"?requestAnimationFrame:vn,!0);let dl;function E_(){dl=void 0}const Jt={now:()=>(dl===void 0&&Jt.set(Kt.isProcessing||pr.useManualTiming?Kt.timestamp:performance.now()),dl),set:e=>{dl=e,queueMicrotask(E_)}},wb=e=>t=>typeof t=="string"&&t.startsWith(e),Sb=wb("--"),k_=wb("var(--"),_d=e=>k_(e)?C_.test(e.split("/*")[0].trim()):!1,C_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Tb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},aa={...Zo,transform:e=>Kn(0,1,e)},fl={...Zo,default:1},sa=e=>Math.round(e*1e5)/1e5,Md=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I_(e){return e==null}const A_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dd=(e,t)=>n=>!!(typeof n=="string"&&A_.test(n)&&n.startsWith(e)||t&&!I_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Eb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Md);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},P_=e=>Kn(0,255,e),Nd={...Zo,transform:e=>Math.round(P_(e))},so={test:Dd("rgb","red"),parse:Eb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nd.transform(e)+", "+Nd.transform(t)+", "+Nd.transform(n)+", "+sa(aa.transform(r))+")"};function O_(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 Fd={test:Dd("#"),parse:O_,transform:so.transform},la=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=la("deg"),Zn=la("%"),Se=la("px"),__=la("vh"),M_=la("vw"),kb={...Zn,parse:e=>Zn.parse(e)/100,transform:e=>Zn.transform(e*100)},Xo={test:Dd("hsl","hue"),parse:Eb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zn.transform(sa(t))+", "+Zn.transform(sa(n))+", "+sa(aa.transform(r))+")"},Ft={test:e=>so.test(e)||Fd.test(e)||Xo.test(e),parse:e=>so.test(e)?so.parse(e):Xo.test(e)?Xo.parse(e):Fd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?so.transform(e):Xo.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},D_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function N_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Md)?.length||0)+(e.match(D_)?.length||0)>0}const Cb="number",Ib="color",F_="var",L_="var(",Ab="${}",V_=/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 ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(V_,l=>(Ft.test(l)?(r.color.push(i),o.push(Ib),n.push(Ft.parse(l))):l.startsWith(L_)?(r.var.push(i),o.push(F_),n.push(l)):(r.number.push(i),o.push(Cb),n.push(parseFloat(l))),++i,Ab)).split(Ab);return{values:n,split:s,indexes:r,types:o}}function Pb(e){return ca(e).values}function Ob(e){const{split:t,types:n}=ca(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===Cb?i+=sa(o[a]):s===Ib?i+=Ft.transform(o[a]):i+=o[a]}return i}}const $_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function z_(e){const t=Pb(e);return Ob(e)(t.map($_))}const _r={test:N_,parse:Pb,createTransformer:Ob,getAnimatableNone:z_};function Ld(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 j_({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=Ld(l,s,e+1/3),i=Ld(l,s,e),a=Ld(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function pl(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,Vd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},R_=[Fd,so,Xo],B_=e=>R_.find(t=>t.test(e));function _b(e){const t=B_(e);if(Yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xo&&(n=j_(n)),n}const Mb=(e,t)=>{const n=_b(e),r=_b(t);if(!n||!r)return pl(e,t);const o={...n};return i=>(o.red=Vd(n.red,r.red,i),o.green=Vd(n.green,r.green,i),o.blue=Vd(n.blue,r.blue,i),o.alpha=yt(n.alpha,r.alpha,i),so.transform(o))},$d=new Set(["none","hidden"]);function H_(e,t){return $d.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function W_(e,t){return n=>yt(e,t,n)}function zd(e){return typeof e=="number"?W_:typeof e=="string"?_d(e)?pl:Ft.test(e)?Mb:G_:Array.isArray(e)?Db:typeof e=="object"?Ft.test(e)?Mb:q_:pl}function Db(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>zd(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function q_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=zd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function U_(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 G_=(e,t)=>{const n=_r.createTransformer(t),r=ca(e),o=ca(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?$d.has(e)&&!o.values.length||$d.has(t)&&!r.values.length?H_(e,t):oa(Db(U_(r,o),o.values),n):(Yo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),pl(e,t))};function Nb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):zd(e)(e,t)}const Y_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>gt.update(t,n),stop:()=>hr(t),now:()=>Kt.isProcessing?Kt.timestamp:Jt.now()}},Fb=(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)})`},hl=2e4;function jd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hl;)t+=n,r=e.next(t);return t>=hl?1/0:t}function Lb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jd(r),hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:yn(o)}}const K_=5;function Vb(e,t,n){const r=Math.max(t-K_,0);return ib(n-e(r),t-r)}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Rd=.001;function Z_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;Yo(e<=_n(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kn(Ct.minDamping,Ct.maxDamping,a),e=Kn(Ct.minDuration,Ct.maxDuration,yn(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-n,p=Bd(c,a),v=Math.exp(-d);return Rd-f/p*v},i=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),h=Bd(Math.pow(c,2),a);return(-o(c)+Rd>0?-1:1)*((f-p)*v)/h}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Rd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=Q_(o,i,s);if(e=_n(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const X_=12;function Q_(e,t,n){let r=n;for(let o=1;o<X_;o++)r=r-e(r)/t(r);return r}function Bd(e,t){return e*Math.sqrt(1-t*t)}const J_=["duration","bounce"],eM=["stiffness","damping","mass"];function $b(e,t){return t.some(n=>e[n]!==void 0)}function tM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!$b(e,eM)&&$b(e,J_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=Z_(e);t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ua(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=tM({...n,velocity:-yn(n.velocity||0)}),v=f||0,h=c/(2*Math.sqrt(l*u)),m=a-i,y=yn(Math.sqrt(l/u)),x=Math.abs(m)<5;r||(r=x?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=x?Ct.restDelta.granular:Ct.restDelta.default);let b;if(h<1){const T=Bd(y,h);b=I=>{const w=Math.exp(-h*y*I);return a-w*((v+h*y*m)/T*Math.sin(T*I)+m*Math.cos(T*I))}}else if(h===1)b=T=>a-Math.exp(-y*T)*(m+(v+y*m)*T);else{const T=y*Math.sqrt(h*h-1);b=I=>{const w=Math.exp(-h*y*I),k=Math.min(T*I,300);return a-w*((v+h*y*m)*Math.sinh(k)+T*m*Math.cosh(k))/T}}const E={calculatedDuration:p&&d||null,next:T=>{const I=b(T);if(p)s.done=T>=d;else{let w=T===0?v:0;h<1&&(w=T===0?_n(v):Vb(b,T,I));const k=Math.abs(w)<=r,P=Math.abs(a-I)<=o;s.done=k&&P}return s.value=s.done?a:I,s},toString:()=>{const T=Math.min(jd(E),hl),I=Fb(w=>E.next(T*w).value,T,30);return T+"ms "+I},toTransition:()=>{}};return E}ua.applyToOptions=e=>{const t=Lb(e,100,ua);return e.ease=t.ease,e.duration=_n(t.duration),e.type="keyframes",e};function Hd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,v=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let h=n*t;const m=d+h,y=a===void 0?m:a(m);y!==m&&(h=y-d);const x=k=>-h*Math.exp(-k/r),b=k=>y+x(k),E=k=>{const P=x(k),_=b(k);f.done=Math.abs(P)<=c,f.value=f.done?y:_};let T,I;const w=k=>{p(f.value)&&(T=k,I=ua({keyframes:[f.value,v(f.value)],velocity:Vb(b,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let P=!1;return!I&&T===void 0&&(P=!0,E(k),w(k)),T!==void 0&&k>=T?I.next(k-T):(!P&&E(k),f)}}}function nM(e,t,n){const r=[],o=n||pr.mix||Nb,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]||vn:t;s=oa(l,s)}r.push(s)}return r}function zb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=nM(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Ko(e[d],e[d+1],u);return s[d](f)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function jb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ko(0,t,r);e.push(yt(n,1,o))}}function Rb(e){const t=[0];return jb(t,e.length-1),t}function rM(e,t){return e.map(n=>n*t)}function oM(e,t){return e.map(()=>t||mb).splice(0,e.length-1)}function Qo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=gb(r)?r.map(Pd):Pd(r),i={done:!1,value:t[0]},a=rM(n&&n.length===t.length?n:Rb(t),e),s=zb(a,t,{ease:Array.isArray(o)?o:oM(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const iM=e=>e!==null;function Wd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(iM),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const aM={decay:Hd,inertia:Hd,tween:Qo,keyframes:Qo,spring:ua};function Bb(e){typeof e.type=="string"&&(e.type=aM[e.type])}class qd{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 sM=e=>e/100;class Ud extends qd{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Bb(t);const{type:n=Qo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Qo;process.env.NODE_ENV!=="production"&&l!==Qo&&dn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Qo&&typeof s[0]!="number"&&(this.mixKeyframes=oa(sM,Nb(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=jd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:v,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,E=r;if(d){const k=Math.min(this.currentTime,o)/s;let P=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/s)):f==="mirror"&&(E=a)),b=Kn(0,1,_)*s}const T=x?{done:!1,value:u[0]}:E.next(b);i&&(T.value=i(T.value));let{done:I}=T;!x&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&v!==Hd&&(T.value=Wd(u,this.options,m,this.speed)),h&&h(T.value),w&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return yn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yn(t)}get time(){return yn(this.currentTime)}set time(t){t=_n(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=yn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Y_,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function lM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const lo=e=>e*180/Math.PI,Gd=e=>{const t=lo(Math.atan2(e[1],e[0]));return Yd(t)},cM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,skewX:e=>lo(Math.atan(e[1])),skewY:e=>lo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Yd=e=>(e=e%360,e<0&&(e+=360),e),Hb=Gd,Wb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wb,scaleY:qb,scale:e=>(Wb(e)+qb(e))/2,rotateX:e=>Yd(lo(Math.atan2(e[6],e[5]))),rotateY:e=>Yd(lo(Math.atan2(-e[2],e[0]))),rotateZ:Hb,rotate:Hb,skewX:e=>lo(Math.atan(e[4])),skewY:e=>lo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Kd(e){return e.includes("scale")?1:0}function Zd(e,t){if(!e||e==="none")return Kd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=uM,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=cM,o=s}if(!o)return Kd(t);const i=r[t],a=o[1].split(",").map(fM);return typeof i=="function"?i(a):a[i]}const dM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zd(n,t)};function fM(e){return parseFloat(e.trim())}const Jo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ei=new Set(Jo),Ub=e=>e===Zo||e===Se,pM=new Set(["x","y","z"]),hM=Jo.filter(e=>!pM.has(e));function mM(e){const t=[];return hM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mr={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})=>Zd(t,"x"),y:(e,{transform:t})=>Zd(t,"y")};Mr.translateX=Mr.x,Mr.translateY=Mr.y;const co=new Set;let Xd=!1,Qd=!1,Jd=!1;function Gb(){if(Qd){const e=Array.from(co).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=mM(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)})}Qd=!1,Xd=!1,co.forEach(e=>e.complete(Jd)),co.clear()}function Yb(){co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qd=!0)})}function gM(){Jd=!0,Yb(),Gb(),Jd=!1}class ef{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?(co.add(this),Xd||(Xd=!0,gt.read(Yb),gt.resolveKeyframes(Gb))):(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])}lM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),co.delete(this)}cancel(){this.state==="scheduled"&&(co.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vM=e=>e.startsWith("--");function yM(e,t,n){vM(t)?e.style.setProperty(t,n):e.style[t]=n}const bM=Ed(()=>window.ScrollTimeline!==void 0),xM={};function wM(e,t){const n=Ed(e);return()=>xM[t]??n()}const Kb=wM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),da=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:da([0,.65,.55,1]),circOut:da([.55,0,1,.45]),backIn:da([.31,.01,.66,-.59]),backOut:da([.33,1.53,.69,.99])};function Xb(e,t){if(e)return typeof e=="function"?Kb()?Fb(e,t):"ease-out":yb(e)?da(e):Array.isArray(e)?e.map(n=>Xb(n,t)||Zb.easeOut):Zb[e]}function SM(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=Xb(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function tf(e){return typeof e=="function"&&"applyToOptions"in e}function TM({type:e,...t}){return tf(e)&&Kb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class EM extends qd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,dn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=TM(t);this.animation=SM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Wd(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):yM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return yn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yn(t)}get time(){return yn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_n(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&bM()?(this.animation.timeline=t,vn):n(this)}}const Qb={anticipate:fb,backInOut:db,circInOut:hb};function kM(e){return e in Qb}function CM(e){typeof e.ease=="string"&&kM(e.ease)&&(e.ease=Qb[e.ease])}const nf=10;class IM extends EM{constructor(t){CM(t),Bb(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Ud({...a,autoplay:!1}),l=Math.max(nf,Jt.now()-this.startTime),c=Kn(0,nf,l-nf);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const Jb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_r.test(e)||e==="0")&&!e.startsWith("url("));function AM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function PM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Jb(o,t),s=Jb(i,t);return Yo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:AM(e)||(n==="spring"||tf(n))&&r}function rf(e){e.duration=0,e.type="keyframes"}const OM=new Set(["opacity","clipPath","filter","transform"]),_M=Ed(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return _M()&&n&&OM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const DM=40;class NM extends qd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||ef;this.keyframeResolver=new p(s,(v,h,m)=>this.onKeyframesResolved(v,h,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),PM(t,i,a,s)||((pr.instantAnimations||!l)&&u?.(Wd(t,r,n)),t[0]=t[t.length-1],rf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>DM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&MM(f),v=f.motionValue?.owner?.current,h=p?new IM({...f,element:v}):new Ud(f);h.finished.then(()=>{this.notifyFinished()}).catch(vn),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}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(),gM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class FM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ex(this.animations,"duration")}get iterationDuration(){return ex(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ex(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class LM extends FM{then(t,n){return this.finished.finally(t).then(()=>{})}}function tx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const VM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $M(e){const t=VM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const zM=4;function nx(e,t,n=1){dn(n<=zM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=$M(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return nb(a)?parseFloat(a):a}return _d(o)?nx(o,t,n+1):o}const jM={type:"spring",stiffness:500,damping:25,restSpeed:10},RM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BM={type:"keyframes",duration:.8},HM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WM=(e,{keyframes:t})=>t.length>2?BM:ei.has(e)?e.startsWith("scale")?RM(t[1]):jM:HM,qM=e=>e!==null;function UM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(qM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function of(e,t){return e?.[t]??e?.default??e}function GM({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 af=(e,t,n,r={},o,i)=>a=>{const s=of(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-_n(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};GM(s)||Object.assign(u,WM(e,u)),u.duration&&(u.duration=_n(u.duration)),u.repeatDelay&&(u.repeatDelay=_n(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rf(u),u.delay===0&&(d=!0)),(pr.instantAnimations||pr.skipAnimations)&&(d=!0,rf(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=UM(u.keyframes,s);if(f!==void 0){gt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Ud(u):new NM(u)};function rx(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[o,i]=rx(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]=rx(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ti(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}const ox=new Set(["width","height","top","left","right","bottom",...Jo]),ix=30,YM=e=>!isNaN(parseFloat(e)),fa={current:void 0};class KM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Cd(!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 kd);const r=this.events[t].add(n);return t==="change"?()=>{r(),gt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return fa.current&&fa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ix)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ix);return ib(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 uo(e,t){return new KM(e,t)}const lf=e=>Array.isArray(e);function ZM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function XM(e){return lf(e)?e[e.length-1]||0:e}function QM(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=XM(i[a]);ZM(e,a,s)}}const jt=e=>!!(e&&e.getVelocity);function JM(e){return!!(jt(e)&&e.add)}function cf(e,t){const n=e.getValue("willChange");if(JM(n))return n.add(t);if(!n&&pr.WillChange){const r=new pr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function uf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ax="data-"+uf("framerAppearId");function sx(e){return e.props[ax]}function eD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function df(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),f=s[u];if(f===void 0||c&&eD(c,u))continue;const p={delay:n,...of(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!p.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const y=sx(e);if(y){const x=window.MotionHandoffAnimation(y,u,gt);x!==null&&(p.startTime=x,h=!0)}}cf(e,u),d.start(af(u,d,f,e.shouldReduceMotion&&ox.has(u)?{type:!1}:p,e,h));const m=d.animation;m&&l.push(m)}return a&&Promise.all(l).then(()=>{gt.update(()=>{a&&QM(e,a)})}),l}function ff(e,t,n={}){const r=ti(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(df(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return tD(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when: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 tD(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(ff(l,t,{...a,delay:n+(typeof r=="function"?0:r)+tx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function nD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ff(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ff(e,t,n);else{const o=typeof t=="function"?ti(e,t,n.custom):t;r=Promise.all(df(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rD={test:e=>e==="auto",parse:e=>e},lx=e=>t=>t.test(e),cx=[Zo,Se,Zn,Or,M_,__,rD],ux=e=>cx.find(lx(e));function oD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ob(e):!0}const iD=new Set(["brightness","contrast","saturate","opacity"]);function aD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Md)||[];if(!r)return e;const o=n.replace(r,"");let i=iD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const sD=/\b([a-z-]*)\(.*?\)/gu,pf={..._r,getAnimatableNone:e=>{const t=e.match(sD);return t?t.map(aD).join(" "):e}},dx={...Zo,transform:Math.round},hf={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,inset:Se,insetBlock:Se,insetBlockStart:Se,insetBlockEnd:Se,insetInline:Se,insetInlineStart:Se,insetInlineEnd:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,paddingBlock:Se,paddingBlockStart:Se,paddingBlockEnd:Se,paddingInline:Se,paddingInlineStart:Se,paddingInlineEnd:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,marginBlock:Se,marginBlockStart:Se,marginBlockEnd:Se,marginInline:Se,marginInlineStart:Se,marginInlineEnd:Se,backgroundPositionX:Se,backgroundPositionY:Se,...{rotate:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:fl,scaleX:fl,scaleY:fl,scaleZ:fl,skew:Or,skewX:Or,skewY:Or,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:aa,originX:kb,originY:kb,originZ:Se},zIndex:dx,fillOpacity:aa,strokeOpacity:aa,numOctaves:dx},lD={...hf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:pf,WebkitFilter:pf},fx=e=>lD[e];function px(e,t){let n=fx(e);return n!==pf&&(n=_r),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cD=new Set(["auto","none","0"]);function uD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!cD.has(i)&&ca(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=px(n,o)}class dD extends ef{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),_d(d))){const f=nx(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ox.has(r)||t.length!==2)return;const[o,i]=t,a=ux(o),s=ux(i),l=Tb(o),c=Tb(i);if(l!==c&&Mr[r]){this.needsMeasurement=!0;return}if(a!==s)if(Ub(a)&&Ub(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Mr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||oD(t[o]))&&r.push(o);r.length&&uD(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=Mr[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]=Mr[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 hx(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const mx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mf(e){return rb(e)&&"offsetHeight"in e}const{schedule:gf}=xb(queueMicrotask,!1),Mn={x:!1,y:!1};function gx(){return Mn.x||Mn.y}function fD(e){return e==="x"||e==="y"?Mn[e]?null:(Mn[e]=!0,()=>{Mn[e]=!1}):Mn.x||Mn.y?null:(Mn.x=Mn.y=!0,()=>{Mn.x=Mn.y=!1})}function vx(e,t){const n=hx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function yx(e){return!(e.pointerType==="touch"||gx())}function pD(e,t,n={}){const[r,o,i]=vx(e,n),a=s=>{if(!yx(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{yx(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const bx=(e,t)=>t?e===t?!0:bx(e,t.parentElement):!1,vf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xx(e){return hD.has(e.tagName)||e.isContentEditable===!0}const ml=new WeakSet;function wx(e){return t=>{t.key==="Enter"&&e(t)}}function yf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wx(()=>{if(ml.has(n))return;yf(n,"down");const o=wx(()=>{yf(n,"up")}),i=()=>yf(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 Sx(e){return vf(e)&&!gx()}function gD(e,t,n={}){const[r,o,i]=vx(e,n),a=s=>{const l=s.currentTarget;if(!Sx(s))return;ml.add(l);const c=t(l,s),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ml.has(l)&&ml.delete(l),Sx(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||bx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),mf(s)&&(s.addEventListener("focus",c=>mD(c,o)),!xx(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function bf(e){return rb(e)&&"ownerSVGElement"in e}function Tx(e){return bf(e)&&e.tagName==="svg"}function vD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function yD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:vD(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Pd(r)(l/c)*c}return t+l}}function bD(...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=zb(o,i,a);return t?s(r):s}const xD=[...cx,Ft,_r],wD=e=>xD.find(lx(e)),Ex=()=>({translate:0,scale:1,origin:0,originPoint:0}),ni=()=>({x:Ex(),y:Ex()}),kx=()=>({min:0,max:0}),Lt=()=>({x:kx(),y:kx()}),xf={current:null},Cx={current:!1},SD=typeof window<"u";function TD(){if(Cx.current=!0,!!SD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xf.current=e.matches;e.addEventListener("change",t),t()}else xf.current=!1}const pa=new WeakMap;function gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ha(e){return typeof e=="string"||Array.isArray(e)}const wf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sf=["initial",...wf];function vl(e){return gl(e.animate)||Sf.some(t=>ha(e[t]))}function Ix(e){return!!(vl(e)||e.variants)}function ED(e,t,n){for(const r in t){const o=t[r],i=n[r];if(jt(o))e.addValue(r,o);else if(jt(i))e.addValue(r,uo(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,uo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ax=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yl={};function Px(e){yl=e}function kD(){return yl}class Ox{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=ef,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Jt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,gt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=vl(n),this.isVariantNode=Ix(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&jt(p)&&p.set(l[f])}}mount(t){this.current=t,pa.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Cx.current||TD(),this.shouldReduceMotion=xf.current),process.env.NODE_ENV!=="production"&&Cd(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hr(this.notifyUpdate),hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ei.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&gt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yl){const n=yl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ax.length;r++){const o=Ax[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=ED(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=uo(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"&&(nb(r)||ob(r))?r=parseFloat(r):!wD(r)&&_r.test(n)&&(r=px(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=sf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new kd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){gf.render(this.render)}}class _x extends Ox{constructor(){super(...arguments),this.KeyframeResolver=dD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Mx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ID(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Tf(e){return e===void 0||e===1}function Ef({scale:e,scaleX:t,scaleY:n}){return!Tf(e)||!Tf(t)||!Tf(n)}function fo(e){return Ef(e)||Dx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dx(e){return Nx(e.x)||Nx(e.y)}function Nx(e){return e&&e!=="0%"}function bl(e,t,n){const r=e-n,o=t*r;return n+o}function Fx(e,t,n,r,o){return o!==void 0&&(e=bl(e,o,r)),bl(e,n,r)+t}function kf(e,t=0,n=1,r,o){e.min=Fx(e.min,t,n,r,o),e.max=Fx(e.max,t,n,r,o)}function Lx(e,{x:t,y:n}){kf(e.x,t.translate,t.scale,t.originPoint),kf(e.y,n.translate,n.scale,n.originPoint)}const Vx=.999999999999,$x=1.0000000000001;function AD(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&&oi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Lx(e,a)),r&&fo(i.latestValues)&&oi(e,i.latestValues))}t.x<$x&&t.x>Vx&&(t.x=1),t.y<$x&&t.y>Vx&&(t.y=1)}function ri(e,t){e.min=e.min+t,e.max=e.max+t}function zx(e,t,n,r,o=.5){const i=yt(e.min,e.max,o);kf(e,t,n,i,r)}function oi(e,t){zx(e.x,t.x,t.scaleX,t.scale,t.originX),zx(e.y,t.y,t.scaleY,t.scale,t.originY)}function jx(e,t){return Mx(ID(e.getBoundingClientRect(),t))}function PD(e,t,n){const r=jx(e,n),{scroll:o}=t;return o&&(ri(r.x,o.offset.x),ri(r.y,o.offset.y)),r}const OD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_D=Jo.length;function MD(e,t,n){let r="",o=!0;for(let i=0;i<_D;i++){const a=Jo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=mx(s,hf[a]);if(!l){o=!1;const u=OD[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Cf(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(ei.has(l)){a=!0;continue}else if(Sb(l)){o[l]=c;continue}else{const u=mx(c,hf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=MD(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Rx(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function Bx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ma={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=Bx(e,t.target.x),r=Bx(e,t.target.y);return`${n}% ${r}%`}},DD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_r.parse(e);if(o.length>5)return r;const i=_r.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=yt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},If={borderRadius:{...ma,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ma,borderTopRightRadius:ma,borderBottomLeftRadius:ma,borderBottomRightRadius:ma,boxShadow:DD};function Hx(e,{layout:t,layoutId:n}){return ei.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!If[e]||e==="opacity")}function Af(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(jt(r[a])||o&&jt(o[a])||Hx(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function ND(e){return window.getComputedStyle(e)}class Wx extends _x{constructor(){super(...arguments),this.type="html",this.renderInstance=Rx}readValueFromInstance(t,n){if(ei.has(n))return this.projection?.isProjecting?Kd(n):dM(t,n);{const r=ND(t),o=(Sb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jx(t,n)}build(t,n,r){Cf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Af(t,n,r)}}function FD(e,t){return e in t}class LD extends Ox{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(FD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const VD={offset:"stroke-dashoffset",array:"stroke-dasharray"},$D={offset:"strokeDashoffset",array:"strokeDasharray"};function zD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?VD:$D;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const jD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Cf(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of jD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&zD(d,o,i,a,!1)}const Ux=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"]),Gx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function RD(e,t,n,r){Rx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ux.has(o)?o:uf(o),t.attrs[o])}function Yx(e,t,n){const r=Af(e,t,n);for(const o in e)if(jt(e[o])||jt(t[o])){const i=Jo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class Kx extends _x{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ei.has(n)){const r=fx(n);return r&&r.default||0}return n=Ux.has(n)?n:uf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Yx(t,n,r)}build(t,n,r){qx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){RD(t,n,r,o)}mount(t){this.isSVGTag=Gx(t.tagName),super.mount(t)}}const BD=Sf.length;function Zx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Zx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<BD;n++){const r=Sf[n],o=e.props[r];(ha(o)||o===!1)&&(t[r]=o)}return t}function Xx(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 HD=[...wf].reverse(),WD=wf.length;function qD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nD(e,n,r)))}function UD(e){let t=qD(e),n=Qx(),r=!0;const o=l=>(c,u)=>{const d=ti(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...v}=d;c={...c,...v,...p}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Zx(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let m=0;m<WD;m++){const y=HD[m],x=n[y],b=c[y]!==void 0?c[y]:u[y],E=ha(b),T=y===l?x.isActive:null;T===!1&&(v=m);let I=b===u[y]&&b!==c[y]&&E;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),x.protectedKeys={...p},!x.isActive&&T===null||!b&&!x.prevProp||gl(b)||typeof b=="boolean")continue;const w=GD(x.prevProp,b);let k=w||y===l&&x.isActive&&!I&&E||m>v&&E,P=!1;const _=Array.isArray(b)?b:[b];let F=_.reduce(o(y),{});T===!1&&(F={});const{prevResolvedValues:$={}}=x,D={...$,...F},O=M=>{k=!0,f.has(M)&&(P=!0,f.delete(M)),x.needsAnimating[M]=!0;const C=e.getValue(M);C&&(C.liveStyle=!1)};for(const M in D){const C=F[M],V=$[M];if(p.hasOwnProperty(M))continue;let z=!1;lf(C)&&lf(V)?z=!Xx(C,V):z=C!==V,z?C!=null?O(M):f.add(M):C!==void 0&&f.has(M)?O(M):x.protectedKeys[M]=!0}x.prevProp=b,x.prevResolvedValues=F,x.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(k=!1);const N=I&&w;k&&(!N||P)&&d.push(..._.map(M=>{const C={type:y};if(typeof M=="string"&&r&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,z=ti(V,M);if(V.enteringChildren&&z){const{delayChildren:R}=z.transition||{};C.delay=tx(V.enteringChildren,e,R)}}return{animation:M,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const y=ti(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),m[y]=x??null}),d.push({animation:m})}let h=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?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=Qx()}}}function GD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Xx(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qx(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function Jx(e,t){e.min=t.min,e.max=t.max}function Dn(e,t){Jx(e.x,t.x),Jx(e.y,t.y)}function e0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const t0=1e-4,YD=1-t0,KD=1+t0,n0=.01,ZD=0-n0,XD=0+n0;function en(e){return e.max-e.min}function QD(e,t,n){return Math.abs(e-t)<=n}function r0(e,t,n,r=.5){e.origin=r,e.originPoint=yt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=YD&&e.scale<=KD||isNaN(e.scale))&&(e.scale=1),(e.translate>=ZD&&e.translate<=XD||isNaN(e.translate))&&(e.translate=0)}function ga(e,t,n,r){r0(e.x,t.x,n.x,r?r.originX:void 0),r0(e.y,t.y,n.y,r?r.originY:void 0)}function o0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function JD(e,t,n){o0(e.x,t.x,n.x),o0(e.y,t.y,n.y)}function i0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function xl(e,t,n){i0(e.x,t.x,n.x),i0(e.y,t.y,n.y)}function a0(e,t,n,r,o){return e-=t,e=bl(e,1/n,r),o!==void 0&&(e=bl(e,1/o,r)),e}function eN(e,t=0,n=1,r=.5,o,i=e,a=e){if(Zn.test(t)&&(t=parseFloat(t),t=yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=yt(i.min,i.max,r);e===i&&(s-=t),e.min=a0(e.min,t,n,s,o),e.max=a0(e.max,t,n,s,o)}function s0(e,t,[n,r,o],i,a){eN(e,t[n],t[r],t[o],t.scale,i,a)}const tN=["x","scaleX","originX"],nN=["y","scaleY","originY"];function l0(e,t,n,r){s0(e.x,t,tN,n?n.x:void 0,r?r.x:void 0),s0(e.y,t,nN,n?n.y:void 0,r?r.y:void 0)}function c0(e){return e.translate===0&&e.scale===1}function u0(e){return c0(e.x)&&c0(e.y)}function d0(e,t){return e.min===t.min&&e.max===t.max}function rN(e,t){return d0(e.x,t.x)&&d0(e.y,t.y)}function f0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function p0(e,t){return f0(e.x,t.x)&&f0(e.y,t.y)}function h0(e){return en(e.x)/en(e.y)}function m0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function bn(e){return[e("x"),e("y")]}function oN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const g0=["TopLeft","TopRight","BottomLeft","BottomRight"],iN=g0.length,v0=e=>typeof e=="string"?parseFloat(e):e,y0=e=>typeof e=="number"||Se.test(e);function aN(e,t,n,r,o,i){o?(e.opacity=yt(0,n.opacity??1,sN(r)),e.opacityExit=yt(t.opacity??1,0,lN(r))):i&&(e.opacity=yt(t.opacity??1,n.opacity??1,r));for(let a=0;a<iN;a++){const s=`border${g0[a]}Radius`;let l=b0(t,s),c=b0(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||y0(l)===y0(c)?(e[s]=Math.max(yt(v0(l),v0(c),r),0),(Zn.test(c)||Zn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,r))}function b0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const sN=x0(0,.5,pb),lN=x0(.5,.95,vn);function x0(e,t,n){return r=>r<e?0:r>t?1:n(Ko(e,t,r))}function w0(e,t,n){const r=jt(e)?e:uo(e);return r.start(af("",r,t,n)),r.animation}function va(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cN=(e,t)=>e.depth-t.depth;class uN{constructor(){this.children=[],this.isDirty=!1}add(t){Sd(this.children,t),this.isDirty=!0}remove(t){ra(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cN),this.isDirty=!1,this.children.forEach(t)}}function dN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hr(r),e(i-t))};return gt.setup(r,!0),()=>hr(r)}function wl(e){return jt(e)?e.get():e}class fN{constructor(){this.members=[]}add(t){Sd(this.members,t),t.scheduleRender()}remove(t){if(ra(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pf=["","X","Y","Z"],pN=1e3;let hN=0;function Of(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function S0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&S0(r)}function T0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=hN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vN),this.nodes.forEach(wN),this.nodes.forEach(SN),this.nodes.forEach(yN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new uN)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new kd),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=bf(a)&&!Tx(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{d=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=dN(f,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(C0)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||IN,{onLayoutAnimationStart:h,onLayoutAnimationComplete:m}=c.getProps(),y=!this.targetLayout||!p0(this.targetLayout,p),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...of(v,"layout"),onPlay:h,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else d||C0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hr(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(TN),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&&S0(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(E0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(k0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xN),this.nodes.forEach(mN),this.nodes.forEach(gN)):this.nodes.forEach(k0),this.clearAllSnapshots();const s=Jt.now();Kt.delta=Kn(0,1e3/60,s-Kt.timestamp),Kt.timestamp=s,Kt.isProcessing=!0,Od.update.process(Kt),Od.preRender.process(Kt),Od.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bN),this.sharedNodes.forEach(EN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!u0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||fo(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)),AN(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Lt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(PN))){const{scroll:c}=this.root;c&&(ri(s.x,c.offset.x),ri(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Lt();if(Dn(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&&Dn(s,a),ri(s.x,u.offset.x),ri(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Lt();Dn(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&&oi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&oi(l,u.latestValues)}return fo(this.latestValues)&&oi(l,this.latestValues),l}removeTransform(a){const s=Lt();Dn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Ef(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Dn(u,d),l0(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&l0(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Kt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JD(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Dn(this.target,this.layout.layoutBox),Lx(this.target,this.targetDelta)):Dn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ef(this.parent.latestValues)||Dx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),xl(this.relativeTargetOrigin,s,l),Dn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Dn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;AD(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(e0(this.prevProjectionDelta.x,this.projectionDelta.x),e0(this.prevProjectionDelta.y,this.projectionDelta.y)),ga(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!m0(this.projectionDelta.x,this.prevProjectionDelta.x)||!m0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ni(),this.projectionDelta=ni(),this.projectionDeltaWithTransform=ni()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ni();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Lt(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,h=p!==v,m=this.getStack(),y=!m||m.members.length<=1,x=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(CN));this.animationProgress=0;let b;this.mixTargetDelta=E=>{const T=E/1e3;I0(d.x,a.x,T),I0(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kN(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&rN(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Lt()),Dn(b,this.relativeTarget)),h&&(this.animationValues=u,aN(u,c,this.latestValues,T,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{Sl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=uo(0)),this.currentAnimation=w0(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(pN),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&&M0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Dn(s,l),oi(s,u),ga(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new fN),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&&Of("z",a,c,this.animationValues);for(let u=0;u<Pf.length;u++)Of(`rotate${Pf[u]}`,a,c,this.animationValues),Of(`skew${Pf[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=wl(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=wl(s?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=oN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in If){if(u[v]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:y}=If[v],x=d==="none"?u[v]:h(u[v],c);if(m){const b=m.length;for(let E=0;E<b;E++)a[m[E]]=x}else y?this.options.visualElement.renderState.vars[v]=x:a[v]=x}this.options.layoutId&&(a.pointerEvents=c===this?wl(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(E0),this.root.sharedNodes.clear()}}}function mN(e){e.updateLayout()}function gN(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"?bn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):M0(o,t.layoutBox,n)&&bn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=ni();ga(a,n,t.layoutBox);const s=ni();i?ga(s,e.applyTransform(r,!0),t.measuredBox):ga(s,n,t.layoutBox);const l=!u0(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();xl(p,t.layoutBox,d.layoutBox);const v=Lt();xl(v,n,f.layoutBox),p0(p,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function vN(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 yN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bN(e){e.clearSnapshot()}function E0(e){e.clearMeasurements()}function k0(e){e.isLayoutDirty=!1}function xN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function C0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wN(e){e.resolveTargetDelta()}function SN(e){e.calcProjection()}function TN(e){e.resetSkewAndRotation()}function EN(e){e.removeLeadSnapshot()}function I0(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function A0(e,t,n,r){e.min=yt(t.min,n.min,r),e.max=yt(t.max,n.max,r)}function kN(e,t,n,r){A0(e.x,t.x,n.x,r),A0(e.y,t.y,n.y,r)}function CN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IN={duration:.45,ease:[.4,0,.1,1]},P0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),O0=P0("applewebkit/")&&!P0("chrome/")?Math.round:vn;function _0(e){e.min=O0(e.min),e.max=O0(e.max)}function AN(e){_0(e.x),_0(e.y)}function M0(e,t,n){return e==="position"||e==="preserve-aspect"&&!QD(h0(t),h0(n),.2)}function PN(e){return e!==e.root&&e.scroll?.wasRoot}const ON=T0({attachResizeListener:(e,t)=>va(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),_N=e=>!e.isLayoutDirty&&e.willUpdate(!1);function D0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(_N);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 _f={current:void 0},N0=T0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_f.current){const e=new ON({});e.mount(window),e.setOptions({layoutScroll:!0}),_f.current=e}return _f.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ii=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function F0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function MN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=F0(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():F0(e[o],null)}}}}function DN(...e){return A.useCallback(MN(...e),e)}class NN extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=mf(r)&&r.offsetWidth||0,i=mf(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function FN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=S.useId(),a=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(ii),c=e.props?.ref??e?.ref,u=DN(a,c);return S.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:v,right:h,bottom:m}=s.current;if(t||!a.current||!d||!f)return;const y=n==="left"?`left: ${v}`:`right: ${h}`,x=r==="bottom"?`bottom: ${m}`:`top: ${p}`;a.current.dataset.motionPopId=i;const b=document.createElement("style");l&&(b.nonce=l);const E=o??document.head;return E.appendChild(b),b.sheet&&b.sheet.insertRule(`
6
+ `))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||a(c)},[]);return[s,l]}const cy={};function io(e,t){const n=A.useRef(cy);return n.current===cy&&(n.current=e(t)),n}const nd=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],_P=nd&&nd!==A.useLayoutEffect?nd:e=>e();function Ye(e){const t=io(MP).current;return t.next=e,_P(t.effect),t.trampoline}function MP(){const e={next:void 0,callback:DP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function DP(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const St=typeof document<"u"?A.useLayoutEffect:()=>{};function rd(e){const t=io(NP,e).current;return t.next=e,St(t.effect),t}function NP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let od;process.env.NODE_ENV!=="production"&&(od=new Set);function FP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");od.has(t)||(od.add(t),console.warn(`Base UI: ${t}`))}}function An(){}const Pn=Object.freeze({}),LP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},VP="none",uy="track-press",$P="input-change",zP="focus-out",jP="keyboard",RP="drag";function qo(e,t,n,r){let o=!1,i=!1;const a=r??Pn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function dy(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function BP(e,t){const n=A.useRef(e),r=Ye(t);St(()=>{n.current!==e&&r(n.current)},[e,r]),St(()=>{n.current=e},[e])}const HP={...A};let fy=0;function WP(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(fy+=1,r(`${t}-${fy}`))},[n,t]),o}const py=HP.useId;function Ws(e,t){if(py!==void 0){const n=py();return e??(t?`${t}-${n}`:n)}return WP(e,t)}function qs(e){return Ws(e,"base-ui")}function Ir(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function id(e,t,n,r){const o=io(hy).current;return UP(o,e,t,n,r)&&my(o,[e,t,n,r]),o.callback}function qP(e){const t=io(hy).current;return GP(t,e)&&my(t,e),t.callback}function hy(){return{callback:null,cleanup:null,refs:[]}}function UP(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function GP(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function my(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const YP=parseInt(A.version,10);function gy(e){return YP>=e}function vy(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(gy(19)?n?.ref:t.ref)??null}function ad(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function KP(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function ZP(e,t){return typeof e=="function"?e(t):e}function XP(e,t){return typeof e=="function"?e(t):e}const Qi={};function sd(e,t,n,r,o){let i={...ld(e,Qi)};return t&&(i=Us(i,t)),n&&(i=Us(i,n)),r&&(i=Us(i,r)),i}function QP(e){if(e.length===0)return Qi;if(e.length===1)return ld(e[0],Qi);let t={...ld(e[0],Qi)};for(let n=1;n<e.length;n+=1)t=Us(t,e[n]);return t}function Us(e,t){return yy(t)?t(e):JP(e,t)}function JP(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ad(e.style,r);break}case"className":{e[n]=by(e.className,r);break}default:eO(n,r)?e[n]=tO(e[n],r):e[n]=r}}return e}function eO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function yy(e){return typeof e=="function"}function ld(e,t){return yy(e)?e(t):e??Qi}function tO(e,t){return t?e?n=>{if(nO(n)){const o=n;cd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function cd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function by(e,t){return t?e?t+" "+e:t:e}function nO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=rO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return oO(e,r,o,i)}function rO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?ZP(n,i):void 0,d=c?XP(r,i):void 0,f=c?KP(i,l):Pn,p=c?ad(f,Array.isArray(s)?QP(s):s)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(a)?p.ref=qP([p.ref,vy(o),...a]):p.ref=id(p.ref,vy(o),a):id(null,null)),c?(u!==void 0&&(p.className=by(p.className,u)),d!==void 0&&(p.style=ad(p.style,d)),p):Pn}function oO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=sd(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return iO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Ir(8))}function iO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function On(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function xy(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const Ji=typeof navigator<"u",ud=uO(),aO=fO(),sO=dO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),ud.platform==="MacIntel"&&ud.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(ud.platform);const lO=Ji&&/apple/i.test(navigator.vendor);Ji&&aO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const cO=sO.includes("jsdom/");function uO(){if(!Ji)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function dO(){if(!Ji)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function fO(){if(!Ji)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ar(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function fd(e){return e?.ownerDocument||document}function pd(e){if(!e||cO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}var pO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],hd=pO.join(","),wy=typeof Element>"u",ea=wy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gs=!wy&&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},Ys=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ys(t.parentNode));return a},hO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},mO=function(t,n,r){if(Ys(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(hd));return n&&ea.call(t,hd)&&o.unshift(t),o=o.filter(r),o},md=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ys(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=md(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=ea.call(a,hd);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ys(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=md(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Sy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||hO(t))&&!Sy(t)?0:t.tabIndex},gO=function(t,n){var r=Ty(t);return r<0&&n&&!Sy(t)?0:r},vO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ey=function(t){return t.tagName==="INPUT"},yO=function(t){return Ey(t)&&t.type==="hidden"},bO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},xO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},wO=function(t){if(!t.name)return!0;var n=t.form||Gs(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=xO(o,t.form);return!i||i===t},SO=function(t){return Ey(t)&&t.type==="radio"},TO=function(t){return SO(t)&&!wO(t)},EO=function(t){var n,r=t&&Gs(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=Gs(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},ky=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},kO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ea.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ea.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Gs(t);if(c&&!c.shadowRoot&&o(c)===!0)return ky(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(EO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ky(t);return!1},CO=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 ea.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},IO=function(t,n){return!(n.disabled||yO(n)||kO(n,t)||bO(n)||CO(n))},Cy=function(t,n){return!(TO(n)||Ty(n)<0||!IO(t,n))},AO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Iy=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=gO(s,a),c=a?Iy(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(vO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ay=function(t,n){n=n||{};var r;return n.getShadowRoot?r=md([t],n.includeContainer,{filter:Cy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:AO}):r=mO(t,n.includeContainer,Cy.bind(null,n)),Iy(r)};const Py=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oy(e,t){const n=Ay(e,Py()),r=n.length;if(r===0)return;const o=ao(fd(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function PO(e){return Oy(fd(e).body,1)||e}function OO(e){return Oy(fd(e).body,-1)||e}function gd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ar(n,r)}function _O(e){Ay(e,Py()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function _y(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const vd=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(vd.displayName="CompositeListContext");function MO(){return A.useContext(vd)}function DO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ye(o),a=A.useRef(0),s=io(FO).current,l=io(NO).current,[c,u]=A.useState(0),d=A.useRef(c),f=Ye((y,x)=>{l.set(y,x??null),d.current+=1,u(d.current)}),p=Ye(y=>{l.delete(y),d.current+=1,u(d.current)}),v=A.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(b=>b.isConnected).sort(LO).forEach((b,T)=>{const E=l.get(b)??{};y.set(b,{...E,index:T})}),y},[l,c]);St(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(x=>{const b=new Set,T=E=>b.has(E)?b.delete(E):b.add(E);x.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),b.size===0&&(d.current+=1,u(d.current))});return v.forEach((x,b)=>{b.parentElement&&y.observe(b.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),St(()=>{d.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),a.current=v.size),i(v)},[i,v,n,r,c]),St(()=>()=>{n.current=[]},[n]),St(()=>()=>{r&&(r.current=[])},[r]);const h=Ye(y=>(s.add(y),()=>{s.delete(y)}));St(()=>{s.forEach(y=>y(v))},[s,v]);const m=A.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:a}),[f,p,h,n,r,a]);return g.jsx(vd.Provider,{value:m,children:t})}function NO(){return new Map}function FO(){return new Set}function LO(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function VO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const My=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:An,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(My.displayName="FormContext");function Dy(){return A.useContext(My)}const $O={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ny=A.createContext({invalid:void 0,name:void 0,validityData:{state:$O,errors:[],error:"",value:"",initialValue:null},setValidityData:An,disabled:void 0,touched:!1,setTouched:An,dirty:!1,setDirty:An,filled:!1,setFilled:An,focused:!1,setFocused:An,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ny.displayName="FieldRootContext");function yd(e=!0){const t=A.useContext(Ny);if(t.setValidityData===An&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Ir(28));return t}function zO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=Dy(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=yd(),f=Ye(e.getValue);St(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(v=>({...v,initialValue:p}))},[t,d,n,u.initialValue,f]),St(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:VO(u,l),validate(p=!0){let v=n;v===void 0&&(v=f()),c.current=!0,p?jn.flushSync(()=>a(v)):a(v)}})},[a,i,t,s,f,r,l,c,o,u,n]),St(()=>{const p=s.current.fields;return()=>{r&&p.delete(r)}},[s,r])}const Fy=A.createContext({controlId:void 0,setControlId:An,labelId:void 0,setLabelId:An,messageIds:[],setMessageIds:An,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Fy.displayName="LabelableContext");function Ly(){return A.useContext(Fy)}function Vy(e,t){return e-t}function jO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Vy)}function $y(e,t,n,r,o,i){let a=e;return a=On(a,n,r),o&&(a=jO(i,t,On(a,i[t-1]||-1/0,i[t+1]||1/0))),a}function zy(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,a,s)=>(a===s.length-1||o.push(Math.abs(i-s[a+1])),o),[]);return Math.min(...r)>=t*n}const ta={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},bd=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(bd.displayName="SliderRootContext");function Ks(){const e=A.useContext(bd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Ir(62));return e}function RO(e){return"key"in e?jP:$P}function BO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?xy(e,t):!1}const jy=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:a=!1,id:s,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:v=0,name:h,onValueChange:m,onValueCommitted:y,orientation:x="horizontal",step:b=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,k=qs(s),P=Ye(m),_=Ye(y),{clearErrors:F}=Dy(),{state:V,disabled:N,name:O,setTouched:D,setDirty:z,validityData:M,shouldValidateOnChange:C,validation:L}=yd(),{labelId:$}=Ly(),B=r??$,q=N||a,G=O??h,[W,J]=OP({controlled:I,default:i??p,name:"Slider"}),re=A.useRef(null),ee=A.useRef(null),Y=A.useRef([]),K=A.useRef(null),X=A.useRef(null),de=A.useRef(-1),H=A.useRef(null),se=A.useRef(null),ie=A.useRef("none"),Q=rd(l),[le,te]=A.useState(-1),[fe,pe]=A.useState(-1),[ve,Ae]=A.useState(!1),[me,oe]=A.useState(()=>new Map),[j,R]=A.useState([void 0,void 0]),ne=Ye($e=>{te($e),$e!==-1&&pe($e)});zO({id:k,commit:L.commit,value:W,controlRef:ee,name:G,getValue:()=>W}),BP(W,()=>{F(G),C()?L.commit(W):L.commit(W,!0);const $e=M.initialValue;let U;Array.isArray(W)&&Array.isArray($e)?U=!xy(W,$e):U=W!==$e,z(U)});const ce=Ye($e=>{$e&&(ee.current=$e)}),xe=Array.isArray(W),Ce=A.useMemo(()=>xe?W.slice().sort(Vy):[On(W,p,f)],[f,p,xe,W]),_e=Ye(($e,U)=>{if(Number.isNaN($e)||BO($e,W))return;const Z=U??qo(VP,void 0,void 0,{activeThumbIndex:-1});ie.current=Z.reason;const Pe=new event.constructor(event.type,event);Object.defineProperty(Pe,"target",{writable:!0,value:{value:$e,name:G}}),Z.event=Pe,se.current=$e,P($e,Z),!Z.isCanceled&&J($e)}),qe=Ye(($e,U,Z)=>{const Pe=$y($e,U,p,f,xe,Ce);if(zy(Pe,b,v)){const Ge=RO(Z);_e(Pe,qo(Ge,Z.nativeEvent,void 0,{activeThumbIndex:U})),D(!0);const Ze=se.current??Pe;_(Ze,dy(Ge,Z.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&FP("Slider `max` must be greater than `min`."),St(()=>{const $e=ao(In(re.current));q&&$e&&re.current?.contains($e)&&$e.blur()},[q]),q&&le!==-1&&ne(-1);const pt=A.useMemo(()=>({...V,activeThumbIndex:le,disabled:q,dragging:ve,orientation:x,max:f,min:p,minStepsBetweenValues:v,step:b,values:Ce}),[V,le,q,ve,f,p,v,x,b,Ce]),ht=A.useMemo(()=>({active:le,controlRef:ee,disabled:q,dragging:ve,validation:L,formatOptionsRef:Q,handleInputChange:qe,indicatorPosition:j,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:fe,lastChangedValueRef:se,lastChangeReasonRef:ie,locale:u,max:f,min:p,minStepsBetweenValues:v,name:G,onValueCommitted:_,orientation:x,pressedInputRef:K,pressedThumbCenterOffsetRef:X,pressedThumbIndexRef:de,pressedValuesRef:H,registerFieldControlRef:ce,renderBeforeHydration:E==="edge",setActive:ne,setDragging:Ae,setIndicatorPosition:R,setValue:_e,state:pt,step:b,thumbCollisionBehavior:T,thumbMap:me,thumbRefs:Y,values:Ce}),[le,ee,B,q,ve,L,Q,qe,j,c,fe,se,ie,u,f,p,v,G,_,x,K,X,de,H,ce,ne,Ae,R,_e,pt,b,T,E,me,Y,Ce]),$t=an("div",t,{state:pt,ref:[n,re],props:[{"aria-labelledby":B,id:k,role:"group"},L.getValidationProps,w],stateAttributesMapping:ta});return g.jsx(bd.Provider,{value:ht,children:g.jsx(DO,{elementsRef:Y,onMapChange:oe,children:$t})})});process.env.NODE_ENV!=="production"&&(jy.displayName="SliderRoot");const Ry=new Map;function HO(e,t){const n=JSON.stringify({locale:e,options:t}),r=Ry.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return Ry.set(n,o),o}function Uo(e,t,n){return e==null?"":HO(t,n).format(e)}const WO=[];function xd(e){A.useEffect(e,WO)}const Zs=null;let By=globalThis.requestAnimationFrame;class qO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&By!==requestAnimationFrame&&(By=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Xs=new qO;class wd{static create(){return new wd}static request(t){return Xs.request(t)}static cancel(t){return Xs.cancel(t)}currentId=Zs;request(t){this.cancel(),this.currentId=Xs.request(()=>{this.currentId=Zs,t()})}cancel=()=>{this.currentId!==Zs&&(Xs.cancel(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.cancel}function Hy(){const e=io(wd.create).current;return xd(e.disposeEffect),e}const Wy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Wy.displayName="DirectionContext");function qy(){return A.useContext(Wy)?.direction??"ltr"}function Uy(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function UO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Gy(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(UO(t)))}function Yy({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:a,initialValues:s}){if(e.length===0)return[];const l=e.slice(),c=i*a,u=l.length-1,d=s??e,f=r+t*c,p=o-(u-t)*c;l[t]=On(n,f,p);for(let v=t+1;v<=u;v+=1){const h=l[v-1]+c,m=o-(u-v)*c,y=d[v]??l[v];let x=Math.max(l[v],h);y<x&&(x=Math.max(y,h)),l[v]=On(x,h,m)}for(let v=t-1;v>=0;v-=1){const h=l[v+1]-c,m=r+v*c,y=d[v]??l[v];let x=Math.min(l[v],h);y>x&&(x=Math.min(y,h)),l[v]=On(x,m,h)}for(let v=0;v<=u;v+=1)l[v]=Number(l[v].toFixed(12));return l}function GO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const v=u[o],h=1e-7,m=u.slice(),y=m[o-1],x=m[o+1],b=y!=null?y+p:a,T=x!=null?x-p:s,E=On(i,b,T),I=Number(E.toFixed(12));m[o]=I;const w=i>v,k=i<v,P=w&&x!=null&&i>=x-h,_=k&&y!=null&&i<=y+h;if(!P&&!_)return{value:m,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,V=m.map((z,M)=>{if(M===o)return I;const C=d[M];return C??u[M]});let N=i;P?N=Math.max(i,m[F]):N=Math.min(i,m[F]);const O=Yy({values:m,index:F,nextValue:N,min:a,max:s,step:l,minStepsBetweenValues:c,initialValues:V}),D=P?F-1:F+1;if(D>=0&&D<O.length){const z=O[D-1],M=O[D+1];let C=z!=null?z+p:a;C=Math.max(C,a+D*p);let L=M!=null?M-p:s;L=Math.min(L,s-(O.length-1-D)*p);const $=On(I,C,L);O[D]=Number($.toFixed(12))}return{value:O,thumbIndex:F,didSwap:!0}}case"push":return{value:Yy({values:u,index:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const v=u.slice(),h=v[o-1],m=v[o+1],y=h!=null?h+p:a,x=m!=null?m-p:s,b=On(i,y,x);return v[o]=Number(b.toFixed(12)),{value:v,thumbIndex:o,didSwap:!1}}}}const YO=2;function KO(e,t){if(!e)return{start:0,end:0};function n(i){const a=i!=null?parseFloat(i):0;return Number.isNaN(a)?0:a}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Qs(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Ky=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:a,dragging:s,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:v,onValueCommitted:h,orientation:m,pressedInputRef:y,pressedThumbCenterOffsetRef:x,pressedThumbIndexRef:b,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:P,state:_,step:F,thumbCollisionBehavior:V,thumbRefs:N,values:O}=Ks(),D=qy(),z=O.length>1,M=m==="vertical",C=A.useRef(null),L=A.useRef(null),$=Ye(Q=>{Q&&L.current==null&&L.current==null&&(L.current=getComputedStyle(Q))}),B=A.useRef(null),q=A.useRef(0),G=A.useRef(0),W=rd(O),J=Ye(Q=>{b.current!==Q&&(b.current=Q);const le=N.current[Q];if(!le){x.current=null,y.current=null;return}y.current=le.querySelector('input[type="range"]')}),re=Ye(Q=>{const le=C.current;if(!le)return null;const{width:te,height:fe,bottom:pe,left:ve,right:Ae}=le.getBoundingClientRect(),me=KO(L.current,M),oe=G.current,j=(M?fe:te)-me.start-me.end-oe*2,R=x.current??0,ne=Q.x-R,ce=Q.y-R,xe=M?pe-ce-me.end:(D==="rtl"?Ae-ne:ne-ve)-me.start,Ce=On((xe-oe)/j,0,1);let _e=(f-p)*Ce+p;if(_e=Gy(_e,F,p),_e=On(_e,p,f),!z)return{value:_e,thumbIndex:0,didSwap:!1};const qe=b.current;if(qe<0)return null;const pt=GO({behavior:V,values:O,currentValues:W.current??O,initialValues:T.current,pressedIndex:qe,nextValue:_e,min:p,max:f,step:F,minStepsBetweenValues:v});return V==="swap"&&pt.didSwap?J(pt.thumbIndex):b.current=pt.thumbIndex,pt}),ee=Ye(Q=>{T.current=z?O.slice():null,W.current=O;const le=b.current;let te=le;if(le>-1&&le<O.length){if(O[le]===f){let fe=le;for(;fe>0&&O[fe-1]===f;)fe-=1;te=fe}}else{const fe=M?"y":"x";let pe;te=-1;for(let ve=0;ve<N.current.length;ve+=1){const Ae=N.current[ve];if(tt(Ae)){const me=Uy(Ae),oe=Math.abs(Q[fe]-me[fe]);(pe===void 0||oe<=pe)&&(te=ve,pe=oe)}}}if(te>-1&&te!==le&&J(te),c){const fe=N.current[te];if(tt(fe)){const pe=fe.getBoundingClientRect(),ve=M?"height":"width";G.current=pe[ve]/2}}}),Y=Ye(Q=>{N.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),K=Ye(Q=>{const le=Qs(Q,B);if(le==null)return;if(q.current+=1,Q.type==="pointermove"&&Q.buttons===0){X(Q);return}const te=re(le);te!=null&&zy(te.value,F,v)&&(!s&&q.current>YO&&k(!0),P(te.value,qo(RP,Q,void 0,{activeThumbIndex:te.thumbIndex})),W.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&Y(te.thumbIndex))});function X(Q){w(-1),k(!1),y.current=null,x.current=null;const le=Qs(Q,B),te=le!=null?re(le):null;if(te!=null){const fe=d.current;l.commit(u.current??te.value),h(u.current??te.value,dy(fe,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),b.current=-1,B.current=null,T.current=null,H()}const de=Ye(Q=>{if(a)return;const le=Q.changedTouches[0];le!=null&&(B.current=le.identifier);const te=Qs(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Y(pe.thumbIndex),P(pe.value,qo(uy,Q,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex)}q.current=0;const fe=In(C.current);fe.addEventListener("touchmove",K,{passive:!0}),fe.addEventListener("touchend",X,{passive:!0})}),H=Ye(()=>{const Q=In(C.current);Q.removeEventListener("pointermove",K),Q.removeEventListener("pointerup",X),Q.removeEventListener("touchmove",K),Q.removeEventListener("touchend",X),T.current=null}),se=Hy();return A.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",de,{passive:!0}),()=>{Q.removeEventListener("touchstart",de),se.cancel(),H()}):()=>H()},[H,de,C,se]),A.useEffect(()=>{a&&H()},[a,H]),an("div",t,{state:_,ref:[n,E,C,$],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const le=C.current;if(!le||a||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const te=Qs(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Ar(N.current[pe.thumbIndex],ao(In(le)))?Q.preventDefault():se.request(()=>{Y(pe.thumbIndex)}),k(!0),x.current!=null||(P(pe.value,qo(uy,Q.nativeEvent,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex))}Q.nativeEvent.pointerId&&le.setPointerCapture(Q.nativeEvent.pointerId),q.current=0;const fe=In(C.current);fe.addEventListener("pointermove",K,{passive:!0}),fe.addEventListener("pointerup",X,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Ky.displayName="SliderControl");const Zy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=Ks();return an("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Zy.displayName="SliderTrack");const Js={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function el(e,t,n){return(e-t)*100/(n-t)}const tl="ArrowUp",nl="ArrowDown",rl="ArrowLeft",ol="ArrowRight",il="Home",al="End",ZO=new Set([rl,ol]),XO=new Set([tl,nl]),QO=new Set([...ZO,...XO]);[...QO];const JO=new Set([tl,nl,rl,ol,il,al]);let e_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function t_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=MO(),f=A.useRef(-1),[p,v]=A.useState(i??(o===e_.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),h=A.useRef(null),m=A.useCallback(y=>{if(h.current=y,p!==-1&&y!==null&&(c.current[p]=y,u)){const x=t!==void 0;u.current[p]=x?t:r?.current?.textContent??y.textContent}},[p,c,u,t,r]);return St(()=>{if(i!=null)return;const y=h.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),St(()=>{if(i==null)return l(y=>{const x=h.current?y.get(h.current)?.index:null;x!=null&&v(x)})},[i,l,v]),A.useMemo(()=>({ref:m,index:p}),[p,m])}const Xy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xy.displayName="CSPContext");const n_={disableStyleElements:!1};function r_(){return A.useContext(Xy)??n_}function o_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Ly(),a=qs(t);return St(()=>{if(!(!n&&!t||i===An)){if(n){const s=r?.current;tt(s)&&s.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}let i_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const a_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',Qy="PageUp",Jy="PageDown",s_=new Set([tl,nl,rl,ol,il,al,Qy,Jy]);function l_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Uo(e[t],r,n)} start range`:`${Uo(e[t],r,n)} end range`:n?Uo(e[t],r,n):void 0}function Go(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const eb=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":a,"aria-label":s,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:v,onBlur:h,onFocus:m,onKeyDown:y,tabIndex:x,...b}=t,{nonce:T}=r_(),E=qs(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:V,inset:N,labelId:O,largeStep:D,locale:z,max:M,min:C,minStepsBetweenValues:L,name:$,orientation:B,pressedInputRef:q,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:W,renderBeforeHydration:J,setActive:re,setIndicatorPosition:ee,state:Y,step:K,values:X}=Ks(),de=qy(),H=c||P,se=X.length>1,ie=B==="vertical",Q=de==="rtl",{setTouched:le,setFocused:te,validationMode:fe}=yd(),pe=A.useRef(null),ve=A.useRef(null),Ae=qs(),me=o_(),oe=se?Ae:me,j=A.useMemo(()=>({inputId:oe}),[oe]),{ref:R,index:ne}=t_({metadata:j}),ce=se?p??ne:0,xe=ce===X.length-1,Ce=X[ce],_e=el(Ce,C,M),[qe,pt]=A.useState(!1),[ht,$t]=A.useState();xd(()=>pt(!0));const $e=w>=0&&w<X.length?w:-1,U=Ye(()=>{const ot=k.current,mt=pe.current;if(!ot||!mt)return;const it=mt.getBoundingClientRect(),vn=ot.getBoundingClientRect(),Ur=ie?"height":"width",Gr=vn[Ur]-it[Ur],Mi=(it[Ur]/2+Gr*_e/100)/vn[Ur]*100;$t(Mi),ce===0?ee(Di=>[Mi,Di[1]]):xe&&ee(Di=>[Di[0],Mi])});St(()=>{N&&queueMicrotask(U)},[U,N]),St(()=>{N&&U()},[U,N,_e]);const Z=A.useCallback(()=>{const ot=ie?"bottom":"insetInlineStart",mt=ie?"left":"top";let it;return se?I===ce?it=2:$e===ce&&(it=1):I===ce&&(it=1),N?{"--position":`${ht}%`,visibility:J&&!qe||ht===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[mt]:"50%",translate:`${(ie||!Q?-1:1)*50}% ${(ie?1:-1)*50}%`,zIndex:it}:Number.isFinite(_e)?{position:"absolute",[ot]:`${_e}%`,[mt]:"50%",translate:`${(ie||!Q?-1:1)*50}% ${(ie?1:-1)*50}%`,zIndex:it}:Js},[I,ce,N,qe,ht,se,J,Q,$e,_e,ie]);let Pe;B==="vertical"&&(Pe=Q?"vertical-rl":"vertical-lr");const Ge=sd({"aria-label":typeof u=="function"?u(ce):s,"aria-labelledby":l??O,"aria-describedby":a,"aria-orientation":B,"aria-valuenow":Ce,"aria-valuetext":typeof d=="function"?d(Uo(Ce,z,F.current??void 0),Ce,ce):l_(X,ce,F.current??void 0,z),disabled:H,id:oe,max:M,min:C,name:$,onChange(ot){V(ot.target.valueAsNumber,ce,ot)},onFocus(){re(ce),te(!0)},onBlur(){pe.current&&(re(-1),le(!0),te(!1),fe==="onBlur"&&_.commit($y(Ce,ce,C,M,se,X)))},onKeyDown(ot){if(!s_.has(ot.key))return;JO.has(ot.key)&&ot.stopPropagation();let mt=null;const it=Gy(Ce,K,C);switch(ot.key){case tl:mt=Go(it,ot.shiftKey?D:K,1,C,M);break;case ol:mt=Go(it,ot.shiftKey?D:K,Q?-1:1,C,M);break;case nl:mt=Go(it,ot.shiftKey?D:K,-1,C,M);break;case rl:mt=Go(it,ot.shiftKey?D:K,Q?1:-1,C,M);break;case Qy:mt=Go(it,D,1,C,M);break;case Jy:mt=Go(it,D,-1,C,M);break;case al:mt=M,se&&(mt=Number.isFinite(X[ce+1])?X[ce+1]-K*L:M);break;case il:mt=C,se&&(mt=Number.isFinite(X[ce-1])?X[ce-1]+K*L:C);break}mt!==null&&(V(mt,ce,ot),ot.preventDefault())},step:K,style:{...Js,width:"100%",height:"100%",writingMode:Pe},tabIndex:x??void 0,type:"range",value:Ce??""},_.getInputValidationProps),Ze=id(ve,_.inputRef,v);return an("div",t,{state:Y,ref:[n,R,pe],props:[{[i_.index]:ce,children:g.jsxs(A.Fragment,{children:[o,g.jsx("input",{ref:Ze,...Ge}),N&&!qe&&J&&xe&&g.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:a_},suppressHydrationWarning:!0})]}),id:E,onBlur:h,onFocus:m,onPointerDown(ot){if(W.current=ce,pe.current!=null){const mt=B==="horizontal"?"x":"y",it=Uy(pe.current),vn=(B==="horizontal"?ot.clientX:ot.clientY)-it[mt];G.current=vn}ve.current!=null&&q.current!==ve.current&&(q.current=ve.current)},style:Z(),suppressHydrationWarning:J||void 0,tabIndex:-1},b],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(eb.displayName="SliderThumb");function c_(e,t,n,r,o,i){const a=n===void 0||t&&r===void 0?"hidden":void 0,s=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":a,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[s]="var(--start-position)",u[l]="var(--relative-size)",u):(u[s]=0,u[l]="var(--start-position)",u)}function u_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",s={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return s[o]=0,s[i]=`${n}%`,s;const l=r-n;return s[o]=`${n}%`,s[i]=`${l}%`,s}const tb=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:a,inset:s,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Ks(),[v,h]=A.useState(!1);xd(()=>h(!0));const m=u==="vertical",y=p.length>1,x=s?c_(m,y,a[0],a[1],d,v):u_(m,y,el(p[0],c,l),el(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:x,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(tb.displayName="SliderIndicator");const sl=e=>{const t=S.useContext(Kr);if(e)return e;if(t)return t.locale||e},d_=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),g.jsx(td,{title:"",ref:r,as:eb,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},f_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Bo()),s=r||o||[],l=sl();return g.jsx(jy,{...i,value:o,locale:l,defaultValue:r,children:g.jsxs(Ky,{className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[g.jsx(Zy,{className:"relative h-2 rounded-full grow bg-background",children:g.jsx(tb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(s)?s.map((c,u)=>g.jsx(d_,{tooltip:t??!1},`${a.current}-${u}`)):null]})})},Pr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},p_=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=Pr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=h=>{d.current&&d.current(h)},v=u.current;return v.addEventListener("change",p),()=>v?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return g.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[g.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[g.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),g.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${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:g.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),g.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:g.jsx("span",{className:"font-medium text-foreground",children:e})})]}),g.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),na=S.createContext({});function _n(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const nb=typeof window<"u",ll=nb?S.useLayoutEffect:S.useEffect,cl=S.createContext(null);function Sd(e,t){e.indexOf(t)===-1&&e.push(t)}function ra(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function h_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Kn=(e,t,n)=>n>t?t:n<e?e:n;function Td(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yo=()=>{},dn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Yo=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Td(t,n))},dn=(e,t,n)=>{if(!e)throw new Error(Td(t,n))});const pr={},rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ob(e){return typeof e=="object"&&e!==null}const ib=e=>/^0[^.\s]+$/u.test(e);function Ed(e){let t;return()=>(t===void 0&&(t=e()),t)}const yn=e=>e,m_=(e,t)=>n=>t(e(n)),oa=(...e)=>e.reduce(m_),Ko=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class kd{constructor(){this.subscriptions=[]}add(t){return Sd(this.subscriptions,t),()=>ra(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mn=e=>e*1e3,bn=e=>e/1e3;function ab(e,t){return t?e*(1e3/t):0}const sb=new Set;function Cd(e,t,n){e||sb.has(t)||(console.warn(Td(t,n)),sb.add(t))}const g_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},lb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,v_=1e-7,y_=12;function b_(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=lb(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>v_&&++s<y_);return a}function ia(e,t,n,r){if(e===t&&n===r)return yn;const o=i=>b_(i,0,1,e,n);return i=>i===0||i===1?i:lb(o(i),t,r)}const cb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ub=e=>t=>1-e(1-t),db=ia(.33,1.53,.69,.99),Id=ub(db),fb=cb(Id),pb=e=>(e*=2)<1?.5*Id(e):.5*(2-Math.pow(2,-10*(e-1))),Ad=e=>1-Math.sin(Math.acos(e)),hb=ub(Ad),mb=cb(Ad),x_=ia(.42,0,1,1),w_=ia(0,0,.58,1),gb=ia(.42,0,.58,1),vb=e=>Array.isArray(e)&&typeof e[0]!="number";function yb(e,t){return vb(e)?e[g_(0,e.length,t)]:e}const bb=e=>Array.isArray(e)&&typeof e[0]=="number",xb={linear:yn,easeIn:x_,easeInOut:gb,easeOut:w_,circIn:Ad,circInOut:mb,circOut:hb,backIn:Id,backInOut:fb,backOut:db,anticipate:pb},S_=e=>typeof e=="string",Pd=e=>{if(bb(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return ia(t,n,r,o)}else if(S_(e))return dn(xb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),xb[e];return e},ul=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function T_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const v=f&&o?n:r;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const E_=40;function wb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ul.reduce((b,T)=>(b[T]=T_(i),b),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=a,h=()=>{const b=pr.useManualTiming?o.timestamp:performance.now();n=!1,pr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,E_),1)),o.timestamp=b,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ul.reduce((b,T)=>{const E=a[T];return b[T]=(I,w=!1,k=!1)=>(n||m(),E.schedule(I,w,k)),b},{}),cancel:b=>{for(let T=0;T<ul.length;T++)a[ul[T]].cancel(b)},state:o,steps:a}}const{schedule:gt,cancel:hr,state:Kt,steps:Od}=wb(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0);let dl;function k_(){dl=void 0}const Jt={now:()=>(dl===void 0&&Jt.set(Kt.isProcessing||pr.useManualTiming?Kt.timestamp:performance.now()),dl),set:e=>{dl=e,queueMicrotask(k_)}},Sb=e=>t=>typeof t=="string"&&t.startsWith(e),Tb=Sb("--"),C_=Sb("var(--"),_d=e=>C_(e)?I_.test(e.split("/*")[0].trim()):!1,I_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Eb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},aa={...Zo,transform:e=>Kn(0,1,e)},fl={...Zo,default:1},sa=e=>Math.round(e*1e5)/1e5,Md=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function A_(e){return e==null}const P_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dd=(e,t)=>n=>!!(typeof n=="string"&&P_.test(n)&&n.startsWith(e)||t&&!A_(n)&&Object.prototype.hasOwnProperty.call(n,t)),kb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Md);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},O_=e=>Kn(0,255,e),Nd={...Zo,transform:e=>Math.round(O_(e))},so={test:Dd("rgb","red"),parse:kb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nd.transform(e)+", "+Nd.transform(t)+", "+Nd.transform(n)+", "+sa(aa.transform(r))+")"};function __(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 Fd={test:Dd("#"),parse:__,transform:so.transform},la=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=la("deg"),Zn=la("%"),Te=la("px"),M_=la("vh"),D_=la("vw"),Cb={...Zn,parse:e=>Zn.parse(e)/100,transform:e=>Zn.transform(e*100)},Xo={test:Dd("hsl","hue"),parse:kb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zn.transform(sa(t))+", "+Zn.transform(sa(n))+", "+sa(aa.transform(r))+")"},Ft={test:e=>so.test(e)||Fd.test(e)||Xo.test(e),parse:e=>so.test(e)?so.parse(e):Xo.test(e)?Xo.parse(e):Fd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?so.transform(e):Xo.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},N_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function F_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Md)?.length||0)+(e.match(N_)?.length||0)>0}const Ib="number",Ab="color",L_="var",V_="var(",Pb="${}",$_=/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 ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace($_,l=>(Ft.test(l)?(r.color.push(i),o.push(Ab),n.push(Ft.parse(l))):l.startsWith(V_)?(r.var.push(i),o.push(L_),n.push(l)):(r.number.push(i),o.push(Ib),n.push(parseFloat(l))),++i,Pb)).split(Pb);return{values:n,split:s,indexes:r,types:o}}function Ob(e){return ca(e).values}function _b(e){const{split:t,types:n}=ca(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===Ib?i+=sa(o[a]):s===Ab?i+=Ft.transform(o[a]):i+=o[a]}return i}}const z_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function j_(e){const t=Ob(e);return _b(e)(t.map(z_))}const _r={test:F_,parse:Ob,createTransformer:_b,getAnimatableNone:j_};function Ld(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 R_({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=Ld(l,s,e+1/3),i=Ld(l,s,e),a=Ld(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function pl(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,Vd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},B_=[Fd,so,Xo],H_=e=>B_.find(t=>t.test(e));function Mb(e){const t=H_(e);if(Yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xo&&(n=R_(n)),n}const Db=(e,t)=>{const n=Mb(e),r=Mb(t);if(!n||!r)return pl(e,t);const o={...n};return i=>(o.red=Vd(n.red,r.red,i),o.green=Vd(n.green,r.green,i),o.blue=Vd(n.blue,r.blue,i),o.alpha=yt(n.alpha,r.alpha,i),so.transform(o))},$d=new Set(["none","hidden"]);function W_(e,t){return $d.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function q_(e,t){return n=>yt(e,t,n)}function zd(e){return typeof e=="number"?q_:typeof e=="string"?_d(e)?pl:Ft.test(e)?Db:Y_:Array.isArray(e)?Nb:typeof e=="object"?Ft.test(e)?Db:U_:pl}function Nb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>zd(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function U_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=zd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function G_(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 Y_=(e,t)=>{const n=_r.createTransformer(t),r=ca(e),o=ca(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?$d.has(e)&&!o.values.length||$d.has(t)&&!r.values.length?W_(e,t):oa(Nb(G_(r,o),o.values),n):(Yo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),pl(e,t))};function Fb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):zd(e)(e,t)}const K_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>gt.update(t,n),stop:()=>hr(t),now:()=>Kt.isProcessing?Kt.timestamp:Jt.now()}},Lb=(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)})`},hl=2e4;function jd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hl;)t+=n,r=e.next(t);return t>=hl?1/0:t}function Vb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jd(r),hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:bn(o)}}const Z_=5;function $b(e,t,n){const r=Math.max(t-Z_,0);return ab(n-e(r),t-r)}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Rd=.001;function X_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;Yo(e<=Mn(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kn(Ct.minDamping,Ct.maxDamping,a),e=Kn(Ct.minDuration,Ct.maxDuration,bn(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-n,p=Bd(c,a),v=Math.exp(-d);return Rd-f/p*v},i=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),h=Bd(Math.pow(c,2),a);return(-o(c)+Rd>0?-1:1)*((f-p)*v)/h}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Rd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=J_(o,i,s);if(e=Mn(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Q_=12;function J_(e,t,n){let r=n;for(let o=1;o<Q_;o++)r=r-e(r)/t(r);return r}function Bd(e,t){return e*Math.sqrt(1-t*t)}const eM=["duration","bounce"],tM=["stiffness","damping","mass"];function zb(e,t){return t.some(n=>e[n]!==void 0)}function nM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!zb(e,tM)&&zb(e,eM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=X_(e);t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ua(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=nM({...n,velocity:-bn(n.velocity||0)}),v=f||0,h=c/(2*Math.sqrt(l*u)),m=a-i,y=bn(Math.sqrt(l/u)),x=Math.abs(m)<5;r||(r=x?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=x?Ct.restDelta.granular:Ct.restDelta.default);let b;if(h<1){const E=Bd(y,h);b=I=>{const w=Math.exp(-h*y*I);return a-w*((v+h*y*m)/E*Math.sin(E*I)+m*Math.cos(E*I))}}else if(h===1)b=E=>a-Math.exp(-y*E)*(m+(v+y*m)*E);else{const E=y*Math.sqrt(h*h-1);b=I=>{const w=Math.exp(-h*y*I),k=Math.min(E*I,300);return a-w*((v+h*y*m)*Math.sinh(k)+E*m*Math.cosh(k))/E}}const T={calculatedDuration:p&&d||null,next:E=>{const I=b(E);if(p)s.done=E>=d;else{let w=E===0?v:0;h<1&&(w=E===0?Mn(v):$b(b,E,I));const k=Math.abs(w)<=r,P=Math.abs(a-I)<=o;s.done=k&&P}return s.value=s.done?a:I,s},toString:()=>{const E=Math.min(jd(T),hl),I=Lb(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}ua.applyToOptions=e=>{const t=Vb(e,100,ua);return e.ease=t.ease,e.duration=Mn(t.duration),e.type="keyframes",e};function Hd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,v=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let h=n*t;const m=d+h,y=a===void 0?m:a(m);y!==m&&(h=y-d);const x=k=>-h*Math.exp(-k/r),b=k=>y+x(k),T=k=>{const P=x(k),_=b(k);f.done=Math.abs(P)<=c,f.value=f.done?y:_};let E,I;const w=k=>{p(f.value)&&(E=k,I=ua({keyframes:[f.value,v(f.value)],velocity:$b(b,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let P=!1;return!I&&E===void 0&&(P=!0,T(k),w(k)),E!==void 0&&k>=E?I.next(k-E):(!P&&T(k),f)}}}function rM(e,t,n){const r=[],o=n||pr.mix||Fb,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||yn:t;s=oa(l,s)}r.push(s)}return r}function jb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=rM(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Ko(e[d],e[d+1],u);return s[d](f)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function Rb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ko(0,t,r);e.push(yt(n,1,o))}}function Bb(e){const t=[0];return Rb(t,e.length-1),t}function oM(e,t){return e.map(n=>n*t)}function iM(e,t){return e.map(()=>t||gb).splice(0,e.length-1)}function Qo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=vb(r)?r.map(Pd):Pd(r),i={done:!1,value:t[0]},a=oM(n&&n.length===t.length?n:Bb(t),e),s=jb(a,t,{ease:Array.isArray(o)?o:iM(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const aM=e=>e!==null;function Wd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(aM),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const sM={decay:Hd,inertia:Hd,tween:Qo,keyframes:Qo,spring:ua};function Hb(e){typeof e.type=="string"&&(e.type=sM[e.type])}class qd{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 lM=e=>e/100;class Ud extends qd{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Hb(t);const{type:n=Qo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Qo;process.env.NODE_ENV!=="production"&&l!==Qo&&dn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Qo&&typeof s[0]!="number"&&(this.mixKeyframes=oa(lM,Fb(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=jd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:v,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,T=r;if(d){const k=Math.min(this.currentTime,o)/s;let P=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/s)):f==="mirror"&&(T=a)),b=Kn(0,1,_)*s}const E=x?{done:!1,value:u[0]}:T.next(b);i&&(E.value=i(E.value));let{done:I}=E;!x&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&v!==Hd&&(E.value=Wd(u,this.options,m,this.speed)),h&&h(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return bn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=K_,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function cM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const lo=e=>e*180/Math.PI,Gd=e=>{const t=lo(Math.atan2(e[1],e[0]));return Yd(t)},uM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,skewX:e=>lo(Math.atan(e[1])),skewY:e=>lo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Yd=e=>(e=e%360,e<0&&(e+=360),e),Wb=Gd,qb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ub=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),dM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qb,scaleY:Ub,scale:e=>(qb(e)+Ub(e))/2,rotateX:e=>Yd(lo(Math.atan2(e[6],e[5]))),rotateY:e=>Yd(lo(Math.atan2(-e[2],e[0]))),rotateZ:Wb,rotate:Wb,skewX:e=>lo(Math.atan(e[4])),skewY:e=>lo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Kd(e){return e.includes("scale")?1:0}function Zd(e,t){if(!e||e==="none")return Kd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=dM,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=uM,o=s}if(!o)return Kd(t);const i=r[t],a=o[1].split(",").map(pM);return typeof i=="function"?i(a):a[i]}const fM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zd(n,t)};function pM(e){return parseFloat(e.trim())}const Jo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ei=new Set(Jo),Gb=e=>e===Zo||e===Te,hM=new Set(["x","y","z"]),mM=Jo.filter(e=>!hM.has(e));function gM(e){const t=[];return mM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mr={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})=>Zd(t,"x"),y:(e,{transform:t})=>Zd(t,"y")};Mr.translateX=Mr.x,Mr.translateY=Mr.y;const co=new Set;let Xd=!1,Qd=!1,Jd=!1;function Yb(){if(Qd){const e=Array.from(co).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=gM(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)})}Qd=!1,Xd=!1,co.forEach(e=>e.complete(Jd)),co.clear()}function Kb(){co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qd=!0)})}function vM(){Jd=!0,Kb(),Yb(),Jd=!1}class ef{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?(co.add(this),Xd||(Xd=!0,gt.read(Kb),gt.resolveKeyframes(Yb))):(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])}cM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),co.delete(this)}cancel(){this.state==="scheduled"&&(co.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yM=e=>e.startsWith("--");function bM(e,t,n){yM(t)?e.style.setProperty(t,n):e.style[t]=n}const xM=Ed(()=>window.ScrollTimeline!==void 0),wM={};function SM(e,t){const n=Ed(e);return()=>wM[t]??n()}const Zb=SM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),da=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Xb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:da([0,.65,.55,1]),circOut:da([.55,0,1,.45]),backIn:da([.31,.01,.66,-.59]),backOut:da([.33,1.53,.69,.99])};function Qb(e,t){if(e)return typeof e=="function"?Zb()?Lb(e,t):"ease-out":bb(e)?da(e):Array.isArray(e)?e.map(n=>Qb(n,t)||Xb.easeOut):Xb[e]}function TM(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=Qb(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function tf(e){return typeof e=="function"&&"applyToOptions"in e}function EM({type:e,...t}){return tf(e)&&Zb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class kM extends qd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,dn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=EM(t);this.animation=TM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Wd(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):bM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return bn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bn(t)}get time(){return bn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Mn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&xM()?(this.animation.timeline=t,yn):n(this)}}const Jb={anticipate:pb,backInOut:fb,circInOut:mb};function CM(e){return e in Jb}function IM(e){typeof e.ease=="string"&&CM(e.ease)&&(e.ease=Jb[e.ease])}const nf=10;class AM extends kM{constructor(t){IM(t),Hb(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Ud({...a,autoplay:!1}),l=Math.max(nf,Jt.now()-this.startTime),c=Kn(0,nf,l-nf);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const ex=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_r.test(e)||e==="0")&&!e.startsWith("url("));function PM(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 OM(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=ex(o,t),s=ex(i,t);return Yo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:PM(e)||(n==="spring"||tf(n))&&r}function rf(e){e.duration=0,e.type="keyframes"}const _M=new Set(["opacity","clipPath","filter","transform"]),MM=Ed(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function DM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return MM()&&n&&_M.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const NM=40;class FM extends qd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||ef;this.keyframeResolver=new p(s,(v,h,m)=>this.onKeyframesResolved(v,h,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),OM(t,i,a,s)||((pr.instantAnimations||!l)&&u?.(Wd(t,r,n)),t[0]=t[t.length-1],rf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>NM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&DM(f),v=f.motionValue?.owner?.current,h=p?new AM({...f,element:v}):new Ud(f);h.finished.then(()=>{this.notifyFinished()}).catch(yn),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class LM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tx(this.animations,"duration")}get iterationDuration(){return tx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class VM extends LM{then(t,n){return this.finished.finally(t).then(()=>{})}}function nx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const $M=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zM(e){const t=$M.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const jM=4;function rx(e,t,n=1){dn(n<=jM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=zM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return rb(a)?parseFloat(a):a}return _d(o)?rx(o,t,n+1):o}const RM={type:"spring",stiffness:500,damping:25,restSpeed:10},BM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HM={type:"keyframes",duration:.8},WM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qM=(e,{keyframes:t})=>t.length>2?HM:ei.has(e)?e.startsWith("scale")?BM(t[1]):RM:WM,UM=e=>e!==null;function GM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function of(e,t){return e?.[t]??e?.default??e}function YM({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 af=(e,t,n,r={},o,i)=>a=>{const s=of(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};YM(s)||Object.assign(u,qM(e,u)),u.duration&&(u.duration=Mn(u.duration)),u.repeatDelay&&(u.repeatDelay=Mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rf(u),u.delay===0&&(d=!0)),(pr.instantAnimations||pr.skipAnimations)&&(d=!0,rf(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=GM(u.keyframes,s);if(f!==void 0){gt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Ud(u):new FM(u)};function ox(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[o,i]=ox(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]=ox(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ti(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}const ix=new Set(["width","height","top","left","right","bottom",...Jo]),ax=30,KM=e=>!isNaN(parseFloat(e)),fa={current:void 0};class ZM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=KM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Cd(!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 kd);const r=this.events[t].add(n);return t==="change"?()=>{r(),gt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return fa.current&&fa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ax)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ax);return ab(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 uo(e,t){return new ZM(e,t)}const lf=e=>Array.isArray(e);function XM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function QM(e){return lf(e)?e[e.length-1]||0:e}function JM(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=QM(i[a]);XM(e,a,s)}}const jt=e=>!!(e&&e.getVelocity);function eD(e){return!!(jt(e)&&e.add)}function cf(e,t){const n=e.getValue("willChange");if(eD(n))return n.add(t);if(!n&&pr.WillChange){const r=new pr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function uf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const sx="data-"+uf("framerAppearId");function lx(e){return e.props[sx]}function tD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function df(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),f=s[u];if(f===void 0||c&&tD(c,u))continue;const p={delay:n,...of(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!p.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const y=lx(e);if(y){const x=window.MotionHandoffAnimation(y,u,gt);x!==null&&(p.startTime=x,h=!0)}}cf(e,u),d.start(af(u,d,f,e.shouldReduceMotion&&ix.has(u)?{type:!1}:p,e,h));const m=d.animation;m&&l.push(m)}return a&&Promise.all(l).then(()=>{gt.update(()=>{a&&JM(e,a)})}),l}function ff(e,t,n={}){const r=ti(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(df(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return nD(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function nD(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(ff(l,t,{...a,delay:n+(typeof r=="function"?0:r)+nx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function rD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ff(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ff(e,t,n);else{const o=typeof t=="function"?ti(e,t,n.custom):t;r=Promise.all(df(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const oD={test:e=>e==="auto",parse:e=>e},cx=e=>t=>t.test(e),ux=[Zo,Te,Zn,Or,D_,M_,oD],dx=e=>ux.find(cx(e));function iD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ib(e):!0}const aD=new Set(["brightness","contrast","saturate","opacity"]);function sD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Md)||[];if(!r)return e;const o=n.replace(r,"");let i=aD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const lD=/\b([a-z-]*)\(.*?\)/gu,pf={..._r,getAnimatableNone:e=>{const t=e.match(lD);return t?t.map(sD).join(" "):e}},fx={...Zo,transform:Math.round},hf={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,backgroundPositionX:Te,backgroundPositionY:Te,...{rotate:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:fl,scaleX:fl,scaleY:fl,scaleZ:fl,skew:Or,skewX:Or,skewY:Or,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:aa,originX:Cb,originY:Cb,originZ:Te},zIndex:fx,fillOpacity:aa,strokeOpacity:aa,numOctaves:fx},cD={...hf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:pf,WebkitFilter:pf},px=e=>cD[e];function hx(e,t){let n=px(e);return n!==pf&&(n=_r),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uD=new Set(["auto","none","0"]);function dD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!uD.has(i)&&ca(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=hx(n,o)}class fD extends ef{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),_d(d))){const f=rx(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ix.has(r)||t.length!==2)return;const[o,i]=t,a=dx(o),s=dx(i),l=Eb(o),c=Eb(i);if(l!==c&&Mr[r]){this.needsMeasurement=!0;return}if(a!==s)if(Gb(a)&&Gb(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Mr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||iD(t[o]))&&r.push(o);r.length&&dD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mr[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]=Mr[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 mx(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const gx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mf(e){return ob(e)&&"offsetHeight"in e}const{schedule:gf}=wb(queueMicrotask,!1),Dn={x:!1,y:!1};function vx(){return Dn.x||Dn.y}function pD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function yx(e,t){const n=mx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function bx(e){return!(e.pointerType==="touch"||vx())}function hD(e,t,n={}){const[r,o,i]=yx(e,n),a=s=>{if(!bx(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{bx(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const xx=(e,t)=>t?e===t?!0:xx(e,t.parentElement):!1,vf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wx(e){return mD.has(e.tagName)||e.isContentEditable===!0}const ml=new WeakSet;function Sx(e){return t=>{t.key==="Enter"&&e(t)}}function yf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const gD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Sx(()=>{if(ml.has(n))return;yf(n,"down");const o=Sx(()=>{yf(n,"up")}),i=()=>yf(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 Tx(e){return vf(e)&&!vx()}function vD(e,t,n={}){const[r,o,i]=yx(e,n),a=s=>{const l=s.currentTarget;if(!Tx(s))return;ml.add(l);const c=t(l,s),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ml.has(l)&&ml.delete(l),Tx(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||xx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),mf(s)&&(s.addEventListener("focus",c=>gD(c,o)),!wx(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function bf(e){return ob(e)&&"ownerSVGElement"in e}function Ex(e){return bf(e)&&e.tagName==="svg"}function yD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function bD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:yD(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Pd(r)(l/c)*c}return t+l}}function xD(...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=jb(o,i,a);return t?s(r):s}const wD=[...ux,Ft,_r],SD=e=>wD.find(cx(e)),kx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ni=()=>({x:kx(),y:kx()}),Cx=()=>({min:0,max:0}),Lt=()=>({x:Cx(),y:Cx()}),xf={current:null},Ix={current:!1},TD=typeof window<"u";function ED(){if(Ix.current=!0,!!TD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xf.current=e.matches;e.addEventListener("change",t),t()}else xf.current=!1}const pa=new WeakMap;function gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ha(e){return typeof e=="string"||Array.isArray(e)}const wf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sf=["initial",...wf];function vl(e){return gl(e.animate)||Sf.some(t=>ha(e[t]))}function Ax(e){return!!(vl(e)||e.variants)}function kD(e,t,n){for(const r in t){const o=t[r],i=n[r];if(jt(o))e.addValue(r,o);else if(jt(i))e.addValue(r,uo(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,uo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Px=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yl={};function Ox(e){yl=e}function CD(){return yl}class _x{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=ef,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Jt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,gt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=vl(n),this.isVariantNode=Ax(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&jt(p)&&p.set(l[f])}}mount(t){this.current=t,pa.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ix.current||ED(),this.shouldReduceMotion=xf.current),process.env.NODE_ENV!=="production"&&Cd(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hr(this.notifyUpdate),hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ei.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&gt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yl){const n=yl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Px.length;r++){const o=Px[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=kD(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=uo(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"&&(rb(r)||ib(r))?r=parseFloat(r):!SD(r)&&_r.test(n)&&(r=hx(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=sf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new kd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){gf.render(this.render)}}class Mx extends _x{constructor(){super(...arguments),this.KeyframeResolver=fD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Dx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ID({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function AD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Tf(e){return e===void 0||e===1}function Ef({scale:e,scaleX:t,scaleY:n}){return!Tf(e)||!Tf(t)||!Tf(n)}function fo(e){return Ef(e)||Nx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Nx(e){return Fx(e.x)||Fx(e.y)}function Fx(e){return e&&e!=="0%"}function bl(e,t,n){const r=e-n,o=t*r;return n+o}function Lx(e,t,n,r,o){return o!==void 0&&(e=bl(e,o,r)),bl(e,n,r)+t}function kf(e,t=0,n=1,r,o){e.min=Lx(e.min,t,n,r,o),e.max=Lx(e.max,t,n,r,o)}function Vx(e,{x:t,y:n}){kf(e.x,t.translate,t.scale,t.originPoint),kf(e.y,n.translate,n.scale,n.originPoint)}const $x=.999999999999,zx=1.0000000000001;function PD(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&&oi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Vx(e,a)),r&&fo(i.latestValues)&&oi(e,i.latestValues))}t.x<zx&&t.x>$x&&(t.x=1),t.y<zx&&t.y>$x&&(t.y=1)}function ri(e,t){e.min=e.min+t,e.max=e.max+t}function jx(e,t,n,r,o=.5){const i=yt(e.min,e.max,o);kf(e,t,n,i,r)}function oi(e,t){jx(e.x,t.x,t.scaleX,t.scale,t.originX),jx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rx(e,t){return Dx(AD(e.getBoundingClientRect(),t))}function OD(e,t,n){const r=Rx(e,n),{scroll:o}=t;return o&&(ri(r.x,o.offset.x),ri(r.y,o.offset.y)),r}const _D={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MD=Jo.length;function DD(e,t,n){let r="",o=!0;for(let i=0;i<MD;i++){const a=Jo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=gx(s,hf[a]);if(!l){o=!1;const u=_D[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Cf(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(ei.has(l)){a=!0;continue}else if(Tb(l)){o[l]=c;continue}else{const u=gx(c,hf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=DD(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Bx(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function Hx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ma={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=Hx(e,t.target.x),r=Hx(e,t.target.y);return`${n}% ${r}%`}},ND={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_r.parse(e);if(o.length>5)return r;const i=_r.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=yt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},If={borderRadius:{...ma,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ma,borderTopRightRadius:ma,borderBottomLeftRadius:ma,borderBottomRightRadius:ma,boxShadow:ND};function Wx(e,{layout:t,layoutId:n}){return ei.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!If[e]||e==="opacity")}function Af(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(jt(r[a])||o&&jt(o[a])||Wx(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function FD(e){return window.getComputedStyle(e)}class qx extends Mx{constructor(){super(...arguments),this.type="html",this.renderInstance=Bx}readValueFromInstance(t,n){if(ei.has(n))return this.projection?.isProjecting?Kd(n):fM(t,n);{const r=FD(t),o=(Tb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rx(t,n)}build(t,n,r){Cf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Af(t,n,r)}}function LD(e,t){return e in t}class VD extends _x{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(LD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const $D={offset:"stroke-dashoffset",array:"stroke-dasharray"},zD={offset:"strokeDashoffset",array:"strokeDasharray"};function jD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?$D:zD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const RD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ux(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Cf(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of RD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&jD(d,o,i,a,!1)}const Gx=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"]),Yx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function BD(e,t,n,r){Bx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Gx.has(o)?o:uf(o),t.attrs[o])}function Kx(e,t,n){const r=Af(e,t,n);for(const o in e)if(jt(e[o])||jt(t[o])){const i=Jo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class Zx extends Mx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ei.has(n)){const r=px(n);return r&&r.default||0}return n=Gx.has(n)?n:uf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Kx(t,n,r)}build(t,n,r){Ux(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){BD(t,n,r,o)}mount(t){this.isSVGTag=Yx(t.tagName),super.mount(t)}}const HD=Sf.length;function Xx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<HD;n++){const r=Sf[n],o=e.props[r];(ha(o)||o===!1)&&(t[r]=o)}return t}function Qx(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 WD=[...wf].reverse(),qD=wf.length;function UD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>rD(e,n,r)))}function GD(e){let t=UD(e),n=Jx(),r=!0;const o=l=>(c,u)=>{const d=ti(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...v}=d;c={...c,...v,...p}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Xx(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let m=0;m<qD;m++){const y=WD[m],x=n[y],b=c[y]!==void 0?c[y]:u[y],T=ha(b),E=y===l?x.isActive:null;E===!1&&(v=m);let I=b===u[y]&&b!==c[y]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),x.protectedKeys={...p},!x.isActive&&E===null||!b&&!x.prevProp||gl(b)||typeof b=="boolean")continue;const w=YD(x.prevProp,b);let k=w||y===l&&x.isActive&&!I&&T||m>v&&T,P=!1;const _=Array.isArray(b)?b:[b];let F=_.reduce(o(y),{});E===!1&&(F={});const{prevResolvedValues:V={}}=x,N={...V,...F},O=M=>{k=!0,f.has(M)&&(P=!0,f.delete(M)),x.needsAnimating[M]=!0;const C=e.getValue(M);C&&(C.liveStyle=!1)};for(const M in N){const C=F[M],L=V[M];if(p.hasOwnProperty(M))continue;let $=!1;lf(C)&&lf(L)?$=!Qx(C,L):$=C!==L,$?C!=null?O(M):f.add(M):C!==void 0&&f.has(M)?O(M):x.protectedKeys[M]=!0}x.prevProp=b,x.prevResolvedValues=F,x.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(k=!1);const D=I&&w;k&&(!D||P)&&d.push(..._.map(M=>{const C={type:y};if(typeof M=="string"&&r&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,$=ti(L,M);if(L.enteringChildren&&$){const{delayChildren:B}=$.transition||{};C.delay=nx(L.enteringChildren,e,B)}}return{animation:M,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const y=ti(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),m[y]=x??null}),d.push({animation:m})}let h=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?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=Jx()}}}function YD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Qx(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jx(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function e0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){e0(e.x,t.x),e0(e.y,t.y)}function t0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const n0=1e-4,KD=1-n0,ZD=1+n0,r0=.01,XD=0-r0,QD=0+r0;function en(e){return e.max-e.min}function JD(e,t,n){return Math.abs(e-t)<=n}function o0(e,t,n,r=.5){e.origin=r,e.originPoint=yt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=KD&&e.scale<=ZD||isNaN(e.scale))&&(e.scale=1),(e.translate>=XD&&e.translate<=QD||isNaN(e.translate))&&(e.translate=0)}function ga(e,t,n,r){o0(e.x,t.x,n.x,r?r.originX:void 0),o0(e.y,t.y,n.y,r?r.originY:void 0)}function i0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function eN(e,t,n){i0(e.x,t.x,n.x),i0(e.y,t.y,n.y)}function a0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function xl(e,t,n){a0(e.x,t.x,n.x),a0(e.y,t.y,n.y)}function s0(e,t,n,r,o){return e-=t,e=bl(e,1/n,r),o!==void 0&&(e=bl(e,1/o,r)),e}function tN(e,t=0,n=1,r=.5,o,i=e,a=e){if(Zn.test(t)&&(t=parseFloat(t),t=yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=yt(i.min,i.max,r);e===i&&(s-=t),e.min=s0(e.min,t,n,s,o),e.max=s0(e.max,t,n,s,o)}function l0(e,t,[n,r,o],i,a){tN(e,t[n],t[r],t[o],t.scale,i,a)}const nN=["x","scaleX","originX"],rN=["y","scaleY","originY"];function c0(e,t,n,r){l0(e.x,t,nN,n?n.x:void 0,r?r.x:void 0),l0(e.y,t,rN,n?n.y:void 0,r?r.y:void 0)}function u0(e){return e.translate===0&&e.scale===1}function d0(e){return u0(e.x)&&u0(e.y)}function f0(e,t){return e.min===t.min&&e.max===t.max}function oN(e,t){return f0(e.x,t.x)&&f0(e.y,t.y)}function p0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function h0(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function m0(e){return en(e.x)/en(e.y)}function g0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xn(e){return[e("x"),e("y")]}function iN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const v0=["TopLeft","TopRight","BottomLeft","BottomRight"],aN=v0.length,y0=e=>typeof e=="string"?parseFloat(e):e,b0=e=>typeof e=="number"||Te.test(e);function sN(e,t,n,r,o,i){o?(e.opacity=yt(0,n.opacity??1,lN(r)),e.opacityExit=yt(t.opacity??1,0,cN(r))):i&&(e.opacity=yt(t.opacity??1,n.opacity??1,r));for(let a=0;a<aN;a++){const s=`border${v0[a]}Radius`;let l=x0(t,s),c=x0(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||b0(l)===b0(c)?(e[s]=Math.max(yt(y0(l),y0(c),r),0),(Zn.test(c)||Zn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,r))}function x0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const lN=w0(0,.5,hb),cN=w0(.5,.95,yn);function w0(e,t,n){return r=>r<e?0:r>t?1:n(Ko(e,t,r))}function S0(e,t,n){const r=jt(e)?e:uo(e);return r.start(af("",r,t,n)),r.animation}function va(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const uN=(e,t)=>e.depth-t.depth;class dN{constructor(){this.children=[],this.isDirty=!1}add(t){Sd(this.children,t),this.isDirty=!0}remove(t){ra(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uN),this.isDirty=!1,this.children.forEach(t)}}function fN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hr(r),e(i-t))};return gt.setup(r,!0),()=>hr(r)}function wl(e){return jt(e)?e.get():e}class pN{constructor(){this.members=[]}add(t){Sd(this.members,t),t.scheduleRender()}remove(t){if(ra(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pf=["","X","Y","Z"],hN=1e3;let mN=0;function Of(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function T0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=lx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&T0(r)}function E0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=mN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(yN),this.nodes.forEach(SN),this.nodes.forEach(TN),this.nodes.forEach(bN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new dN)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new kd),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=bf(a)&&!Ex(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{d=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=fN(f,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(I0)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||AN,{onLayoutAnimationStart:h,onLayoutAnimationComplete:m}=c.getProps(),y=!this.targetLayout||!h0(this.targetLayout,p),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...of(v,"layout"),onPlay:h,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else d||I0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hr(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(EN),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&&T0(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(k0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(C0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wN),this.nodes.forEach(gN),this.nodes.forEach(vN)):this.nodes.forEach(C0),this.clearAllSnapshots();const s=Jt.now();Kt.delta=Kn(0,1e3/60,s-Kt.timestamp),Kt.timestamp=s,Kt.isProcessing=!0,Od.update.process(Kt),Od.preRender.process(Kt),Od.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xN),this.sharedNodes.forEach(kN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!d0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||fo(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)),PN(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Lt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ON))){const{scroll:c}=this.root;c&&(ri(s.x,c.offset.x),ri(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Lt();if(Nn(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Nn(s,a),ri(s.x,u.offset.x),ri(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Lt();Nn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&oi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&oi(l,u.latestValues)}return fo(this.latestValues)&&oi(l,this.latestValues),l}removeTransform(a){const s=Lt();Nn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Ef(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),c0(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&c0(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Kt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),Vx(this.target,this.targetDelta)):Nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ef(this.parent.latestValues)||Nx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),xl(this.relativeTargetOrigin,s,l),Nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;PD(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(t0(this.prevProjectionDelta.x,this.projectionDelta.x),t0(this.prevProjectionDelta.y,this.projectionDelta.y)),ga(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!g0(this.projectionDelta.x,this.prevProjectionDelta.x)||!g0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ni(),this.projectionDelta=ni(),this.projectionDeltaWithTransform=ni()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ni();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Lt(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,h=p!==v,m=this.getStack(),y=!m||m.members.length<=1,x=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(IN));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const E=T/1e3;A0(d.x,a.x,E),A0(d.y,a.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),CN(this.relativeTarget,this.relativeTargetOrigin,f,E),b&&oN(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Lt()),Nn(b,this.relativeTarget)),h&&(this.animationValues=u,sN(u,c,this.latestValues,E,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{Sl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=uo(0)),this.currentAnimation=S0(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(hN),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&&D0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Nn(s,l),oi(s,u),ga(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new pN),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&&Of("z",a,c,this.animationValues);for(let u=0;u<Pf.length;u++)Of(`rotate${Pf[u]}`,a,c,this.animationValues),Of(`skew${Pf[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=wl(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=wl(s?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=iN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in If){if(u[v]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:y}=If[v],x=d==="none"?u[v]:h(u[v],c);if(m){const b=m.length;for(let T=0;T<b;T++)a[m[T]]=x}else y?this.options.visualElement.renderState.vars[v]=x:a[v]=x}this.options.layoutId&&(a.pointerEvents=c===this?wl(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(k0),this.root.sharedNodes.clear()}}}function gN(e){e.updateLayout()}function vN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):D0(o,t.layoutBox,n)&&xn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=ni();ga(a,n,t.layoutBox);const s=ni();i?ga(s,e.applyTransform(r,!0),t.measuredBox):ga(s,n,t.layoutBox);const l=!d0(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();xl(p,t.layoutBox,d.layoutBox);const v=Lt();xl(v,n,f.layoutBox),h0(p,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function yN(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 bN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xN(e){e.clearSnapshot()}function k0(e){e.clearMeasurements()}function C0(e){e.isLayoutDirty=!1}function wN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function I0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function SN(e){e.resolveTargetDelta()}function TN(e){e.calcProjection()}function EN(e){e.resetSkewAndRotation()}function kN(e){e.removeLeadSnapshot()}function A0(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function P0(e,t,n,r){e.min=yt(t.min,n.min,r),e.max=yt(t.max,n.max,r)}function CN(e,t,n,r){P0(e.x,t.x,n.x,r),P0(e.y,t.y,n.y,r)}function IN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AN={duration:.45,ease:[.4,0,.1,1]},O0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_0=O0("applewebkit/")&&!O0("chrome/")?Math.round:yn;function M0(e){e.min=_0(e.min),e.max=_0(e.max)}function PN(e){M0(e.x),M0(e.y)}function D0(e,t,n){return e==="position"||e==="preserve-aspect"&&!JD(m0(t),m0(n),.2)}function ON(e){return e!==e.root&&e.scroll?.wasRoot}const _N=E0({attachResizeListener:(e,t)=>va(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),MN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function N0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(MN);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 _f={current:void 0},F0=E0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_f.current){const e=new _N({});e.mount(window),e.setOptions({layoutScroll:!0}),_f.current=e}return _f.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ii=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function L0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function DN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=L0(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():L0(e[o],null)}}}}function NN(...e){return A.useCallback(DN(...e),e)}class FN extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=mf(r)&&r.offsetWidth||0,i=mf(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function LN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=S.useId(),a=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(ii),c=e.props?.ref??e?.ref,u=NN(a,c);return S.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:v,right:h,bottom:m}=s.current;if(t||!a.current||!d||!f)return;const y=n==="left"?`left: ${v}`:`right: ${h}`,x=r==="bottom"?`bottom: ${m}`:`top: ${p}`;a.current.dataset.motionPopId=i;const b=document.createElement("style");l&&(b.nonce=l);const T=o??document.head;return T.appendChild(b),b.sheet&&b.sheet.insertRule(`
7
7
  [data-motion-pop-id="${i}"] {
8
8
  position: absolute !important;
9
9
  width: ${d}px !important;
@@ -11,11 +11,11 @@
11
11
  ${y}px !important;
12
12
  ${x}px !important;
13
13
  }
14
- `),()=>{E.contains(b)&&E.removeChild(b)}},[t]),g.jsx(NN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const LN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=On(VN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const h of u.values())if(!h)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,h)=>u.set(h,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(FN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),g.jsx(cl.Provider,{value:p,children:e})};function VN(){return new Map}function L0(e=!0){const t=S.useContext(cl);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 Tl=e=>e.key||"";function V0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Nn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=L0(a),f=S.useMemo(()=>V0(e),[e]),p=a&&!u?[]:f.map(Tl),v=S.useRef(!0),h=S.useRef(f),m=On(()=>new Map),y=S.useRef(new Set),[x,b]=S.useState(f),[E,T]=S.useState(f);ll(()=>{v.current=!1,h.current=f;for(let k=0;k<E.length;k++){const P=Tl(E[k]);p.includes(P)?(m.delete(P),y.current.delete(P)):m.get(P)!==!0&&m.set(P,!1)}},[E,p.length,p.join("-")]);const I=[];if(f!==x){let k=[...f];for(let P=0;P<E.length;P++){const _=E[P],F=Tl(_);p.includes(F)||(k.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(k=I),T(V0(k)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(na);return g.jsx(g.Fragment,{children:E.map(k=>{const P=Tl(k),_=a&&!u?!1:f===E||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),m.has(P))m.set(P,!0);else return;let $=!0;m.forEach(D=>{D||($=!1)}),$&&(w?.(),T(h.current),a&&d?.(),r&&r())};return g.jsx(LN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:k},P)})})},$N=S.createContext(null);function zN(){const e=S.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jN(){const e=zN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const $0=e=>e===!0,RN=e=>$0(e===!0)||e==="id",BN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(na),o=S.useContext($N),[i,a]=jN(),s=S.useRef(null),l=r.id||o;s.current===null&&(RN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:$0(n)&&r.group||D0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return g.jsx(na.Provider,{value:c,children:e})},z0=S.createContext({strict:!1}),j0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let R0=!1;function HN(){if(R0)return;const e={};for(const t in j0)e[t]={isEnabled:n=>j0[t].some(r=>!!n[r])};Px(e),R0=!0}function B0(){return HN(),kD()}function WN(e){const t=B0();for(const n in e)t[n]={...t[n],...e[n]};Px(t)}const qN=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 El(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qN.has(e)}let H0=e=>!El(e);function W0(e){typeof e=="function"&&(H0=t=>t.startsWith("on")?!El(t):e(t))}try{W0(require("@emotion/is-prop-valid").default)}catch{}function UN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(H0(o)||n===!0&&El(o)||!t&&!El(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mf({children:e,isValidProp:t,...n}){t&&W0(t),n={...S.useContext(ii),...n},n.isStatic=On(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return g.jsx(ii.Provider,{value:r,children:e})}const kl=S.createContext({});function GN(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function YN(e){const{initial:t,animate:n}=GN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[q0(t),q0(n)])}function q0(e){return Array.isArray(e)?e.join(" "):e}const Df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function U0(e,t,n){for(const r in t)!jt(t[r])&&!Hx(r,n)&&(e[r]=t[r])}function KN({transformTemplate:e},t){return S.useMemo(()=>{const n=Df();return Cf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZN(e,t){const n=e.style||{},r={};return U0(r,n,e),Object.assign(r,KN(e,t)),r}function XN(e,t){const n={},r=ZN(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 G0=()=>({...Df(),attrs:{}});function QN(e,t,n,r){const o=S.useMemo(()=>{const i=G0();return qx(i,t,Gx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};U0(i,e.style,e),o.style={...i,...o.style}}return o}const JN=["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 Nf(e){return typeof e!="string"||e.includes("-")?!1:!!(JN.indexOf(e)>-1||/[A-Z]/u.test(e))}function e2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Nf(e)?QN:XN)(t,r,o,e),c=UN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>jt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function t2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:n2(n,r,o,e),renderState:t()}}function n2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:a,animate:s}=e;const l=vl(e),c=Ix(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"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=sf(e,f[p]);if(v){const{transitionEnd:h,transition:m,...y}=v;for(const x in y){let b=y[x];if(Array.isArray(b)){const E=u?b.length-1:0;b=b[E]}b!==null&&(o[x]=b)}for(const x in h)o[x]=h[x]}}}return o}const Y0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(cl),i=()=>t2(e,t,r,o);return n?i():On(i)},r2=Y0({scrapeMotionValuesFromProps:Af,createRenderState:Df}),o2=Y0({scrapeMotionValuesFromProps:Yx,createRenderState:G0}),i2=Symbol.for("motionComponentSymbol");function a2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const K0=S.createContext({});function ya(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function s2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(z0),l=S.useContext(cl),c=S.useContext(ii).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(K0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&l2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[ax],h=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),h.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),h.current=!1),d.enteringChildren=void 0)}),d}function l2(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:Z0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ya(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Z0(e){if(e)return e.options.allowProjection!==!1?e.projection:Z0(e.parent)}function Ff(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&WN(r);const i=n?n==="svg":Nf(e),a=i?o2:r2;function s(c,u){let d;const f={...S.useContext(ii),...c,layoutId:c2(c)},{isStatic:p}=f,v=YN(c),h=a(c,p);if(!p&&tb){u2(f,r);const m=d2(f);d=m.MeasureLayout,v.visualElement=s2(e,h,f,o,m.ProjectionNode,i)}return g.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?g.jsx(d,{visualElement:v.visualElement,...f}):null,e2(e,c,a2(h,v.visualElement,u),h,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[i2]=e,l}function c2({layoutId:e}){const t=S.useContext(na).id;return t&&e!==void 0?t+"-"+e:e}function u2(e,t){const n=S.useContext(z0).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?Yo(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function d2(e){const t=B0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function f2(e,t){if(typeof Proxy>"u")return Ff;const n=new Map,r=(i,a)=>Ff(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&Cd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Ff(a,void 0,e,t)),n.get(a))})}const p2=(e,t)=>t.isSVG??Nf(e)?new Kx(t):new Wx(t,{allowProjection:e!==S.Fragment});class h2 extends Dr{constructor(t){super(t),t.animationState||(t.animationState=UD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(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 m2=0;class g2 extends Dr{constructor(){super(...arguments),this.id=m2++}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 v2={animation:{Feature:h2},exit:{Feature:g2}};function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const y2=e=>t=>vf(t)&&e(t,ba(t));function xa(e,t,n,r){return va(e,t,y2(n),r)}const X0=({current:e})=>e?e.ownerDocument.defaultView:null,Q0=(e,t)=>Math.abs(e-t);function b2(e,t){const n=Q0(e.x,t.x),r=Q0(e.y,t.y);return Math.sqrt(n**2+r**2)}const J0=new Set(["auto","scroll"]);class ew{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Vf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,h=b2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!h)return;const{point:m}=p,{timestamp:y}=Kt;this.history.push({...m,timestamp:y});const{onStart:x,onMove:b}=this.handlers;v||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Lf(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vf(p.type==="pointercancel"?this.lastMoveEventInfo:Lf(v,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,x),m&&m(p,x)},!vf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=ba(t),c=Lf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Vf(c,this.history)),this.removeListeners=oa(xa(this.contextWindow,"pointermove",this.handlePointerMove),xa(this.contextWindow,"pointerup",this.handlePointerUp),xa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(J0.has(r.overflowX)||J0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Lf(e,t){return t?{point:t(e.point)}:e}function tw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vf({point:e},t){return{point:e,delta:tw(e,nw(t)),offset:tw(e,x2(t)),velocity:w2(t,.1)}}function x2(e){return e[0]}function nw(e){return e[e.length-1]}function w2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_n(t)));)n--;if(!r)return{x:0,y:0};const i=yn(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 S2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function rw(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 T2(e,{top:t,left:n,bottom:r,right:o}){return{x:rw(e.x,n,o),y:rw(e.y,t,r)}}function ow(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 E2(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function k2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Ko(t.min,t.max-r,e.min):r>o&&(n=Ko(e.min,e.max-o,t.min)),Kn(0,1,n)}function C2(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 $f=.35;function I2(e=$f){return e===!1?e=0:e===!0&&(e=$f),{x:iw(e,"left","right"),y:iw(e,"top","bottom")}}function iw(e,t,n){return{min:aw(e,t),max:aw(e,n)}}function aw(e,t){return typeof e=="number"?e:e[t]||0}const A2=new WeakMap;class P2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(ba(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:h}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Zn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const E=b.layout.layoutBox[y];E&&(x=en(E)*(parseFloat(x)/100))}}this.originPoint[y]=x}),h&&gt.postRender(()=>h(d,f)),cf(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:h,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=O2(y),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>bn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ew(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:X0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&gt.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=S2(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&&ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=T2(r.layoutBox,t):this.constraints=!1,this.elastic=I2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=C2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ya(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=PD(r,o.root,this.visualElement.getTransformPagePoint());let a=E2(o.layout.layoutBox,i);if(n){const s=n(CD(a));this.hasMutatedConstraints=!!s,s&&(a=Mx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=bn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cf(this.visualElement,t),r.start(af(t,r,0,n,this.visualElement,!1))}stopAnimation(){bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bn(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){bn(n=>{const{drag:r}=this.getProps();if(!Cl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ya(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=k2({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(),bn(a=>{if(!Cl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;A2.set(this.visualElement,this);const t=this.visualElement.current,n=xa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&xx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ya(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),gt.read(r);const a=va(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(bn(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=$f,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function O2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _2 extends Dr{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new P2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const sw=e=>(t,n)=>{e&&gt.postRender(()=>e(t,n))};class M2 extends Dr{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new ew(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:X0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:sw(t),onStart:sw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&gt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let zf=!1;class D2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),zf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,zf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;zf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function lw(e){const[t,n]=L0(),r=S.useContext(na);return g.jsx(D2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(K0),isPresent:t,safeToRemove:n})}const N2={pan:{Feature:M2},drag:{Feature:_2,ProjectionNode:N0,MeasureLayout:lw}};function cw(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&&gt.postRender(()=>i(t,ba(t)))}class F2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=pD(t,(n,r)=>(cw(this.node,r,"Start"),o=>cw(this.node,o,"End"))))}unmount(){}}class L2 extends Dr{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=oa(va(this.node.current,"focus",()=>this.onFocus()),va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uw(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&&gt.postRender(()=>i(t,ba(t)))}class V2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=gD(t,(n,r)=>(uw(this.node,r,"Start"),(o,{success:i})=>uw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Rf=new WeakMap,$2=e=>{const t=jf.get(e.target);t&&t(e)},z2=e=>{e.forEach($2)};function j2({root:e,...t}){const n=e||document;Rf.has(n)||Rf.set(n,{});const r=Rf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(z2,{root:e,...t})),r[o]}function R2(e,t,n){const r=j2(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const B2={some:0,all:1};class H2 extends Dr{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:B2[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return R2(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(W2(t,n))&&this.startObserver()}unmount(){}}function W2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q2={...v2,...{inView:{Feature:H2},tap:{Feature:V2},focus:{Feature:L2},hover:{Feature:F2}},...N2,...{layout:{ProjectionNode:N0,MeasureLayout:lw}}},Be=f2(q2,p2);function U2(e){return S.useEffect(()=>()=>e(),[])}function ho(e){const t=On(()=>uo(e)),{isStatic:n}=S.useContext(ii);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function dw(e,t){const n=ho(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),hr(r)}}),n}function G2(e){fa.current=[],e();const t=dw(fa.current,e);return fa.current=void 0,t}function Y2(e,t,n,r){if(typeof e=="function")return G2(e);const i=typeof t=="function"?t:bD(t,n,r);return Array.isArray(e)?fw(e,i):fw([e],([a])=>i(a))}function fw(e,t){const n=On(()=>[]);return dw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Bf(e){return typeof e=="object"&&!Array.isArray(e)}function pw(e,t,n,r){return e==null?[]:typeof e=="string"&&Bf(t)?hx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function K2(e,t,n){return e*(t+1)}function hw(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 Z2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function X2(e,t,n,r,o,i){Z2(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:vb(n,a)})}function Q2(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function J2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eF="easeInOut",tF=20;function nF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,hw(d,v.at,u,c));continue}let[h,m,y={}]=v;y.at!==void 0&&(d=hw(d,y.at,u,c));let x=0;const b=(E,T,I,w=0,k=0)=>{const P=rF(E),{delay:_=0,times:F=Rb(P),type:$=t.type||"keyframes",repeat:D,repeatType:O,repeatDelay:N=0,...j}=T;let{ease:M=t.ease||"easeOut",duration:C}=T;const V=typeof _=="function"?_(w,k):_,z=P.length,R=tf($)?$:o?.[$||"keyframes"];if(z<=2&&R){let ee=100;if(z===2&&aF(P)){const G=P[1]-P[0];ee=Math.abs(G)}const re={...t,...j};C!==void 0&&(re.duration=_n(C));const te=Lb(re,ee,R);M=te.ease,C=te.duration}C??(C=i);const W=d+V;F.length===1&&F[0]===0&&(F[1]=1);const U=F.length-P.length;if(U>0&&jb(F,U),P.length===1&&P.unshift(null),D){dn(D<tF,"Repeat count too high, must be less than 20","repeat-count-high"),C=K2(C,D);const ee=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const te=[...M];for(let G=0;G<D;G++){P.push(...ee);for(let Y=0;Y<ee.length;Y++)F.push(re[Y]+(G+1)),M.push(Y===0?"linear":vb(te,Y-1))}Q2(F,D)}const H=W+C;X2(I,P,M,F,W,H),x=Math.max(V+C,x),f=Math.max(H,f)};if(jt(h)){const E=mw(h,s);b(m,y,gw("default",E))}else{const E=pw(h,m,r,l),T=E.length;for(let I=0;I<T;I++){m=m,y=y;const w=E[I],k=mw(w,s);for(const P in m)b(m[P],oF(y,P),gw(P,k),I,T)}}u=d,d+=x}return s.forEach((p,v)=>{for(const h in p){const m=p[h];m.sort(J2);const y=[],x=[],b=[];for(let w=0;w<m.length;w++){const{at:k,value:P,easing:_}=m[w];y.push(P),x.push(Ko(0,f,k)),b.push(_||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),b.unshift(eF)),x[x.length-1]!==1&&(x.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const E=a.get(v);E.keyframes[h]=y;const{type:T,...I}=t;E.transition[h]={...I,duration:f,ease:b,times:x,...n}}}),a}function mw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function gw(e,t){return t[e]||(t[e]=[]),t[e]}function rF(e){return Array.isArray(e)?e:[e]}function oF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iF=e=>typeof e=="number",aF=e=>e.every(iF);function sF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=bf(e)&&!Tx(e)?new Kx(t):new Wx(t);n.mount(e),pa.set(e,n)}function lF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new LD(t);n.mount(e),pa.set(e,n)}function cF(e,t){return jt(e)||typeof e=="number"||typeof e=="string"&&!Bf(t)}function vw(e,t,n,r){const o=[];if(cF(e,t))o.push(w0(e,Bf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=pw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?sF:lF;pa.has(l)||c(l);const u=pa.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...df(u,{...t,transition:d},{}))}}return o}function uF(e,t,n){const r=[];return nF(e,t,n,{spring:ua}).forEach(({keyframes:i,transition:a},s)=>{r.push(...vw(s,i,a))}),r}function dF(e){return Array.isArray(e)&&e.some(Array.isArray)}function yw(e){function t(n,r,o){let i=[],a;if(dF(n))i=uF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=vw(n,r,c,e)}const s=new LM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{ra(e.animations,s)})),s}return t}const bw=yw();function fF(){const e=On(()=>({current:null,animations:[]})),t=On(()=>yw(e));return U2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class pF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const hF=()=>new pF;function mF(){return On(hF)}const xw=S.createContext(null);function gF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?p_(e,o,o+i):e}function vF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=On(()=>Be[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,h)=>{const m=l.findIndex(y=>v===y.value);m!==-1?l[m].layout=h[n]:l.push({value:v,layout:h[n]}),l.sort(bF)},updateOrder:(v,h,m)=>{if(c.current)return;const y=gF(l,v,h,m);l!==y&&(c.current=!0,r(y.map(yF).filter(x=>o.indexOf(x)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return g.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(xw.Provider,{value:d,children:e})})}const ww=S.forwardRef(vF);function yF(e){return e.value}function bF(e,t){return e.layout.min-t.layout.min}const Il=50,Sw=25,xF=new Set(["auto","scroll"]),wa=new WeakMap,Sa=new WeakMap;let Ta=null;function wF(){if(Ta){const e=Hf(Ta,"y");e&&(Sa.delete(e),wa.delete(e));const t=Hf(Ta,"x");t&&t!==e&&(Sa.delete(t),wa.delete(t)),Ta=null}}function SF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return xF.has(r)}function Hf(e,t){let n=e?.parentElement;for(;n;){if(SF(n,t))return n;n=n.parentElement}return null}function TF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Il){const l=1-a/Il;return{amount:-Sw*l*l,edge:"start"}}else if(s<Il){const l=1-s/Il;return{amount:Sw*l*l,edge:"end"}}return{amount:0,edge:null}}function EF(e,t,n,r){if(!e)return;Ta=e;const o=Hf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=TF(i,o,n);if(s===null){Sa.delete(o),wa.delete(o);return}if(Sa.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Sa.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;wa.set(o,u)}if(a>0){const c=wa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function Tw(e,t=0){return jt(e)?e:ho(t)}function kF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=On(()=>Be[r]),u=S.useContext(xw),d={x:Tw(t.x),y:Tw(t.y)},f=Y2([d.x,d.y],([y,x])=>y||x?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:h,groupRef:m}=u;return g.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,x)=>{const{velocity:b,point:E}=x,T=d[p].get();h(n,T,b[p]),EF(m.current,E[p],p,b[p]),o&&o(y,x)},onDragEnd:(y,x)=>{wF(),i&&i(y,x)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const Ew=S.forwardRef(kF);var Al={exports:{}},Wf={},Pl={exports:{}},qf={};var kw;function CF(){if(kw)return qf;kw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),h=v[0].inst,m=v[1];return i(function(){h.value=p,h.getSnapshot=f,l(h)&&m({inst:h})},[d,p,f]),o(function(){return l(h)&&m({inst:h}),d(function(){l(h)&&m({inst:h})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return qf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qf}var Uf={};var Cw;function IF(){return Cw||(Cw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=v();if(!d){var m=v();i(h,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:h,getSnapshot:v}});var y=m[0].inst,x=m[1];return l(function(){y.value=h,y.getSnapshot=v,n(y)&&x({inst:y})},[p,h,v]),s(function(){return n(y)&&x({inst:y}),p(function(){n(y)&&x({inst:y})})},[p]),c(h),h}function n(p){var v=p.getSnapshot;p=p.value;try{var h=v();return!i(p,h)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Uf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Uf}var Iw;function Aw(){return Iw||(Iw=1,process.env.NODE_ENV==="production"?Pl.exports=CF():Pl.exports=IF()),Pl.exports}var Pw;function AF(){if(Pw)return Wf;Pw=1;var e=S,t=Aw();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 Wf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function y(I){if(!x){if(x=!0,b=I,I=f(I),p!==void 0&&h.hasValue){var w=h.value;if(p(w,I))return E=w}return E=I}if(w=E,r(b,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(b=I,w):(b=I,E=k)}var x=!1,b,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var m=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=m},[m]),l(m),m},Wf}var Gf={};var Ow;function PF(){return Ow||(Ow=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=Aw(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function y(I){if(!x){if(x=!0,b=I,I=f(I),p!==void 0&&h.hasValue){var w=h.value;if(p(w,I))return E=w}return E=I}if(w=E,r(b,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(b=I,w):(b=I,E=k)}var x=!1,b,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var m=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gf}var _w;function OF(){return _w||(_w=1,process.env.NODE_ENV==="production"?Al.exports=AF():Al.exports=PF()),Al.exports}OF();var ai=function(){return ai=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},ai.apply(this,arguments)};function Ea(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 Mw(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 si=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},_F=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},MF=function(e){return Object.entries(e)},Dw=function(e){return e instanceof Promise},Nw=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)},ai(ai({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},DF=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,Mw([],Ea(a),!1)),u=function(d,f){return n(function(p){return Nw(d,p,i,f)})};return Dw(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))}},NF=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,Mw([],Ea(a),!1)),c=function(u){return n(function(d){return Nw(u,d,i,o.current)})};return Dw(l)?l.then(function(u){return c(u)}):c(l)}},Yf=function(e,t,n){var r,o,i,a=Ea(S.useState(function(){return e}),2),s=a[0],l=a[1],c=si(s),u=si((r=n?.props)!==null&&r!==void 0?r:{}),d=si(t),f=si((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=si((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),h=_F(s),m=si(h),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var E=y.current;f.current.forEach(function(T){T(s,h,E)})}},[s,f,h]);var x=Ea(S.useState(function(){var E=function(){return u.current},T=d.current({props:E,state:function(){return c.current},initialState:v.current,previousState:function(){return m.current}});return MF(T).reduce(function(I,w){var k,P=Ea(w,2),_=P[0],F=P[1];return ai(ai({},I),(k={},k[_]=n?.debug?DF(_,F,l,E,y,p.current):NF(_,F,l,E,y,p.current),k))},{})}),1),b=x[0];return[s,b,u.current]},FF=Object.defineProperty,Fw=Object.getOwnPropertySymbols,LF=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,Lw=(e,t,n)=>t in e?FF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$F=(e,t)=>{for(var n in t||(t={}))LF.call(t,n)&&Lw(e,n,t[n]);if(Fw)for(var n of Fw(t))VF.call(t,n)&&Lw(e,n,t[n]);return e},Kf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},zF=(e,t,n,r)=>_l(Kf,e,t,n,r),li=e=>typeof e=="object",Nr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(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=>Nr(e[r],t[r]))},jF=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,RF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),Vw=e=>["string","number"].includes(typeof e),$w=e=>e==null||e?.length===0||e==="",zw={eq:Nr,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:$w,notEmpty:e=>!$w(e),in:(e,t)=>Kf(t,n=>Nr(e,n)),notIn:(e,t)=>jw(t,n=>!Nr(e,n))},BF=e=>{if(e in zw)return zw[e];throw new Error("Linq - Symbol not found")},ci=(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},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=BF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},HF=(e,t,n,r)=>_l(ci,e,t,n,r),jw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},WF=(e,t,n,r)=>_l(jw,e,t,n,r),Rw=e=>{if(e===null)return null;const t=$F({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?Rw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Bw=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1},qF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},UF=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Nr(o,t)):n===r.indexOf(t)),GF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Hw=(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())},YF=(e,t)=>Hw(e,n=>n[t]),Ww=(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},KF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZF=(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 Ol(e)&&Ol(t)?r.map(a=>Number.parseInt(a)):r},Zf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,a]=KF(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return ZF(e,t,r)},XF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Zf(r,o,1):Zf(r,i,Number.parseInt(o,10))}return Vw(e)&&Vw(t)?Zf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Xf=(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},qw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},QF=(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)},JF=(e,t,n,r)=>_l(QF,e,t,n,r),Uw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(RF(t))},Gw=(e=>(e.Asc="asc",e.Desc="desc",e))(Gw||{}),eL=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),tL=(e,t)=>e.sort(eL(t)),nL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rL=class Rh{constructor(t=[]){this.array=t}static Range(...t){return XF(...t)}static New(t){return new Rh(t)}Where(t,n,r){return this.array=HF(this.array,t,n,r),this}Some(t,n,r){return zF(this.array,t,n,r)}All(t,n,r){return WF(this.array,t,n,r)}Reverse(){return this.array=qw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=JF(this.array,t,n,r),this}Distinct(){return this.array=UF(this.array),this}First(t){return t===void 0?this.array[0]:GF(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?Xf((n,r)=>n+r,0,this.array):Xf((n,r)=>n+jF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return YF(this.array,t)}GroupWith(t){return Hw(this.array,t)}Except(t){return ci(this.array,n=>!Bw(t,n))}Intersect(t){return ci(this.array,n=>Bw(t,n))}OrderBy(t,n){let r;return r=t?Uw(this.array,t):this.array.toSorted(),this.array=n==="desc"?qw(r):r,this}Includes(t){return Kf(this.array,n=>Nr(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 Xf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Ww(this.array,n=>[t,n]))}Zip(t,n){return Ww(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Rh(Rw(this.array))}ToObject(t){return qF(this.array,t)}Sort(t){return Array.isArray(t)?tL(this.array,t):Uw(this.array,t)}Unique(t){return nL(this.array,t)}},Yw=rL;const Ml=0,Fr=1,ui=2,Kw=4;function Zw(e){return()=>e}function oL(e){e()}function ka(e,t){return n=>e(t(n))}function Xw(e,t){return()=>e(t)}function iL(e,t){return n=>e(t,n)}function Qf(e){return e!==void 0}function aL(...e){return()=>{e.map(oL)}}function di(){}function Dl(e,t){return t(e),e}function sL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Fr,t)}function ze(e,t){e(Ml,t)}function Jf(e){e(ui)}function Tt(e){return e(Kw)}function Ie(e,t){return st(e,iL(t,Ml))}function Fn(e,t){const n=e(Fr,r=>{n(),t(r)});return n}function Qw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Jw(e,t){return e===t}function xt(e=Jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function _e(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ce(e,...t){const n=lL(...t);return((r,o)=>{switch(r){case ui:Jf(e);return;case Fr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function mo(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function lL(...e){return t=>e.reduceRight(sL,t)}function cL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Fr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),di);case ui:r(),n=null;return}}}function he(e){let t=e;const n=Ye();return((r,o)=>{switch(r){case Ml:t=o;break;case Fr:{o(t);break}case Kw:return t}return n(r,o)})}function Qt(e,t){return Dl(he(t),n=>Ie(e,n))}function Ye(){const e=[];return((t,n)=>{switch(t){case Ml:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case Fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function fn(e){return Dl(Ye(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:uL(),singleton:n}}const uL=()=>Symbol();function dL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Vt(...e){const t=Ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{n[a]=l,r=r|s,r===o&&ze(t,n)})}),function(i,a){switch(i){case ui:{Jf(t);return}case Fr:return r===o&&a(n),st(t,a)}}}function Me(e,t=Jw){return ce(e,xt(t))}function ep(...e){return function(t,n){switch(t){case ui:return;case Fr:return aL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const fL={0:"debug",3:"error",1:"log",2:"warn"},pL=()=>typeof globalThis>"u"?window:globalThis,Lr=Qe(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=pL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[fL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return tp(e,t,n).callbackRef}function tp(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 e1(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=hL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const h=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(h,0),viewportHeight:y}),i?.(s?t1("column-gap",getComputedStyle(u).columnGap,o):t1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return tp(c,n,l)}function hL(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function t1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function np(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=tp(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const tn=Qe(()=>{const e=Ye(),t=Ye(),n=he(0),r=Ye(),o=he(0),i=Ye(),a=Ye(),s=he(0),l=he(0),c=he(0),u=he(0),d=Ye(),f=Ye(),p=he(!1),v=he(!1),h=he(!1);return Ie(ce(e,be(({scrollTop:m})=>m)),t),Ie(ce(e,be(({scrollHeight:m})=>m)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ca={lvl:0};function n1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ft(e){return e===Ca}function Ia(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Ia(e.l,t):Ia(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function pn(e,t,n){return ft(e)?i1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?a1(Rt(e,{l:pn(e.l,t,n)})):a1(Rt(e,{r:pn(e.r,t,n)}))}function fi(){return Ca}function pi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return mL(op(e,r,n))}function rp(e,t){if(ft(e))return Ca;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=o1(r);return Nl(Rt(e,{k:i,l:r1(r),v:a}))}}else return t<n?Nl(Rt(e,{l:rp(r,t)})):Nl(Rt(e,{r:rp(o,t)}))}function go(e){return ft(e)?[]:[...go(e.l),{k:e.k,v:e.v},...go(e.r)]}function op(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(op(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(op(i,t,n))),s}function Nl(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(ip(t))return s1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ip(e))return ap(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=ip(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ap(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return i1(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 r1(e){return ft(e.r)?e.l:Nl(Rt(e,{r:r1(e.r)}))}function ip(e){return ft(e)||e.lvl>e.r.lvl}function o1(e){return ft(e.r)?[e.k,e.v]:o1(e.r)}function i1(e,t,n,r=Ca,o=Ca){return{k:e,l:r,lvl:n,r:o,v:t}}function a1(e){return ap(s1(e))}function s1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function ap(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function mL(e){return n1(e,({k:t,v:n})=>({index:t,value:n}))}function l1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const sp=Qe(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function c1(e,t,n){return e[Fl(e,t,n)]}function Fl(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 gL(e,t,n,r){const o=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!ft(e.groupOffsetTree)}function lp({index:e},t){return t===e?0:t<e?-1:1}function vL(){return{groupIndices:[],groupOffsetTree:fi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fi()}}function yL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=pn(e,0,i);continue}const s=pi(e,a-1,o+1);if(s.some(kL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=rp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=pn(e,o+1,f));c&&(e=pn(e,a,i))}return[e,n]}function bL(e){return typeof e.groupIndex<"u"}function xL({offset:e},t){return t===e?0:t<e?-1:1}function Pa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=c1(t,e,lp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function u1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function d1(e,t,n){if(bL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=u1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function wL(e,t,n,r=0){return r>0&&(t=Math.max(t,c1(e,r,lp).offset)),n1(gL(e,t,n,xL),EL)}function SL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,h)=>pn(pn(v,h,f),h+1,p),a)}else[a,s]=yL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=cp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>pn(f,p,Pa(p,d,o)),fi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function TL(e){return go(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 f1(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 cp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Fl(o,t-1,lp),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of pi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function EL(e){return{index:e.index,value:e}}function kL(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 CL={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ye(),r=Ye(),o=Qt(r,0),i=Ye(),a=Ye(),s=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),p=he((w,k)=>Vn(w,CL[k])),v=he(void 0),h=he(0),m=vL(),y=Qt(ce(n,He(l,e,h),Qn(SL,m),xt()),m),x=Qt(ce(l,xt(),Qn((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ce(l,_e(w=>w.length>0),He(y,h),be(([w,k,P])=>{const _=w.reduce((F,$,D)=>pn(F,$,Pa($,k.offsetTree,P)||D),fi());return{...k,groupIndices:w,groupOffsetTree:_}})),y),Ie(ce(r,He(y),_e(([w,{lastIndex:k}])=>w<k),be(([w,{lastIndex:k,lastSize:P}])=>[{endIndex:k,size:P,startIndex:w}])),n),Ie(c,u);const b=Qt(ce(c,be(w=>w===void 0)),!0);Ie(ce(u,_e(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const k=Tt(d),P=Tt(l).length>0;return k?P?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ce(f,_e(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const k=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const $=w[F];$!==P&&(k.push({endIndex:F-1,size:P,startIndex:_}),P=$,_=F)}return k.push({endIndex:w.length-1,size:P,startIndex:_}),k})),n),Ie(ce(l,He(d,u),_e(([,w,k])=>w!==void 0&&k!==void 0),be(([w,k,P])=>{const _=[];for(let F=0;F<w.length;F++){const $=w[F],D=w[F+1];_.push({startIndex:$,endIndex:$,size:k}),D!==void 0&&_.push({startIndex:$+1,endIndex:D-1,size:P})}return _})),n);const E=fn(ce(n,He(y),Qn(({sizes:w},[k,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:m}),be(w=>w.changed)));st(ce(s,Qn((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:k}=Tt(y);if(w>0)ze(t,!0),ze(i,w+f1(w,k));else if(w<0){const P=Tt(x);P.length>0&&(w-=f1(-w,P)),ze(a,w)}}),st(ce(s,He(e)),([w,k])=>{w<0&&k("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},sn.ERROR)});const T=fn(i);Ie(ce(i,He(y),be(([w,k])=>{const P=k.groupIndices.length>0,_=[],F=k.lastSize;if(P){const $=Ia(k.sizeTree,0);let D=0,O=0;for(;D<w;){const j=k.groupIndices[O],M=k.groupIndices.length===O+1?1/0:k.groupIndices[O+1]-j-1;_.push({endIndex:j,size:$,startIndex:j}),_.push({endIndex:j+1+M-1,size:F,startIndex:j+1}),O++,D+=M+1}const N=go(k.sizeTree);return D!==w&&N.shift(),N.reduce((j,{k:M,v:C})=>{let V=j.ranges;return j.prevSize!==0&&(V=[...j.ranges,{endIndex:M+w-1,size:j.prevSize,startIndex:j.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:V}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return go(k.sizeTree).reduce(($,{k:D,v:O})=>({prevIndex:D+w,prevSize:O,ranges:[...$.ranges,{endIndex:D+w-1,size:$.prevSize,startIndex:$.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=fn(ce(a,He(y,h),be(([w,{offsetTree:k},P])=>{const _=-w;return Pa(_,k,P)})));return Ie(ce(a,He(y,h),be(([w,k,P])=>{if(k.groupIndices.length>0){if(ft(k.sizeTree))return k;let _=fi();const F=Tt(x);let $=0,D=0,O=0;for(;$<-w;){O=F[D];const N=F[D+1]-O-1;D++,$+=N+1}if(_=go(k.sizeTree).reduce((N,{k:j,v:M})=>pn(N,Math.max(0,j+w),M),_),$!==-w){const N=Ia(k.sizeTree,O);_=pn(_,0,N);const j=Ln(k.sizeTree,-w+1)[1];_=pn(_,1,j)}return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}else{const _=go(k.sizeTree).reduce((F,{k:$,v:D})=>pn(F,Math.max(0,$+w),D),fi());return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:T,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:h,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:E,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:b,unshiftWith:i}},bt(Lr,sp),{singleton:!0});function IL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const p1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ye(),a=Ye(),s=fn(ce(i,be(IL)));return Ie(ce(s,be(l=>l.totalCount)),n),Ie(ce(s,be(l=>l.groupIndices)),e),Ie(ce(Vt(o,t,r),_e(([l,c])=>Ll(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),Vr=Qe(([{log:e}])=>{const t=he(!1),n=fn(ce(t,_e(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt(Lr),{singleton:!0}),AL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function h1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!AL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oa=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ye(),v=Ye(),h=he(0);let m=null,y=null,x=null;function b(){m&&(m(),m=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),ze(l,!1)}return Ie(ce(p,He(n,d,r,h,s,a,f),He(e,i,o),be(([[E,T,I,w,k,P,_,F],$,D,O])=>{const N=h1(E),{align:j,behavior:M,offset:C}=N,V=w-1,z=d1(N,T,V);let R=Pa(z,T.offsetTree,$)+P;j==="end"?(R+=D+Ln(T.sizeTree,z)[1]-I+O,z===V&&(R+=_)):j==="center"?R+=(D+Ln(T.sizeTree,z)[1]-I+O)/2:R-=k,C&&(R+=C);const W=U=>{b(),U?(F("retrying to scroll to",{location:E},sn.DEBUG),ze(p,E)):(ze(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(b(),M==="smooth"){let U=!1;x=st(t,H=>{U=U||H}),m=Fn(u,()=>{W(U)})}else m=Fn(ce(t,PL(150)),W);return y=setTimeout(()=>{b()},1200),ze(l,!0),F("scrolling from index to",{behavior:M,index:z,top:R},sn.DEBUG),{behavior:M,top:R}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:h}},bt(er,tn,Lr),{singleton:!0});function PL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function up(e,t){e==0?t():requestAnimationFrame(()=>{up(e-1,t)})}function dp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _a=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=he(!0),l=he(0),c=he(!0);return Ie(ce(a,He(l),_e(([u,d])=>!!d),Xn(!1)),s),Ie(ce(a,He(l),_e(([u,d])=>!!d),Xn(!1)),c),st(ce(Vt(t,a),He(s,n,e,c),_e(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||Qf(p))&&!d&&!v),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),up(4,()=>{Fn(r,()=>{ze(s,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,Oa,Vr),{singleton:!0});function m1(e,t){return Math.abs(e-t)<1.01}const Ma="up",Da="down",OL="none",_L={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ML=0,Na=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=he(!1),s=he(!0),l=Ye(),c=Ye(),u=he(4),d=he(ML),f=Qt(ce(ep(ce(Me(o),mo(1),Xn(!0)),ce(Me(o),mo(1),Xn(!1),Qw(100))),xt()),!1),p=Qt(ce(ep(ce(n,Xn(!0)),ce(n,Xn(!1),Qw(200))),xt()),!1);Ie(ce(Vt(Me(o),Me(d)),be(([x,b])=>x<=b),xt()),s),Ie(ce(s,mr(50)),c);const v=fn(ce(Vt(r,Me(i),Me(t),Me(e),Me(u)),Qn((x,[{scrollHeight:b,scrollTop:E},T,I,w,k])=>{const P=E+T-b>-k,_={scrollHeight:b,scrollTop:E,viewportHeight:T};if(P){let $,D;return E>x.state.scrollTop?($="SCROLLED_DOWN",D=x.state.scrollTop-E):($="SIZE_DECREASED",D=x.state.scrollTop-E||x.scrollTopDelta),{atBottom:!0,atBottomBecause:$,scrollTopDelta:D,state:_}}let F;return _.scrollHeight>x.state.scrollHeight?F="SIZE_INCREASED":T<x.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":E<x.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},_L),xt((x,b)=>x&&x.atBottom===b.atBottom))),h=Qt(ce(r,Qn((x,{scrollHeight:b,scrollTop:E,viewportHeight:T})=>{if(m1(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:E};{const I=b-(E+T)<1;return x.scrollTop!==E&&I?{changed:!0,jump:x.scrollTop-E,scrollHeight:b,scrollTop:E}:{changed:!0,jump:0,scrollHeight:b,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),_e(x=>x.changed),be(x=>x.jump)),0);Ie(ce(v,be(x=>x.atBottom)),a),Ie(ce(a,mr(50)),l);const m=he(Da);Ie(ce(r,be(({scrollTop:x})=>x),xt(),Qn((x,b)=>Tt(p)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?Ma:Da,prevScrollTop:b},{direction:Da,prevScrollTop:0}),be(x=>x.direction)),m),Ie(ce(r,mr(50),Xn(OL)),m);const y=he(0);return Ie(ce(f,_e(x=>!x),Xn(0)),y),Ie(ce(o,mr(100),He(f),_e(([x,b])=>b),Qn(([x,b],[E])=>[b,E],[0,0]),be(([x,b])=>b-x)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:m,scrollVelocity:y}},bt(tn)),Fa="top",La="bottom",g1="none";function v1(e,t,n){return typeof e=="number"?n===Ma&&t===Fa||n===Da&&t===La?e:0:n===Ma?t===Fa?e.main:e.reverse:t===La?e.main:e.reverse}function y1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const fp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ye(),a=he(0),s=he(0),l=he(0),c=Qt(ce(Vt(Me(r),Me(o),Me(n),Me(i,Aa),Me(l),Me(a),Me(t),Me(e),Me(s)),be(([u,d,f,[p,v],h,m,y,x,b])=>{const E=u-x,T=m+y,I=Math.max(f-E,0);let w=g1;const k=y1(b,Fa),P=y1(b,La);return p-=x,p+=f+y,v+=f+y,v-=x,p>u+T-k&&(w=Ma),v<u-I+d+P&&(w=Da),w!==g1?[Math.max(E-f-v1(h,Fa,w)-k,0),E-I-y+d+v1(h,La,w)+P]:null}),_e(u=>u!=null),xt(Aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function DL(e,t,n){if(Ll(t)){const r=u1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const pp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vl(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 h=e[e.length-1];u=h.offset+h.size}const d=n-a,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:x1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:x1(t,o,i),topListHeight:t.reduce((h,m)=>m.size+h,0),totalCount:n}}function b1(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=dp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Vl(c,[],s,o,n,r)}function x1(e,t,n){if(e.length===0)return[];if(!Ll(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=pi(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function w1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const vo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const h=he([]),m=he(0),y=Ye(),x=he(0);Ie(i.topItemsIndexes,h);const b=Qt(ce(Vt(p,v,Me(l,Aa),Me(o),Me(r),Me(c),u,Me(h),Me(t),Me(n),Me(x),e),_e(([w,k,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!k&&!F}),be(([,,[w,k],P,_,F,$,D,O,N,j,M])=>{var C,V,z,R;const W=_,{offsetTree:U,sizeTree:H}=W,ee=Tt(m);if(P===0)return{...pp,totalCount:P};if(w===0&&k===0)return ee===0?{...pp,totalCount:P}:b1(ee,F,_,O,N,M||[]);if(ft(H))return ee>0?null:Vl(DL(dp(F,P),W,M),[],P,N,W,O);const re=[];if(D.length>0){const ae=D[0],oe=D[D.length-1];let J=0;for(const se of pi(H,ae,oe)){const ne=se.value,fe=Math.max(se.start,ae),pe=Math.min(se.end,oe);for(let ve=fe;ve<=pe;ve++)re.push({data:M?.[ve],index:ve,offset:J,size:ne}),J+=ne}}if(!$)return Vl([],re,P,N,W,O);const te=D.length>0?D[D.length-1]+1:0,G=wL(U,w,k,te);if(G.length===0)return null;const Y=P-1,Q=Dl([],ae=>{for(const oe of G){const J=oe.value;let se=J.offset,ne=oe.start;const fe=J.size;if(J.offset<w){ne+=Math.floor((w-J.offset+N)/(fe+N));const ve=ne-oe.start;se+=ve*fe+ve*N}ne<te&&(se+=(te-ne)*fe,ne=te);const pe=Math.min(oe.end,Y);for(let ve=ne;ve<=pe&&!(se>=k);ve++)ae.push({data:M?.[ve],index:ve,offset:se,size:fe}),se+=fe+N}}),de=w1(j,Fa),B=w1(j,La);if(Q.length>0&&(de>0||B>0)){const ae=Q[0],oe=Q[Q.length-1];if(de>0&&ae.index>te){const J=Math.min(de,ae.index-te),se=[];let ne=ae.offset;for(let fe=ae.index-1;fe>=ae.index-J;fe--){const pe=(V=(C=pi(H,fe,fe)[0])==null?void 0:C.value)!=null?V:ae.size;ne-=pe+N,se.unshift({data:M?.[fe],index:fe,offset:ne,size:pe})}Q.unshift(...se)}if(B>0&&oe.index<Y){const J=Math.min(B,Y-oe.index);let se=oe.offset+oe.size+N;for(let ne=oe.index+1;ne<=oe.index+J;ne++){const fe=(R=(z=pi(H,ne,ne)[0])==null?void 0:z.value)!=null?R:oe.size;Q.push({data:M?.[ne],index:ne,offset:se,size:fe}),se+=fe+N}}}return Vl(Q,re,P,N,W,O)}),_e(w=>w!==null),xt()),pp);Ie(ce(e,_e(Qf),be(w=>w?.length)),o),Ie(ce(b,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ce(b,be(w=>[w.top,w.bottom])),a),Ie(ce(b,be(w=>w.items)),y);const E=fn(ce(b,_e(({items:w})=>w.length>0),He(o,e),_e(([{items:w},k])=>w[w.length-1].originalIndex===k-1),be(([,w,k])=>[w-1,k]),xt(Aa),be(([w])=>w))),T=fn(ce(b,mr(200),_e(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),be(({items:w})=>w[0].index),xt())),I=fn(ce(b,_e(({items:w})=>w.length>0),be(({items:w})=>{let k=0,P=w.length-1;for(;w[k].type==="group"&&k<P;)k++;for(;w[P].type==="group"&&P>k;)P--;return{endIndex:w[P].index,startIndex:w[k].index}}),xt(l1)));return{endReached:E,initialItemCount:m,itemsRendered:y,listState:b,minOverscanItemCount:x,rangeChanged:I,startReached:T,topItemsIndexes:h,...f}},bt(er,p1,fp,_a,Oa,Na,Vr,sp),{singleton:!0}),S1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ye(),a=Qt(ce(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(Me(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,vo),{singleton:!0}),NL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Qt(ce(Vt(n,e,t),_e(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,S1),{singleton:!0}),T1=Qe(()=>({context:he(null)})),FL=({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,E1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ye();return Ie(ce(u,He(t,l,n,i,o,r,s),He(e),be(([[d,f,p,v,h,m,y,x],b])=>{const{align:E,behavior:T,calculateViewLocation:I=FL,done:w,...k}=d,P=d1(d,f,v-1),_=Pa(P,f.offsetTree,b)+h+m,F=_+Ln(f.sizeTree,P)[1],$=x+m,D=x+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:E,behavior:T,...k},viewportBottom:D,viewportTop:$});return O?w&&Fn(ce(a,_e(N=>!N),mo(Tt(a)?1:2)),w):w?.(),O}),_e(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,Oa,vo,Lr),{singleton:!0});function k1(e){return e?e==="smooth"?"smooth":"auto":!1}const LL=(e,t)=>typeof e=="function"?k1(e(t)):t&&k1(e),VL=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const v=he(!1),h=Ye();let m=null;function y(T){ze(a,{align:"end",behavior:T,index:"LAST"})}st(ce(Vt(ce(Me(t),mo(1)),l),He(Me(v),i,s,d),be(([[T,I],w,k,P,_])=>{let F=I&&P,$="auto";return F&&($=LL(w,k||_),F=F&&!!$),{followOutputBehavior:$,shouldFollow:F,totalCount:T}}),_e(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:I})=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T)}):m=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T),m=null})});function x(T){const I=Fn(o,w=>{T&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ce(Vt(Me(v),t,c),_e(([T,,I])=>T&&I),Qn(({value:T},[,I])=>({refreshed:T===I,value:I}),{refreshed:!1,value:0}),_e(({refreshed:T})=>T),He(v,t)),([,T])=>{Tt(s)&&x(T!==!1)}),st(h,()=>{x(Tt(v)!==!1)}),st(Vt(Me(v),o),([T,I])=>{T&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const b=he(null),E=Ye();return Ie(ep(ce(Me(r),be(T=>{var I;return(I=T?.length)!=null?I:0})),ce(Me(t))),E),st(ce(Vt(ce(E,mo(1)),l),He(Me(b),s,d,f),be(([[T,I],w,k,P,_])=>I&&k&&w?.({context:_,totalCount:T,scrollingInProgress:P})),_e(T=>!!T),mr(0)),T=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,T)}):m=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,T),m=null})}),{autoscrollToBottom:h,followOutput:v,scrollIntoViewOnChange:b}},bt(er,Na,Oa,_a,Vr,Lr,tn,T1,E1)),$L=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ce(s,He(i),_e(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>b1(l,c,u,d,f,p))),a),{}),bt(er,_a,vo,Vr),{singleton:!0}),zL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return st(ce(e,He(r),_e(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ce(n,mo(1),_e(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Vr,tn,vo),{singleton:!0}),C1=Qe(([{scrollVelocity:e}])=>{const t=he(!1),n=Ye(),r=he(!1);return Ie(ce(e,He(r,t,n),_e(([o,i])=>!!i),be(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),xt()),t),st(ce(Vt(t,e,n),He(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Na),{singleton:!0}),hp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ye(),r=Ye(),o=Ye(),i=he(!1),a=he(void 0);return Ie(ce(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ce(t,He(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),jL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ye(),u=he(void 0),d=he(null),f=he(null);return Ie(s,d),Ie(l,f),st(ce(c,He(t,r,a,d,f,n)),([p,v,h,m,y,x,b])=>{const E=TL(v.sizeTree);m&&y!==null&&x!==null&&(h=y.scrollTop-x.offsetTop),h-=b,p({ranges:E,scrollTop:h})}),Ie(ce(u,_e(Qf),be(RL)),o),Ie(ce(i,He(u),_e(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,_a,Vr,hp));function RL(e){return{align:"start",index:0,offset:e.scrollTop}}const BL=Qe(([{topItemsIndexes:e}])=>{const t=he(0);return Ie(ce(t,_e(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(vo));function I1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const HL=I1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WL=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:v}])=>{const h=fn(ce(l,He(a),Qn(([,y,x,b],[{bottom:E,items:T,offsetBottom:I,totalCount:w},k])=>{const P=E+I;let _=0;return x===w&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(_=P-b,_!==0&&(_+=k))),[_,T,w,P]},[0,[],0,0]),_e(([y])=>y!==0),He(r,s,n,o,p,v),_e(([,y,x,b,,,E])=>!E&&!b&&y!==0&&x===Ma),be(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function m(y){y>0?(ze(t,{behavior:"auto",top:-y}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-y}))}return st(ce(h,He(e,i)),([y,x,b])=>{b&&HL()?ze(e,x-y):m(-y)}),st(ce(Vt(Qt(i,!1),e,v),_e(([y,x,b])=>!y&&!b&&x!==0),be(([y,x])=>x),mr(1)),m),Ie(ce(d,be(y=>({top:-y}))),t),st(ce(c,He(f,u),be(([y,{groupIndices:x,lastSize:b,sizeTree:E},T])=>{function I(w){return w*(b+T)}if(x.length===0)return I(y);{let w=0;const k=Ia(E,0);let P=0,_=0;for(;P<y;){P++,w+=k;let F=x.length===_+1?1/0:x[_+1]-x[_]-1;P+F>y&&(w-=k,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{ze(e,y),requestAnimationFrame(()=>{ze(t,{top:y}),requestAnimationFrame(()=>{ze(e,0),ze(v,!1)})})}),{deviation:e}},bt(tn,Na,vo,er,Lr,sp)),qL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(fp,$L,Vr,C1,S1,zL,NL,hp,E1,Lr,T1)),A1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:h,scrolledToInitialItem:m},y,x,b,E,{scrollToIndex:T},I,{topItemCount:w},{groupCounts:k},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:$,rangeChanged:D,...O}=E;return Ie(D,P.scrollSeekRangeChanged),Ie(ce(P.windowViewportRect,be(N=>N.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:h,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:$,totalCount:f,...b,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:T,statefulTotalCount:d,trackItemSizes:p,rangeChanged:D,...O,...P,...y,sizes:u,...x}},bt(er,_a,tn,jL,VL,vo,Oa,WL,BL,p1,qL));function UL(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 $l=typeof document<"u"?S.useLayoutEffect:S.useEffect;function mp(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(m,y){m.propsReady&&ze(m.propsReady,!1);for(const x of r){const b=m[t.required[x]];ze(b,y[x])}for(const x of o)if(x in y){const b=m[t.optional[x]];ze(b,y[x])}m.propsReady&&ze(m.propsReady,!0)}function c(m){return i.reduce((y,x)=>(y[x]=b=>{const E=m[t.methods[x]];ze(E,b)},y),{})}function u(m){return a.reduce((y,x)=>(y[x]=cL(m[t.events[x]]),y),{})}const d=S.forwardRef((m,y)=>{const{children:x,...b}=m,[E]=S.useState(()=>Dl(dL(e),w=>{l(w,b)})),[T]=S.useState(Xw(u,E));$l(()=>{for(const w of a)w in b&&st(T[w],b[w]);return()=>{Object.values(T).map(Jf)}},[b,T,E]),$l(()=>{l(E,b)}),S.useImperativeHandle(y,Zw(c(E)));const I=n;return g.jsx(s.Provider,{value:E,children:n?g.jsx(I,{...UL([...r,...o,...a],b),children:x}):x})}),f=m=>{const y=S.useContext(s);return S.useCallback(x=>{ze(y[m],x)},[y,m])},p=m=>{const y=S.useContext(s)[m],x=S.useCallback(b=>st(y,b),[y]);return S.useSyncExternalStore(x,()=>Tt(y),()=>Tt(y))},v=m=>{const y=S.useContext(s)[m],[x,b]=S.useState(Xw(Tt,y));return $l(()=>st(y,E=>{E!==x&&b(Zw(E))}),[y,x]),x},h=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(m,y)=>{const x=S.useContext(s)[m];$l(()=>st(x,y),[y,x])},useEmitterValue:h,usePublisher:f}}const zl=S.createContext(void 0),P1=S.createContext(void 0),O1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function gp(e){return"self"in e}function GL(e){return"body"in e}function _1(e,t,n,r=di,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,h;const m=f.target;if(GL(m)||gp(m)){const x=gp(m)?m:m.defaultView;h=i?x.scrollX:x.scrollY,p=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,v=i?x.innerWidth:x.innerHeight}else h=i?m.scrollLeft:m.scrollTop,p=i?m.scrollWidth:m.scrollHeight,v=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(h,0),viewportHeight:v})};f.suppressFlushSync?y():Fi.flushSync(y),s.current!==null&&(h===s.current||h<=0||h===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let h,m,y;gp(p)?(m=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),h=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(m=p[i?"scrollWidth":"scrollHeight"],h=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const x=m-h;if(f.top=Math.ceil(Math.max(Math.min(x,f.top),0)),m1(h,m)||f.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:h}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const vp="-webkit-sticky",M1="sticky",yp=I1(()=>{if(typeof document>"u")return M1;const e=document.createElement("div");return e.style.position=vp,e.style.position===vp?vp:M1});function bp(e){return e}const YL=Qe(()=>{const e=he(s=>`Item ${s}`),t=he(s=>`Group ${s}`),n=he({}),r=he(bp),o=he("div"),i=he(di),a=(s,l=null)=>Qt(ce(n,be(c=>c[s]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),KL=Qe(([e,t])=>({...e,...t}),bt(A1,YL)),ZL=({height:e})=>g.jsx("div",{style:{height:e}}),XL={overflowAnchor:"none",position:yp(),zIndex:1},D1={overflowAnchor:"none"},QL={...D1,display:"inline-block",height:"100%"},N1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=xn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=xn("gap"),h=Fe("horizontalDirection"),{callbackRef:m}=e1(n,f,d,e?di:s,p,v,o,h,Fe("skipAnimationFrameInResizeObserver")),[y,x]=S.useState(0);Sp("deviation",O=>{y!==O&&x(O)});const b=Fe("EmptyPlaceholder"),E=Fe("ScrollSeekPlaceholder")||ZL,T=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),$=Fe("initialItemFinalLocationReached"),D=e?{}:{boxSizing:"border-box",...h?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...$?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?g.jsx(b,{...wt(b,c)}):g.jsx(T,{...wt(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:D,children:(e?t.topItems:t.items).map(O=>{const N=O.originalIndex,j=k(N+t.firstItemIndex,O.data,c);return P?S.createElement(E,{...wt(E,c),height:O.size,index:O.index,key:j,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":N,"data-item-index":O.index,"data-known-size":O.size,key:j,style:XL},u(O.index,c)):S.createElement(I,{...wt(I,c),...F1(I,O.data),"data-index":N,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:j,style:h?QL:D1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),JL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},eV={outline:"none",overflowX:"auto",position:"relative"},hi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),tV={position:yp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function F1(e,t){return{item:typeof e=="string"?void 0:t}}const nV=S.memo(function(){const e=Fe("HeaderComponent"),t=xn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),rV=S.memo(function(){const e=Fe("FooterComponent"),t=xn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=_1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?eV:JL,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function wp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:h,scrollerRef:m,scrollToCallback:y}=_1(s,c,l,v,f);return O1(()=>{var x;return m.current=f||((x=p.current)==null?void 0:x.ownerDocument.defaultView),()=>{m.current=null}},[m,f]),e("windowScrollTo",y),e("scrollBy",h),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const oV=({children:e})=>{const t=S.useContext(zl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:s,style:hi(o),children:e})},iV=({children:e})=>{const t=S.useContext(zl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=np(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(a),children:e})},aV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...tV,marginTop:`${n}px`},o=Fe("context");return g.jsx(t,{style:r,...wt(t,o),children:e})},sV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return g.jsxs(r||t?uV:cV,{...e,context:o,children:[n&&g.jsx(aV,{children:g.jsx(N1,{showTopList:!0})}),g.jsxs(r||t?iV:oV,{children:[g.jsx(nV,{}),g.jsx(N1,{}),g.jsx(rV,{})]})]})}),{Component:lV,useEmitter:Sp,useEmitterValue:Fe,usePublisher:xn}=mp(KL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},sV),cV=xp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:xn}),uV=wp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:xn}),Tp=lV,dV=Qe(()=>{const e=he(c=>g.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),a=he(bp),s=he(di),l=(c,u=null)=>Qt(ce(i,be(d=>d[c]),xt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),fV=Qe(([e,t])=>({...e,...t}),bt(A1,dV)),pV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),hV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),mV={overflowAnchor:"none"},L1={position:yp(),zIndex:2,overflowAnchor:"none"},V1=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),a=je("fixedHeaderHeight"),s=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||pV,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((h,m,y)=>(y===0?h.push(m.size):h.push(h[y-1]+m.size),h),[]),v=(e?t.topItems:t.items).map(h=>{const m=h.originalIndex,y=n(m+r,h.data,o),x=e?m===0?0:p[m-1]:0;return i?S.createElement(u,{...wt(u,o),height:h.size,index:h.index,key:y,type:h.type||"item"}):h.type==="group"?S.createElement(d,{...wt(d,o),"data-index":m,"data-item-index":h.index,"data-known-size":h.size,key:y,style:{...L1,top:a}},c(h.index,o)):S.createElement(f,{...wt(f,o),...F1(f,h.data),"data-index":m,"data-item-index":h.index,"data-known-size":h.size,"data-item-group-index":h.groupIndex,key:y,style:e?{...L1,top:a+x}:mV},s?l(h.index,h.groupIndex,h.data,o):l(h.index,h.data,o))});return g.jsx(g.Fragment,{children:v})}),gV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=e1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);Ep("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const h=je("EmptyPlaceholder"),m=je("FillerRow")||hV,y=je("TableBodyComponent"),x=je("paddingTopAddition"),b=je("statefulTotalCount"),E=je("context");if(b===0&&h)return g.jsx(h,{...wt(h,E)});const T=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+x+p-T,w=e.offsetBottom,k=I>0?g.jsx(m,{context:E,height:I},"padding-top"):null,P=w>0?g.jsx(m,{context:E,height:w},"padding-bottom"):null;return g.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,E),children:[k,t&&g.jsx(V1,{showTopList:!0}),g.jsx(V1,{}),P]})}),vV=({children:e})=>{const t=S.useContext(zl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:hi(!1),children:e})},yV=({children:e})=>{const t=S.useContext(zl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=np(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(!1),children:e})},bV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?SV:wV,d=n||t?yV:vV,f=je("TableComponent"),p=je("TableHeadComponent"),v=je("TableFooterComponent"),h=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,m=a?g.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,s),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[h,g.jsx(gV,{},"TableBody"),m]})})})}),{Component:xV,useEmitter:Ep,useEmitterValue:je,usePublisher:$n}=mp(fV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},bV),wV=xp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),SV=wp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),TV=xV,$1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},EV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:z1,floor:jl,max:Va,min:kp,round:j1}=Math;function R1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function kV(e){return{...EV,items:e}}function Rl(e,t){return e&&e.width===t.width&&e.height===t.height}function CV(e,t){return e&&e.column===t.column&&e.row===t.row}const IV=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:v,propsReady:h},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:E},T])=>{const I=he(0),w=he(0),k=he($1),P=he({height:0,width:0}),_=he({height:0,width:0}),F=Ye(),$=Ye(),D=he(0),O=he(null),N=he({column:0,row:0}),j=Ye(),M=Ye(),C=he(!1),V=he(0),z=he(!0),R=he(!1),W=he(!1);st(ce(v,He(V),_e(([G,Y])=>!!Y)),()=>{ze(z,!1)}),st(ce(Vt(v,z,_,P,V,R),_e(([G,Y,Q,de,,B])=>G&&!Y&&Q.height!==0&&de.height!==0&&!B)),([,,,,G])=>{ze(R,!0),up(1,()=>{ze(F,G)}),Fn(ce(c),()=>{ze(t,[0,0]),ze(z,!0)})}),Ie(ce(M,_e(G=>G!=null&&G.scrollTop>0),Xn(0)),w),st(ce(v,He(M),_e(([,G])=>G!=null)),([,G])=>{G&&(ze(P,G.viewport),ze(_,G.item),ze(N,G.gap),G.scrollTop>0&&(ze(C,!0),Fn(ce(c,mo(1)),Y=>{ze(C,!1)}),ze(l,{top:G.scrollTop})))}),Ie(ce(P,be(({height:G})=>G)),d),Ie(ce(Vt(Me(P,Rl),Me(_,Rl),Me(N,(G,Y)=>G&&G.column===Y.column&&G.row===Y.row),Me(c)),be(([G,Y,Q,de])=>({gap:Q,item:Y,scrollTop:de,viewport:G}))),j),Ie(ce(Vt(Me(I),r,Me(N,CV),Me(_,Rl),Me(P,Rl),Me(O),Me(w),Me(C),Me(z),Me(V)),_e(([,,,,,,,G])=>!G),be(([G,[Y,Q],de,B,ae,oe,J,,se,ne])=>{const{column:fe,row:pe}=de,{height:ve,width:Ae}=B,{width:me}=ae;if(J===0&&(G===0||me===0))return $1;if(Ae===0){const Ke=dp(ne,G),pt=Ke+Math.max(J-1,0);return kV(R1(Ke,pt,oe))}const K=B1(me,Ae,fe);let L,X;se?Y===0&&Q===0&&J>0?(L=0,X=J-1):(L=K*jl((Y+pe)/(ve+pe)),X=K*z1((Q+pe)/(ve+pe))-1,X=kp(G-1,Va(X,K-1)),L=kp(X,Va(0,L))):(L=0,X=-1);const le=R1(L,X,oe),{bottom:ue,top:Ee}=H1(ae,de,B,le),ke=z1(G/K),De=ke*ve+(ke-1)*pe-ue;return{bottom:ue,itemHeight:ve,items:le,itemWidth:Ae,offsetBottom:De,offsetTop:Ee,top:Ee}})),k),Ie(ce(O,_e(G=>G!==null),be(G=>G.length)),I),Ie(ce(Vt(P,_,k,N),_e(([G,Y,{items:Q}])=>Q.length>0&&Y.height!==0&&G.height!==0),be(([G,Y,{items:Q},de])=>{const{bottom:B,top:ae}=H1(G,de,Y,Q);return[ae,B]}),xt(Aa)),t);const U=he(!1);Ie(ce(c,He(U),be(([G,Y])=>Y||G!==0)),U);const H=fn(ce(Vt(k,I),_e(([{items:G}])=>G.length>0),He(U),_e(([[G,Y],Q])=>{const de=G.items[G.items.length-1].index===Y-1;return(Q||G.bottom>0&&G.itemHeight>0&&G.offsetBottom===0&&G.items.length===Y)&&de}),be(([[,G]])=>G-1),xt())),ee=fn(ce(Me(k),_e(({items:G})=>G.length>0&&G[0].index===0),Xn(0),xt())),re=fn(ce(Me(k),He(C),_e(([{items:G},Y])=>G.length>0&&!Y),be(([{items:G}])=>({endIndex:G[G.length-1].index,startIndex:G[0].index})),xt(l1),mr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ce(F,He(P,_,I,N),be(([G,Y,Q,de,B])=>{const ae=h1(G),{align:oe,behavior:J,offset:se}=ae;let ne=ae.index;ne==="LAST"&&(ne=de-1),ne=Va(0,ne,kp(de-1,ne));let fe=Cp(Y,B,Q,ne);return oe==="end"?fe=j1(fe-Y.height+Q.height):oe==="center"&&(fe=j1(fe-Y.height/2+Q.height/2)),se&&(fe+=se),{behavior:J,top:fe}})),l);const te=Qt(ce(k,be(G=>G.offsetBottom+G.bottom)),0);return Ie(ce(E,be(G=>({height:G.visibleHeight,width:G.visibleWidth}))),P),{customScrollParent:m,data:O,deviation:D,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:$,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:E,...p,gridState:k,horizontalDirection:W,initialTopMostItemIndex:V,totalListHeight:te,...f,endReached:H,propsReady:h,rangeChanged:re,startReached:ee,stateChanged:j,stateRestoreInProgress:C,...T}},bt(fp,tn,Na,C1,Vr,hp,Lr));function B1(e,t,n){return Va(1,jl((e+n)/(jl(t)+n)))}function H1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Cp(e,t,n,r[0].index);return{bottom:Cp(e,t,n,r[r.length-1].index)+o,top:i}}function Cp(e,t,n,r){const o=B1(e.width,n.width,t.column),i=jl(r/o),a=i*n.height+Va(0,i-1)*t.row;return a>0?a+t.row:a}const AV=Qe(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(bp),a=he("div"),s=he(di),l=(d,f=null)=>Qt(ce(t,be(p=>p[d]),xt()),f),c=he(!1),u=he(!1);return Ie(Me(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")}}),PV=Qe(([e,t])=>({...e,...t}),bt(IV,AV)),OV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=wn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=wn("itemDimensions"),f=wn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),h=wn("reportReadyState"),m=Jn(S.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const b=y.firstChild;if(b){const{height:E,width:T}=b.getBoundingClientRect();d({height:E,width:T})}f({column:q1("column-gap",getComputedStyle(y).columnGap,p),row:q1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return O1(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),v?null:g.jsx(l,{className:t,ref:m,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const x=o(y.index,y.data,u);return i?g.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},x):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:x},r(y.index,y.data,u))})})}),_V=S.memo(function(){const e=Et("HeaderComponent"),t=wn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),MV=S.memo(function(){const e=Et("FooterComponent"),t=wn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),DV=({children:e})=>{const t=S.useContext(P1),n=wn("itemDimensions"),r=wn("viewportDimensions"),o=Jn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:o,style:hi(!1),children:e})},NV=({children:e})=>{const t=S.useContext(P1),n=wn("windowViewportRect"),r=wn("itemDimensions"),o=Et("customScrollParent"),i=np(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:i,style:hi(!1),children:e})},FV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?VV:LV,o=n||t?NV:DV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(_V,{}),g.jsx(OV,{}),g.jsx(MV,{})]})})}),{useEmitter:W1,useEmitterValue:Et,usePublisher:wn}=mp(PV,{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"}},FV),LV=xp({useEmitter:W1,useEmitterValue:Et,usePublisher:wn}),VV=wp({useEmitter:W1,useEmitterValue:Et,usePublisher:wn});function q1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const U1=e=>{const t=e.Icon??Pg,n=Pt();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Ip=g.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),$a=e=>g.jsx(ln,{...e,as:e.as||"span",className:Oe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function $V(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 zV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>$V(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},jV=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()},[]),g.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:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},RV=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=Ju(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(jV,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?Ip:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},mi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[$o(10),Ds({fallbackAxisSideDirection:"end"}),Ms(),Bu({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:Jr,onOpenChange:(v,h)=>{const m=h?.relatedTarget;m&&m.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=jo(l),u=kr(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(no,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[g.jsx(Hu,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Ap={},G1;function BV(){return G1||(G1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(x){window.console.log(x)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const x=y.getItem(m);try{return JSON.parse(x)}catch{return x??null}},i=m=>Object.keys(m).reduce((y,x)=>({...y,[x]:o(x,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(y=>y(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],f={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=f.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,x={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),E=d.reduce((T,I)=>{const w=I.parse(x);return w===""?T:T.concat(w)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=E,u()}},p=m=>{const y=new Set,x=b=>{m().removeItem(b);const E=i(m());y.forEach(T=>T(E))};return{delete:x,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const E=m().getItem(b);return!n(E)},deleteAll:()=>{t(m(),x),y.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,E)=>{m().setItem(b,JSON.stringify(E)),y.forEach(T=>T(m()))}}},v=p(()=>window.sessionStorage),h=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=h,e.SessionStorage=v,e.createStorage=p})(Ap)),Ap}var za=BV();const Pp=e=>e.headerLabel??e.thead??e.id,Op=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var gi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(gi||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,HV=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},WV={},qV=(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})},UV=(e,t,n=WV)=>{const r=Cr()?null:za.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Yf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:qV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Cr()||za.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},GV=e=>{const t=Pr(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]},YV=()=>Cr()?void 0:document.querySelector('[data-component="modal-body"]'),KV=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),ZV=(e,t)=>e.toSorted(KV(t)),Y1=(e,t,n)=>({label:t,id:Bo(),type:n,value:e.id}),XV=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Y1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return g.jsx(S.Fragment,{children:g.jsx(mi,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(kg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(oo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(oo,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:g.jsx(ss,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},QV=e=>{const t=Pt(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=Y1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Pp(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?g.jsx(WC,{size:14}):null,n==="desc"?g.jsx(HC,{size:14}):null,n==="undefined"?g.jsx(kg,{size:14}):null]})},K1=S.createContext({}),JV=K1.Provider,e$=()=>S.useContext(K1),Mp=(e,t,n,r={})=>{const o=e.id,i=e.type??gi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Bo(),operation:l,label:Pp(e),name:o,type:i,value:"",...r}},Dp=()=>{const e=Pt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[gi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[gi.Boolean]:[t.is,t.isNot],[gi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},t$=e=>{const t=Pt(),n=Dp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Mp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return Mp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=_p(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(eI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(oo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Wo,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:g.jsx(ss,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},n$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Dp(),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=_p(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Wo,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ss,{className:"text-danger",size:14})})]})},r$={top:0,left:0,right:0,bottom:-1},o$=e=>{const t=Tu(),n=Pt(),r=e.filters.filter(h=>h.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=Dp(),l=o?nI:rI,c=S.useRef(null),u=h=>{const m=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==m))},d=S.useCallback(h=>{if(h===null)return;c.current=h;const m=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),f=e.sorters.find(h=>e.header.id===h.value),p=f?.type?f.type===Gw.Asc?"ascending":"descending":"none",v=Pp(e.header);return g.jsxs(Ew,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?g.jsx(mi,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:v})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(h=>g.jsx("li",{className:"my-1",children:g.jsx(n$,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(h=>h.concat(Mp(e.header,s.options,s.operations))),children:[g.jsx(xu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(QV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.jsx(Be.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:r$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:h=>{h.currentTarget.focus()},onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=m.delta.x;c.current.style.width=`${Math.abs(y+x)}px`}})]})},i$=e=>{const[t,n]=GV(e.setCols);return g.jsx(ww,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(Nn,{children:e.headers.map((r,o)=>g.jsx(o$,{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}`))})})},a$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(Nn,{children:n.children})})),s$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),l$=S.forwardRef(({context:e,...t},n)=>{const r=e$(),o={...t?.style,top:Re.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),c$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),u$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),d$={TableRow:c$,TableFoot:u$,TableHead:l$,Table:s$,TableBody:a$},f$=[0,0,0,0,0,0,0,0,0,0],p$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Ip:g.jsx(U1,{})}),h$=()=>g.jsx(S.Fragment,{}),m$=[],Z1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Pr(a),v=Pr(u.loadingMore),h=S.useMemo(()=>{if(u.loading)return f$;if(c)return u.rows;const x=new Yw(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:x.Where(b.name,b.operation.symbol,b.value)),r.length===0?x.Select():ZV(x.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,b=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return b.observe(x),()=>b.disconnect()},[v,p]);const m=h.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(TV,{components:d$,context:y,totalCount:h.length,itemContent:m?h$:RV,data:m?m$:h,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>g.jsx(i$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?g.jsx(p$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(zV,{...l}):null]})},g$=({item:e,onPointerDown:t})=>{const n=ho(0);return g.jsxs(Ew,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(JC,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},v$=e=>{const t=Pt(),n=Op(e.cols),r=mF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Yw(e.rows).GroupBy(u),v=e.cols.find(h=>h.id===u);e.setGroups(Ck(p).map((h,m)=>{const y=p[h];return{...v,groupId:Bo(),groupKey:u,index:m,rows:y,groupName:h}}))},s=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(iI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(oo,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),g.jsx(ro,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:g.jsx(ss,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(BN,{children:g.jsx(ww,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>g.jsx(g$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},y$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(t$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(XV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(v$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=_p(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),b$=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),x$=e=>{const t=Tu(),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(()=>Op(e.cols),[e.cols]),[i,a]=Yf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:b$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Bl(l?.filters??[],s.filters??[],e.setFilters),Bl(l?.sorters??[],s.sorters??[],e.setSorters),Bl(l?.groups??[],s.groups??[],e.setGroups),Bl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),g.jsx(JV,{value:n,children:g.jsxs(Nn,{initial:!1,children:[r?g.jsx(y$,{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?g.jsx(Z1,{...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}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(Z1,{...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}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>g.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Oe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?g.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",a),children:e}):o,g.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-6",s.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx($a,{className:"w-full"}),g.jsx($a,{className:"w-8/12"}),g.jsx($a,{className:"w-10/12"}),g.jsx($a,{className:"w-1/2"})]}):n})]});Hl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return g.jsxs(i,{...o,title:Re.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[g.jsx(a,{className:"font-semibold",children:o.title}),r?g.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const w$=e=>{const t=e.interactive??!0,n=e.Icon??bu;return g.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[g.jsx("div",{className:Oe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx($a,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},S$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(dr,{children:g.jsx(Mf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(Nn,{presenceAffectsLayout:!0,children:[e?g.jsx(Be.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?g.jsx(Ku,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.jsxs(Be.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(Mo,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),T$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=jo(o),s=fr(o,{role:"dialog"}),l=kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(S$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,h=`${r}-${p}`,m=()=>n({...v,id:h}),y=v.leading;return g.jsx(Be.li,{layout:!0,layoutId:`item-${h}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(Be.div,{layoutId:`toast-${h}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[v.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:v.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?g.jsx(y,{open:m}):null]})})]})})})},h)})})]})},E$=e=>g.jsx(S.Fragment,{children:e.children}),X1=()=>{const e=S.useContext(Kr);return e?e.parser:ls.hsla},Np=.3,Wl={duration:Np,type:"tween",ease:"easeInOut"},Q1=S.createContext(null),Fp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},vi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},k$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"M18 6 6 18"}),g.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"m6 6 12 12"})]}),C$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:vi.animate,initial:vi.initial,transition:Fp})}),I$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},A$={duration:.6,delay:.2,type:"tween",ease:"circOut"},P$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",O$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,J1=()=>S.useContext(Q1),_$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=X1(),s=J1(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=O$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=P$(e,l,n);return s?.steps&&100/s?.steps,g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(Be.div,{variants:I$,transition:A$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(Be.div,{initial:!1,animate:u,transition:Wl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:Wl,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:Wl,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:Wl,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(C$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(k$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},M$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Np*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Np,steps:S.Children.count(e.children)};return g.jsx(Q1.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},eS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},tS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},nS=S.createContext(""),D$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Lp=(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(!D$(a))return a}return n==="backward"?Lp(e,e.length-1,"backward"):Lp(e,-1,"forward")},rS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Lp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},oS={[tS.ArrowLeft]:(e,t)=>rS(t,"backward"),[tS.ArrowRight]:(e,t)=>rS(t,"forward")},N$=e=>{const[t,n]=eS(e.active),r=S.useRef(null),o=Pr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Re.keyof(oS,c)){const u=oS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(nS.Provider,{value:t,children:g.jsx(Hl,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:g.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},F$=()=>S.useContext(nS),L$=e=>{const t=F$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},iS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},V$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},aS=e=>g.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:iS,exit:iS.false,transition:V$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),$$=Io("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"}}),z$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return g.jsx(Nn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:g.jsx(aS,{"data-open":!!i,open:!!i,children:g.jsxs(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe($$({theme:n}),t),children:[g.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?g.jsx(Cg,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(bu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(oI,{"aria-hidden":"true",size:20}):null,r,g.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(Mo,{size:20})}):null]})})}):null})}),j$=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),R$=Symbol.for("react.lazy");function sS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sS(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():sS(e[o],null)}}}}const ql=A[" use ".trim().toString()];function H$(e){return typeof e=="object"&&e!==null&&"then"in e}function lS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===R$&&"_payload"in e&&H$(e._payload)}function W$(e){const t=q$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;lS(i)&&typeof ql=="function"&&(i=ql(i._payload));const s=A.Children.toArray(i),l=s.find(G$);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 g.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return g.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const cS=W$("Slot");function q$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(lS(o)&&typeof ql=="function"&&(o=ql(o._payload)),A.isValidElement(o)){const a=K$(o),s=Y$(i,o.props);return o.type!==A.Fragment&&(s.ref=r?B$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const U$=Symbol("radix.slottable");function G$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===U$}function Y$(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 K$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const uS=(e="")=>Oe("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),Vp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),dS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[v,h]=S.useState(null),m=S.useRef([]),y=S.useRef([]),x=S.useContext(Vp),b=Sr(),E=Tr(),T=JA(),I=wv(),w=b!==null,{floatingStyles:k,refs:P,context:_}=Gn({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Jr,placement:w?"right":"bottom-start",middleware:[$o({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ds(),Ms()]}),F=fr(_,{role:"menu"}),$=kr(_,{bubbles:!0}),D=_v(_,{move:!1,enabled:n,delay:{open:ty},handleClose:ey({blockPointerEvents:!0,requireIntent:!1})}),O=jo(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),N=Hs(_,{loop:!0,activeIndex:v,nested:w,listRef:m,onNavigate:h}),j=EP(_,{activeIndex:v,listRef:y,resetMs:CP,onMatch:u?h:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:V}=Yn([D,O,F,$,N,j]);S.useEffect(()=>{if(!E)return;const R=()=>d(!1),W=U=>{U.nodeId!==T&&U.parentId===b&&d(!1)};return E.events.on("click",R),E.events.on("menuopen",W),()=>{E.events.off("click",R),E.events.off("menuopen",W)}},[E,T,b]),S.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:b,nodeId:T})},[E,u,T,b]);const z=o?l.className:Oe(uS(l.className));return g.jsxs(eP,{id:T,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(cS,{...M(x.getItemProps({...l,onFocus(R){l.onFocus?.(R),p(!1),x.setHasFocusInside(!0)}})),children:s,className:z,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?x.activeIndex===I.index?0:-1:void 0}):g.jsxs("button",{type:"button",className:z,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?x.activeIndex===I.index?0:-1:void 0,...M(x.getItemProps({...l,onFocus(R){l.onFocus?.(R),p(!1),x.setHasFocusInside(!0)}})),children:[s,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(vu,{size:14})]})]})}),g.jsx(Vp.Provider,{value:{activeIndex:v,setActiveIndex:h,getItemProps:V,setHasFocusInside:p,isOpen:u},children:g.jsx(GA,{elementsRef:m,labelsRef:y,children:u&&g.jsx(dr,{children:g.jsx(no,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.jsx(t,{...C(),ref:P.setFloating,style:{...l.style,...k},className:Oe("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})})})})})]})}),Z$=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Vp),s=wv({label:n?null:e}),l=Tr(),c=s.index===a.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sr(s.ref,i),className:uS(`${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?g.jsx(t,{size:16}):null]})}),X$=S.forwardRef((e,t)=>Sr()===null?g.jsx(tP,{children:g.jsx(dS,{...e,isParent:!0,ref:t})}):g.jsx(dS,{...e,isParent:!1,ref:t})),$p=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 g.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[g.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,g.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Q$=({children:e,className:t="",size:n,...r})=>g.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[g.jsx("input",{...r,type:"radio",className:Oe("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]}),J$=sy("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
15
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ez=(e,t)=>Cr()?t:window.matchMedia(e).matches,tz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(ez(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},nz=()=>S.useContext(Kr).floatingRef??void 0,Sn="500ms",rz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},oz={enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Sn}},zp={drawer:e=>e==="left"?rz:oz,sheet:{enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Sn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}}}},iz=Io("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),fS={top:0,left:0,right:0,bottom:0},pS=e=>e*.6,az=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=pS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return g.jsx(Be.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:fS,whileDrag:{cursor:"grabbing"},className:Oe("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?g.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ul={drawer:"right",sheet:"none",dialog:"none"},sz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ul.drawer:Ul[o]:t?Ul[o]:Ul.sheet},lz=[],jp=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:h="",type:m="dialog",position:y,overlayClickClose:x=!1,closeOnFocusOut:b=!1,interactions:E=lz,...T},I)=>{const w=nz(),k=S.useRef(null),P=S.useRef(null),_=S.useId(),F=S.useId(),$=tz("(min-width: 64rem)"),D=sz($,p,m,y),O=$||p?zp[m]:zp.sheet,N=typeof O=="function"?O(D):O,j=$||p?m:"sheet",M=j!=="dialog",C=Gn({open:e,onOpenChange:a,strategy:"fixed"}),V=jo(C.context,{}),z=fr(C.context,{role:"dialog"}),R=kr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:oe=>{const J=oe.target;return x&&!!J?.isConnected}}),W=Yn([V,R,z].concat(E)),U=o,H=ho(void 0),ee=ho(void 0),re=S.useRef(!1),te=S.useRef(0);S.useEffect(()=>{H.set(void 0),ee.set(void 0)},[j,H,ee]);const G=()=>a(!1);S.useImperativeHandle(I,()=>({context:C.context,floating:P.current}),[C.context,P]);const Q=j==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:fS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(oe,J)=>{const ne=C.refs.floating.current.getBoundingClientRect(),fe=H.get()||ne.height,pe=Math.abs(fe-J.delta.y),ve=window.outerHeight,Ae=pS(ve);return pe>=Ae?H.set(pe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},de=ho(void 0),B=ho(void 0),ae=r?cS:Be.button;return g.jsxs(S.Fragment,{children:[o?g.jsx(ae,{ref:C.refs.setReference,...W.getReferenceProps(),layoutId:v,type:"button",children:U}):null,g.jsx(dr,{preserveTabOrder:!0,root:w,children:e?g.jsx(Ku,{lockScroll:!0,className:Oe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",j==="drawer"?"":"items-start justify-center lg:p-10 pt-10",h),children:g.jsx(Mf,{reducedMotion:d?"user":"always",children:g.jsx(no,{guards:!0,modal:!0,closeOnFocusOut:b,context:C.context,children:g.jsxs(Be.div,{...T,...t?{"aria-labelledby":_,"aria-describedby":F}:{"aria-label":s},...W.getFloatingProps({"aria-modal":e,ref:sr(C.refs.setFloating,P),className:Oe(iz({position:D,type:j}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:N,"data-component":"modal",style:j==="drawer"?{width:H}:{height:H,y:ee},children:[M&&u?g.jsx(az,{onChange:a,value:H,sheet:j==="sheet",position:D,parent:C.refs.floating}):null,t?g.jsx(Be.header,{...Q,className:"relative w-full isolate",children:t?g.jsx("h2",{id:_,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,g.jsx(Be.section,{ref:k,"data-component":"modal-body",className:Oe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(B.set(void 0),de.set(void 0),re.current){const oe=ee.get()||0,J=window.innerHeight*.2;oe>J?(await bw(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):bw(ee,0,{type:"spring",bounce:0,duration:.3}),re.current=!1}},onTouchStart:oe=>{const J=oe.changedTouches[0];de.set(J.pageY),B.set(J.pageY),re.current=!1},onTouchMove:oe=>{const se=oe.changedTouches[0].pageY,ne=B.get()||se,fe=k.current?.scrollTop||0;if(!re.current&&fe<=0&&se>ne&&j==="sheet"&&(re.current=!0,te.current=se),re.current){const pe=se-te.current;pe<0?ee.set(pe*.2):ee.set(pe)}B.set(se)},children:i}),n?g.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?g.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:g.jsx("button",{type:"button",onClick:G,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:g.jsx(Mo,{})})}):null]})})})}):null})]})}),cz=e=>{const[t,n]=fF();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:yD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),g.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},uz=e=>g.jsx("p",{...e,className:Oe("text-base leading-snug",e.className)}),dz=e=>g.jsx("p",{...e,className:Oe("mb-kilo text-sm text-secondary",e.className)}),fz=e=>g.jsx("div",{className:Oe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:g.jsxs(S.Fragment,{children:[g.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),g.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),hS=e=>g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),g.jsx("p",{className:"text-secondary typography",children:e.children})]}),pz=e=>g.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[g.jsx("div",{children:g.jsx(hS,{title:e.title,children:e.description})}),g.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),mS=e=>g.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Oe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),hz=()=>g.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:g.jsx(mS,{})}),mz=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=jo(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=kr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return g.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[g.jsx(ro,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:g.jsx(Be.span,{layoutId:o,children:e.trigger})}),g.jsx(Nn,{children:i?g.jsx(dr,{root:t,children:g.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:g.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},gz=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},vz=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},yz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),bz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,xz=({steps:e,active:t=!1,onClose:n=Ho,onFinish:r=Ho,onChange:o=Ho,labels:i})=>{const a=Pt(),[s,l]=S.useState(0),c=e[s],[u,d]=S.useState(null),[f,p]=S.useState(yz()),[v,h]=S.useState(!1),m=S.useRef(null),{width:y,height:x}=vz(),b={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:E,floatingStyles:T,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:Jr,middleware:[$o(10),Ds(),Ms(),Bu({element:m})]}),{getFloatingProps:w}=Yn([fr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{h(!1)},[s,t]),S.useEffect(()=>{if(!t||!c)return;const $=bz(c.element);$?(c.onEnter?.(),setTimeout(()=>{p($.getBoundingClientRect()),E.setReference($),d($)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,E]),S.useLayoutEffect(()=>{if(!u)return;const $=()=>p(u.getBoundingClientRect());return $(),window.addEventListener("scroll",$,{capture:!0,passive:!0}),window.addEventListener("resize",$,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",$,{capture:!0}),window.removeEventListener("resize",$,{capture:!0})}},[u,y,x]),gz(u,$=>{p($.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l($=>$+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l($=>$-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return g.jsx(dr,{children:g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[g.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("mask",{id:"driver-mask",children:[g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),g.jsx(Be.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>h(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),g.jsx(Nn,{mode:"wait",children:c&&v&&g.jsx("div",{...w(),ref:E.setFloating,style:u?T:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:g.jsxs(Be.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-card-background border-card-border",children:[u&&g.jsx(Hu,{ref:m,context:I,className:"fill-card-background stroke-card-border"}),c.title&&g.jsx("h3",{children:c.title}),c.description&&g.jsx(S.Fragment,{children:c.description}),g.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[g.jsx(ro,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:b.skip}),g.jsxs("div",{className:"flex gap-2",children:[F&&g.jsx(ro,{size:"small",theme:"neutral",onClick:P,children:b.previous}),g.jsx(ro,{size:"small",onClick:k,children:_?b.next:b.finish})]})]}),g.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},gS=6048e5,wz=864e5,Sz=6e4,Tz=36e5,Ez=1e3,vS=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vS in e?e[vS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Gl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function yS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function yi(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?yS(u,o+r*12):u,f=a||i?Gl(d,a+i*7):d,p=l+s*60,h=(c+p*60)*1e3;return ut(e,+f+h)}let kz={};function yo(){return kz}function tr(e,t){const n=yo(),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 bi(e,t){return tr(e,{...t,weekStartsOn:1})}function bS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=bi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=bi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Yl(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 Kl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function bo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function Cz(e,t,n){const[r,o]=Kl(n?.in,e,t),i=bo(r),a=bo(o),s=+i-Yl(i),l=+a-Yl(a);return Math.round((s-l)/wz)}function Iz(e,t){const n=bS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bi(r)}function Az(e){return ut(e,Date.now())}function Pz(e,t,n){const[r,o]=Kl(n?.in,e,t);return+bo(r)==+bo(o)}function Oz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zl(e){return!(!Oz(e)&&typeof e!="number"||isNaN(+Je(e)))}function _z(e,t){const[n,r]=Kl(e,t.start,t.end);return{start:n,end:r}}function xS(e,t){const{start:n,end:r}=_z(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function wS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Mz(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Dz(e,t){const n=yo(),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 Nz={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"}},Fz=(e,t,n)=>{let r;const o=Nz[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 Rp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Lz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$z={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zz={date:Rp({formats:Lz,defaultWidth:"full"}),time:Rp({formats:Vz,defaultWidth:"full"}),dateTime:Rp({formats:$z,defaultWidth:"full"})},jz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Rz=(e,t,n,r)=>jz[e];function ja(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 Bz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Hz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Wz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Uz={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"}},Gz={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"}},Yz={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:ja({values:Bz,defaultWidth:"wide"}),quarter:ja({values:Hz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ja({values:Wz,defaultWidth:"wide"}),day:ja({values:qz,defaultWidth:"wide"}),dayPeriod:ja({values:Uz,defaultWidth:"wide",formattingValues:Gz,defaultFormattingWidth:"wide"})};function Ra(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)?Zz(s,d=>d.test(a)):Kz(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 Kz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Zz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Xz(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 Qz=/^(\d+)(th|st|nd|rd)?/i,Jz=/\d+/i,ej={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},tj={any:[/^b/i,/^(a|c)/i]},nj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rj={any:[/1/i,/2/i,/3/i,/4/i]},oj={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},ij={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]},aj={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},sj={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]},lj={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},cj={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}},uj={ordinalNumber:Xz({matchPattern:Qz,parsePattern:Jz,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:ej,defaultMatchWidth:"wide",parsePatterns:tj,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:nj,defaultMatchWidth:"wide",parsePatterns:rj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:oj,defaultMatchWidth:"wide",parsePatterns:ij,defaultParseWidth:"any"}),day:Ra({matchPatterns:aj,defaultMatchWidth:"wide",parsePatterns:sj,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:lj,defaultMatchWidth:"any",parsePatterns:cj,defaultParseWidth:"any"})},SS={code:"en-US",formatDistance:Fz,formatLong:zz,formatRelative:Rz,localize:Yz,match:uj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dj(e,t){const n=Je(e,t?.in);return Cz(n,Mz(n))+1}function TS(e,t){const n=Je(e,t?.in),r=+bi(n)-+Iz(n);return Math.round(r/gS)+1}function Bp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=yo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function fj(e,t){const n=yo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Bp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function ES(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+fj(n,t);return Math.round(r/gS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $r={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},xi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return $r.y(e,t)},Y:function(e,t,n,r){const o=Bp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=bS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $r.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ES(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=TS(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){const r=dj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return dt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return dt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=xi.noon:r===0?o=xi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=xi.evening:r>=12?o=xi.afternoon:r>=4?o=xi.morning:o=xi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $r.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return IS(r);case"XXXX":case"XX":return xo(r);default:return xo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return IS(r);case"xxxx":case"xx":return xo(r);default:return xo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+CS(r,":");default:return"GMT"+xo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+CS(r,":");default:return"GMT"+xo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function CS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+dt(i,2)}function IS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):xo(e,t)}function xo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const AS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},PS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Hp={p:PS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return AS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",AS(r,t)).replace("{{time}}",PS(o,t))}},pj=/^D+$/,hj=/^Y+$/,mj=["D","DD","YY","YYYY"];function OS(e){return pj.test(e)}function _S(e){return hj.test(e)}function Wp(e,t,n){const r=gj(e,t,n);if(console.warn(r),mj.includes(e))throw new RangeError(r)}function gj(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 vj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bj=/^'([^]*?)'?$/,xj=/''/g,wj=/[a-zA-Z]/;function qp(e,t,n){const r=yo(),o=r.locale??SS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Zl(s))throw new RangeError("Invalid time value");let l=t.match(yj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Hp[d];return f(u,o.formatLong)}return u}).join("").match(vj).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Sj(u)};if(kS[d])return{isToken:!0,value:u};if(d.match(wj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(_S(d)||OS(d))&&Wp(d,t,String(e));const f=kS[d[0]];return f(s,d,o.localize,c)}).join("")}function Sj(e){const t=e.match(bj);return t?t[1].replace(xj,"'"):e}function Tj(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Ej(){return Object.assign({},yo())}function kj(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function Cj(e,t){return+Je(e)>+Je(t)}function Ij(e,t){return+Je(e)<+Je(t)}function Aj(e,t){const n=Pj(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Pj(e){return typeof e=="function"&&e.prototype?.constructor===e}const Oj=10;class MS{subPriority=0;validate(t,n){return!0}}class _j extends MS{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 Mj extends MS{priority=Oj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Aj(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new _j(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Dj extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},nr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Tz+i*Sz+a*Ez),rest:t.slice(n[0].length)}}function DS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Xl(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Up(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function NS(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 FS(e){return e%400===0||e%4===0&&e%100!==0}class Nj extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=NS(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 Fj extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Bp(t,o);if(r.isTwoDigitYear){const s=NS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Lj extends rt{priority=130;parse(t,n){return Xl(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),bi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Vj extends rt{priority=130;parse(t,n){return Xl(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 $j extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class zj extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class jj extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class Rj extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Bj(e,t,n){const r=Je(e,n?.in),o=ES(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class Hj extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Bj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Wj(e,t,n){const r=Je(e,n?.in),o=TS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class qj extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return bi(Wj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Uj=[31,28,31,30,31,30,31,31,30,31,30,31],Gj=[31,29,31,30,31,30,31,31,30,31,30,31];class Yj extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=FS(r),i=t.getMonth();return o?n>=1&&n<=Gj[i]:n>=1&&n<=Uj[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 Kj extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return FS(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 Gp(e,t,n){const r=yo(),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 Gl(i,u,n)}class Zj extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Xj extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Nt(_t(n.length,t),i);case"eo":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(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 Qj extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Nt(_t(n.length,t),i);case"co":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(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 Jj(e,t,n){const r=Je(e,n?.in),o=kj(r,n),i=t-o;return Gl(r,i,n)}class eR extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=Jj(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 tR extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class nR extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class rR extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class oR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class iR extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class aR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class sR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class lR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class cR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class uR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class dR extends rt{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","x"]}class fR extends rt{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","X"]}class pR extends rt{priority=40;parse(t){return DS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class hR extends rt{priority=20;parse(t){return DS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const mR={G:new Dj,y:new Nj,Y:new Fj,R:new Lj,u:new Vj,Q:new $j,q:new zj,M:new jj,L:new Rj,w:new Hj,I:new qj,d:new Yj,D:new Kj,E:new Zj,e:new Xj,c:new Qj,i:new eR,a:new tR,b:new nR,B:new rR,h:new oR,H:new iR,K:new aR,k:new sR,m:new lR,s:new cR,S:new uR,X:new dR,x:new fR,t:new pR,T:new hR},gR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yR=/^'([^]*?)'?$/,bR=/''/g,xR=/\S/,wR=/[a-zA-Z]/;function SR(e,t,n,r){const o=()=>ut(n,NaN),i=Ej(),a=i.locale??SS,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 Mj(r?.in,n)],d=t.match(vR).map(m=>{const y=m[0];if(y in Hp){const x=Hp[y];return x(m,a.formatLong)}return m}).join("").match(gR),f=[];for(let m of d){_S(m)&&Wp(m,t,e),OS(m)&&Wp(m,t,e);const y=m[0],x=mR[y];if(x){const{incompatibleTokens:b}=x;if(Array.isArray(b)){const T=f.find(I=>b.includes(I.token)||I.token===y);if(T)throw new RangeError(`The format string mustn't contain \`${T.fullToken}\` and \`${m}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);f.push({token:y,fullToken:m});const E=x.run(e,m,a.match,c);if(!E)return o();u.push(E.setter),e=E.rest}else{if(y.match(wR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=TR(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&xR.test(e))return o();const p=u.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,x)=>x.indexOf(m)===y).map(m=>u.filter(y=>y.priority===m).sort((y,x)=>x.subPriority-y.subPriority)).map(m=>m[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const h={};for(const m of p){if(!m.validate(v,c))return o();const y=m.set(v,h,c);Array.isArray(y)?(v=y[0],Object.assign(h,y[1])):v=y}return v}function TR(e){return e.match(yR)[1].replace(bR,"'")}function ER(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function kR(e,t){return Pz(ut(e,e),Az(e))}function CR(e,t,n){return Gl(e,-t,n)}function IR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Tj(a);return r.setMonth(t,Math.min(i,s)),r}function AR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=IR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function PR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function OR(e,t,n){return yS(e,-t,n)}function Ba(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=OR(e,o+r*12,n),d=CR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const _R=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function MR(e,t){return S.useRef(_R(e,t)).current}function LS(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 DR=/^(?<hour>\d\d):(?<min>\d\d)$/,NR={type:"spring",bounce:.3,duration:.6},VS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),$S={enter:VS(1),exit:VS(-1),middle:{x:"0%",opacity:1}},zS={exit:{visibility:"hidden"}},FR=e=>{const t=tr(wS(e));return xS({start:t,end:yi(t,{days:41})})},jS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),LR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=wS(new Date(1970,o,1).setMonth(o)),a=jS(i,n);return g.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yp={ArrowLeft:(e,t)=>t==="days"?Ba(e,{days:1}):Ba(e,{months:1}),ArrowRight:(e,t)=>t==="days"?yi(e,{days:1}):yi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ba(e,{weeks:1}):Ba(e,{years:1}),ArrowDown:(e,t)=>t==="days"?yi(e,{weeks:1}):yi(e,{years:1})},RS=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},wo=e=>e.getFullYear().toString().padStart(4,"0"),VR=(e,t,n)=>e===void 0||n===void 0?!1:Cj(t,e)&&Ij(t,n),$R=e=>{const t=Pt();return g.jsx(Be.tbody,{layout:!0,variants:$S,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return g.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?bo(e.date).toISOString():void 0),l=kR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=ER(i,e.stateDate),d=!u||c,f=e.rangeMode?VR(e.range?.from,i,e.range?.to):!1;return g.jsxs("td",{align:"center",className:Oe("relative",Re.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[g.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:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Re.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?g.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},zR=()=>bo(new Date),BS=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...v})=>{const h=S.useRef(Bo()),m=Pt(),y=sl(o),x=S.useRef(null),{date:b,range:E}=v,T=b||new Date,I=S.useRef(null),[w,k]=Yf({date:T,isAnimating:!1,year:wo(T),direction:void 0,range:{from:E?.from,to:E?.to},months:LR(h.current,T,y),selectMode:l?"from":void 0,week:xS({start:tr(T),end:Dz(T)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(RS(I.current||null,x,M.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const V=C(M.state().date);return{date:V,year:wo(V)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const V=M.state();if(V.isAnimating)return V;const z=yi(V.date,{months:1});return{date:z,isAnimating:!0,direction:1,year:wo(z)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const V=M.state();if(V.isAnimating)return V;const z=Ba(V.date,{months:1});return{date:z,isAnimating:!0,direction:-1,year:wo(z)}},onSelectDate:C=>{const V=M.state(),z=C.currentTarget.dataset.range==="true",R=C.currentTarget.dataset.date||"",W=new Date(R);return{date:W,year:wo(W),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:z?{from:V.selectMode==="from"?W:V.range.from,to:V.selectMode==="to"?W:V.range.to}:V.range}},onChangeMonth:C=>{const V=C.target.value,R=Array.from(C.target.options).find(U=>U.value===V),W=M.state();if(R){const U=R.dataset.index||"",H=new Date(M.state().date);return H.setMonth(+U),{...W,date:H,year:wo(H)}}return W},onKeyDown:C=>{const V=C.key,z=M.state();if(V in Yp){(V==="ArrowUp"||V==="ArrowDown")&&C.preventDefault();const R=M.state().date,W=Re.keyof(Yp,V)?Yp[V](R,C.shiftKey?"month":"days"):null;if(W!==null)return RS(C.target,x,W),{...z,date:W,year:wo(W)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,C,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(M.date),M),(M,C,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(M.date),M),(M,C,V)=>{const z=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&z&&t?(c?.(M.range),M):(z&&t&&c?.(M.date),M)}]}),P=FR(w.date),_=oy(P,7),F=w.date.toISOString(),$=jS(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[F,t]);const D=MR(M=>k.date(C=>PR(new Date(C),+M)),1200),O=M=>{const C=M.currentTarget.value;k.onChangeYear(C),s?.(new Date(C)),D(C)},N=LS((M,C)=>(M.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),j=()=>{const M=zR();k.date(()=>M),c?.(M)};return g.jsx(Mf,{transition:NR,children:g.jsxs("div",{ref:x,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:Oe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[g.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:g.jsx(Nn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:g.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[g.jsxs("header",{className:"relative flex justify-between",children:[g.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:zS,onClick:k.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(GC,{className:"h-4 w-4"})}),g.jsx(Be.span,{layout:!0,variants:$S,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:g.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[g.jsx("select",{value:$,onChange:k.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${$.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),g.jsx(Sg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),g.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:zS,onClick:k.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),g.jsxs(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[g.jsx("thead",{children:g.jsx("tr",{children:w.week.map(M=>g.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),g.jsx($R,{zip:_,range:E,styles:u,date:b||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},$)})}),f==="datetime"?g.jsx("section",{className:"grid items-center my-4",children:g.jsx(Wo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:b?qp(b,"HH:mm"):void 0,title:p||m.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,V=DR.exec(C);if(!V)return;const z=V.groups.hour,R=V.groups.min,W=AR(w.date,{hours:Number(z),minutes:Number(R),seconds:0});k.date(()=>W),c?.(W)}})}):null,g.jsx("footer",{className:"mt-2 text-center text-primary",children:g.jsx("button",{type:"button",onClick:j,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Kp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Kp.displayName="ProgressRootContext");function jR(){const e=A.useContext(Kp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Ir(51));return e}let Zp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const HS={status(e){return e==="progressing"?{[Zp.progressing]:""}:e==="complete"?{[Zp.complete]:""}:e==="indeterminate"?{[Zp.indeterminate]:""}:null}};function RR(e,t,n){return e==null?"":n?Uo(e,t,n):Uo(e/100,t,{style:"percent"})}function BR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const WS=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=BR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=rd(r);let h="indeterminate";Number.isFinite(l)&&(h=l===a?"complete":"progressing");const m=RR(l,i,v.current),y=A.useMemo(()=>({status:h}),[h]),x={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(m,l),role:"progressbar"},b=A.useMemo(()=>({formattedValue:m,max:a,min:s,setLabelId:p,state:y,status:h,value:l}),[m,a,s,p,y,h,l]),E=an("div",t,{state:y,ref:n,props:[x,d],stateAttributesMapping:HS});return g.jsx(Kp.Provider,{value:b,children:E})});process.env.NODE_ENV!=="production"&&(WS.displayName="ProgressRoot");const qS=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=jR(),u=Number.isFinite(l)&&l!==null?el(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:HS})});process.env.NODE_ENV!=="production"&&(qS.displayName="ProgressIndicator");const HR=e=>g.jsxs(WS,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Oe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[g.jsx(qS,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Oe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Re.number(e.percent)?g.jsx("p",{className:Oe("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]}),Ql=e=>g.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[g.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),g.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Ql.Icon=function(t){return g.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ql.Body=function(t){return g.jsx(ln,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Ql.Right=function(t){return g.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:g.jsx(ln,{...t,type:"button"})})};const WR=e=>g.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),qR=e=>g.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),US=new Date(1970,11,31),Xp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},GS={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},UR={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Qp=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},GR={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},YR={day:"numeric",month:"numeric",year:"numeric"},KR=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=sl(t),d=S.useId(),f=Pt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?GR:YR),[u,s]),[v,h]=S.useState(e||void 0),[m,y]=S.useState(!1),x=Qp(p,US).flatMap($=>Re.keyof(Xp,$.type)?Xp[$.type]($.value):[]),b=S.useMemo(()=>Qp(p,US).reduce(($,D)=>$+(Re.keyof(GS,D.type)?GS[D.type](D.value):""),""),[p]),E=e?.toISOString(),[T,I]=S.useState(v?Qp(p,v).reduce(($,D)=>$+(Re.keyof(Xp,D.type)?UR[D.type](v,D.value):""),""):""),w=$=>{const D=$.target.value;if(I(D),x.length===D.length&&x.every((N,j)=>{const M=D.charAt(j);return typeof N=="string"?M===N:N.test(M)})){const N=SR(D,b,new Date),j=s==="datetime"?N:bo(N);return h(j),r?.(j)}return h(void 0),r?.(void 0)};S.useEffect(()=>{Zl(e)&&(h(e),I(qp(e,b)))},[E,b]);const k=$=>(h($),r?.($),i&&y(!1),I($?qp($,b):"")),P=Zl(v),_=P?v.toISOString():void 0,F=g.jsx(BS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:P?v:void 0});return g.jsx(S.Fragment,{children:g.jsx(Wo,{...l,mask:x,value:T,id:void 0,name:void 0,"data-value":_,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(b),right:a?g.jsxs(S.Fragment,{children:[g.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),g.jsx(mi,{open:m,onChange:y,buttonProps:{"aria-describedby":d},trigger:g.jsxs("span",{"aria-labelledby":d,children:[g.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),g.jsx(UC,{})]}),children:F})]}):null})})}),ZR=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],XR=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],QR=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],JR=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],YS=(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},KS=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},eB=e=>typeof e=="number"?Math.log(e):KS(e)*Math.log(10),tB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},ZS=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},nB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function rB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?JR:QR:t.binary?XR:ZR,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return ZS(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=nB(t);let l;if(e<1){const c=YS(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?eB(e)/Math.log(1024):KS(e)/3),n.length-1);if(e=tB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=YS(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return ZS(l,t.fixedWidth)}var Jl={exports:{}},ec={exports:{}},lt={};var XS;function oB(){if(XS)return lt;XS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(T){if(typeof T=="object"&&T!==null){var I=T.$$typeof;switch(I){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case s:case u:case v:case p:case a:return T;default:return I}}case n:return I}}}function E(T){return b(T)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(T){return E(T)||b(T)===l},lt.isConcurrentMode=E,lt.isContextConsumer=function(T){return b(T)===s},lt.isContextProvider=function(T){return b(T)===a},lt.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},lt.isForwardRef=function(T){return b(T)===u},lt.isFragment=function(T){return b(T)===r},lt.isLazy=function(T){return b(T)===v},lt.isMemo=function(T){return b(T)===p},lt.isPortal=function(T){return b(T)===n},lt.isProfiler=function(T){return b(T)===i},lt.isStrictMode=function(T){return b(T)===o},lt.isSuspense=function(T){return b(T)===d},lt.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===v||T.$$typeof===p||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===m||T.$$typeof===y||T.$$typeof===x||T.$$typeof===h)},lt.typeOf=b,lt}var ct={};var QS;function iB(){return QS||(QS=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===v||B.$$typeof===p||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===m||B.$$typeof===y||B.$$typeof===x||B.$$typeof===h)}function E(B){if(typeof B=="object"&&B!==null){var ae=B.$$typeof;switch(ae){case t:var oe=B.type;switch(oe){case l:case c:case r:case i:case o:case d:return oe;default:var J=oe&&oe.$$typeof;switch(J){case s:case u:case v:case p:case a:return J;default:return ae}}case n:return ae}}}var T=l,I=c,w=s,k=a,P=t,_=u,F=r,$=v,D=p,O=n,N=i,j=o,M=d,C=!1;function V(B){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(B)||E(B)===l}function z(B){return E(B)===c}function R(B){return E(B)===s}function W(B){return E(B)===a}function U(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function H(B){return E(B)===u}function ee(B){return E(B)===r}function re(B){return E(B)===v}function te(B){return E(B)===p}function G(B){return E(B)===n}function Y(B){return E(B)===i}function Q(B){return E(B)===o}function de(B){return E(B)===d}ct.AsyncMode=T,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=k,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=$,ct.Memo=D,ct.Portal=O,ct.Profiler=N,ct.StrictMode=j,ct.Suspense=M,ct.isAsyncMode=V,ct.isConcurrentMode=z,ct.isContextConsumer=R,ct.isContextProvider=W,ct.isElement=U,ct.isForwardRef=H,ct.isFragment=ee,ct.isLazy=re,ct.isMemo=te,ct.isPortal=G,ct.isProfiler=Y,ct.isStrictMode=Q,ct.isSuspense=de,ct.isValidElementType=b,ct.typeOf=E})()),ct}var JS;function eT(){return JS||(JS=1,process.env.NODE_ENV==="production"?ec.exports=oB():ec.exports=iB()),ec.exports}var Jp,tT;function aB(){if(tT)return Jp;tT=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 Jp=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},Jp}var eh,nT;function th(){if(nT)return eh;nT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eh=e,eh}var nh,rT;function oT(){return rT||(rT=1,nh=Function.call.bind(Object.prototype.hasOwnProperty)),nh}var rh,iT;function sB(){if(iT)return rh;iT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=th(),n={},r=oT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},rh=o,rh}var oh,aT;function lB(){if(aT)return oh;aT=1;var e=eT(),t=aB(),n=th(),r=oT(),o=sB(),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 oh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(z){var R=z&&(c&&z[c]||z[u]);if(typeof R=="function")return R}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:E(),elementType:T(),instanceOf:I,node:_(),objectOf:k,oneOf:w,oneOfType:P,shape:$,exact:D};function v(z,R){return z===R?z!==0||1/z===1/R:z!==z&&R!==R}function h(z,R){this.message=z,this.data=R&&typeof R=="object"?R:{},this.stack=""}h.prototype=Error.prototype;function m(z){if(process.env.NODE_ENV!=="production")var R={},W=0;function U(ee,re,te,G,Y,Q,de){if(G=G||f,Q=Q||te,de!==n){if(l){var B=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 B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=G+":"+te;!R[ae]&&W<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+G+"`. 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."),R[ae]=!0,W++)}}return re[te]==null?ee?re[te]===null?new h("The "+Y+" `"+Q+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new h("The "+Y+" `"+Q+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:z(re,te,G,Y,Q)}var H=U.bind(null,!1);return H.isRequired=U.bind(null,!0),H}function y(z){function R(W,U,H,ee,re,te){var G=W[U],Y=j(G);if(Y!==z){var Q=M(G);return new h("Invalid "+ee+" `"+re+"` of type "+("`"+Q+"` supplied to `"+H+"`, expected ")+("`"+z+"`."),{expectedType:z})}return null}return m(R)}function x(){return m(a)}function b(z){function R(W,U,H,ee,re){if(typeof z!="function")return new h("Property `"+re+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var te=W[U];if(!Array.isArray(te)){var G=j(te);return new h("Invalid "+ee+" `"+re+"` of type "+("`"+G+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Q=z(te,Y,H,ee,re+"["+Y+"]",n);if(Q instanceof Error)return Q}return null}return m(R)}function E(){function z(R,W,U,H,ee){var re=R[W];if(!s(re)){var te=j(re);return new h("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return m(z)}function T(){function z(R,W,U,H,ee){var re=R[W];if(!e.isValidElementType(re)){var te=j(re);return new h("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return m(z)}function I(z){function R(W,U,H,ee,re){if(!(W[U]instanceof z)){var te=z.name||f,G=V(W[U]);return new h("Invalid "+ee+" `"+re+"` of type "+("`"+G+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return m(R)}function w(z){if(!Array.isArray(z))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 R(W,U,H,ee,re){for(var te=W[U],G=0;G<z.length;G++)if(v(te,z[G]))return null;var Y=JSON.stringify(z,function(de,B){var ae=M(B);return ae==="symbol"?String(B):B});return new h("Invalid "+ee+" `"+re+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return m(R)}function k(z){function R(W,U,H,ee,re){if(typeof z!="function")return new h("Property `"+re+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=W[U],G=j(te);if(G!=="object")return new h("Invalid "+ee+" `"+re+"` of type "+("`"+G+"` supplied to `"+H+"`, expected an object."));for(var Y in te)if(r(te,Y)){var Q=z(te,Y,H,ee,re+"."+Y,n);if(Q instanceof Error)return Q}return null}return m(R)}function P(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<z.length;R++){var W=z[R];if(typeof W!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(W)+" at index "+R+"."),a}function U(H,ee,re,te,G){for(var Y=[],Q=0;Q<z.length;Q++){var de=z[Q],B=de(H,ee,re,te,G,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new h("Invalid "+te+" `"+G+"` supplied to "+("`"+re+"`"+ae+"."))}return m(U)}function _(){function z(R,W,U,H,ee){return O(R[W])?null:new h("Invalid "+H+" `"+ee+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return m(z)}function F(z,R,W,U,H){return new h((z||"React class")+": "+R+" type `"+W+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function $(z){function R(W,U,H,ee,re){var te=W[U],G=j(te);if(G!=="object")return new h("Invalid "+ee+" `"+re+"` of type `"+G+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in z){var Q=z[Y];if(typeof Q!="function")return F(H,ee,re,Y,M(Q));var de=Q(te,Y,H,ee,re+"."+Y,n);if(de)return de}return null}return m(R)}function D(z){function R(W,U,H,ee,re){var te=W[U],G=j(te);if(G!=="object")return new h("Invalid "+ee+" `"+re+"` of type `"+G+"` "+("supplied to `"+H+"`, expected `object`."));var Y=t({},W[U],z);for(var Q in Y){var de=z[Q];if(r(z,Q)&&typeof de!="function")return F(H,ee,re,Q,M(de));if(!de)return new h("Invalid "+ee+" `"+re+"` key `"+Q+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(W[U],null," ")+`
16
- Valid keys: `+JSON.stringify(Object.keys(z),null," "));var B=de(te,Q,H,ee,re+"."+Q,n);if(B)return B}return null}return m(R)}function O(z){switch(typeof z){case"number":case"string":case"undefined":return!0;case"boolean":return!z;case"object":if(Array.isArray(z))return z.every(O);if(z===null||s(z))return!0;var R=d(z);if(R){var W=R.call(z),U;if(R!==z.entries){for(;!(U=W.next()).done;)if(!O(U.value))return!1}else for(;!(U=W.next()).done;){var H=U.value;if(H&&!O(H[1]))return!1}}else return!1;return!0;default:return!1}}function N(z,R){return z==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function j(z){var R=typeof z;return Array.isArray(z)?"array":z instanceof RegExp?"object":N(R,z)?"symbol":R}function M(z){if(typeof z>"u"||z===null)return""+z;var R=j(z);if(R==="object"){if(z instanceof Date)return"date";if(z instanceof RegExp)return"regexp"}return R}function C(z){var R=M(z);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function V(z){return!z.constructor||!z.constructor.name?f:z.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},oh}var ih,sT;function cB(){if(sT)return ih;sT=1;var e=th();function t(){}function n(){}return n.resetWarningCache=t,ih=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ih}var lT;function uB(){if(lT)return Jl.exports;if(lT=1,process.env.NODE_ENV!=="production"){var e=eT(),t=!0;Jl.exports=lB()(e.isElement,t)}else Jl.exports=cB()();return Jl.exports}var dB=uB();const vt=Yh(dB);function So(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const fB=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 wi(e,t,n){const r=pB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&cT(r,"path",i),cT(r,"relativePath",i),r}function pB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=fB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function cT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const hB=[".DS_Store","Thumbs.db"];function mB(e){return So(this,void 0,void 0,function*(){return tc(e)&&gB(e.dataTransfer)?xB(e.dataTransfer,e.type):vB(e)?yB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?bB(e):[]})}function gB(e){return tc(e)}function vB(e){return tc(e)&&tc(e.target)}function tc(e){return typeof e=="object"&&e!==null}function yB(e){return ah(e.target.files).map(t=>wi(t))}function bB(e){return So(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>wi(n))})}function xB(e,t){return So(this,void 0,void 0,function*(){if(e.items){const n=ah(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(wB));return uT(dT(r))}return uT(ah(e.files).map(n=>wi(n)))})}function uT(e){return e.filter(t=>hB.indexOf(t.name)===-1)}function ah(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 wB(e){if(typeof e.webkitGetAsEntry!="function")return fT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?pT(t):fT(e,t)}function dT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?dT(n):[n]],[])}function fT(e,t){return So(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,wi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function SB(e){return So(this,void 0,void 0,function*(){return e.isDirectory?pT(e):TB(e)})}function pT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>So(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(SB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function TB(e){return So(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=wi(r,e.fullPath);t(o)},r=>{n(r)})})})}var nc={},hT;function EB(){return hT||(hT=1,nc.__esModule=!0,nc.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}),nc}var kB=EB();const sh=Yh(kB);function mT(e){return AB(e)||IB(e)||bT(e)||CB()}function CB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AB(e){if(Array.isArray(e))return lh(e)}function gT(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?gT(Object(n),!0).forEach(function(r){yT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ha(e,t){return _B(e)||OB(e,t)||bT(e,t)||PB()}function PB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bT(e,t){if(e){if(typeof e=="string")return lh(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 lh(e,t)}}function lh(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 OB(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 _B(e){if(Array.isArray(e))return e}var MB=typeof sh=="function"?sh:sh.default,DB="file-invalid-type",NB="file-too-large",FB="file-too-small",LB="too-many-files",VB=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:DB,message:"File type must be ".concat(r)}},xT=function(t){return{code:NB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},wT=function(t){return{code:FB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},$B={code:LB,message:"Too many files"};function ST(e,t){var n=e.type==="application/x-moz-file"||MB(e,t);return[n,n?null:VB(t)]}function TT(e,t,n){if(To(e.size))if(To(t)&&To(n)){if(e.size>n)return[!1,xT(n)];if(e.size<t)return[!1,wT(t)]}else{if(To(t)&&e.size<t)return[!1,wT(t)];if(To(n)&&e.size>n)return[!1,xT(n)]}return[!0,null]}function To(e){return e!=null}function zB(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=ST(l,n),u=Ha(c,1),d=u[0],f=TT(l,r,o),p=Ha(f,1),v=p[0],h=s?s(l):null;return d&&v&&!h})}function rc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function oc(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 ET(e){e.preventDefault()}function jB(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function RB(e){return e.indexOf("Edge/")!==-1}function BB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return jB(e)||RB(e)}function or(){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!rc(r)&&s&&s.apply(void 0,[r].concat(i)),rc(r)})}}function HB(){return"showOpenFilePicker"in window}function WB(e){if(To(e)){var t=Object.entries(e).filter(function(n){var r=Ha(n,2),o=r[0],i=r[1],a=!0;return kT(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(CT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Ha(r,2),i=o[0],a=o[1];return vT(vT({},n),{},yT({},i,a))},{});return[{description:"Files",accept:t}]}return e}function qB(e){if(To(e))return Object.entries(e).reduce(function(t,n){var r=Ha(n,2),o=r[0],i=r[1];return[].concat(mT(t),[o],mT(i))},[]).filter(function(t){return kT(t)||CT(t)}).join(",")}function UB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function GB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function kT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function CT(e){return/^.*\.[\w]+$/.test(e)}var YB=["children"],KB=["open"],ZB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],XB=["refKey","onChange","onClick"];function QB(e){return t4(e)||e4(e)||IT(e)||JB()}function JB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t4(e){if(Array.isArray(e))return uh(e)}function ch(e,t){return o4(e)||r4(e,t)||IT(e,t)||n4()}function n4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IT(e,t){if(e){if(typeof e=="string")return uh(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 uh(e,t)}}function uh(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 r4(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 o4(e){if(Array.isArray(e))return e}function AT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(n),!0).forEach(function(r){dh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e,t){if(e==null)return{};var n=i4(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 i4(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 fh=S.forwardRef(function(e,t){var n=e.children,r=ic(e,YB),o=OT(r),i=o.open,a=ic(o,KB);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(At(At({},a),{},{open:i})))});fh.displayName="Dropzone";var PT={disabled:!1,getFilesFromEvent:mB,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};fh.defaultProps=PT,fh.propTypes={children:vt.func,accept:vt.objectOf(vt.arrayOf(vt.string)),multiple:vt.bool,preventDropOnDocument:vt.bool,noClick:vt.bool,noKeyboard:vt.bool,noDrag:vt.bool,noDragEventsBubbling:vt.bool,minSize:vt.number,maxSize:vt.number,maxFiles:vt.number,disabled:vt.bool,getFilesFromEvent:vt.func,onFileDialogCancel:vt.func,onFileDialogOpen:vt.func,useFsAccessApi:vt.bool,autoFocus:vt.bool,onDragEnter:vt.func,onDragLeave:vt.func,onDragOver:vt.func,onDrop:vt.func,onDropAccepted:vt.func,onDropRejected:vt.func,onError:vt.func,validator:vt.func};var ph={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function OT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=At(At({},PT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,E=t.noClick,T=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,P=t.validator,_=S.useMemo(function(){return qB(n)},[n]),F=S.useMemo(function(){return WB(n)},[n]),$=S.useMemo(function(){return typeof m=="function"?m:_T},[m]),D=S.useMemo(function(){return typeof h=="function"?h:_T},[h]),O=S.useRef(null),N=S.useRef(null),j=S.useReducer(a4,ph),M=ch(j,2),C=M[0],V=M[1],z=C.isFocused,R=C.isFileDialogActive,W=S.useRef(typeof window<"u"&&window.isSecureContext&&y&&HB()),U=function(){!W.current&&R&&setTimeout(function(){if(N.current){var X=N.current.files;X.length||(V({type:"closeDialog"}),D())}},300)};S.useEffect(function(){return window.addEventListener("focus",U,!1),function(){window.removeEventListener("focus",U,!1)}},[N,R,D,W]);var H=S.useRef([]),ee=function(X){O.current&&O.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return b&&(document.addEventListener("dragover",ET,!1),document.addEventListener("drop",ee,!1)),function(){b&&(document.removeEventListener("dragover",ET),document.removeEventListener("drop",ee))}},[O,b]),S.useEffect(function(){return!r&&x&&O.current&&O.current.focus(),function(){}},[O,x,r]);var re=S.useCallback(function(L){k?k(L):console.error(L)},[k]),te=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L),H.current=[].concat(QB(H.current),[L.target]),oc(L)&&Promise.resolve(o(L)).then(function(X){if(!(rc(L)&&!w)){var le=X.length,ue=le>0&&zB({files:X,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:P}),Ee=le>0&&!ue;V({isDragAccept:ue,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),c&&c(L)}}).catch(function(X){return re(X)})},[o,c,re,w,_,a,i,s,l,P]),G=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L);var X=oc(L);if(X&&L.dataTransfer)try{L.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(L),!1},[d,w]),Y=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L);var X=H.current.filter(function(ue){return O.current&&O.current.contains(ue)}),le=X.indexOf(L.target);le!==-1&&X.splice(le,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oc(L)&&u&&u(L))},[O,u,w]),Q=S.useCallback(function(L,X){var le=[],ue=[];L.forEach(function(Ee){var ke=ST(Ee,_),De=ch(ke,2),Ke=De[0],pt=De[1],ht=TT(Ee,a,i),$t=ch(ht,2),$e=$t[0],q=$t[1],Z=P?P(Ee):null;if(Ke&&$e&&!Z)le.push(Ee);else{var Pe=[pt,q];Z&&(Pe=Pe.concat(Z)),ue.push({file:Ee,errors:Pe.filter(function(Ue){return Ue})})}}),(!s&&le.length>1||s&&l>=1&&le.length>l)&&(le.forEach(function(Ee){ue.push({file:Ee,errors:[$B]})}),le.splice(0)),V({acceptedFiles:le,fileRejections:ue,isDragReject:ue.length>0,type:"setFiles"}),f&&f(le,ue,X),ue.length>0&&v&&v(ue,X),le.length>0&&p&&p(le,X)},[V,s,_,a,i,l,f,p,v,P]),de=S.useCallback(function(L){L.preventDefault(),L.persist(),ve(L),H.current=[],oc(L)&&Promise.resolve(o(L)).then(function(X){rc(L)&&!w||Q(X,L)}).catch(function(X){return re(X)}),V({type:"reset"})},[o,Q,re,w]),B=S.useCallback(function(){if(W.current){V({type:"openDialog"}),$();var L={multiple:s,types:F};window.showOpenFilePicker(L).then(function(X){return o(X)}).then(function(X){Q(X,null),V({type:"closeDialog"})}).catch(function(X){UB(X)?(D(X),V({type:"closeDialog"})):GB(X)?(W.current=!1,N.current?(N.current.value=null,N.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(X)});return}N.current&&(V({type:"openDialog"}),$(),N.current.value=null,N.current.click())},[V,$,D,y,Q,re,F,s]),ae=S.useCallback(function(L){!O.current||!O.current.isEqualNode(L.target)||(L.key===" "||L.key==="Enter"||L.keyCode===32||L.keyCode===13)&&(L.preventDefault(),B())},[O,B]),oe=S.useCallback(function(){V({type:"focus"})},[]),J=S.useCallback(function(){V({type:"blur"})},[]),se=S.useCallback(function(){E||(BB()?setTimeout(B,0):B())},[E,B]),ne=function(X){return r?null:X},fe=function(X){return T?null:ne(X)},pe=function(X){return I?null:ne(X)},ve=function(X){w&&X.stopPropagation()},Ae=S.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=L.refKey,le=X===void 0?"ref":X,ue=L.role,Ee=L.onKeyDown,ke=L.onFocus,De=L.onBlur,Ke=L.onClick,pt=L.onDragEnter,ht=L.onDragOver,$t=L.onDragLeave,$e=L.onDrop,q=ic(L,ZB);return At(At(dh({onKeyDown:fe(or(Ee,ae)),onFocus:fe(or(ke,oe)),onBlur:fe(or(De,J)),onClick:ne(or(Ke,se)),onDragEnter:pe(or(pt,te)),onDragOver:pe(or(ht,G)),onDragLeave:pe(or($t,Y)),onDrop:pe(or($e,de)),role:typeof ue=="string"&&ue!==""?ue:"presentation"},le,O),!r&&!T?{tabIndex:0}:{}),q)}},[O,ae,oe,J,se,te,G,Y,de,T,I,r]),me=S.useCallback(function(L){L.stopPropagation()},[]),K=S.useMemo(function(){return function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=L.refKey,le=X===void 0?"ref":X,ue=L.onChange,Ee=L.onClick,ke=ic(L,XB),De=dh({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:ne(or(ue,de)),onClick:ne(or(Ee,me)),tabIndex:-1},le,N);return At(At({},De),ke)}},[N,n,s,de,r]);return At(At({},C),{},{isFocused:z&&!r,getRootProps:Ae,getInputProps:K,rootRef:O,inputRef:N,open:ne(B)})}function a4(e,t){switch(t.type){case"focus":return At(At({},e),{},{isFocused:!0});case"blur":return At(At({},e),{},{isFocused:!1});case"openDialog":return At(At({},ph),{},{isFileDialogActive:!0});case"closeDialog":return At(At({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return At(At({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return At(At({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return At({},ph);default:return e}}function _T(){}const MT=S.createContext([null,()=>{}]),s4=()=>S.useContext(MT),l4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,c4={csv:wu,xls:wu,mov:Ag,mp4:Ag,xlsx:wu,pdf:Ig,txt:Ig,json:ZC,mp3:qC},u4=e=>{const[,t]=s4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:l4(l),size:rB(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=c4[e.file.name.split(".").at(-1)]??Pg,s=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Mo,{size:16})})})]})},d4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(u4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),DT=e=>{const t=Pt(),n=e.dragging?XC:QC;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},f4=e=>e.isDragActive?g.jsx(DT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(d4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),p4=g.jsx(DT,{dragging:!1}),h4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},m4=({idle:e=p4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Pt(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=h=>{r?.(h),l(m=>m.concat(h))},{getRootProps:f,getInputProps:p,isDragActive:v}=OT({onDrop:d});return g.jsxs(MT.Provider,{value:a,children:[g.jsx(jp,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?g.jsx(h4,{item:a[0]}):null}),g.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(f4,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},NT=()=>window.matchMedia("@media (pointer: coarse)"),g4=()=>{const e=S.useRef(Cr()?null:NT()),[t,n]=S.useState(Cr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?NT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},FT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=g4(),o=S.useRef(Cr()?"":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||iy())return;document.documentElement.style.padding=ug(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(Ik(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},v4=(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]},LT=(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},VT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},$T=(e,t)=>{const n=LT(t,VT.basic,e);return n!==void 0&&n!==e?n:LT(t,VT.extend,e)},zT=e=>e.replace(/[^0-9]/g,""),ac=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),jT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?zT(e).includes(zT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?v4(e,t)!==null:!1,y4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>jT(e,o,n,r)):jT(e,t,n,r),hh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(ac):ac(`${i.value}`)}));return e.forEach(i=>{const a=$T(i,t);o.forEach(s=>{const l=$T(i,s.key);if(!l)return;const c=ac(`${s.value}`.toLocaleLowerCase()).trim(),u=ac(`${l}`.toLocaleLowerCase()).trim();if(y4(u,c,s.score,s.match))return void r.set(a,i);Re.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},b4=e=>g.jsx(S.Fragment,{children:e.children}),x4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},w4=[],S4=S.forwardRef(function(t,n){return g.jsx(Be.ul,{...t,ref:n,className:"overscroll-contain w-full rounded-lg",children:g.jsx(Nn,{children:t.children})})}),T4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),E4={List:S4,Item:T4},Si=40,k4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,...h},m)=>{const y=S.useRef(null),x=S.useRef(null),b=S.useRef(null),E=h.value??h.defaultValue??"",T=Pt(),[I,w]=S.useState(()=>Math.min(320,Si*o.length)),[k,P]=S.useState(!1),[_,F]=S.useState(""),[$,D]=S.useState(E),[O,N]=S.useState(()=>o.find(K=>K.value===E)?.label??E),[j,M]=S.useState(null),C=S.useRef(w4),V=FT(k,"block-only"),z=v&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,R=()=>Fi.flushSync(()=>P(!0)),W=_?hh(z,"value",[{key:"value",value:_},{key:"label",value:_}]):z,U=()=>{P(!1),w(0)},H=W.filter(K=>K.hidden!==!0),ee=v?void 0:`^(${o.map(K=>`${ed(K.value)}${K.label?"|"+ed(K.label):""}`).join("|")})$`,{x:re,y:te,strategy:G,refs:Y,context:Q}=Gn({open:k,transform:!0,onOpenChange:P,placement:"bottom-start",whileElementsMounted:Jr,middleware:[$o(4),bv({padding:10,elementContext:"reference",apply(K){const X=K.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,le=$i(Y.reference.current,window.innerHeight),ue=Math.min(X<Si?le:X,le,K.availableHeight),Ee=H.length===0?Si:Math.min(ue,le,X),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(K.elements.floating.style,{width:ke,maxWidth:ke,height:Ee})}})]}),de=Xv(Q,x4),{getReferenceProps:B,getFloatingProps:ae,getItemProps:oe}=Yn([fr(Q,{role:"listbox"}),kr(Q),Hs(Q,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(h.value){const K=o.find(L=>L.value===h.value);K&&(N(K.label??K.value),D(h.value))}},[h.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const K=Y.reference;if(K.current===null)return;const L=$i(K.current,window.innerHeight);setTimeout(()=>w(Math.min(L,H.length*Si)),100)},[_,k,Y.reference,H.length]),S.useEffect(()=>{const K=Y.reference.current;if(K)return Vi(K)},[]);const J=(K,L)=>{D(K.value);const X=Y.reference.current;if(!X)return;X?.setAttribute("data-value",K.value),X.value=K.value;const le=new Event("change",{bubbles:!1,cancelable:!0});X.dispatchEvent(le),h.onChange&&h.onChange(le),N(K.label??""),U(),F(""),M(L)},se=K=>{const L=K.target.value;return F(L),!k&&L===""?P(!0):(K.target.name=h.name||"",L?P(!0):h.onChange?.(K))},ne=()=>{R(),F(""),Y.reference.current?.focus()},fe=()=>{M(K=>K===null?0:K),R(),F("")},pe=()=>{Y.reference.current?.setAttribute("data-value",""),F(""),D(""),N(""),cg(Y.reference.current),U()},ve=h.id||h.name,Ae=`${ve}-shadow`,me=H.length===0;return g.jsxs(Xi,{...h,left:e,error:t,ref:x,form:h.form,loading:r,name:h.name,feedback:d,hideLeft:f,required:p,title:h.title,container:i,rightLabel:a,interactive:s,id:Ae,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:ne,children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?g.jsx("button",{type:"button",onClick:pe,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsx("input",{"data-shadow":"true",...B({...h,onFocus:fe,pattern:ee,onChange:se,id:Ae,name:Ae,ref:Y.setReference,onClick:K=>K.currentTarget.focus(),onKeyDown(K){if(K.key==="Escape")return K.currentTarget.blur(),U();if(k){if(K.key==="ArrowDown"){let L=Re.number(j)?j+1:0;return L>H.length-1&&(L=0),b.current?.scrollIntoView({index:L}),M(L)}if(K.key==="ArrowUp"){let L=Re.number(j)?j-1:H.length-1;return L<0&&(L=H.length-1),b.current?.scrollIntoView({index:L}),M(L)}if(K.key==="Enter"){if(j!==null&&H[j])return K.preventDefault(),J(H[j],j);if(H.length===1)return K.preventDefault(),J(H[0],0)}}}}),"data-value":$,"data-error":!!t,"data-name":ve,"data-target":ve,required:p,value:k?_:o.length===0?"":O||$,"aria-autocomplete":"list",autoComplete:"off",className:Oe("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",h.className)}),g.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:m,required:p,defaultValue:h.value||$||void 0}),g.jsx(dr,{preserveTabOrder:!0,children:k?g.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:Q,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(Be.div,{...ae({ref:sr(V,Y.setFloating),style:{...de.styles,left:re,top:te??0,position:G,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:me?"auto":I},className:"overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",onAnimationComplete:()=>{if(!k)return w(0);const L=Y.floating.current.querySelectorAll("li").item(0),X=(L?L.getBoundingClientRect().height:Si)*H.length;return Fi.flushSync(()=>w(X+10))},children:[me?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||T.autocompleteEmpty})}):null,g.jsx(Tp,{overscan:40,ref:b,hidden:me,data:H,defaultItemHeight:Si,components:E4,scrollerRef:K=>{y.current=K},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(K,L)=>{const X=L.Render??b4,le=$===L.value||$===L.label,ue=j===K,Ee=L.label??L.value;return g.jsx("button",{"data-value":L.value,...oe({ref:ke=>{C.current[K]=ke},role:"option",type:"button","aria-checked":le,"aria-current":le,"aria-selected":le,"aria-busy":L.disabled,onClick:()=>J(L,K),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${le?"bg-primary-hover text-primary-foreground":""} ${ue?"bg-floating-hover text-floating-foreground":""}`}),children:g.jsx(X,{...h,label:L.label,value:L.value,children:Ee})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const RT=40,C4=e=>g.jsx(S.Fragment,{children:e.children}),I4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},BT=[],A4=S.forwardRef(function(t,n){return g.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(Nn,{children:t.children})})}),P4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),O4={List:A4,Item:P4},_4=e=>{const t=Pt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(ts,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},M4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,onChangeOptions:h,...m},y)=>{const x=S.useMemo(()=>new zn(r.map(K=>[K.value,K])),[r]),b=S.useRef(null),E=S.useRef(null),T=m.value??m.defaultValue??BT,I=Pt(),[w,k]=S.useState(0),[P,_]=S.useState(!1),[F,$]=S.useState(""),[D,O]=S.useState(()=>{const K=new zn;return T.forEach(L=>{const X=x.get(L);return X?K.set(L,X):void 0}),K}),N=S.useMemo(()=>Array.from(D.keys()),[D]),[j,M]=S.useState(()=>{const K=new Set(T);return r.reduce((L,X)=>K.has(X.value)?[...L,X.label??X.value]:L,[])??T}),[C,V]=S.useState(null),z=S.useRef(BT),R=v&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,W=F.length===0?R:hh(R,"value",[{key:"value",value:F},{key:"label",value:F}]),U=FT(P,"block-only"),H=W.filter(K=>K.hidden!==!0),ee=H.length===0,{x:re,y:te,strategy:G,refs:Y,context:Q}=Gn({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Jr,middleware:[$o(4),bv({padding:10,elementContext:"reference",apply(K){const X=K.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,le=$i(Y.reference.current,window.innerHeight),ue=Math.min(X<RT?le:X,le,K.availableHeight),Ee=H.length===0?RT:Math.min(ue,le,X),ke=`${b.current.getBoundingClientRect().width}px`;Object.assign(K.elements.floating.style,{width:ke,maxWidth:ke,height:Ee})}})]}),de=Xv(Q,I4),{getReferenceProps:B,getFloatingProps:ae,getItemProps:oe}=Yn([fr(Q,{role:"listbox"}),kr(Q),Hs(Q,{cols:0,listRef:z,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:K=>V(L=>K??L)})]);S.useEffect(()=>{if(!P)return k(0);const K=Y.reference;if(K.current===null)return;const L=$i(K.current,window.innerHeight);setTimeout(()=>k(Math.min(L,H.length*40)),100)},[F,P,Y.reference]),S.useEffect(()=>{m.value&&O(new zn(m.value.map(K=>[K,x.get(K)])))},[m.value,x]),S.useEffect(()=>{const K=Y.reference.current;if(K)return Vi(K)},[]);const J=(K,L)=>{const X=D.clone(Ee=>Ee.has(K.value)?Ee.remove(K.value):Ee.set(K.value,K));O(X);const le=Y.reference.current;if(!le)return;const ue=X.map(Ee=>Ee.value);le?.setAttribute("data-value",JSON.stringify(ue)),h&&h(ue),M(Ee=>Ee.concat(K.label??"")),$(""),V(L)},se=K=>{const L=K.target.value;return $(L),!P&&L===""?_(!0):(K.target.name=m.name||"",L?_(!0):void 0)},ne=()=>{_(!0),$(""),Y.reference.current?.focus()},fe=()=>{_(!0),$("")},pe=()=>{Y.reference.current?.setAttribute("data-value","[]"),$(""),_(!1),O(new zn),h?.([])},ve=m.id||m.name,Ae=D.map((K,L)=>g.jsx(ts,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:X=>{X.preventDefault(),X.stopPropagation(),J(K,L)},children:g.jsx(Mo,{size:14})}),children:K.label??K.value},`MultiSelect-${K.value}-x`)),me={height:ee?"0":D.size===0?w-49:w-86};return g.jsxs(Xi,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ne,children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),D?g.jsx("button",{type:"button",onClick:pe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsxs("ul",{...B({...m,onFocus:fe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:Oe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[N.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(_4,{label:c,children:Ae})]}),g.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:p,defaultValue:m.value||N||void 0}),g.jsx(dr,{preserveTabOrder:!0,children:P?g.jsx(Ku,{lockScroll:!0,children:g.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:Q,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...ae({ref:Y.setFloating,style:{...de.styles,top:te??0,position:G,left:re,height:w-(N.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:F,onChange:se,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:K=>{if(K.key==="ArrowDown"){let L=C+1;return L>H.length-1&&(L=0),E.current?.scrollIntoView({index:L}),V(L)}if(K.key==="ArrowUp"){let L=C-1;return L<0&&(L=H.length-1),E.current?.scrollIntoView({index:L}),V(L)}if(K.key==="Escape")return K.currentTarget.blur(),_(!1);if(K.key==="Enter"){if(C!==null&&H[C])return K.preventDefault(),J(H[C],C);if(H.length===1)return K.preventDefault(),J(H[0],0)}}}),ee?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:s||I.autocompleteEmpty})}):null,ee?null:g.jsx(Be.div,{initial:!1,"data-floating":"true",ref:U,animate:{height:ee?"auto":w},style:me,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return k(0);const L=Y.floating.current.querySelectorAll("li").item(0),X=(L?L.getBoundingClientRect().height:40)*H.length;return Fi.flushSync(()=>k(X+2))},children:g.jsx(Tp,{ref:E,hidden:ee,data:H,components:O4,style:me,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(K,L)=>{const X=L.Render??C4,le=D.has(L.value)||D.has(L.label??""),ue=C===K,Ee=L.label??L.value;return g.jsxs("button",{"data-value":L.value,...oe({ref:ke=>{z.current[K]=ke},role:"option",type:"button","aria-checked":le,"aria-current":le,"aria-selected":le,"aria-busy":L.disabled,onClick:()=>J(L,K)}),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 ${le||ue?"bg-floating-hover text-floating-foreground":""}`,children:[g.jsx($p,{onChange:Ho,checked:le,"aria-checked":le,onClick:ke=>{ke.stopPropagation(),J(L,K)}}),g.jsx(X,{...m,label:L.label,value:L.value,children:Ee})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:D.size===0?g.jsx(ts,{theme:"muted",size:"small",children:I.autocompleteEmpty}):Ae})]})})}):null})]})}),D4=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},N4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},F4=e=>{const t=S.useRef(null),n=D4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Wo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Tp,{height:n,useWindowScroll:!0,data:e.source,components:N4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx($p,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(ro,{children:g.jsx(vu,{})})}),g.jsx("div",{})]})};function L4(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 V4=({children:e,...t})=>{const n=Pr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:L4(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()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})};let HT=0;function $4(e){return HT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${HT}`}const Wa=0;class sc{static create(){return new sc}currentId=Wa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Wa,n()},t)}isStarted(){return this.currentId!==Wa}clear=()=>{this.currentId!==Wa&&(clearTimeout(this.currentId),this.currentId=Wa)};disposeEffect=()=>this.clear}const lc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(lc.displayName="ToastContext");function mh(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));return e}function gh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const WT=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,s]=A.useState([]),[l,c]=A.useState(!1),[u,d]=A.useState(!1),[f,p]=A.useState(null);a.length===0&&(l&&c(!1),u&&d(!1));const v=l||u,h=A.useRef(new Map),m=A.useRef(null),y=A.useRef(!0),x=A.useRef(!1);function b(D){const O=ao(Cn(m.current));if(!m.current||!Ar(m.current,O)||!pd(O))return;const N=a.findIndex(C=>C.id===D);let j=null,M=N+1;for(;M<a.length;){if(a[M].transitionStatus!=="ending"){j=a[M];break}M+=1}if(!j)for(M=N-1;M>=0;){if(a[M].transitionStatus!=="ending"){j=a[M];break}M-=1}j?j.ref?.current?.focus():f?.focus({preventScroll:!0})}const E=Ge(()=>{x.current||(x.current=!0,h.current.forEach(D=>{if(D.timeout){D.timeout.clear();const O=Date.now()-D.start,N=D.delay-O;D.remaining=N>0?N:0}}))}),T=Ge(()=>{x.current&&(x.current=!1,h.current.forEach((D,O)=>{D.remaining=D.remaining>0?D.remaining:D.delay,D.timeout??=sc.create(),D.timeout.start(D.remaining,()=>{h.current.delete(O),D.callback()}),D.start=Date.now()}))}),I=Ge(D=>{s(j=>{const M=j.map(V=>V.id===D?{...V,transitionStatus:"ending",height:0}:V),C=M.filter(V=>V.transitionStatus!=="ending");return M.map(V=>{if(V.transitionStatus==="ending")return V;const z=C.indexOf(V)>=o;return{...V,limited:z}})});const O=h.current.get(D);O&&O.timeout&&(O.timeout.clear(),h.current.delete(D)),a.find(j=>j.id===D)?.onClose?.(),b(D),a.length===1&&(c(!1),d(!1))}),w=Ge(D=>{s(N=>N.filter(j=>j.id!==D)),a.find(N=>N.id===D)?.onRemove?.()}),k=Ge((D,O,N)=>{const j=Date.now(),M=y.current&&!l&&!u,C=M?sc.create():void 0;C?.start(O,()=>{h.current.delete(D),N()}),h.current.set(D,{timeout:C,start:M?j:0,delay:O,remaining:O,callback:N})}),P=Ge(D=>{const O=D.id||$4("toast"),N={...D,id:O,transitionStatus:"starting"};s(M=>{const C=[N,...M],V=C.filter(z=>z.transitionStatus!=="ending");if(V.length>o){const z=V.length-o,R=V.slice(-z);return C.map(W=>R.some(U=>U.id===W.id)?{...W,limited:!0}:{...W,limited:!1})}return C.map(z=>({...z,limited:!1}))});const j=N.timeout??r;return N.type!=="loading"&&j>0&&k(O,j,()=>I(O)),(l||u||!y.current)&&E(),O}),_=Ge((D,O)=>{const N=a.find(H=>H.id===D)??null,j=N?{...N,...O}:null;if(jn.flushSync(()=>{s(H=>H.map(ee=>ee.id===D?{...ee,...O}:ee))}),!j)return;const M=j.timeout??r,C=N?.timeout??r,V=Object.hasOwn(O,"timeout"),z=j.transitionStatus!=="ending"&&j.type!=="loading"&&M>0,R=h.current.has(D),W=C!==M,U=N?.type==="loading";if(!z&&R){h.current.get(D)?.timeout?.clear(),h.current.delete(D);return}if(z&&(!R||W||V||U)){const H=h.current.get(D);H&&(H.timeout?.clear(),h.current.delete(D)),k(D,M,()=>I(D)),(l||u||!y.current)&&E()}}),F=Ge((D,O)=>{const N=gh(O.loading),j=P({...N,type:"loading"}),M=D.then(C=>{const V=gh(O.success,C);return _(j,{...V,type:"success",timeout:V.timeout}),C}).catch(C=>{const V=gh(O.error,C);return _(j,{...V,type:"error",timeout:V.timeout}),Promise.reject(C)});return{}.hasOwnProperty.call(O,"setPromise")&&O.setPromise(M),M});A.useEffect(function(){return i?i[" subscribe"](({action:N,options:j})=>{const M=j.id;N==="promise"&&j.promise?F(j.promise,j):N==="update"&&M?_(M,j):N==="close"&&M?I(M):P(j)}):void 0},[P,_,k,r,i,F,I]);const $=A.useMemo(()=>({toasts:a,setToasts:s,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:v,add:P,close:I,remove:w,update:_,promise:F,pauseTimers:E,resumeTimers:T,prevFocusElement:f,setPrevFocusElement:p,viewportRef:m,scheduleTimer:k,windowFocusedRef:y}),[P,I,u,l,v,E,f,F,w,T,k,a,_]);return g.jsx(lc.Provider,{value:$,children:n})};process.env.NODE_ENV!=="production"&&(WT.displayName="ToastProvider");const Ti=A.forwardRef(function(t,n){const[r,o]=A.useState();St(()=>{sO&&o("button")},[]);const i={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:Js,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ti.displayName="FocusGuard");const qT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(qT.displayName="ToastViewportContext");let z4=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const UT=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{toasts:s,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:v,setPrevFocusElement:h,expanded:m,focused:y}=mh(),x=A.useRef(!1),b=A.useRef(!1),E=s.length,T=s[0]?.height??0,I=A.useMemo(()=>s.some(C=>C.transitionStatus==="ending"),[s]);A.useEffect(()=>{if(!f.current)return;function C(z){E!==0&&z.key==="F6"&&z.target!==f.current&&(z.preventDefault(),h(ao(Cn(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const V=qt(f.current);return V.addEventListener("keydown",C),()=>{V.removeEventListener("keydown",C)}},[l,d,h,E,f]),A.useEffect(()=>{if(!f.current||!E)return;const C=qt(f.current);function V(R){R.target===C&&(p.current=!1,l())}function z(R){if(R.relatedTarget||R.target===C)return;const W=dd(R),U=ao(Cn(f.current));(!Ar(f.current,W)||!pd(U))&&c(),setTimeout(()=>{p.current=!0})}return C.addEventListener("blur",V,!0),C.addEventListener("focus",z,!0),()=>{C.removeEventListener("blur",V,!0),C.removeEventListener("focus",z,!0)}},[l,c,f,p,d,E]),A.useEffect(()=>{const C=f.current;if(!C||E===0)return;const V=Cn(C);function z(R){if(R.pointerType!=="touch")return;const W=dd(R);Ar(C,W)||(c(),u(!1),d(!1))}return V.addEventListener("pointerdown",z,!0),()=>{V.removeEventListener("pointerdown",z,!0)}},[E,c,d,u,f]);function w(C){f.current&&(x.current=!0,C.relatedTarget===f.current?s[0]?.ref?.current?.focus():v?.focus({preventScroll:!0}))}function k(C){C.key==="Tab"&&C.shiftKey&&C.target===f.current&&(C.preventDefault(),v?.focus({preventScroll:!0}),c())}A.useEffect(()=>{!p.current||I||!b.current||(c(),u(!1),b.current=!1)},[I,c,u,p]);function P(){l(),u(!0),b.current=!1}function _(){s.some(C=>C.transitionStatus==="ending")?b.current=!0:(c(),u(!1))}function F(){if(x.current){x.current=!1;return}y||pd(Cn(f.current).activeElement)&&(d(!0),l())}function $(C){!y||Ar(f.current,C.relatedTarget)||(d(!1),c())}const D={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:$,onKeyDown:k,onClick:F},O=A.useMemo(()=>({expanded:m}),[m]),N=an("div",t,{ref:[n,f],state:O,props:[D,{style:{[z4.frontmostHeight]:T?`${T}px`:void 0}},a,{children:g.jsxs(A.Fragment,{children:[E>0&&v&&g.jsx(Ti,{onFocus:w}),i,E>0&&v&&g.jsx(Ti,{onFocus:w})]})}]}),j=A.useMemo(()=>({viewportRef:f}),[f]),M=A.useMemo(()=>s.filter(C=>C.priority==="high"),[s]);return g.jsxs(qT.Provider,{value:j,children:[E>0&&v&&g.jsx(Ti,{onFocus:w}),N,!y&&M.length>0&&g.jsx("div",{style:Js,children:M.map(C=>g.jsxs("div",{role:"alert","aria-atomic":!0,children:[g.jsx("div",{children:C.title}),g.jsx("div",{children:C.description})]},C.id))})]})});process.env.NODE_ENV!=="production"&&(UT.displayName="ToastViewport");function j4(e){return my(19)?e:e?"true":void 0}const vh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(vh.displayName="ToastRootContext");function Ei(){const e=A.useContext(vh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Ir(66));return e}let yh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const R4={[yh.startingStyle]:""},B4={[yh.endingStyle]:""},H4={transitionStatus(e){return e==="starting"?R4:e==="ending"?B4:null}};function W4(e){return e==null?e:"current"in e?e.current:e}function q4(e,t=!1,n=!0){const r=By();return Ge((o,i=null)=>{r.cancel();function a(){jn.flushSync(o)}const s=W4(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=yh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;a()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function U4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ge(o),a=q4(r,n,!1);A.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}let Eo=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const G4={...H4,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qa=40,Y4=10,zr=.5,K4=1;function GT(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Z4(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const s=a[1].split(", ").map(parseFloat);s.length===6?(r=s[4],o=s[5],i=Math.sqrt(s[0]*s[0]+s[1]*s[1])):s.length===16&&(r=s[12],o=s[13],i=s[0])}}return{x:r,y:o,scale:i}}const YT=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...s}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(a)?a:[a]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:v,setToasts:h,pauseTimers:m,expanded:y,setHovering:x}=mh(),[b,E]=A.useState(void 0),[T,I]=A.useState(!1),[w,k]=A.useState(!1),[P,_]=A.useState(!1),[F,$]=A.useState({x:0,y:0}),[D,O]=A.useState({x:0,y:0,scale:1}),[N,j]=A.useState(),[M,C]=A.useState(),[V,z]=A.useState(null),R=A.useRef(null),W=A.useRef({x:0,y:0}),U=A.useRef({x:0,y:0,scale:1}),H=A.useRef(void 0),ee=A.useRef(0),re=A.useRef(!1),te=A.useRef({x:0,y:0}),G=A.useRef(!1),Y=A.useMemo(()=>d.indexOf(r),[r,d]),Q=A.useMemo(()=>d.filter(L=>L.transitionStatus!=="ending").indexOf(r),[r,d]),de=A.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((L,X)=>L+(X.height||0),0),[d,r]);U4({open:r.transitionStatus!=="ending",ref:R,onComplete(){r.transitionStatus==="ending"&&v(r.id)}});const B=Ge((L=!1)=>{const X=R.current;if(!X)return;const le=X.style.height;X.style.height="auto";const ue=X.offsetHeight;X.style.height=le;function Ee(){h(ke=>ke.map(De=>De.id===r.id?{...De,ref:R,height:ue,transitionStatus:void 0}:De))}L?jn.flushSync(Ee):Ee()});St(B,[B]);function ae(L,X){let le=L,ue=X;return!c.includes("left")&&!c.includes("right")?le=L>0?L**zr:-(Math.abs(L)**zr):(!c.includes("right")&&L>0&&(le=L**zr),!c.includes("left")&&L<0&&(le=-(Math.abs(L)**zr))),!c.includes("up")&&!c.includes("down")?ue=X>0?X**zr:-(Math.abs(X)**zr):(!c.includes("down")&&X>0&&(ue=X**zr),!c.includes("up")&&X<0&&(ue=-(Math.abs(X)**zr))),{x:le,y:ue}}function oe(L){if(L.button!==0)return;L.pointerType==="touch"&&m();const X=dd(L.nativeEvent);if(!(X&&X.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(re.current=!1,H.current=void 0,ee.current=0,W.current={x:L.clientX,y:L.clientY},te.current=W.current,R.current){const ue=Z4(R.current);U.current=ue,O(ue),$({x:ue.x,y:ue.y})}x(!0),I(!0),k(!1),z(null),G.current=!0,R.current?.setPointerCapture(L.pointerId)}}function J(L){if(!T)return;L.preventDefault(),G.current&&(W.current={x:L.clientX,y:L.clientY},G.current=!1);const{clientY:X,clientX:le,movementX:ue,movementY:Ee}=L;(Ee<0&&X>te.current.y||Ee>0&&X<te.current.y)&&(te.current={x:te.current.x,y:X}),(ue<0&&le>te.current.x||ue>0&&le<te.current.x)&&(te.current={x:le,y:te.current.y});const ke=le-W.current.x,De=X-W.current.y,Ke=X-te.current.y,pt=le-te.current.x;if(!w&&Math.sqrt(ke*ke+De*De)>=K4&&(k(!0),V===null)){const Pe=c.includes("left")||c.includes("right"),Ue=c.includes("up")||c.includes("down");if(Pe&&Ue){const Ze=Math.abs(ke),Ne=Math.abs(De);z(Ze>Ne?"horizontal":"vertical")}}let ht;if(!H.current)V==="vertical"?De>0?ht="down":De<0&&(ht="up"):V==="horizontal"?ke>0?ht="right":ke<0&&(ht="left"):Math.abs(ke)>=Math.abs(De)?ht=ke>0?"right":"left":ht=De>0?"down":"up",ht&&c.includes(ht)&&(H.current=ht,ee.current=GT(ht,ke,De),E(ht));else{const Z=H.current,Pe=GT(Z,pt,Ke);Pe>qa?(re.current=!1,E(Z)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&ee.current-Pe>=Y4&&(re.current=!0)}const $t=ae(ke,De);let $e=U.current.x,q=U.current.y;V==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=$t.x):(V==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=$t.x),(c.includes("up")||c.includes("down"))&&(q+=$t.y)),$({x:$e,y:q})}function se(L){if(!T)return;if(I(!1),k(!1),z(null),R.current?.releasePointerCapture(L.pointerId),re.current){$({x:D.x,y:D.y}),E(void 0);return}let X=!1;const le=F.x-D.x,ue=F.y-D.y;let Ee;for(const ke of c){switch(ke){case"right":le>qa&&(X=!0,Ee="right");break;case"left":le<-qa&&(X=!0,Ee="left");break;case"down":ue>qa&&(X=!0,Ee="down");break;case"up":ue<-qa&&(X=!0,Ee="up");break}if(X)break}X?(E(Ee),_(!0),p(r.id)):($({x:D.x,y:D.y}),E(void 0))}function ne(L){if(L.key==="Escape"){if(!R.current||!Ar(R.current,ao(Cn(R.current))))return;p(r.id)}}A.useEffect(()=>{if(!u)return;const L=R.current;if(!L)return;function X(le){Ar(L,le.target)&&le.preventDefault()}return L.addEventListener("touchmove",X,{passive:!1}),()=>{L.removeEventListener("touchmove",X)}},[u]);function fe(){if(!T&&F.x===D.x&&F.y===D.y&&!P)return{[Eo.swipeMovementX]:"0px",[Eo.swipeMovementY]:"0px"};const L=F.x-D.x,X=F.y-D.y;return{transition:T?"none":void 0,transform:T?`translateX(${F.x}px) translateY(${F.y}px) scale(${D.scale})`:void 0,[Eo.swipeMovementX]:`${L}px`,[Eo.swipeMovementY]:`${X}px`}}const pe=r.priority==="high",ve={role:pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":N,"aria-describedby":M,"aria-hidden":pe&&!f?!0:void 0,onPointerDown:u?oe:void 0,onPointerMove:u?J:void 0,onPointerUp:u?se:void 0,onKeyDown:ne,inert:j4(r.limited),style:{...fe(),[Eo.index]:r.transitionStatus==="ending"?Y:Q,[Eo.offsetY]:`${de}px`,[Eo.height]:r.height?`${r.height}px`:void 0}},Ae=A.useMemo(()=>({rootRef:R,toast:r,titleId:N,setTitleId:j,descriptionId:M,setDescriptionId:C,swiping:T,swipeDirection:b,recalculateHeight:B,index:Y,visibleIndex:Q,expanded:y}),[r,N,M,T,b,B,Y,Q,y]),me=A.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:Ae.swiping,swipeDirection:Ae.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,Ae.swiping,Ae.swipeDirection]),K=an("div",t,{ref:[n,Ae.rootRef],state:me,stateAttributesMapping:G4,props:[ve,s]});return g.jsx(vh.Provider,{value:Ae,children:K})});process.env.NODE_ENV!=="production"&&(YT.displayName="ToastRoot");const KT=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:s,recalculateHeight:l}=Ei(),c=A.useRef(null);St(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const v=new ResizeObserver(()=>l(!0)),h=new MutationObserver(()=>l(!0));return v.observe(p),h.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{v.disconnect(),h.disconnect()}},[l]);const u=a>0,d=A.useMemo(()=>({expanded:s,behind:u}),[s,u]);return an("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(KT.displayName="ToastContent");const ZT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.description,u=!!c,d=Ws(i),{setDescriptionId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("p",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(ZT.displayName="ToastDescription");const XT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.title,u=!!c,d=Ws(i),{setTitleId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("h2",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(XT.displayName="ToastTitle");let bh;process.env.NODE_ENV!=="production"&&(bh=new Set);function QT(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");bh.has(t)||(bh.add(t),console.error(`Base UI: ${t}`))}}const JT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(JT.displayName="CompositeRootContext");function X4(e=!1){const t=A.useContext(JT);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ir(16));return t}function Q4(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,i,o])}}function J4(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=X4(!0)!==void 0,s=Ge(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=Q4({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||QT("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&QT("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=A.useCallback(()=>{const f=i.current;e3(f)&&a&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,a]);St(c,[c]);const u=A.useCallback((f={})=>{const{onClick:p,onMouseDown:v,onKeyUp:h,onKeyDown:m,onPointerDown:y,...x}=f;return sd({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}p?.(E)},onMouseDown(E){t||v?.(E)},onKeyDown(E){if(t||(cd(E),m?.(E)),E.baseUIHandlerPrevented)return;const T=E.target===E.currentTarget&&!o&&!s()&&!t,I=E.key==="Enter",w=E.key===" ";T&&((w||I)&&E.preventDefault(),I&&p?.(E))},onKeyUp(E){t||(cd(E),h?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&p?.(E)},onPointerDown(E){if(t){E.preventDefault();return}y?.(E)}},o?void 0:{role:"button"},l,x)},[t,l,o,s]),d=Ge(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function e3(e){return Ot(e)&&e.tagName==="BUTTON"}const eE=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...s}=t,{close:l,expanded:c}=mh(),{toast:u}=Ei(),[d,f]=A.useState(!1),{getButtonProps:p,buttonRef:v}=J4({disabled:i,native:a}),h=A.useMemo(()=>({type:u.type}),[u.type]);return an("button",t,{ref:[n,v],state:h,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!=="production"&&(eE.displayName="ToastClose");function t3(e){return`data-base-ui-${e}`}const xh=A.createContext(null);process.env.NODE_ENV!=="production"&&(xh.displayName="PortalContext");const n3=()=>A.useContext(xh),r3=t3("portal");function tE(e={}){const{ref:t,container:n,componentProps:r=An,elementProps:o,elementState:i}=e,a=Ws(),l=n3()?.portalNode,[c,u]=A.useState(null),[d,f]=A.useState(null),p=Ge(y=>{y!==null&&f(y)}),v=A.useRef(null);St(()=>{if(n===null){v.current&&(v.current=null,f(null),u(null));return}if(a==null)return;const y=(n&&(ps(n)?n:n.current))??l??document.body;if(y==null){v.current&&(v.current=null,f(null),u(null));return}v.current!==y&&(v.current=y,f(null),u(y))},[n,l,a]);const h=an("div",r,{ref:[t,p],state:i,props:[{id:a,[r3]:""},o]});return{portalNode:d,portalSubtree:c&&h?jn.createPortal(h,c):null}}const o3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=tE({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),v=A.useRef(null),[h,m]=A.useState(null),y=h?.modal,x=h?.open,b=typeof s=="boolean"?s:!!h&&!h.modal&&h.open&&!!c;A.useEffect(()=>{if(!c||y)return;function T(I){c&&I.relatedTarget&&gd(I)&&(I.type==="focusin"?Oy:OO)(c)}return c.addEventListener("focusin",T,!0),c.addEventListener("focusout",T,!0),()=>{c.removeEventListener("focusin",T,!0),c.removeEventListener("focusout",T,!0)}},[c,y]),A.useEffect(()=>{!c||x||Oy(c)},[x,c]);const E=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:v,portalNode:c,setFocusManagerState:m}),[c]);return g.jsxs(A.Fragment,{children:[u,g.jsxs(xh.Provider,{value:E,children:[b&&c&&g.jsx(Ti,{"data-type":"outside",ref:d,onFocus:T=>{if(gd(T,c))p.current?.focus();else{const I=h?h.domReference:null;PO(I)?.focus()}}}),b&&c&&g.jsx("span",{"aria-owns":c.id,style:FP}),c&&jn.createPortal(r,c),b&&c&&g.jsx(Ti,{"data-type":"outside",ref:f,onFocus:T=>{if(gd(T,c))v.current?.focus();else{const I=h?h.domReference:null;AO(I)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,qo($P,T.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(o3.displayName="FloatingPortal");const nE=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...s}=t,{portalNode:l,portalSubtree:c}=tE({container:o,ref:n,componentProps:t,elementProps:s});return!c&&!l?null:g.jsxs(A.Fragment,{children:[c,l&&jn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(nE.displayName="FloatingPortalLite");const i3=nE;function rE(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return A.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const a3=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},s3=Io("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-wrap 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",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),oE=S.createContext(()=>{throw new Error("Not implemented")}),l3=()=>S.useContext(oE),iE={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]}};function c3(e){const t=e.toast.data?.closable??!0,n=e.hover?"hover":e.isLast?"isLast":"other",r=s3({theme:e.toast.data?.theme||"default"});return g.jsx(YT,{toast:e.toast,swipeDirection:["down","right"],children:g.jsx(Be.li,{layout:!0,layoutScroll:!0,animate:n,"data-index":e.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:iE[e.reversedIndex]||iE.default},children:g.jsxs(KT,{className:r,children:[g.jsxs("div",{className:"flex flex-col p-4",children:[e.toast.title?g.jsx(XT,{className:"text-lg font-medium leading-relaxed select-text"}):null,g.jsx(ZT,{className:"select-text"})]}),t?g.jsx(eE,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:g.jsx(Mo,{className:"size-5"})}):null]})})})}function u3({max:e=5}){const t=S.useRef(null),n=a3(t),o=rE().toasts.slice(-e);return g.jsx(UT,{ref:t,"data-items":o.length,style:{justifyContent:"start",height:`${(n?o.length:Math.min(1,o.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",children:g.jsx(Be.ol,{className:"flex flex-col gap-4",children:g.jsx(Nn,{presenceAffectsLayout:!0,mode:"popLayout",children:o.reverse().map((i,a,s)=>g.jsx(c3,{toast:i,hover:n,index:a,isLast:s.length-1===a,reversedIndex:s.length-(a+1)},i.id))})})})}function d3({children:e,max:t=5}){const n=rE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,a)=>{const s=n.add({description:i,title:a?.title,timeout:a?.timeout,data:{theme:a?.theme,closable:a?.closable}});return{close:()=>n.close(s),clear:r}},[n,r]);return g.jsxs(oE.Provider,{value:o,children:[e,g.jsx(i3,{children:g.jsx(u3,{max:t})})]})}function f3({children:e,max:t=5,timeout:n=5e3}){return g.jsx(WT,{limit:t,timeout:n,children:g.jsx(d3,{max:t,children:e})})}const p3=/Mac|iPod|iPhone|iPad/,cc=()=>p3.test(navigator.userAgent),h3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?cc()?"Meta":"Control":n==="Hyper"?cc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),aE=e=>e.map(t=>t.trim()).join("+");class m3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=aE(h3(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=aE(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const g3=e=>(e=e.trim(),e==="Alt"?cc()?g.jsx(tI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?cc()?g.jsx(KC,{"aria-label":"Command",size:12}):"Ctrl":e),v3=e=>{const t=e.value.trim().split("+");return g.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return g.jsxs(S.Fragment,{children:[g.jsx("kbd",{"aria-label":n,children:g3(n)}),o?null:g.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},y3=e=>g.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:du(e.item.title)?g.jsx(e.item.title,{text:e.text}):e.item.title}),b3=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?g.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:g.jsx(y3,{text:e.text,item:o})}):o.type!=="shortcut"?g.jsx(S.Fragment,{}):g.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[g.jsxs("span",{className:"flex gap-2 items-center",children:[o.Icon?o.Icon:null,g.jsx("span",{children:du(o.title)?g.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?g.jsx(v3,{value:o.shortcut}):null]})}),x3=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Re.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=hh(o,"title",n),a=r.filter(s=>Re.function(s.enabled)?s.enabled({text:t}):!1);return zn.unique(i.concat(a),s=>s.title)},w3=[0,0,0,0,0],S3=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=Pt(),[o,i]=S.useState(""),a=Pr(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:Jr,onOpenChange:e.onChangeVisibility}),f=Hs(d.context,{cols:0,listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,focusItemOnHover:!1,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:c,onNavigate:b=>{Re.number(b)&&n.current[b]?.scrollIntoView({block:"start",inline:"start"}),u(E=>Re.number(b)?b:e.open?E??0:null)}}),{getItemProps:p,getReferenceProps:v}=Yn([f]),h=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),m=x3(h,o),y=o===""?h:[{type:"group",title:"Results",items:[]},...m.filter(b=>b.type!=="group")];S.useEffect(()=>{const b=new m3;return b.add(t,()=>e.onChangeVisibility?.(!0)),h.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&b.add(E.shortcut,T=>E.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),b.register()},[t,h,e,a]);const x=e.Icon??yu;return g.jsx(S.Fragment,{children:g.jsxs(jp,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[g.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[g.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?g.jsx(x,{Default:yu,text:o,size:16}):g.jsx(yu,{size:16})}),g.jsx("input",{...v({ref:d.refs.setReference,onKeyDown:b=>{const E=Re.number(c)?y[c]:null;E&&b.key==="Enter"&&E.type==="shortcut"&&E.action({event:b,text:o,setOpen:e.onChangeVisibility})}}),autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>i(b.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[g.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:r.commandPaletteLoading}),w3.map((b,E)=>g.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Ip},`${s}-${E}-skeleton-index`))]}):g.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[y.map((b,E)=>S.createElement(b3,{...p({onMouseEnter:()=>u(E),ref(T){n.current[E]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),b.type==="shortcut"&&b.action({event:T,text:o,setOpen:e.onChangeVisibility})}}),item:b,text:o,active:c===E,key:`${s}-${b.type}-${E}`})),y.length===1?g.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(c)?g.jsx(e.Preview,{command:y[c],text:o}):null]}),e.footer?g.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg bg-background",children:e.footer}):null]})})},T3=["INPUT","SELECT"],sE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{T3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var wh,lE;function Sh(){if(lE)return wh;lE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return wh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},wh}var Th,cE;function uE(){if(cE)return Th;cE=1;var e=Sh(),t=Hm(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,k){return o.set(w,k),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,k){o.set(w,k)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var k=w.pop(),P=k.obj[k.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);k.obj[k.prop]=_}}},d=function(w,k){for(var P=k&&k.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function I(w,k,P){if(!k)return w;if(typeof k!="object"&&typeof k!="function"){if(r(w))w.push(k);else if(w&&typeof w=="object")if(a(w)){var _=s(w)+1;w[_]=k,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,k))&&(w[k]=!0);else return[w,k];return w}if(!w||typeof w!="object"){if(a(k)){for(var F=Object.keys(k),$=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},D=0;D<F.length;D++){var O=parseInt(F[D],10);$[O+1]=k[F[D]]}return i($,s(k)+1)}return[w].concat(k)}var N=w;return r(w)&&!r(k)&&(N=d(w,P)),r(w)&&r(k)?(k.forEach(function(j,M){if(n.call(w,M)){var C=w[M];C&&typeof C=="object"&&j&&typeof j=="object"?w[M]=I(C,j,P):w.push(j)}else w[M]=j}),w):Object.keys(k).reduce(function(j,M){var C=k[M];return n.call(j,M)?j[M]=I(j[M],C,P):j[M]=C,j},N)},p=function(w,k){return Object.keys(k).reduce(function(P,_){return P[_]=k[_],P},w)},v=function(I,w,k){var P=I.replace(/\+/g," ");if(k==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,m=function(w,k,P,_,F){if(w.length===0)return w;var $=w;if(typeof w=="symbol"?$=Symbol.prototype.toString.call(w):typeof w!="string"&&($=String(w)),P==="iso-8859-1")return escape($).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var D="",O=0;O<$.length;O+=h){for(var N=$.length>=h?$.slice(O,O+h):$,j=[],M=0;M<N.length;++M){var C=N.charCodeAt(M);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||F===e.RFC1738&&(C===40||C===41)){j[j.length]=N.charAt(M);continue}if(C<128){j[j.length]=c[C];continue}if(C<2048){j[j.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){j[j.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}M+=1,C=65536+((C&1023)<<10|N.charCodeAt(M)&1023),j[j.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}D+=j.join("")}return D},y=function(w){for(var k=[{obj:{o:w},prop:"o"}],P=[],_=0;_<k.length;++_)for(var F=k[_],$=F.obj[F.prop],D=Object.keys($),O=0;O<D.length;++O){var N=D[O],j=$[N];typeof j=="object"&&j!==null&&P.indexOf(j)===-1&&(k.push({obj:$,prop:N}),P.push(j))}return u(k),w},x=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},b=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},E=function(w,k,P,_){if(a(w)){var F=s(w)+1;return w[F]=k,l(w,F),w}var $=[].concat(w,k);return $.length>P?i(d($,{plainObjects:_}),$.length-1):$},T=function(w,k){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(k(w[_]));return P}return k(w)};return Th={arrayToObject:d,assign:p,combine:E,compact:y,decode:v,encode:m,isBuffer:b,isOverflow:a,isRegExp:x,maybeMap:T,merge:f},Th}var Eh,dE;function E3(){if(dE)return Eh;dE=1;var e=Hm(),t=uE(),n=Sh(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(h,m){a.apply(h,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},f={},p=function h(m,y,x,b,E,T,I,w,k,P,_,F,$,D,O,N,j,M){for(var C=m,V=M,z=0,R=!1;(V=V.get(f))!==void 0&&!R;){var W=V.get(m);if(z+=1,typeof W<"u"){if(W===z)throw new RangeError("Cyclic object value");R=!0}typeof V.get(f)>"u"&&(z=0)}if(typeof P=="function"?C=P(y,C):C instanceof Date?C=$(C):x==="comma"&&i(C)&&(C=t.maybeMap(C,function(J){return J instanceof Date?$(J):J})),C===null){if(T)return k&&!N?k(y,u.encoder,j,"key",D):y;C=""}if(d(C)||t.isBuffer(C)){if(k){var U=N?y:k(y,u.encoder,j,"key",D);return[O(U)+"="+O(k(C,u.encoder,j,"value",D))]}return[O(y)+"="+O(String(C))]}var H=[];if(typeof C>"u")return H;var ee;if(x==="comma"&&i(C))N&&k&&(C=t.maybeMap(C,k)),ee=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(P))ee=P;else{var re=Object.keys(C);ee=_?re.sort(_):re}var te=w?String(y).replace(/\./g,"%2E"):String(y),G=b&&i(C)&&C.length===1?te+"[]":te;if(E&&i(C)&&C.length===0)return G+"[]";for(var Y=0;Y<ee.length;++Y){var Q=ee[Y],de=typeof Q=="object"&&Q&&typeof Q.value<"u"?Q.value:C[Q];if(!(I&&de===null)){var B=F&&w?String(Q).replace(/\./g,"%2E"):String(Q),ae=i(C)?typeof x=="function"?x(G,B):G:G+(F?"."+B:"["+B+"]");M.set(m,z);var oe=e();oe.set(f,M),s(H,h(de,ae,x,b,E,T,I,w,x==="comma"&&N&&i(C)?null:k,P,_,F,$,D,O,N,j,oe))}}return H},v=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");x=m.format}var b=n.formatters[x],E=u.filter;(typeof m.filter=="function"||i(m.filter))&&(E=m.filter);var T;if(m.arrayFormat in o?T=m.arrayFormat:"indices"in m?T=m.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:E,format:x,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Eh=function(h,m){var y=h,x=v(m),b,E;typeof x.filter=="function"?(E=x.filter,y=E("",y)):i(x.filter)&&(E=x.filter,b=E);var T=[];if(typeof y!="object"||y===null)return"";var I=o[x.arrayFormat],w=I==="comma"&&x.commaRoundTrip;b||(b=Object.keys(y)),x.sort&&b.sort(x.sort);for(var k=e(),P=0;P<b.length;++P){var _=b[P],F=y[_];x.skipNulls&&F===null||s(T,p(F,_,I,w,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,k))}var $=T.join(x.delimiter),D=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?D+="utf8=%26%2310003%3B&":D+="utf8=%E2%9C%93&"),$.length>0?D+$:""},Eh}var kh,fE;function k3(){if(fE)return kh;fE=1;var e=uE(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(v,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,v,h){if(p&&typeof p=="string"&&v.comma&&p.indexOf(",")>-1)return p.split(",");if(v.throwOnLimitExceeded&&h>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,h){var m={__proto__:null},y=h.ignoreQueryPrefix?v.replace(/^\?/,""):v;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var x=h.parameterLimit===1/0?void 0:h.parameterLimit,b=y.split(h.delimiter,h.throwOnLimitExceeded?x+1:x);if(h.throwOnLimitExceeded&&b.length>x)throw new RangeError("Parameter limit exceeded. Only "+x+" parameter"+(x===1?"":"s")+" allowed.");var E=-1,T,I=h.charset;if(h.charsetSentinel)for(T=0;T<b.length;++T)b[T].indexOf("utf8=")===0&&(b[T]===s?I="utf-8":b[T]===a&&(I="iso-8859-1"),E=T,T=b.length);for(T=0;T<b.length;++T)if(T!==E){var w=b[T],k=w.indexOf("]="),P=k===-1?w.indexOf("="):k+1,_,F;if(P===-1?(_=h.decoder(w,r.decoder,I,"key"),F=h.strictNullHandling?null:""):(_=h.decoder(w.slice(0,P),r.decoder,I,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),h,n(m[_])?m[_].length:0),function(D){return h.decoder(D,r.decoder,I,"value")}))),F&&h.interpretNumericEntities&&I==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var $=t.call(m,_);$&&h.duplicates==="combine"?m[_]=e.combine(m[_],F,h.arrayLimit,h.plainObjects):(!$||h.duplicates==="last")&&(m[_]=F)}}return m},c=function(p,v,h,m){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var x=p.slice(0,-1).join("");y=Array.isArray(v)&&v[x]?v[x].length:0}for(var b=m?v:i(v,h,y),E=p.length-1;E>=0;--E){var T,I=p[E];if(I==="[]"&&h.parseArrays)e.isOverflow(b)?T=b:T=h.allowEmptyArrays&&(b===""||h.strictNullHandling&&b===null)?[]:e.combine([],b,h.arrayLimit,h.plainObjects);else{T=h.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,k=h.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(k,10);!h.parseArrays&&k===""?T={0:b}:!isNaN(P)&&I!==k&&String(P)===k&&P>=0&&h.parseArrays&&P<=h.arrayLimit?(T=[],T[P]=b):k!=="__proto__"&&(T[k]=b)}b=T}return b},u=function(v,h){var m=h.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(h.depth<=0)return!h.plainObjects&&t.call(Object.prototype,m)&&!h.allowPrototypes?void 0:[m];var y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,b=y.exec(m),E=b?m.slice(0,b.index):m,T=[];if(E){if(!h.plainObjects&&t.call(Object.prototype,E)&&!h.allowPrototypes)return;T.push(E)}for(var I=0;(b=x.exec(m))!==null&&I<h.depth;){I+=1;var w=b[1].slice(1,-1);if(!h.plainObjects&&t.call(Object.prototype,w)&&!h.allowPrototypes)return;T.push(b[1])}if(b){if(h.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+h.depth+" and strictDepth is true");T.push("["+m.slice(b.index)+"]")}return T},d=function(v,h,m,y){if(v){var x=u(v,m);if(x)return c(x,h,m,y)}},f=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof v.charset>"u"?r.charset:v.charset,m=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:m,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return kh=function(p,v){var h=f(v);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var m=typeof p=="string"?l(p,h):p,y=h.plainObjects?{__proto__:null}:{},x=Object.keys(m),b=0;b<x.length;++b){var E=x[b],T=d(E,m[E],h,typeof p=="string");y=e.merge(y,T,h)}return h.allowSparse===!0?y:e.compact(y)},kh}var Ch,pE;function C3(){if(pE)return Ch;pE=1;var e=E3(),t=k3(),n=Sh();return Ch={formats:n,parse:t,stringify:e},Ch}var I3=C3(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var hE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(hE||(hE={}));const Te=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return Te.undefined;case"string":return Te.string;case"number":return Number.isNaN(e)?Te.nan:Te.number;case"boolean":return Te.boolean;case"function":return Te.function;case"bigint":return Te.bigint;case"symbol":return Te.symbol;case"object":return Array.isArray(e)?Te.array:e===null?Te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Te.promise:typeof Map<"u"&&e instanceof Map?Te.map:typeof Set<"u"&&e instanceof Set?Te.set:typeof Date<"u"&&e instanceof Date?Te.date:Te.object;default:return Te.unknown}},ge=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class gr 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 gr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}gr.create=e=>new gr(e);const Ih=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let A3=Ih;function P3(){return A3}const O3=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ye(e,t){const n=P3(),r=O3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ih?void 0:Ih].filter(o=>!!o)});e.common.issues.push(r)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),Ua=e=>({status:"dirty",value:e}),Tn=e=>({status:"valid",value:e}),mE=e=>e.status==="aborted",gE=e=>e.status==="dirty",ki=e=>e.status==="valid",uc=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ce||(Ce={}));class Rr{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 vE=(e,t)=>{if(ki(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new gr(e.common.issues);return this._error=n,this._error}}};function qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class Xe{get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(uc(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:jr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return vE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ki(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>ki(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(uc(o)?o:Promise.resolve(o));return vE(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ge.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Pi({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Hr.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this)}promise(){return hc.create(this,this._def)}or(t){return fc.create([this,t],this._def)}and(t){return pc.create(this,t,this._def)}transform(t){return new Pi({...qe(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Oh({...qe(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new J3({typeName:Ve.ZodBranded,type:this,...qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _h({...qe(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mh.create(this,t)}readonly(){return Dh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _3=/^c[^\s-]{8,}$/i,M3=/^[0-9a-z]+$/,D3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,N3=/^[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,F3=/^[a-z0-9_-]{21}$/i,L3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V3=/^[-+]?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)?)??$/,$3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ah;const j3=/^(?:(?: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])$/,R3=/^(?:(?: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])$/,B3=/^(([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]))$/,H3=/^(([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])$/,W3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yE="((\\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])))",U3=new RegExp(`^${yE}$`);function bE(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 G3(e){return new RegExp(`^${bE(e)}$`)}function Y3(e){let t=`${yE}T${bE(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 K3(e,t){return!!((t==="v4"||!t)&&j3.test(e)||(t==="v6"||!t)&&B3.test(e))}function Z3(e,t){if(!L3.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 X3(e,t){return!!((t==="v4"||!t)&&R3.test(e)||(t==="v6"||!t)&&H3.test(e))}class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Te.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Te.string,received:i.parsedType}),Le}const r=new hn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")$3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ah||(Ah=new RegExp(z3,"u")),Ah.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")N3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")F3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")M3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")D3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:ge.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"regex",code:ge.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Y3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?U3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?G3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?V3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?K3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Z3(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?X3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?W3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ko({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ce.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ce.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ce.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ce.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ko({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ko.create=e=>new ko({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...qe(e)});function Q3(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 Ci extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Te.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Te.number,received:i.parsedType}),Le}let r;const o=new hn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Q3(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,o){return new Ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(o)}]})}_addCheck(t){return new Ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ci.create=e=>new Ci({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...qe(e)});class Ga extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Te.bigint)return this._getInvalidInput(t);let r;const o=new hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Te.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,o){return new Ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(o)}]})}_addCheck(t){return new Ga({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ga.create=e=>new Ga({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...qe(e)});class xE extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Te.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Te.boolean,received:r.parsedType}),Le}return Tn(t.data)}}xE.create=e=>new xE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...qe(e)});class dc extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Te.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Te.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_date}),Le}const r=new hn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new dc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}dc.create=e=>new dc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...qe(e)});class wE extends Xe{_parse(t){if(this._getType(t)!==Te.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Te.symbol,received:r.parsedType}),Le}return Tn(t.data)}}wE.create=e=>new wE({typeName:Ve.ZodSymbol,...qe(e)});class SE extends Xe{_parse(t){if(this._getType(t)!==Te.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Te.undefined,received:r.parsedType}),Le}return Tn(t.data)}}SE.create=e=>new SE({typeName:Ve.ZodUndefined,...qe(e)});class TE extends Xe{_parse(t){if(this._getType(t)!==Te.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Te.null,received:r.parsedType}),Le}return Tn(t.data)}}TE.create=e=>new TE({typeName:Ve.ZodNull,...qe(e)});class EE extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}EE.create=e=>new EE({typeName:Ve.ZodAny,...qe(e)});class kE extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}kE.create=e=>new kE({typeName:Ve.ZodUnknown,...qe(e)});class Br extends Xe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Te.never,received:n.parsedType}),Le}}Br.create=e=>new Br({typeName:Ve.ZodNever,...qe(e)});class CE extends Xe{_parse(t){if(this._getType(t)!==Te.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Te.void,received:r.parsedType}),Le}return Tn(t.data)}}CE.create=e=>new CE({typeName:Ve.ZodVoid,...qe(e)});class ir extends Xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Te.array)return ye(n,{code:ge.invalid_type,expected:Te.array,received:n.parsedType}),Le;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ye(n,{code:a?ge.too_big:ge.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ye(n,{code:ge.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ye(n,{code:ge.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Rr(n,a,n.path,s)))).then(a=>hn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rr(n,a,n.path,s)));return hn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ir({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new ir({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new ir({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}}ir.create=(e,t)=>new ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...qe(t)});function Ii(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hr.create(Ii(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof ir?new ir({...e._def,type:Ii(e.element)}):e instanceof Hr?Hr.create(Ii(e.unwrap())):e instanceof Oi?Oi.create(Ii(e.unwrap())):e instanceof Co?Co.create(e.items.map(t=>Ii(t))):e}class Bt extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Te.object){const c=this._getOrReturnCtx(t);return ye(c,{code:ge.invalid_type,expected:Te.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Br&&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 Rr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ye(o,{code:ge.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Rr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>hn.mergeObjectSync(r,c)):hn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ce.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Ii(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return OE(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...qe(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:Ve.ZodObject,...qe(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...qe(t)});class fc extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new gr(s.ctx.common.issues));return ye(n,{code:ge.invalid_union,unionErrors:a}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new gr(l));return ye(n,{code:ge.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}fc.create=(e,t)=>new fc({options:e,typeName:Ve.ZodUnion,...qe(t)});function Ph(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===Te.object&&r===Te.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ph(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Te.array&&r===Te.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=Ph(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Te.date&&r===Te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class pc extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(mE(i)||mE(a))return Le;const s=Ph(i.value,a.value);return s.valid?((gE(i)||gE(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ge.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}pc.create=(e,t,n)=>new pc({left:e,right:t,typeName:Ve.ZodIntersection,...qe(n)});class Co extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Te.array)return ye(r,{code:ge.invalid_type,expected:Te.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ye(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Rr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>hn.mergeArray(n,a)):hn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Co({...this._def,rest:t})}}Co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Co({items:e,typeName:Ve.ZodTuple,rest:null,...qe(t)})};class IE extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Te.map)return ye(r,{code:ge.invalid_type,expected:Te.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rr(r,s,r.path,[c,"key"])),value:i._parse(new Rr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}IE.create=(e,t,n)=>new IE({valueType:t,keyType:e,typeName:Ve.ZodMap,...qe(n)});class Ya extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Te.set)return ye(r,{code:ge.invalid_type,expected:Te.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:ge.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ye(r,{code:ge.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Rr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ya({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new Ya({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ya.create=(e,t)=>new Ya({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...qe(t)});class AE extends Xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}AE.create=(e,t)=>new AE({getter:e,typeName:Ve.ZodLazy,...qe(t)});class PE extends Xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}PE.create=(e,t)=>new PE({value:e,typeName:Ve.ZodLiteral,...qe(t)});function OE(e,t){return new Ai({values:e,typeName:Ve.ZodEnum,...qe(t)})}class Ai extends Xe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:et.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Le}return Tn(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 Ai.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ai.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ai.create=OE;class _E extends Xe{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Te.string&&r.parsedType!==Te.number){const o=et.objectValues(n);return ye(r,{expected:et.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return ye(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Le}return Tn(t.data)}get enum(){return this._def.values}}_E.create=(e,t)=>new _E({values:e,typeName:Ve.ZodNativeEnum,...qe(t)});class hc extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Te.promise&&n.common.async===!1)return ye(n,{code:ge.invalid_type,expected:Te.promise,received:n.parsedType}),Le;const r=n.parsedType===Te.promise?n.data:Promise.resolve(n.data);return Tn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hc.create=(e,t)=>new hc({type:e,typeName:Ve.ZodPromise,...qe(t)});class Pi extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Ua(l.value):l});{if(n.value==="aborted")return Le;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Le:s.status==="dirty"||n.value==="dirty"?Ua(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ki(a))return Le;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ki(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Le);et.assertNever(o)}}Pi.create=(e,t,n)=>new Pi({schema:e,typeName:Ve.ZodEffects,effect:t,...qe(n)}),Pi.createWithPreprocess=(e,t,n)=>new Pi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...qe(n)});class Hr extends Xe{_parse(t){return this._getType(t)===Te.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:Ve.ZodOptional,...qe(t)});class Oi extends Xe{_parse(t){return this._getType(t)===Te.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oi.create=(e,t)=>new Oi({innerType:e,typeName:Ve.ZodNullable,...qe(t)});class Oh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Oh.create=(e,t)=>new Oh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qe(t)});class _h extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return uc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_h.create=(e,t)=>new _h({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qe(t)});class ME extends Xe{_parse(t){if(this._getType(t)!==Te.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Te.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}ME.create=e=>new ME({typeName:Ve.ZodNaN,...qe(e)});class J3 extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mh extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),Ua(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Mh({in:t,out:n,typeName:Ve.ZodPipeline})}}class Dh extends Xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ki(o)&&(o.value=Object.freeze(o.value)),o);return uc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Dh.create=(e,t)=>new Dh({innerType:e,typeName:Ve.ZodReadonly,...qe(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={})),Br.create,ir.create,fc.create,pc.create,Co.create,Ai.create,hc.create,Hr.create,Oi.create;const eH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},tH=(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]}}},DE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),mn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):DE(t),o=structuredClone(e);return tH(o,r,n),o},nH=(e,t)=>e.localeCompare(t),_i={},NE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return FE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=NE(e._def.innerType);return t==="ZodArray"?n??[]:n}},FE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,NE(n)])),LE=(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]=LE(i,o):n[r]=o||i)}return n},rH={sort:nH,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},VE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return I3.parse(n.toString(),rH)},Wr=(e,t)=>DE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),qr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Nh=e=>{const t=e.dataset.target;if(!t)return qr(e);const n=document.querySelector(`[data-origin="${t}"]`);return qr(n||e)},oH={state:{},loading:!1,useOnChange:!1},$E=e=>e.dataset.target||e.name,iH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=za.LocalStorage.get(t);return eH(n)?n:{}},clear:()=>{za.LocalStorage.delete(t)},set:n=>za.LocalStorage.set(t,n)}},aH=(e,t,n=oH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??FE(e)??{}),l=S.useCallback(b=>{const E=b.target,T=b.currentTarget;if(E.dataset.optional==="true")return;const w=$E(E),k=Nh(E)||(T?qr(T):""),P=Wr(w,e);if(E.setAttribute("data-initialized","true"),P){const _=P.safeParse(k),F=_.success?void 0:_.error.issues[0]?.message??"";o($=>mn($??{},w,F))}},[e]),c=S.useCallback(b=>E=>{const T=E.currentTarget,I=Object.values(i.current).reduce((k,P)=>{const _=P.element,F=P.schema.safeParse(qr(_));if(_.dataset.ignore==="ignore"||F.success)return k;const $=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const D=_.dataset.name||_.name||"";return mn(k,D,$)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),b?.({form:T,errors:w||{}})},[]),u=(b,E=_i)=>{const T=Wr(b,e),I=w=>{if(!Zl(w))return;s(P=>mn(P,b,w.toISOString())),o(P=>mn(P,b,void 0));const k=i.current[b].element;if(k){const P=k.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}E?.onChange?.(w)};return{...E,loading:n.loading,name:b,id:b,onChange:I,form:t,date:Re.string(a[b])?new Date(a[b]):a[b],required:E.required??!T.isOptional(),error:Rn(r,b),ref:w=>{w!==null&&(i.current[b]={element:w,schema:T})}}},d=(b,E=_i)=>{const T=Wr(b,e);return{...E,name:b,id:b,onChange:w=>{const k=w.target.value;s(P=>mn(P,b,k)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),value:Rn(a,b,void 0)??"",required:E.required??!T.isOptional(),ref:w=>w!==null?i.current[b]={element:w,schema:T}:void 0}},f=(b,E=_i)=>{const T=Wr(b,e);return{...E,name:b,id:b,onChange:w=>{const k=w.target.checked;s(P=>mn(P??{},b,k)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),ref:w=>w!==null?void(i.current[b]={element:w,schema:T}):void 0}},p=(b,E=_i)=>{const T=Wr(b,e),I=w=>{w.persist?.();const k=w.target.value;E?.onChange?.(w),s(P=>mn(P,b,k))};return{...E,loading:n.loading,name:b,id:b,onChange:I,form:t,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),value:Rn(a,b,void 0)||E?.value||"",type:Re.instance(T,Ci)?"number":E?.type??"text",ref:w=>w===null?void 0:i.current[b]={element:w,schema:T}}},v=(b,E=_i)=>{const T=Wr(b,e);return{...E,name:b,id:b,onChangeOptions:w=>{s(k=>mn(k,b,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),value:Rn(a,b,void 0)||E?.value||[],ref:w=>w===null?void 0:void(i.current[b]={element:w,schema:T})}},h=(b,E=_i)=>{const T=Wr(b,e),I=T._def.typeName==="ZodNumber";return{...E,name:b,id:b,onChange:k=>{k.persist?.();const P=I?k.target.valueAsNumber:k.target.value;E?.onChange?.(k),s(_=>mn(_,b,P))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),type:I?"number":E?.type??"text",value:Rn(a,b,void 0)||E?.value||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:T})}};S.useEffect(()=>{const b=Object.values(i.current).map(T=>{const I=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,w=T.schema.safeParse(qr(I)),k=$=>{const D=$E($.target);if(!D)return!1;const O=$.target,N=Nh($.target)||($.relatedTarget?qr($.relatedTarget):""),j=T.schema.safeParse(N);if(O.setAttribute("value",N),j.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const C=mn(M,D,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(C)?null:C}),!1;if(I.required){const M=j.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(C=>{if(Re.null(C))return null;const V=mn(C,D,M||void 0);return Re.empty(V)?null:V})}return!1},P=new AbortController,_=I.getAttribute("data-trigger")||"blur";I.addEventListener(_,k,{signal:P.signal});const F=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:T,hasInitialError:F,unsubscribe:()=>P.abort()}});return b.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>b.forEach(T=>T.unsubscribe())});const m=b=>E=>{E.preventDefault();const T=E.currentTarget;let I=VE(T);Array.from(t?document.querySelectorAll(`[form="${t}"]`):T.elements).forEach(F=>{if(F.tagName==="SELECT"){const $=F;I=mn(I,$.name,$.value)}if(F.tagName==="INPUT"){const $=F,D=Nh($)||($?qr($):"");I=mn(I,$.dataset.target||$.name,D)}});const k=LE(I,a),P=e.safeParse(k),_=()=>{sE(T),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return T.setAttribute("data-json",F),n.interceptor?.clear(),b?.(E,{form:T,event:E,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),T.reportValidity(),b?.(E,{form:T,json:I,event:E,reset:_,setErrors:o,data:I,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map($=>String($))}))})},y=b=>Ju(a,b)||"",x=b=>({...b,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:h,state:a,errors:r,select:d,checkbox:f,onSubmit:m,setState:s,textarea:p,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:v,disabled:r!==null}},sH=e=>e?JSON.parse(e.getAttribute("data-json")):{},lH=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},zE={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},jE={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"},RE={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},cH={name:"dark",zIndex:RE,rounded:zE,spacing:jE,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",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(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,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%)"}}}},uH={rounded:zE,spacing:jE,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:RE,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(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},dH=cH,fH=uH,pH=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...ds,...e.tweaks},parser:e.parser||ls.hsla,map:{...us,...e.map}}),[e]);return g.jsx(Kr.Provider,{value:t,children:e.children})};ie.Alert=z$,ie.AnimatedList=T$,ie.AnimatedListItem=E$,ie.Autocomplete=k4,ie.Button=ro,ie.Calendar=BS,ie.Card=Hl,ie.Checkbox=$p,ie.ColType=gi,ie.Collapse=aS,ie.CommandPalette=S3,ie.ComponentsProvider=pH,ie.Context=Kr,ie.DatePicker=KR,ie.Description=dz,ie.Dict=zn,ie.Dropdown=mi,ie.Empty=U1,ie.Expand=mz,ie.FileUpload=m4,ie.Form=xC,ie.Info=fz,ie.Input=Wo,ie.InputFeedback=ay,ie.InputField=Xi,ie.Loading=hz,ie.Menu=X$,ie.MenuItem=Z$,ie.Modal=jp,ie.MultiSelect=M4,ie.Notifications=f3,ie.PageHeader=pz,ie.PageTitle=hS,ie.Paragraph=uz,ie.Polymorph=ln,ie.Progress=HR,ie.Radiobox=Q$,ie.RenderOnView=V4,ie.Select=oo,ie.Slider=d_,ie.Spinner=mS,ie.Stats=j$,ie.StatsCard=w$,ie.Step=_$,ie.Steps=M$,ie.Switch=f_,ie.Tab=L$,ie.Table=x$,ie.Tabs=N$,ie.Tag=ts,ie.TaskList=cz,ie.Textarea=J$,ie.Timeline=WR,ie.TimelineItem=Ql,ie.Toolbar=qR,ie.Tooltip=td,ie.TransferList=F4,ie.Wizard=xz,ie.createColumns=HV,ie.createCssProperties=cI,ie.createDesignTokens=Og,ie.createFormStorage=iH,ie.createOptionCols=Op,ie.createStyles=aI,ie.createTheme=lI,ie.createTokenStyles=uI,ie.css=Oe,ie.defaultDarkTheme=dH,ie.defaultLightTheme=fH,ie.defaultTranslations=us,ie.defaultTweaks=ds,ie.dispatchInput=cg,ie.formReset=sE,ie.formToJson=VE,ie.getCoords=gC,ie.getJsonForm=sH,ie.getModalScrollerRef=YV,ie.getRemainingSize=$i,ie.getSchemaShape=Wr,ie.hasVerticalScroll=ug,ie.initializeInputDataset=Vi,ie.isMobile=iy,ie.isReactComponent=mC,ie.isReactFC=du,ie.isSsr=Cr,ie.mergeRefs=sr,ie.negate=IP,ie.noop=Ho,ie.parsers=ls,ie.path=Ju,ie.reduceTokens=yr,ie.safeRegex=ed,ie.splitInto=oy,ie.useColorParser=X1,ie.useForm=aH,ie.useLocale=sl,ie.useNotification=l3,ie.usePrevious=lH,ie.useReactive=eS,ie.useStableRef=Pr,ie.useStepContext=J1,ie.useSwipe=LS,ie.useTablePreferences=UV,ie.useTranslations=Pt,ie.uuid=Bo,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
14
+ `),()=>{T.contains(b)&&T.removeChild(b)}},[t]),g.jsx(FN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const VN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=_n($N),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const h of u.values())if(!h)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,h)=>u.set(h,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(LN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),g.jsx(cl.Provider,{value:p,children:e})};function $N(){return new Map}function V0(e=!0){const t=S.useContext(cl);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 Tl=e=>e.key||"";function $0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const fn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=V0(a),f=S.useMemo(()=>$0(e),[e]),p=a&&!u?[]:f.map(Tl),v=S.useRef(!0),h=S.useRef(f),m=_n(()=>new Map),y=S.useRef(new Set),[x,b]=S.useState(f),[T,E]=S.useState(f);ll(()=>{v.current=!1,h.current=f;for(let k=0;k<T.length;k++){const P=Tl(T[k]);p.includes(P)?(m.delete(P),y.current.delete(P)):m.get(P)!==!0&&m.set(P,!1)}},[T,p.length,p.join("-")]);const I=[];if(f!==x){let k=[...f];for(let P=0;P<T.length;P++){const _=T[P],F=Tl(_);p.includes(F)||(k.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(k=I),E($0(k)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(na);return g.jsx(g.Fragment,{children:T.map(k=>{const P=Tl(k),_=a&&!u?!1:f===T||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),m.has(P))m.set(P,!0);else return;let V=!0;m.forEach(N=>{N||(V=!1)}),V&&(w?.(),E(h.current),a&&d?.(),r&&r())};return g.jsx(VN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:k},P)})})},zN=S.createContext(null);function jN(){const e=S.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function RN(){const e=jN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const z0=e=>e===!0,BN=e=>z0(e===!0)||e==="id",HN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(na),o=S.useContext(zN),[i,a]=RN(),s=S.useRef(null),l=r.id||o;s.current===null&&(BN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:z0(n)&&r.group||N0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return g.jsx(na.Provider,{value:c,children:e})},j0=S.createContext({strict:!1}),R0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let B0=!1;function WN(){if(B0)return;const e={};for(const t in R0)e[t]={isEnabled:n=>R0[t].some(r=>!!n[r])};Ox(e),B0=!0}function H0(){return WN(),CD()}function qN(e){const t=H0();for(const n in e)t[n]={...t[n],...e[n]};Ox(t)}const UN=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 El(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||UN.has(e)}let W0=e=>!El(e);function q0(e){typeof e=="function"&&(W0=t=>t.startsWith("on")?!El(t):e(t))}try{q0(require("@emotion/is-prop-valid").default)}catch{}function GN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(W0(o)||n===!0&&El(o)||!t&&!El(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mf({children:e,isValidProp:t,...n}){t&&q0(t),n={...S.useContext(ii),...n},n.isStatic=_n(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return g.jsx(ii.Provider,{value:r,children:e})}const kl=S.createContext({});function YN(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function KN(e){const{initial:t,animate:n}=YN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[U0(t),U0(n)])}function U0(e){return Array.isArray(e)?e.join(" "):e}const Df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function G0(e,t,n){for(const r in t)!jt(t[r])&&!Wx(r,n)&&(e[r]=t[r])}function ZN({transformTemplate:e},t){return S.useMemo(()=>{const n=Df();return Cf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function XN(e,t){const n=e.style||{},r={};return G0(r,n,e),Object.assign(r,ZN(e,t)),r}function QN(e,t){const n={},r=XN(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 Y0=()=>({...Df(),attrs:{}});function JN(e,t,n,r){const o=S.useMemo(()=>{const i=Y0();return Ux(i,t,Yx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};G0(i,e.style,e),o.style={...i,...o.style}}return o}const e2=["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 Nf(e){return typeof e!="string"||e.includes("-")?!1:!!(e2.indexOf(e)>-1||/[A-Z]/u.test(e))}function t2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Nf(e)?JN:QN)(t,r,o,e),c=GN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>jt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function n2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:r2(n,r,o,e),renderState:t()}}function r2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:a,animate:s}=e;const l=vl(e),c=Ax(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"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=sf(e,f[p]);if(v){const{transitionEnd:h,transition:m,...y}=v;for(const x in y){let b=y[x];if(Array.isArray(b)){const T=u?b.length-1:0;b=b[T]}b!==null&&(o[x]=b)}for(const x in h)o[x]=h[x]}}}return o}const K0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(cl),i=()=>n2(e,t,r,o);return n?i():_n(i)},o2=K0({scrapeMotionValuesFromProps:Af,createRenderState:Df}),i2=K0({scrapeMotionValuesFromProps:Kx,createRenderState:Y0}),a2=Symbol.for("motionComponentSymbol");function s2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const Z0=S.createContext({});function ya(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function l2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(j0),l=S.useContext(cl),c=S.useContext(ii).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(Z0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&c2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[sx],h=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),h.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),h.current=!1),d.enteringChildren=void 0)}),d}function c2(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:X0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ya(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function X0(e){if(e)return e.options.allowProjection!==!1?e.projection:X0(e.parent)}function Ff(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&qN(r);const i=n?n==="svg":Nf(e),a=i?i2:o2;function s(c,u){let d;const f={...S.useContext(ii),...c,layoutId:u2(c)},{isStatic:p}=f,v=KN(c),h=a(c,p);if(!p&&nb){d2(f,r);const m=f2(f);d=m.MeasureLayout,v.visualElement=l2(e,h,f,o,m.ProjectionNode,i)}return g.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?g.jsx(d,{visualElement:v.visualElement,...f}):null,t2(e,c,s2(h,v.visualElement,u),h,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[a2]=e,l}function u2({layoutId:e}){const t=S.useContext(na).id;return t&&e!==void 0?t+"-"+e:e}function d2(e,t){const n=S.useContext(j0).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?Yo(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function f2(e){const t=H0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function p2(e,t){if(typeof Proxy>"u")return Ff;const n=new Map,r=(i,a)=>Ff(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&Cd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Ff(a,void 0,e,t)),n.get(a))})}const h2=(e,t)=>t.isSVG??Nf(e)?new Zx(t):new qx(t,{allowProjection:e!==S.Fragment});class m2 extends Dr{constructor(t){super(t),t.animationState||(t.animationState=GD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(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 g2=0;class v2 extends Dr{constructor(){super(...arguments),this.id=g2++}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 y2={animation:{Feature:m2},exit:{Feature:v2}};function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const b2=e=>t=>vf(t)&&e(t,ba(t));function xa(e,t,n,r){return va(e,t,b2(n),r)}const Q0=({current:e})=>e?e.ownerDocument.defaultView:null,J0=(e,t)=>Math.abs(e-t);function x2(e,t){const n=J0(e.x,t.x),r=J0(e.y,t.y);return Math.sqrt(n**2+r**2)}const ew=new Set(["auto","scroll"]);class tw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Vf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,h=x2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!h)return;const{point:m}=p,{timestamp:y}=Kt;this.history.push({...m,timestamp:y});const{onStart:x,onMove:b}=this.handlers;v||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Lf(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vf(p.type==="pointercancel"?this.lastMoveEventInfo:Lf(v,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,x),m&&m(p,x)},!vf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=ba(t),c=Lf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Vf(c,this.history)),this.removeListeners=oa(xa(this.contextWindow,"pointermove",this.handlePointerMove),xa(this.contextWindow,"pointerup",this.handlePointerUp),xa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ew.has(r.overflowX)||ew.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Lf(e,t){return t?{point:t(e.point)}:e}function nw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vf({point:e},t){return{point:e,delta:nw(e,rw(t)),offset:nw(e,w2(t)),velocity:S2(t,.1)}}function w2(e){return e[0]}function rw(e){return e[e.length-1]}function S2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=rw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=bn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function T2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function ow(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 E2(e,{top:t,left:n,bottom:r,right:o}){return{x:ow(e.x,n,o),y:ow(e.y,t,r)}}function iw(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 k2(e,t){return{x:iw(e.x,t.x),y:iw(e.y,t.y)}}function C2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Ko(t.min,t.max-r,e.min):r>o&&(n=Ko(e.min,e.max-o,t.min)),Kn(0,1,n)}function I2(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 $f=.35;function A2(e=$f){return e===!1?e=0:e===!0&&(e=$f),{x:aw(e,"left","right"),y:aw(e,"top","bottom")}}function aw(e,t,n){return{min:sw(e,t),max:sw(e,n)}}function sw(e,t){return typeof e=="number"?e:e[t]||0}const P2=new WeakMap;class O2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(ba(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:h}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xn(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Zn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const T=b.layout.layoutBox[y];T&&(x=en(T)*(parseFloat(x)/100))}}this.originPoint[y]=x}),h&&gt.postRender(()=>h(d,f)),cf(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:h,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=_2(y),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>xn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new tw(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Q0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&gt.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=T2(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&&ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=E2(r.layoutBox,t):this.constraints=!1,this.elastic=A2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=I2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ya(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=OD(r,o.root,this.visualElement.getTransformPagePoint());let a=k2(o.layout.layoutBox,i);if(n){const s=n(ID(a));this.hasMutatedConstraints=!!s,s&&(a=Dx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=xn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cf(this.visualElement,t),r.start(af(t,r,0,n,this.visualElement,!1))}stopAnimation(){xn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){xn(n=>{const{drag:r}=this.getProps();if(!Cl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ya(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};xn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=C2({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),xn(a=>{if(!Cl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;P2.set(this.visualElement,this);const t=this.visualElement.current,n=xa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&wx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ya(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),gt.read(r);const a=va(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(xn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=$f,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class M2 extends Dr{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new O2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const lw=e=>(t,n)=>{e&&gt.postRender(()=>e(t,n))};class D2 extends Dr{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new tw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Q0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:lw(t),onStart:lw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&gt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let zf=!1;class N2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),zf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,zf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;zf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cw(e){const[t,n]=V0(),r=S.useContext(na);return g.jsx(N2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Z0),isPresent:t,safeToRemove:n})}const F2={pan:{Feature:D2},drag:{Feature:M2,ProjectionNode:F0,MeasureLayout:cw}};function uw(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&&gt.postRender(()=>i(t,ba(t)))}class L2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=hD(t,(n,r)=>(uw(this.node,r,"Start"),o=>uw(this.node,o,"End"))))}unmount(){}}class V2 extends Dr{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=oa(va(this.node.current,"focus",()=>this.onFocus()),va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dw(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&&gt.postRender(()=>i(t,ba(t)))}class $2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=vD(t,(n,r)=>(dw(this.node,r,"Start"),(o,{success:i})=>dw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Rf=new WeakMap,z2=e=>{const t=jf.get(e.target);t&&t(e)},j2=e=>{e.forEach(z2)};function R2({root:e,...t}){const n=e||document;Rf.has(n)||Rf.set(n,{});const r=Rf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(j2,{root:e,...t})),r[o]}function B2(e,t,n){const r=R2(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const H2={some:0,all:1};class W2 extends Dr{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:H2[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return B2(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(q2(t,n))&&this.startObserver()}unmount(){}}function q2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const U2={...y2,...{inView:{Feature:W2},tap:{Feature:$2},focus:{Feature:V2},hover:{Feature:L2}},...F2,...{layout:{ProjectionNode:F0,MeasureLayout:cw}}},Be=p2(U2,h2);function G2(e){return S.useEffect(()=>()=>e(),[])}function ho(e){const t=_n(()=>uo(e)),{isStatic:n}=S.useContext(ii);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function fw(e,t){const n=ho(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),hr(r)}}),n}function Y2(e){fa.current=[],e();const t=fw(fa.current,e);return fa.current=void 0,t}function K2(e,t,n,r){if(typeof e=="function")return Y2(e);const i=typeof t=="function"?t:xD(t,n,r);return Array.isArray(e)?pw(e,i):pw([e],([a])=>i(a))}function pw(e,t){const n=_n(()=>[]);return fw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Bf(e){return typeof e=="object"&&!Array.isArray(e)}function hw(e,t,n,r){return e==null?[]:typeof e=="string"&&Bf(t)?mx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function Z2(e,t,n){return e*(t+1)}function mw(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 X2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function Q2(e,t,n,r,o,i){X2(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:yb(n,a)})}function J2(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function eF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const tF="easeInOut",nF=20;function rF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,mw(d,v.at,u,c));continue}let[h,m,y={}]=v;y.at!==void 0&&(d=mw(d,y.at,u,c));let x=0;const b=(T,E,I,w=0,k=0)=>{const P=oF(T),{delay:_=0,times:F=Bb(P),type:V=t.type||"keyframes",repeat:N,repeatType:O,repeatDelay:D=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:C}=E;const L=typeof _=="function"?_(w,k):_,$=P.length,B=tf(V)?V:o?.[V||"keyframes"];if($<=2&&B){let J=100;if($===2&&sF(P)){const Y=P[1]-P[0];J=Math.abs(Y)}const re={...t,...z};C!==void 0&&(re.duration=Mn(C));const ee=Vb(re,J,B);M=ee.ease,C=ee.duration}C??(C=i);const q=d+L;F.length===1&&F[0]===0&&(F[1]=1);const G=F.length-P.length;if(G>0&&Rb(F,G),P.length===1&&P.unshift(null),N){dn(N<nF,"Repeat count too high, must be less than 20","repeat-count-high"),C=Z2(C,N);const J=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let Y=0;Y<N;Y++){P.push(...J);for(let K=0;K<J.length;K++)F.push(re[K]+(Y+1)),M.push(K===0?"linear":yb(ee,K-1))}J2(F,N)}const W=q+C;Q2(I,P,M,F,q,W),x=Math.max(L+C,x),f=Math.max(W,f)};if(jt(h)){const T=gw(h,s);b(m,y,vw("default",T))}else{const T=hw(h,m,r,l),E=T.length;for(let I=0;I<E;I++){m=m,y=y;const w=T[I],k=gw(w,s);for(const P in m)b(m[P],iF(y,P),vw(P,k),I,E)}}u=d,d+=x}return s.forEach((p,v)=>{for(const h in p){const m=p[h];m.sort(eF);const y=[],x=[],b=[];for(let w=0;w<m.length;w++){const{at:k,value:P,easing:_}=m[w];y.push(P),x.push(Ko(0,f,k)),b.push(_||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),b.unshift(tF)),x[x.length-1]!==1&&(x.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const T=a.get(v);T.keyframes[h]=y;const{type:E,...I}=t;T.transition[h]={...I,duration:f,ease:b,times:x,...n}}}),a}function gw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function vw(e,t){return t[e]||(t[e]=[]),t[e]}function oF(e){return Array.isArray(e)?e:[e]}function iF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const aF=e=>typeof e=="number",sF=e=>e.every(aF);function lF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=bf(e)&&!Ex(e)?new Zx(t):new qx(t);n.mount(e),pa.set(e,n)}function cF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new VD(t);n.mount(e),pa.set(e,n)}function uF(e,t){return jt(e)||typeof e=="number"||typeof e=="string"&&!Bf(t)}function yw(e,t,n,r){const o=[];if(uF(e,t))o.push(S0(e,Bf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=hw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?lF:cF;pa.has(l)||c(l);const u=pa.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...df(u,{...t,transition:d},{}))}}return o}function dF(e,t,n){const r=[];return rF(e,t,n,{spring:ua}).forEach(({keyframes:i,transition:a},s)=>{r.push(...yw(s,i,a))}),r}function fF(e){return Array.isArray(e)&&e.some(Array.isArray)}function bw(e){function t(n,r,o){let i=[],a;if(fF(n))i=dF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=yw(n,r,c,e)}const s=new VM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{ra(e.animations,s)})),s}return t}const xw=bw();function pF(){const e=_n(()=>({current:null,animations:[]})),t=_n(()=>bw(e));return G2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class hF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const mF=()=>new hF;function gF(){return _n(mF)}const ww=S.createContext(null);function vF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?h_(e,o,o+i):e}function yF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=_n(()=>Be[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,h)=>{const m=l.findIndex(y=>v===y.value);m!==-1?l[m].layout=h[n]:l.push({value:v,layout:h[n]}),l.sort(xF)},updateOrder:(v,h,m)=>{if(c.current)return;const y=vF(l,v,h,m);l!==y&&(c.current=!0,r(y.map(bF).filter(x=>o.indexOf(x)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return g.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(ww.Provider,{value:d,children:e})})}const Sw=S.forwardRef(yF);function bF(e){return e.value}function xF(e,t){return e.layout.min-t.layout.min}const Il=50,Tw=25,wF=new Set(["auto","scroll"]),wa=new WeakMap,Sa=new WeakMap;let Ta=null;function SF(){if(Ta){const e=Hf(Ta,"y");e&&(Sa.delete(e),wa.delete(e));const t=Hf(Ta,"x");t&&t!==e&&(Sa.delete(t),wa.delete(t)),Ta=null}}function TF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return wF.has(r)}function Hf(e,t){let n=e?.parentElement;for(;n;){if(TF(n,t))return n;n=n.parentElement}return null}function EF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Il){const l=1-a/Il;return{amount:-Tw*l*l,edge:"start"}}else if(s<Il){const l=1-s/Il;return{amount:Tw*l*l,edge:"end"}}return{amount:0,edge:null}}function kF(e,t,n,r){if(!e)return;Ta=e;const o=Hf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=EF(i,o,n);if(s===null){Sa.delete(o),wa.delete(o);return}if(Sa.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Sa.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;wa.set(o,u)}if(a>0){const c=wa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function Ew(e,t=0){return jt(e)?e:ho(t)}function CF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=_n(()=>Be[r]),u=S.useContext(ww),d={x:Ew(t.x),y:Ew(t.y)},f=K2([d.x,d.y],([y,x])=>y||x?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:h,groupRef:m}=u;return g.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,x)=>{const{velocity:b,point:T}=x,E=d[p].get();h(n,E,b[p]),kF(m.current,T[p],p,b[p]),o&&o(y,x)},onDragEnd:(y,x)=>{SF(),i&&i(y,x)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const kw=S.forwardRef(CF);var Al={exports:{}},Wf={},Pl={exports:{}},qf={};var Cw;function IF(){if(Cw)return qf;Cw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),h=v[0].inst,m=v[1];return i(function(){h.value=p,h.getSnapshot=f,l(h)&&m({inst:h})},[d,p,f]),o(function(){return l(h)&&m({inst:h}),d(function(){l(h)&&m({inst:h})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return qf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qf}var Uf={};var Iw;function AF(){return Iw||(Iw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=v();if(!d){var m=v();i(h,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:h,getSnapshot:v}});var y=m[0].inst,x=m[1];return l(function(){y.value=h,y.getSnapshot=v,n(y)&&x({inst:y})},[p,h,v]),s(function(){return n(y)&&x({inst:y}),p(function(){n(y)&&x({inst:y})})},[p]),c(h),h}function n(p){var v=p.getSnapshot;p=p.value;try{var h=v();return!i(p,h)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Uf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Uf}var Aw;function Pw(){return Aw||(Aw=1,process.env.NODE_ENV==="production"?Pl.exports=IF():Pl.exports=AF()),Pl.exports}var Ow;function PF(){if(Ow)return Wf;Ow=1;var e=S,t=Pw();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 Wf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function y(I){if(!x){if(x=!0,b=I,I=f(I),p!==void 0&&h.hasValue){var w=h.value;if(p(w,I))return T=w}return T=I}if(w=T,r(b,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(b=I,w):(b=I,T=k)}var x=!1,b,T,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var m=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=m},[m]),l(m),m},Wf}var Gf={};var _w;function OF(){return _w||(_w=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=Pw(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function y(I){if(!x){if(x=!0,b=I,I=f(I),p!==void 0&&h.hasValue){var w=h.value;if(p(w,I))return T=w}return T=I}if(w=T,r(b,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(b=I,w):(b=I,T=k)}var x=!1,b,T,E=d===void 0?null:d;return[function(){return y(u())},E===null?void 0:function(){return y(E())}]},[u,d,f,p]);var m=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gf}var Mw;function _F(){return Mw||(Mw=1,process.env.NODE_ENV==="production"?Al.exports=PF():Al.exports=OF()),Al.exports}_F();var ai=function(){return ai=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},ai.apply(this,arguments)};function Ea(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 Dw(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 si=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},MF=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},DF=function(e){return Object.entries(e)},Nw=function(e){return e instanceof Promise},Fw=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)},ai(ai({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},NF=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,Dw([],Ea(a),!1)),u=function(d,f){return n(function(p){return Fw(d,p,i,f)})};return Nw(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))}},FF=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,Dw([],Ea(a),!1)),c=function(u){return n(function(d){return Fw(u,d,i,o.current)})};return Nw(l)?l.then(function(u){return c(u)}):c(l)}},Yf=function(e,t,n){var r,o,i,a=Ea(S.useState(function(){return e}),2),s=a[0],l=a[1],c=si(s),u=si((r=n?.props)!==null&&r!==void 0?r:{}),d=si(t),f=si((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=si((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),h=MF(s),m=si(h),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var T=y.current;f.current.forEach(function(E){E(s,h,T)})}},[s,f,h]);var x=Ea(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:v.current,previousState:function(){return m.current}});return DF(E).reduce(function(I,w){var k,P=Ea(w,2),_=P[0],F=P[1];return ai(ai({},I),(k={},k[_]=n?.debug?NF(_,F,l,T,y,p.current):FF(_,F,l,T,y,p.current),k))},{})}),1),b=x[0];return[s,b,u.current]},LF=Object.defineProperty,Lw=Object.getOwnPropertySymbols,VF=Object.prototype.hasOwnProperty,$F=Object.prototype.propertyIsEnumerable,Vw=(e,t,n)=>t in e?LF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zF=(e,t)=>{for(var n in t||(t={}))VF.call(t,n)&&Vw(e,n,t[n]);if(Lw)for(var n of Lw(t))$F.call(t,n)&&Vw(e,n,t[n]);return e},Kf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},jF=(e,t,n,r)=>_l(Kf,e,t,n,r),li=e=>typeof e=="object",Nr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(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=>Nr(e[r],t[r]))},RF=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,BF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),$w=e=>["string","number"].includes(typeof e),zw=e=>e==null||e?.length===0||e==="",jw={eq:Nr,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:zw,notEmpty:e=>!zw(e),in:(e,t)=>Kf(t,n=>Nr(e,n)),notIn:(e,t)=>Rw(t,n=>!Nr(e,n))},HF=e=>{if(e in jw)return jw[e];throw new Error("Linq - Symbol not found")},ci=(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},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=HF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},WF=(e,t,n,r)=>_l(ci,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},qF=(e,t,n,r)=>_l(Rw,e,t,n,r),Bw=e=>{if(e===null)return null;const t=zF({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?Bw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Hw=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1},UF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},GF=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Nr(o,t)):n===r.indexOf(t)),YF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Ww=(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())},KF=(e,t)=>Ww(e,n=>n[t]),qw=(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},ZF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},XF=(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 Ol(e)&&Ol(t)?r.map(a=>Number.parseInt(a)):r},Zf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,a]=ZF(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return XF(e,t,r)},QF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Zf(r,o,1):Zf(r,i,Number.parseInt(o,10))}return $w(e)&&$w(t)?Zf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Xf=(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},Uw=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},JF=(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)},eL=(e,t,n,r)=>_l(JF,e,t,n,r),Gw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(BF(t))},Yw=(e=>(e.Asc="asc",e.Desc="desc",e))(Yw||{}),tL=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),nL=(e,t)=>e.sort(tL(t)),rL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},oL=class Rh{constructor(t=[]){this.array=t}static Range(...t){return QF(...t)}static New(t){return new Rh(t)}Where(t,n,r){return this.array=WF(this.array,t,n,r),this}Some(t,n,r){return jF(this.array,t,n,r)}All(t,n,r){return qF(this.array,t,n,r)}Reverse(){return this.array=Uw(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=eL(this.array,t,n,r),this}Distinct(){return this.array=GF(this.array),this}First(t){return t===void 0?this.array[0]:YF(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?Xf((n,r)=>n+r,0,this.array):Xf((n,r)=>n+RF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return KF(this.array,t)}GroupWith(t){return Ww(this.array,t)}Except(t){return ci(this.array,n=>!Hw(t,n))}Intersect(t){return ci(this.array,n=>Hw(t,n))}OrderBy(t,n){let r;return r=t?Gw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Uw(r):r,this}Includes(t){return Kf(this.array,n=>Nr(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 Xf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(qw(this.array,n=>[t,n]))}Zip(t,n){return qw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Rh(Bw(this.array))}ToObject(t){return UF(this.array,t)}Sort(t){return Array.isArray(t)?nL(this.array,t):Gw(this.array,t)}Unique(t){return rL(this.array,t)}},Kw=oL;const Ml=0,Fr=1,ui=2,Zw=4;function Xw(e){return()=>e}function iL(e){e()}function ka(e,t){return n=>e(t(n))}function Qw(e,t){return()=>e(t)}function aL(e,t){return n=>e(t,n)}function Qf(e){return e!==void 0}function sL(...e){return()=>{e.map(iL)}}function di(){}function Dl(e,t){return t(e),e}function lL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Fr,t)}function ze(e,t){e(Ml,t)}function Jf(e){e(ui)}function Tt(e){return e(Zw)}function Ie(e,t){return st(e,aL(t,Ml))}function Fn(e,t){const n=e(Fr,r=>{n(),t(r)});return n}function Jw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function e1(e,t){return e===t}function xt(e=e1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Me(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ue(e,...t){const n=cL(...t);return((r,o)=>{switch(r){case ui:Jf(e);return;case Fr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function mo(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function cL(...e){return t=>e.reduceRight(lL,t)}function uL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Fr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),di);case ui:r(),n=null;return}}}function he(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Ml:t=o;break;case Fr:{o(t);break}case Zw:return t}return n(r,o)})}function Qt(e,t){return Dl(he(t),n=>Ie(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Ml:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case Fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function pn(e){return Dl(Ke(),t=>Ie(e,t))}function Qe(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 Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{n[a]=l,r=r|s,r===o&&ze(t,n)})}),function(i,a){switch(i){case ui:{Jf(t);return}case Fr:return r===o&&a(n),st(t,a)}}}function De(e,t=e1){return ue(e,xt(t))}function ep(...e){return function(t,n){switch(t){case ui:return;case Fr:return sL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const pL={0:"debug",3:"error",1:"log",2:"warn"},hL=()=>typeof globalThis>"u"?window:globalThis,Lr=Qe(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=hL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(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 Jn(e,t,n){return tp(e,t,n).callbackRef}function tp(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 t1(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 f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const h=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(h,0),viewportHeight:y}),i?.(s?n1("column-gap",getComputedStyle(u).columnGap,o):n1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return tp(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},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function n1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function np(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=tp(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const tn=Qe(()=>{const e=Ke(),t=Ke(),n=he(0),r=Ke(),o=he(0),i=Ke(),a=Ke(),s=he(0),l=he(0),c=he(0),u=he(0),d=Ke(),f=Ke(),p=he(!1),v=he(!1),h=he(!1);return Ie(ue(e,be(({scrollTop:m})=>m)),t),Ie(ue(e,be(({scrollHeight:m})=>m)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ca={lvl:0};function r1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ft(e){return e===Ca}function Ia(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Ia(e.l,t):Ia(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function hn(e,t,n){return ft(e)?a1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?s1(Rt(e,{l:hn(e.l,t,n)})):s1(Rt(e,{r:hn(e.r,t,n)}))}function fi(){return Ca}function pi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return gL(op(e,r,n))}function rp(e,t){if(ft(e))return Ca;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=i1(r);return Nl(Rt(e,{k:i,l:o1(r),v:a}))}}else return t<n?Nl(Rt(e,{l:rp(r,t)})):Nl(Rt(e,{r:rp(o,t)}))}function go(e){return ft(e)?[]:[...go(e.l),{k:e.k,v:e.v},...go(e.r)]}function op(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(op(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(op(i,t,n))),s}function Nl(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(ip(t))return l1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ip(e))return ap(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=ip(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ap(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return a1(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 o1(e){return ft(e.r)?e.l:Nl(Rt(e,{r:o1(e.r)}))}function ip(e){return ft(e)||e.lvl>e.r.lvl}function i1(e){return ft(e.r)?[e.k,e.v]:i1(e.r)}function a1(e,t,n,r=Ca,o=Ca){return{k:e,l:r,lvl:n,r:o,v:t}}function s1(e){return ap(l1(e))}function l1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function ap(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function gL(e){return r1(e,({k:t,v:n})=>({index:t,value:n}))}function c1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const sp=Qe(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function u1(e,t,n){return e[Fl(e,t,n)]}function Fl(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=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!ft(e.groupOffsetTree)}function lp({index:e},t){return t===e?0:t<e?-1:1}function yL(){return{groupIndices:[],groupOffsetTree:fi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fi()}}function bL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=hn(e,0,i);continue}const s=pi(e,a-1,o+1);if(s.some(CL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=rp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=hn(e,o+1,f));c&&(e=hn(e,a,i))}return[e,n]}function xL(e){return typeof e.groupIndex<"u"}function wL({offset:e},t){return t===e?0:t<e?-1:1}function Pa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=u1(t,e,lp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function d1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function f1(e,t,n){if(xL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=d1(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,u1(e,r,lp).offset)),r1(vL(e,t,n,wL),kL)}function TL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,h)=>hn(hn(v,h,f),h+1,p),a)}else[a,s]=bL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=cp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>hn(f,p,Pa(p,d,o)),fi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function EL(e){return go(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 p1(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 cp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Fl(o,t-1,lp),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of pi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function 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 IL={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Qt(r,0),i=Ke(),a=Ke(),s=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),p=he((w,k)=>Vn(w,IL[k])),v=he(void 0),h=he(0),m=yL(),y=Qt(ue(n,He(l,e,h),Qn(TL,m),xt()),m),x=Qt(ue(l,xt(),Qn((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ue(l,Me(w=>w.length>0),He(y,h),be(([w,k,P])=>{const _=w.reduce((F,V,N)=>hn(F,V,Pa(V,k.offsetTree,P)||N),fi());return{...k,groupIndices:w,groupOffsetTree:_}})),y),Ie(ue(r,He(y),Me(([w,{lastIndex:k}])=>w<k),be(([w,{lastIndex:k,lastSize:P}])=>[{endIndex:k,size:P,startIndex:w}])),n),Ie(c,u);const b=Qt(ue(c,be(w=>w===void 0)),!0);Ie(ue(u,Me(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const k=Tt(d),P=Tt(l).length>0;return k?P?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ue(f,Me(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const k=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const V=w[F];V!==P&&(k.push({endIndex:F-1,size:P,startIndex:_}),P=V,_=F)}return k.push({endIndex:w.length-1,size:P,startIndex:_}),k})),n),Ie(ue(l,He(d,u),Me(([,w,k])=>w!==void 0&&k!==void 0),be(([w,k,P])=>{const _=[];for(let F=0;F<w.length;F++){const V=w[F],N=w[F+1];_.push({startIndex:V,endIndex:V,size:k}),N!==void 0&&_.push({startIndex:V+1,endIndex:N-1,size:P})}return _})),n);const T=pn(ue(n,He(y),Qn(({sizes:w},[k,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:m}),be(w=>w.changed)));st(ue(s,Qn((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:k}=Tt(y);if(w>0)ze(t,!0),ze(i,w+p1(w,k));else if(w<0){const P=Tt(x);P.length>0&&(w-=p1(-w,P)),ze(a,w)}}),st(ue(s,He(e)),([w,k])=>{w<0&&k("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},sn.ERROR)});const E=pn(i);Ie(ue(i,He(y),be(([w,k])=>{const P=k.groupIndices.length>0,_=[],F=k.lastSize;if(P){const V=Ia(k.sizeTree,0);let N=0,O=0;for(;N<w;){const z=k.groupIndices[O],M=k.groupIndices.length===O+1?1/0:k.groupIndices[O+1]-z-1;_.push({endIndex:z,size:V,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,N+=M+1}const D=go(k.sizeTree);return N!==w&&D.shift(),D.reduce((z,{k:M,v:C})=>{let L=z.ranges;return z.prevSize!==0&&(L=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:L}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return go(k.sizeTree).reduce((V,{k:N,v:O})=>({prevIndex:N+w,prevSize:O,ranges:[...V.ranges,{endIndex:N+w-1,size:V.prevSize,startIndex:V.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=pn(ue(a,He(y,h),be(([w,{offsetTree:k},P])=>{const _=-w;return Pa(_,k,P)})));return Ie(ue(a,He(y,h),be(([w,k,P])=>{if(k.groupIndices.length>0){if(ft(k.sizeTree))return k;let _=fi();const F=Tt(x);let V=0,N=0,O=0;for(;V<-w;){O=F[N];const D=F[N+1]-O-1;N++,V+=D+1}if(_=go(k.sizeTree).reduce((D,{k:z,v:M})=>hn(D,Math.max(0,z+w),M),_),V!==-w){const D=Ia(k.sizeTree,O);_=hn(_,0,D);const z=Ln(k.sizeTree,-w+1)[1];_=hn(_,1,z)}return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}else{const _=go(k.sizeTree).reduce((F,{k:V,v:N})=>hn(F,Math.max(0,V+w),N),fi());return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:E,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:h,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:T,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:b,unshiftWith:i}},bt(Lr,sp),{singleton:!0});function AL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const h1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),a=Ke(),s=pn(ue(i,be(AL)));return Ie(ue(s,be(l=>l.totalCount)),n),Ie(ue(s,be(l=>l.groupIndices)),e),Ie(ue(Vt(o,t,r),Me(([l,c])=>Ll(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),Vr=Qe(([{log:e}])=>{const t=he(!1),n=pn(ue(t,Me(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt(Lr),{singleton:!0}),PL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function m1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!PL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oa=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ke(),v=Ke(),h=he(0);let m=null,y=null,x=null;function b(){m&&(m(),m=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),ze(l,!1)}return Ie(ue(p,He(n,d,r,h,s,a,f),He(e,i,o),be(([[T,E,I,w,k,P,_,F],V,N,O])=>{const D=m1(T),{align:z,behavior:M,offset:C}=D,L=w-1,$=f1(D,E,L);let B=Pa($,E.offsetTree,V)+P;z==="end"?(B+=N+Ln(E.sizeTree,$)[1]-I+O,$===L&&(B+=_)):z==="center"?B+=(N+Ln(E.sizeTree,$)[1]-I+O)/2:B-=k,C&&(B+=C);const q=G=>{b(),G?(F("retrying to scroll to",{location:T},sn.DEBUG),ze(p,T)):(ze(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(b(),M==="smooth"){let G=!1;x=st(t,W=>{G=G||W}),m=Fn(u,()=>{q(G)})}else m=Fn(ue(t,OL(150)),q);return y=setTimeout(()=>{b()},1200),ze(l,!0),F("scrolling from index to",{behavior:M,index:$,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:h}},bt(er,tn,Lr),{singleton:!0});function OL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function up(e,t){e==0?t():requestAnimationFrame(()=>{up(e-1,t)})}function dp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _a=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=he(!0),l=he(0),c=he(!0);return Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),s),Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),c),st(ue(Vt(t,a),He(s,n,e,c),Me(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||Qf(p))&&!d&&!v),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),up(4,()=>{Fn(r,()=>{ze(s,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,Oa,Vr),{singleton:!0});function g1(e,t){return Math.abs(e-t)<1.01}const Ma="up",Da="down",_L="none",ML={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},DL=0,Na=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=he(!1),s=he(!0),l=Ke(),c=Ke(),u=he(4),d=he(DL),f=Qt(ue(ep(ue(De(o),mo(1),Xn(!0)),ue(De(o),mo(1),Xn(!1),Jw(100))),xt()),!1),p=Qt(ue(ep(ue(n,Xn(!0)),ue(n,Xn(!1),Jw(200))),xt()),!1);Ie(ue(Vt(De(o),De(d)),be(([x,b])=>x<=b),xt()),s),Ie(ue(s,mr(50)),c);const v=pn(ue(Vt(r,De(i),De(t),De(e),De(u)),Qn((x,[{scrollHeight:b,scrollTop:T},E,I,w,k])=>{const P=T+E-b>-k,_={scrollHeight:b,scrollTop:T,viewportHeight:E};if(P){let V,N;return T>x.state.scrollTop?(V="SCROLLED_DOWN",N=x.state.scrollTop-T):(V="SIZE_DECREASED",N=x.state.scrollTop-T||x.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:N,state:_}}let F;return _.scrollHeight>x.state.scrollHeight?F="SIZE_INCREASED":E<x.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":T<x.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},ML),xt((x,b)=>x&&x.atBottom===b.atBottom))),h=Qt(ue(r,Qn((x,{scrollHeight:b,scrollTop:T,viewportHeight:E})=>{if(g1(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:T};{const I=b-(T+E)<1;return x.scrollTop!==T&&I?{changed:!0,jump:x.scrollTop-T,scrollHeight:b,scrollTop:T}:{changed:!0,jump:0,scrollHeight:b,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Me(x=>x.changed),be(x=>x.jump)),0);Ie(ue(v,be(x=>x.atBottom)),a),Ie(ue(a,mr(50)),l);const m=he(Da);Ie(ue(r,be(({scrollTop:x})=>x),xt(),Qn((x,b)=>Tt(p)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?Ma:Da,prevScrollTop:b},{direction:Da,prevScrollTop:0}),be(x=>x.direction)),m),Ie(ue(r,mr(50),Xn(_L)),m);const y=he(0);return Ie(ue(f,Me(x=>!x),Xn(0)),y),Ie(ue(o,mr(100),He(f),Me(([x,b])=>b),Qn(([x,b],[T])=>[b,T],[0,0]),be(([x,b])=>b-x)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:m,scrollVelocity:y}},bt(tn)),Fa="top",La="bottom",v1="none";function y1(e,t,n){return typeof e=="number"?n===Ma&&t===Fa||n===Da&&t===La?e:0:n===Ma?t===Fa?e.main:e.reverse:t===La?e.main:e.reverse}function b1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const fp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),a=he(0),s=he(0),l=he(0),c=Qt(ue(Vt(De(r),De(o),De(n),De(i,Aa),De(l),De(a),De(t),De(e),De(s)),be(([u,d,f,[p,v],h,m,y,x,b])=>{const T=u-x,E=m+y,I=Math.max(f-T,0);let w=v1;const k=b1(b,Fa),P=b1(b,La);return p-=x,p+=f+y,v+=f+y,v-=x,p>u+E-k&&(w=Ma),v<u-I+d+P&&(w=Da),w!==v1?[Math.max(T-f-y1(h,Fa,w)-k,0),T-I-y+d+y1(h,La,w)+P]:null}),Me(u=>u!=null),xt(Aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function NL(e,t,n){if(Ll(t)){const r=d1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const pp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vl(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 h=e[e.length-1];u=h.offset+h.size}const d=n-a,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:w1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:w1(t,o,i),topListHeight:t.reduce((h,m)=>m.size+h,0),totalCount:n}}function x1(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=dp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Vl(c,[],s,o,n,r)}function w1(e,t,n){if(e.length===0)return[];if(!Ll(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=pi(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function S1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const vo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const h=he([]),m=he(0),y=Ke(),x=he(0);Ie(i.topItemsIndexes,h);const b=Qt(ue(Vt(p,v,De(l,Aa),De(o),De(r),De(c),u,De(h),De(t),De(n),De(x),e),Me(([w,k,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!k&&!F}),be(([,,[w,k],P,_,F,V,N,O,D,z,M])=>{var C,L,$,B;const q=_,{offsetTree:G,sizeTree:W}=q,J=Tt(m);if(P===0)return{...pp,totalCount:P};if(w===0&&k===0)return J===0?{...pp,totalCount:P}:x1(J,F,_,O,D,M||[]);if(ft(W))return J>0?null:Vl(NL(dp(F,P),q,M),[],P,D,q,O);const re=[];if(N.length>0){const se=N[0],ie=N[N.length-1];let Q=0;for(const le of pi(W,se,ie)){const te=le.value,fe=Math.max(le.start,se),pe=Math.min(le.end,ie);for(let ve=fe;ve<=pe;ve++)re.push({data:M?.[ve],index:ve,offset:Q,size:te}),Q+=te}}if(!V)return Vl([],re,P,D,q,O);const ee=N.length>0?N[N.length-1]+1:0,Y=SL(G,w,k,ee);if(Y.length===0)return null;const K=P-1,X=Dl([],se=>{for(const ie of Y){const Q=ie.value;let le=Q.offset,te=ie.start;const fe=Q.size;if(Q.offset<w){te+=Math.floor((w-Q.offset+D)/(fe+D));const ve=te-ie.start;le+=ve*fe+ve*D}te<ee&&(le+=(ee-te)*fe,te=ee);const pe=Math.min(ie.end,K);for(let ve=te;ve<=pe&&!(le>=k);ve++)se.push({data:M?.[ve],index:ve,offset:le,size:fe}),le+=fe+D}}),de=S1(z,Fa),H=S1(z,La);if(X.length>0&&(de>0||H>0)){const se=X[0],ie=X[X.length-1];if(de>0&&se.index>ee){const Q=Math.min(de,se.index-ee),le=[];let te=se.offset;for(let fe=se.index-1;fe>=se.index-Q;fe--){const pe=(L=(C=pi(W,fe,fe)[0])==null?void 0:C.value)!=null?L:se.size;te-=pe+D,le.unshift({data:M?.[fe],index:fe,offset:te,size:pe})}X.unshift(...le)}if(H>0&&ie.index<K){const Q=Math.min(H,K-ie.index);let le=ie.offset+ie.size+D;for(let te=ie.index+1;te<=ie.index+Q;te++){const fe=(B=($=pi(W,te,te)[0])==null?void 0:$.value)!=null?B:ie.size;X.push({data:M?.[te],index:te,offset:le,size:fe}),le+=fe+D}}}return Vl(X,re,P,D,q,O)}),Me(w=>w!==null),xt()),pp);Ie(ue(e,Me(Qf),be(w=>w?.length)),o),Ie(ue(b,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ue(b,be(w=>[w.top,w.bottom])),a),Ie(ue(b,be(w=>w.items)),y);const T=pn(ue(b,Me(({items:w})=>w.length>0),He(o,e),Me(([{items:w},k])=>w[w.length-1].originalIndex===k-1),be(([,w,k])=>[w-1,k]),xt(Aa),be(([w])=>w))),E=pn(ue(b,mr(200),Me(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),be(({items:w})=>w[0].index),xt())),I=pn(ue(b,Me(({items:w})=>w.length>0),be(({items:w})=>{let k=0,P=w.length-1;for(;w[k].type==="group"&&k<P;)k++;for(;w[P].type==="group"&&P>k;)P--;return{endIndex:w[P].index,startIndex:w[k].index}}),xt(c1)));return{endReached:T,initialItemCount:m,itemsRendered:y,listState:b,minOverscanItemCount:x,rangeChanged:I,startReached:E,topItemsIndexes:h,...f}},bt(er,h1,fp,_a,Oa,Na,Vr,sp),{singleton:!0}),T1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),a=Qt(ue(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(De(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,vo),{singleton:!0}),FL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Qt(ue(Vt(n,e,t),Me(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,T1),{singleton:!0}),E1=Qe(()=>({context:he(null)})),LL=({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,k1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ie(ue(u,He(t,l,n,i,o,r,s),He(e),be(([[d,f,p,v,h,m,y,x],b])=>{const{align:T,behavior:E,calculateViewLocation:I=LL,done:w,...k}=d,P=f1(d,f,v-1),_=Pa(P,f.offsetTree,b)+h+m,F=_+Ln(f.sizeTree,P)[1],V=x+m,N=x+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:T,behavior:E,...k},viewportBottom:N,viewportTop:V});return O?w&&Fn(ue(a,Me(D=>!D),mo(Tt(a)?1:2)),w):w?.(),O}),Me(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,Oa,vo,Lr),{singleton:!0});function C1(e){return e?e==="smooth"?"smooth":"auto":!1}const VL=(e,t)=>typeof e=="function"?C1(e(t)):t&&C1(e),$L=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const v=he(!1),h=Ke();let m=null;function y(E){ze(a,{align:"end",behavior:E,index:"LAST"})}st(ue(Vt(ue(De(t),mo(1)),l),He(De(v),i,s,d),be(([[E,I],w,k,P,_])=>{let F=I&&P,V="auto";return F&&(V=VL(w,k||_),F=F&&!!V),{followOutputBehavior:V,shouldFollow:F,totalCount:E}}),Me(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E)}):m=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(E),m=null})});function x(E){const I=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ue(Vt(De(v),t,c),Me(([E,,I])=>E&&I),Qn(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),Me(({refreshed:E})=>E),He(v,t)),([,E])=>{Tt(s)&&x(E!==!1)}),st(h,()=>{x(Tt(v)!==!1)}),st(Vt(De(v),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const b=he(null),T=Ke();return Ie(ep(ue(De(r),be(E=>{var I;return(I=E?.length)!=null?I:0})),ue(De(t))),T),st(ue(Vt(ue(T,mo(1)),l),He(De(b),s,d,f),be(([[E,I],w,k,P,_])=>I&&k&&w?.({context:_,totalCount:E,scrollingInProgress:P})),Me(E=>!!E),mr(0)),E=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,E)}):m=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,E),m=null})}),{autoscrollToBottom:h,followOutput:v,scrollIntoViewOnChange:b}},bt(er,Na,Oa,_a,Vr,Lr,tn,E1,k1)),zL=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ue(s,He(i),Me(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>x1(l,c,u,d,f,p))),a),{}),bt(er,_a,vo,Vr),{singleton:!0}),jL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return st(ue(e,He(r),Me(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ue(n,mo(1),Me(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Vr,tn,vo),{singleton:!0}),I1=Qe(([{scrollVelocity:e}])=>{const t=he(!1),n=Ke(),r=he(!1);return Ie(ue(e,He(r,t,n),Me(([o,i])=>!!i),be(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),xt()),t),st(ue(Vt(t,e,n),He(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Na),{singleton:!0}),hp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=he(!1),a=he(void 0);return Ie(ue(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ue(t,He(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),RL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ke(),u=he(void 0),d=he(null),f=he(null);return Ie(s,d),Ie(l,f),st(ue(c,He(t,r,a,d,f,n)),([p,v,h,m,y,x,b])=>{const T=EL(v.sizeTree);m&&y!==null&&x!==null&&(h=y.scrollTop-x.offsetTop),h-=b,p({ranges:T,scrollTop:h})}),Ie(ue(u,Me(Qf),be(BL)),o),Ie(ue(i,He(u),Me(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,_a,Vr,hp));function BL(e){return{align:"start",index:0,offset:e.scrollTop}}const HL=Qe(([{topItemsIndexes:e}])=>{const t=he(0);return Ie(ue(t,Me(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(vo));function A1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const WL=A1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),qL=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:v}])=>{const h=pn(ue(l,He(a),Qn(([,y,x,b],[{bottom:T,items:E,offsetBottom:I,totalCount:w},k])=>{const P=T+I;let _=0;return x===w&&y.length>0&&E.length>0&&(E[0].originalIndex===0&&y[0].originalIndex===0||(_=P-b,_!==0&&(_+=k))),[_,E,w,P]},[0,[],0,0]),Me(([y])=>y!==0),He(r,s,n,o,p,v),Me(([,y,x,b,,,T])=>!T&&!b&&y!==0&&x===Ma),be(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function m(y){y>0?(ze(t,{behavior:"auto",top:-y}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-y}))}return st(ue(h,He(e,i)),([y,x,b])=>{b&&WL()?ze(e,x-y):m(-y)}),st(ue(Vt(Qt(i,!1),e,v),Me(([y,x,b])=>!y&&!b&&x!==0),be(([y,x])=>x),mr(1)),m),Ie(ue(d,be(y=>({top:-y}))),t),st(ue(c,He(f,u),be(([y,{groupIndices:x,lastSize:b,sizeTree:T},E])=>{function I(w){return w*(b+E)}if(x.length===0)return I(y);{let w=0;const k=Ia(T,0);let P=0,_=0;for(;P<y;){P++,w+=k;let F=x.length===_+1?1/0:x[_+1]-x[_]-1;P+F>y&&(w-=k,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{ze(e,y),requestAnimationFrame(()=>{ze(t,{top:y}),requestAnimationFrame(()=>{ze(e,0),ze(v,!1)})})}),{deviation:e}},bt(tn,Na,vo,er,Lr,sp)),UL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(fp,zL,Vr,I1,T1,jL,FL,hp,k1,Lr,E1)),P1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:h,scrolledToInitialItem:m},y,x,b,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:k},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:V,rangeChanged:N,...O}=T;return Ie(N,P.scrollSeekRangeChanged),Ie(ue(P.windowViewportRect,be(D=>D.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:h,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:V,totalCount:f,...b,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:N,...O,...P,...y,sizes:u,...x}},bt(er,_a,tn,RL,$L,vo,Oa,qL,HL,h1,UL));function GL(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 $l=typeof document<"u"?S.useLayoutEffect:S.useEffect;function mp(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(m,y){m.propsReady&&ze(m.propsReady,!1);for(const x of r){const b=m[t.required[x]];ze(b,y[x])}for(const x of o)if(x in y){const b=m[t.optional[x]];ze(b,y[x])}m.propsReady&&ze(m.propsReady,!0)}function c(m){return i.reduce((y,x)=>(y[x]=b=>{const T=m[t.methods[x]];ze(T,b)},y),{})}function u(m){return a.reduce((y,x)=>(y[x]=uL(m[t.events[x]]),y),{})}const d=S.forwardRef((m,y)=>{const{children:x,...b}=m,[T]=S.useState(()=>Dl(fL(e),w=>{l(w,b)})),[E]=S.useState(Qw(u,T));$l(()=>{for(const w of a)w in b&&st(E[w],b[w]);return()=>{Object.values(E).map(Jf)}},[b,E,T]),$l(()=>{l(T,b)}),S.useImperativeHandle(y,Xw(c(T)));const I=n;return g.jsx(s.Provider,{value:T,children:n?g.jsx(I,{...GL([...r,...o,...a],b),children:x}):x})}),f=m=>{const y=S.useContext(s);return S.useCallback(x=>{ze(y[m],x)},[y,m])},p=m=>{const y=S.useContext(s)[m],x=S.useCallback(b=>st(y,b),[y]);return S.useSyncExternalStore(x,()=>Tt(y),()=>Tt(y))},v=m=>{const y=S.useContext(s)[m],[x,b]=S.useState(Qw(Tt,y));return $l(()=>st(y,T=>{T!==x&&b(Xw(T))}),[y,x]),x},h=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(m,y)=>{const x=S.useContext(s)[m];$l(()=>st(x,y),[y,x])},useEmitterValue:h,usePublisher:f}}const zl=S.createContext(void 0),O1=S.createContext(void 0),_1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function gp(e){return"self"in e}function YL(e){return"body"in e}function M1(e,t,n,r=di,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,h;const m=f.target;if(YL(m)||gp(m)){const x=gp(m)?m:m.defaultView;h=i?x.scrollX:x.scrollY,p=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,v=i?x.innerWidth:x.innerHeight}else h=i?m.scrollLeft:m.scrollTop,p=i?m.scrollWidth:m.scrollHeight,v=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(h,0),viewportHeight:v})};f.suppressFlushSync?y():Fi.flushSync(y),s.current!==null&&(h===s.current||h<=0||h===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let h,m,y;gp(p)?(m=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),h=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(m=p[i?"scrollWidth":"scrollHeight"],h=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const x=m-h;if(f.top=Math.ceil(Math.max(Math.min(x,f.top),0)),g1(h,m)||f.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:h}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const vp="-webkit-sticky",D1="sticky",yp=A1(()=>{if(typeof document>"u")return D1;const e=document.createElement("div");return e.style.position=vp,e.style.position===vp?vp:D1});function bp(e){return e}const KL=Qe(()=>{const e=he(s=>`Item ${s}`),t=he(s=>`Group ${s}`),n=he({}),r=he(bp),o=he("div"),i=he(di),a=(s,l=null)=>Qt(ue(n,be(c=>c[s]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),ZL=Qe(([e,t])=>({...e,...t}),bt(P1,KL)),XL=({height:e})=>g.jsx("div",{style:{height:e}}),QL={overflowAnchor:"none",position:yp(),zIndex:1},N1={overflowAnchor:"none"},JL={...N1,display:"inline-block",height:"100%"},F1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=wn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=wn("gap"),h=Fe("horizontalDirection"),{callbackRef:m}=t1(n,f,d,e?di:s,p,v,o,h,Fe("skipAnimationFrameInResizeObserver")),[y,x]=S.useState(0);Sp("deviation",O=>{y!==O&&x(O)});const b=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||XL,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),V=Fe("initialItemFinalLocationReached"),N=e?{}:{boxSizing:"border-box",...h?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?g.jsx(b,{...wt(b,c)}):g.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:N,children:(e?t.topItems:t.items).map(O=>{const D=O.originalIndex,z=k(D+t.firstItemIndex,O.data,c);return P?S.createElement(T,{...wt(T,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":D,"data-item-index":O.index,"data-known-size":O.size,key:z,style:QL},u(O.index,c)):S.createElement(I,{...wt(I,c),...L1(I,O.data),"data-index":D,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:h?JL:N1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),eV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},tV={outline:"none",overflowX:"auto",position:"relative"},hi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),nV={position:yp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function L1(e,t){return{item:typeof e=="string"?void 0:t}}const rV=S.memo(function(){const e=Fe("HeaderComponent"),t=wn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),oV=S.memo(function(){const e=Fe("FooterComponent"),t=wn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=M1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?tV:eV,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function wp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:h,scrollerRef:m,scrollToCallback:y}=M1(s,c,l,v,f);return _1(()=>{var x;return m.current=f||((x=p.current)==null?void 0:x.ownerDocument.defaultView),()=>{m.current=null}},[m,f]),e("windowScrollTo",y),e("scrollBy",h),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const iV=({children:e})=>{const t=S.useContext(zl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:s,style:hi(o),children:e})},aV=({children:e})=>{const t=S.useContext(zl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Fe("customScrollParent"),i=np(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(a),children:e})},sV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...nV,marginTop:`${n}px`},o=Fe("context");return g.jsx(t,{style:r,...wt(t,o),children:e})},lV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return g.jsxs(r||t?dV:uV,{...e,context:o,children:[n&&g.jsx(sV,{children:g.jsx(F1,{showTopList:!0})}),g.jsxs(r||t?aV:iV,{children:[g.jsx(rV,{}),g.jsx(F1,{}),g.jsx(oV,{})]})]})}),{Component:cV,useEmitter:Sp,useEmitterValue:Fe,usePublisher:wn}=mp(ZL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},lV),uV=xp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:wn}),dV=wp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:wn}),Tp=cV,fV=Qe(()=>{const e=he(c=>g.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),a=he(bp),s=he(di),l=(c,u=null)=>Qt(ue(i,be(d=>d[c]),xt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),pV=Qe(([e,t])=>({...e,...t}),bt(P1,fV)),hV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),mV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),gV={overflowAnchor:"none"},V1={position:yp(),zIndex:2,overflowAnchor:"none"},$1=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),a=je("fixedHeaderHeight"),s=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||hV,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((h,m,y)=>(y===0?h.push(m.size):h.push(h[y-1]+m.size),h),[]),v=(e?t.topItems:t.items).map(h=>{const m=h.originalIndex,y=n(m+r,h.data,o),x=e?m===0?0:p[m-1]:0;return i?S.createElement(u,{...wt(u,o),height:h.size,index:h.index,key:y,type:h.type||"item"}):h.type==="group"?S.createElement(d,{...wt(d,o),"data-index":m,"data-item-index":h.index,"data-known-size":h.size,key:y,style:{...V1,top:a}},c(h.index,o)):S.createElement(f,{...wt(f,o),...L1(f,h.data),"data-index":m,"data-item-index":h.index,"data-known-size":h.size,"data-item-group-index":h.groupIndex,key:y,style:e?{...V1,top:a+x}:gV},s?l(h.index,h.groupIndex,h.data,o):l(h.index,h.data,o))});return g.jsx(g.Fragment,{children:v})}),vV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=t1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);Ep("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const h=je("EmptyPlaceholder"),m=je("FillerRow")||mV,y=je("TableBodyComponent"),x=je("paddingTopAddition"),b=je("statefulTotalCount"),T=je("context");if(b===0&&h)return g.jsx(h,{...wt(h,T)});const E=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+x+p-E,w=e.offsetBottom,k=I>0?g.jsx(m,{context:T,height:I},"padding-top"):null,P=w>0?g.jsx(m,{context:T,height:w},"padding-bottom"):null;return g.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,T),children:[k,t&&g.jsx($1,{showTopList:!0}),g.jsx($1,{}),P]})}),yV=({children:e})=>{const t=S.useContext(zl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:hi(!1),children:e})},bV=({children:e})=>{const t=S.useContext(zl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=np(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(!1),children:e})},xV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?TV:SV,d=n||t?bV:yV,f=je("TableComponent"),p=je("TableHeadComponent"),v=je("TableFooterComponent"),h=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,m=a?g.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,s),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[h,g.jsx(vV,{},"TableBody"),m]})})})}),{Component:wV,useEmitter:Ep,useEmitterValue:je,usePublisher:$n}=mp(pV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},xV),SV=xp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),TV=wp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),EV=wV,z1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},kV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:j1,floor:jl,max:Va,min:kp,round:R1}=Math;function B1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function CV(e){return{...kV,items:e}}function Rl(e,t){return e&&e.width===t.width&&e.height===t.height}function IV(e,t){return e&&e.column===t.column&&e.row===t.row}const AV=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:v,propsReady:h},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:T},E])=>{const I=he(0),w=he(0),k=he(z1),P=he({height:0,width:0}),_=he({height:0,width:0}),F=Ke(),V=Ke(),N=he(0),O=he(null),D=he({column:0,row:0}),z=Ke(),M=Ke(),C=he(!1),L=he(0),$=he(!0),B=he(!1),q=he(!1);st(ue(v,He(L),Me(([Y,K])=>!!K)),()=>{ze($,!1)}),st(ue(Vt(v,$,_,P,L,B),Me(([Y,K,X,de,,H])=>Y&&!K&&X.height!==0&&de.height!==0&&!H)),([,,,,Y])=>{ze(B,!0),up(1,()=>{ze(F,Y)}),Fn(ue(c),()=>{ze(t,[0,0]),ze($,!0)})}),Ie(ue(M,Me(Y=>Y!=null&&Y.scrollTop>0),Xn(0)),w),st(ue(v,He(M),Me(([,Y])=>Y!=null)),([,Y])=>{Y&&(ze(P,Y.viewport),ze(_,Y.item),ze(D,Y.gap),Y.scrollTop>0&&(ze(C,!0),Fn(ue(c,mo(1)),K=>{ze(C,!1)}),ze(l,{top:Y.scrollTop})))}),Ie(ue(P,be(({height:Y})=>Y)),d),Ie(ue(Vt(De(P,Rl),De(_,Rl),De(D,(Y,K)=>Y&&Y.column===K.column&&Y.row===K.row),De(c)),be(([Y,K,X,de])=>({gap:X,item:K,scrollTop:de,viewport:Y}))),z),Ie(ue(Vt(De(I),r,De(D,IV),De(_,Rl),De(P,Rl),De(O),De(w),De(C),De($),De(L)),Me(([,,,,,,,Y])=>!Y),be(([Y,[K,X],de,H,se,ie,Q,,le,te])=>{const{column:fe,row:pe}=de,{height:ve,width:Ae}=H,{width:me}=se;if(Q===0&&(Y===0||me===0))return z1;if(Ae===0){const qe=dp(te,Y),pt=qe+Math.max(Q-1,0);return CV(B1(qe,pt,ie))}const oe=H1(me,Ae,fe);let j,R;le?K===0&&X===0&&Q>0?(j=0,R=Q-1):(j=oe*jl((K+pe)/(ve+pe)),R=oe*j1((X+pe)/(ve+pe))-1,R=kp(Y-1,Va(R,oe-1)),j=kp(R,Va(0,j))):(j=0,R=-1);const ne=B1(j,R,ie),{bottom:ce,top:xe}=W1(se,de,H,ne),Ce=j1(Y/oe),_e=Ce*ve+(Ce-1)*pe-ce;return{bottom:ce,itemHeight:ve,items:ne,itemWidth:Ae,offsetBottom:_e,offsetTop:xe,top:xe}})),k),Ie(ue(O,Me(Y=>Y!==null),be(Y=>Y.length)),I),Ie(ue(Vt(P,_,k,D),Me(([Y,K,{items:X}])=>X.length>0&&K.height!==0&&Y.height!==0),be(([Y,K,{items:X},de])=>{const{bottom:H,top:se}=W1(Y,de,K,X);return[se,H]}),xt(Aa)),t);const G=he(!1);Ie(ue(c,He(G),be(([Y,K])=>K||Y!==0)),G);const W=pn(ue(Vt(k,I),Me(([{items:Y}])=>Y.length>0),He(G),Me(([[Y,K],X])=>{const de=Y.items[Y.items.length-1].index===K-1;return(X||Y.bottom>0&&Y.itemHeight>0&&Y.offsetBottom===0&&Y.items.length===K)&&de}),be(([[,Y]])=>Y-1),xt())),J=pn(ue(De(k),Me(({items:Y})=>Y.length>0&&Y[0].index===0),Xn(0),xt())),re=pn(ue(De(k),He(C),Me(([{items:Y},K])=>Y.length>0&&!K),be(([{items:Y}])=>({endIndex:Y[Y.length-1].index,startIndex:Y[0].index})),xt(c1),mr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ue(F,He(P,_,I,D),be(([Y,K,X,de,H])=>{const se=m1(Y),{align:ie,behavior:Q,offset:le}=se;let te=se.index;te==="LAST"&&(te=de-1),te=Va(0,te,kp(de-1,te));let fe=Cp(K,H,X,te);return ie==="end"?fe=R1(fe-K.height+X.height):ie==="center"&&(fe=R1(fe-K.height/2+X.height/2)),le&&(fe+=le),{behavior:Q,top:fe}})),l);const ee=Qt(ue(k,be(Y=>Y.offsetBottom+Y.bottom)),0);return Ie(ue(T,be(Y=>({height:Y.visibleHeight,width:Y.visibleWidth}))),P),{customScrollParent:m,data:O,deviation:N,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:T,...p,gridState:k,horizontalDirection:q,initialTopMostItemIndex:L,totalListHeight:ee,...f,endReached:W,propsReady:h,rangeChanged:re,startReached:J,stateChanged:z,stateRestoreInProgress:C,...E}},bt(fp,tn,Na,I1,Vr,hp,Lr));function H1(e,t,n){return Va(1,jl((e+n)/(jl(t)+n)))}function W1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Cp(e,t,n,r[0].index);return{bottom:Cp(e,t,n,r[r.length-1].index)+o,top:i}}function Cp(e,t,n,r){const o=H1(e.width,n.width,t.column),i=jl(r/o),a=i*n.height+Va(0,i-1)*t.row;return a>0?a+t.row:a}const PV=Qe(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(bp),a=he("div"),s=he(di),l=(d,f=null)=>Qt(ue(t,be(p=>p[d]),xt()),f),c=he(!1),u=he(!1);return Ie(De(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),OV=Qe(([e,t])=>({...e,...t}),bt(AV,PV)),_V=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=Sn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),h=Sn("reportReadyState"),m=Jn(S.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const b=y.firstChild;if(b){const{height:T,width:E}=b.getBoundingClientRect();d({height:T,width:E})}f({column:U1("column-gap",getComputedStyle(y).columnGap,p),row:U1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return _1(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),v?null:g.jsx(l,{className:t,ref:m,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const x=o(y.index,y.data,u);return i?g.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},x):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:x},r(y.index,y.data,u))})})}),MV=S.memo(function(){const e=Et("HeaderComponent"),t=Sn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),DV=S.memo(function(){const e=Et("FooterComponent"),t=Sn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),NV=({children:e})=>{const t=S.useContext(O1),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=Jn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:o,style:hi(!1),children:e})},FV=({children:e})=>{const t=S.useContext(O1),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=Et("customScrollParent"),i=np(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:i,style:hi(!1),children:e})},LV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?$V:VV,o=n||t?FV:NV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(MV,{}),g.jsx(_V,{}),g.jsx(DV,{})]})})}),{useEmitter:q1,useEmitterValue:Et,usePublisher:Sn}=mp(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"}},LV),VV=xp({useEmitter:q1,useEmitterValue:Et,usePublisher:Sn}),$V=wp({useEmitter:q1,useEmitterValue:Et,usePublisher:Sn});function U1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const G1=e=>{const t=e.Icon??Pg,n=Pt();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Ip=g.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),$a=e=>g.jsx(ln,{...e,as:e.as||"span",className:Oe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function zV(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 jV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>zV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},RV=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()},[]),g.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:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},BV=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=Ju(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(RV,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?Ip:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},mi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[$o(10),Ds({fallbackAxisSideDirection:"end"}),Ms(),Bu({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:Jr,onOpenChange:(v,h)=>{const m=h?.relatedTarget;m&&m.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=jo(l),u=kr(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(no,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[g.jsx(Hu,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Ap={},Y1;function HV(){return Y1||(Y1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(x){window.console.log(x)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const x=y.getItem(m);try{return JSON.parse(x)}catch{return x??null}},i=m=>Object.keys(m).reduce((y,x)=>({...y,[x]:o(x,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(y=>y(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],f={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=f.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,x={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((E,I)=>{const w=I.parse(x);return w===""?E:E.concat(w)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=T,u()}},p=m=>{const y=new Set,x=b=>{m().removeItem(b);const T=i(m());y.forEach(E=>E(T))};return{delete:x,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const T=m().getItem(b);return!n(T)},deleteAll:()=>{t(m(),x),y.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,T)=>{m().setItem(b,JSON.stringify(T)),y.forEach(E=>E(m()))}}},v=p(()=>window.sessionStorage),h=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=h,e.SessionStorage=v,e.createStorage=p})(Ap)),Ap}var za=HV();const Pp=e=>e.headerLabel??e.thead??e.id,Op=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var gi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(gi||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,WV=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},qV={},UV=(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})},GV=(e,t,n=qV)=>{const r=Cr()?null:za.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Yf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:UV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Cr()||za.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},YV=e=>{const t=Pr(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]},KV=()=>Cr()?void 0:document.querySelector('[data-component="modal-body"]'),ZV=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),XV=(e,t)=>e.toSorted(ZV(t)),K1=(e,t,n)=>({label:t,id:Bo(),type:n,value:e.id}),QV=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,K1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return g.jsx(S.Fragment,{children:g.jsx(mi,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(kg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(oo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(oo,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:g.jsx(ss,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},JV=e=>{const t=Pt(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=K1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Pp(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?g.jsx(UC,{size:14}):null,n==="desc"?g.jsx(qC,{size:14}):null,n==="undefined"?g.jsx(kg,{size:14}):null]})},Z1=S.createContext({}),e$=Z1.Provider,t$=()=>S.useContext(Z1),Mp=(e,t,n,r={})=>{const o=e.id,i=e.type??gi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Bo(),operation:l,label:Pp(e),name:o,type:i,value:"",...r}},Dp=()=>{const e=Pt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[gi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[gi.Boolean]:[t.is,t.isNot],[gi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},n$=e=>{const t=Pt(),n=Dp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Mp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return Mp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=_p(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(nI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(oo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Wo,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:g.jsx(ss,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},r$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Dp(),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=_p(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Wo,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ss,{className:"text-danger",size:14})})]})},o$={top:0,left:0,right:0,bottom:-1},i$=e=>{const t=Tu(),n=Pt(),r=e.filters.filter(h=>h.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=Dp(),l=o?oI:iI,c=S.useRef(null),u=h=>{const m=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==m))},d=S.useCallback(h=>{if(h===null)return;c.current=h;const m=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),f=e.sorters.find(h=>e.header.id===h.value),p=f?.type?f.type===Yw.Asc?"ascending":"descending":"none",v=Pp(e.header);return g.jsxs(kw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?g.jsx(mi,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:v})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(h=>g.jsx("li",{className:"my-1",children:g.jsx(r$,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(h=>h.concat(Mp(e.header,s.options,s.operations))),children:[g.jsx(xu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(JV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.jsx(Be.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:o$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:h=>{h.currentTarget.focus()},onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=m.delta.x;c.current.style.width=`${Math.abs(y+x)}px`}})]})},a$=e=>{const[t,n]=YV(e.setCols);return g.jsx(Sw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(fn,{children:e.headers.map((r,o)=>g.jsx(i$,{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}`))})})},s$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(fn,{children:n.children})})),l$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),c$=S.forwardRef(({context:e,...t},n)=>{const r=t$(),o={...t?.style,top:Re.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),u$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),d$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),f$={TableRow:u$,TableFoot:d$,TableHead:c$,Table:l$,TableBody:s$},p$=[0,0,0,0,0,0,0,0,0,0],h$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Ip:g.jsx(G1,{})}),m$=()=>g.jsx(S.Fragment,{}),g$=[],X1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Pr(a),v=Pr(u.loadingMore),h=S.useMemo(()=>{if(u.loading)return p$;if(c)return u.rows;const x=new Kw(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:x.Where(b.name,b.operation.symbol,b.value)),r.length===0?x.Select():XV(x.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,b=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return b.observe(x),()=>b.disconnect()},[v,p]);const m=h.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(EV,{components:f$,context:y,totalCount:h.length,itemContent:m?m$:BV,data:m?g$:h,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>g.jsx(a$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?g.jsx(h$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(jV,{...l}):null]})},v$=({item:e,onPointerDown:t})=>{const n=ho(0);return g.jsxs(kw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(tI,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},y$=e=>{const t=Pt(),n=Op(e.cols),r=gF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Kw(e.rows).GroupBy(u),v=e.cols.find(h=>h.id===u);e.setGroups(Ak(p).map((h,m)=>{const y=p[h];return{...v,groupId:Bo(),groupKey:u,index:m,rows:y,groupName:h}}))},s=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(sI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(oo,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),g.jsx(ro,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:g.jsx(ss,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(HN,{children:g.jsx(Sw,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>g.jsx(v$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},b$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(n$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(QV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(y$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=_p(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),x$=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),w$=e=>{const t=Tu(),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(()=>Op(e.cols),[e.cols]),[i,a]=Yf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:x$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Bl(l?.filters??[],s.filters??[],e.setFilters),Bl(l?.sorters??[],s.sorters??[],e.setSorters),Bl(l?.groups??[],s.groups??[],e.setGroups),Bl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),g.jsx(e$,{value:n,children:g.jsxs(fn,{initial:!1,children:[r?g.jsx(b$,{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?g.jsx(X1,{...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}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(X1,{...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}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>g.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Oe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-3",i),children:[e?g.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",a),children:e}):o,g.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-6",s.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx($a,{className:"w-full"}),g.jsx($a,{className:"w-8/12"}),g.jsx($a,{className:"w-10/12"}),g.jsx($a,{className:"w-1/2"})]}):n})]});Hl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return g.jsxs(i,{...o,title:Re.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[g.jsx(a,{className:"font-semibold",children:o.title}),r?g.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const S$=e=>{const t=e.interactive??!0,n=e.Icon??bu;return g.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[g.jsx("div",{className:Oe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx($a,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},T$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(dr,{children:g.jsx(Mf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(fn,{presenceAffectsLayout:!0,children:[e?g.jsx(Be.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?g.jsx(Ku,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.jsxs(Be.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(Mo,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),E$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=jo(o),s=fr(o,{role:"dialog"}),l=kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(T$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,h=`${r}-${p}`,m=()=>n({...v,id:h}),y=v.leading;return g.jsx(Be.li,{layout:!0,layoutId:`item-${h}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(Be.div,{layoutId:`toast-${h}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[v.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:v.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?g.jsx(y,{open:m}):null]})})]})})})},h)})})]})},k$=e=>g.jsx(S.Fragment,{children:e.children}),Q1=()=>{const e=S.useContext(Kr);return e?e.parser:ls.hsla},Np=.3,Wl={duration:Np,type:"tween",ease:"easeInOut"},J1=S.createContext(null),Fp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},vi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},C$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"M18 6 6 18"}),g.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"m6 6 12 12"})]}),I$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:vi.animate,initial:vi.initial,transition:Fp})}),A$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},P$={duration:.6,delay:.2,type:"tween",ease:"circOut"},O$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",_$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,eS=()=>S.useContext(J1),M$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=Q1(),s=eS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=_$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=O$(e,l,n);return s?.steps&&100/s?.steps,g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(Be.div,{variants:A$,transition:P$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(Be.div,{initial:!1,animate:u,transition:Wl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:Wl,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:Wl,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:Wl,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(I$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(C$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},D$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Np*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Np,steps:S.Children.count(e.children)};return g.jsx(J1.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},tS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},nS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},rS=S.createContext(""),N$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Lp=(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(!N$(a))return a}return n==="backward"?Lp(e,e.length-1,"backward"):Lp(e,-1,"forward")},oS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Lp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},iS={[nS.ArrowLeft]:(e,t)=>oS(t,"backward"),[nS.ArrowRight]:(e,t)=>oS(t,"forward")},F$=e=>{const[t,n]=tS(e.active),r=S.useRef(null),o=Pr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Re.keyof(iS,c)){const u=iS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(rS.Provider,{value:t,children:g.jsx(Hl,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:g.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},L$=()=>S.useContext(rS),V$=e=>{const t=L$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},aS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},$$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},sS=e=>g.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:aS,exit:aS.false,transition:$$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),z$=Io("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"}}),j$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return g.jsx(fn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:g.jsx(sS,{"data-open":!!i,open:!!i,children:g.jsx(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe(z$({theme:n}),t),children:g.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(Mo,{size:20})}):null,g.jsxs("div",{className:Oe("flex gap-2 items-center",a.title?"":"w-fit"),children:[!r&&n==="success"?g.jsx(Cg,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(bu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(aI,{"aria-hidden":"true",size:20}):null,r]}),a.title?g.jsx("h4",{className:"col-start-2 text-lg font-semibold tracking-3 text-balance",children:a.title}):null,g.jsx("div",{className:"col-start-2 w-full",children:a.children})]})})})}):null})}),R$=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),B$=Symbol.for("react.lazy");function lS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=lS(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():lS(e[o],null)}}}}const ql=A[" use ".trim().toString()];function W$(e){return typeof e=="object"&&e!==null&&"then"in e}function cS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===B$&&"_payload"in e&&W$(e._payload)}function q$(e){const t=U$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;cS(i)&&typeof ql=="function"&&(i=ql(i._payload));const s=A.Children.toArray(i),l=s.find(Y$);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 g.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return g.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const uS=q$("Slot");function U$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(cS(o)&&typeof ql=="function"&&(o=ql(o._payload)),A.isValidElement(o)){const a=Z$(o),s=K$(i,o.props);return o.type!==A.Fragment&&(s.ref=r?H$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const G$=Symbol("radix.slottable");function Y$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===G$}function K$(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 Z$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const dS=(e="")=>Oe("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),Vp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),fS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[v,h]=S.useState(null),m=S.useRef([]),y=S.useRef([]),x=S.useContext(Vp),b=Sr(),T=Tr(),E=eP(),I=Sv(),w=b!==null,{floatingStyles:k,refs:P,context:_}=Gn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Jr,placement:w?"right":"bottom-start",middleware:[$o({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ds(),Ms()]}),F=fr(_,{role:"menu"}),V=kr(_,{bubbles:!0}),N=Mv(_,{move:!1,enabled:n,delay:{open:ny},handleClose:ty({blockPointerEvents:!0,requireIntent:!1})}),O=jo(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=Hs(_,{loop:!0,activeIndex:v,nested:w,listRef:m,onNavigate:h}),z=kP(_,{activeIndex:v,listRef:y,resetMs:IP,onMatch:u?h:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:L}=Yn([N,O,F,V,D,z]);S.useEffect(()=>{if(!T)return;const B=()=>d(!1),q=G=>{G.nodeId!==E&&G.parentId===b&&d(!1)};return T.events.on("click",B),T.events.on("menuopen",q),()=>{T.events.off("click",B),T.events.off("menuopen",q)}},[T,E,b]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:b,nodeId:E})},[T,u,E,b]);const $=o?l.className:Oe(dS(l.className));return g.jsxs(tP,{id:E,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(uS,{...M(x.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),x.setHasFocusInside(!0)}})),children:s,className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?x.activeIndex===I.index?0:-1:void 0}):g.jsxs("button",{type:"button",className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?x.activeIndex===I.index?0:-1:void 0,...M(x.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),x.setHasFocusInside(!0)}})),children:[s,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(vu,{size:14})]})]})}),g.jsx(Vp.Provider,{value:{activeIndex:v,setActiveIndex:h,getItemProps:L,setHasFocusInside:p,isOpen:u},children:g.jsx(YA,{elementsRef:m,labelsRef:y,children:u&&g.jsx(dr,{children:g.jsx(no,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.jsx(t,{...C(),ref:P.setFloating,style:{...l.style,...k},className:Oe("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})})})})})]})}),X$=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Vp),s=Sv({label:n?null:e}),l=Tr(),c=s.index===a.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sr(s.ref,i),className:dS(`${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?g.jsx(t,{size:16}):null]})}),Q$=S.forwardRef((e,t)=>Sr()===null?g.jsx(nP,{children:g.jsx(fS,{...e,isParent:!0,ref:t})}):g.jsx(fS,{...e,isParent:!1,ref:t})),$p=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 g.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[g.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,g.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),J$=({children:e,className:t="",size:n,...r})=>g.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[g.jsx("input",{...r,type:"radio",className:Oe("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]}),ez=ly("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
15
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),tz=(e,t)=>Cr()?t:window.matchMedia(e).matches,nz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(tz(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},rz=()=>S.useContext(Kr).floatingRef??void 0,Tn="500ms",oz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Tn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Tn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Tn}},iz={enter:{x:"0%",opacity:1,animationDuration:Tn},exit:{x:["0%","30%"],opacity:0,animationDuration:Tn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Tn}},zp={drawer:e=>e==="left"?oz:iz,sheet:{enter:{opacity:1,y:"0%",animationDuration:Tn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Tn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Tn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Tn},enter:{opacity:1,scale:[1.05,1],animationDuration:Tn},initial:{opacity:.5,scale:.95,animationDuration:Tn,transition:{duration:.5,ease:"easeInOut"}}}},az=Io("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),pS={top:0,left:0,right:0,bottom:0},hS=e=>e*.6,sz=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=hS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return g.jsx(Be.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:pS,whileDrag:{cursor:"grabbing"},className:Oe("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?g.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ul={drawer:"right",sheet:"none",dialog:"none"},lz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ul.drawer:Ul[o]:t?Ul[o]:Ul.sheet},cz=[],jp=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:h="",type:m="dialog",position:y,overlayClickClose:x=!1,closeOnFocusOut:b=!1,interactions:T=cz,...E},I)=>{const w=rz(),k=S.useRef(null),P=S.useRef(null),_=S.useId(),F=S.useId(),V=nz("(min-width: 64rem)"),N=lz(V,p,m,y),O=V||p?zp[m]:zp.sheet,D=typeof O=="function"?O(N):O,z=V||p?m:"sheet",M=z!=="dialog",C=Gn({open:e,onOpenChange:a,strategy:"fixed"}),L=jo(C.context,{}),$=fr(C.context,{role:"dialog"}),B=kr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:ie=>{const Q=ie.target;return x&&!!Q?.isConnected}}),q=Yn([L,B,$].concat(T)),G=o,W=ho(void 0),J=ho(void 0),re=S.useRef(!1),ee=S.useRef(0);S.useEffect(()=>{W.set(void 0),J.set(void 0)},[z,W,J]);const Y=()=>a(!1);S.useImperativeHandle(I,()=>({context:C.context,floating:P.current}),[C.context,P]);const X=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:pS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ie,Q)=>{const te=C.refs.floating.current.getBoundingClientRect(),fe=W.get()||te.height,pe=Math.abs(fe-Q.delta.y),ve=window.outerHeight,Ae=hS(ve);return pe>=Ae?W.set(pe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>W.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},de=ho(void 0),H=ho(void 0),se=r?uS:Be.button;return g.jsxs(S.Fragment,{children:[o?g.jsx(se,{ref:C.refs.setReference,...q.getReferenceProps(),layoutId:v,type:"button",children:G}):null,g.jsx(Mf,{reducedMotion:d?"user":"always",children:g.jsx(dr,{preserveTabOrder:!0,root:w,children:g.jsx(fn,{mode:"wait",propagate:!0,children:e?g.jsx(Ku,{lockScroll:!0,className:Oe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",h),children:g.jsx(no,{guards:!0,modal:!0,closeOnFocusOut:b,context:C.context,children:g.jsx(fn,{propagate:!0,children:g.jsxs(Be.div,{...E,...t?{"aria-labelledby":_,"aria-describedby":F}:{"aria-label":s},...q.getFloatingProps({"aria-modal":e,ref:sr(C.refs.setFloating,P),className:Oe(az({position:N,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:D,"data-component":"modal",style:z==="drawer"?{width:W}:{height:W,y:J},children:[M&&u?g.jsx(sz,{onChange:a,value:W,sheet:z==="sheet",position:N,parent:C.refs.floating}):null,t?g.jsx(Be.header,{...X,className:"relative w-full isolate",children:t?g.jsx("h2",{id:_,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,g.jsx(Be.section,{ref:k,"data-component":"modal-body",className:Oe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(H.set(void 0),de.set(void 0),re.current){const ie=J.get()||0,Q=window.innerHeight*.2;ie>Q?(await xw(J,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):xw(J,0,{type:"spring",bounce:0,duration:.3}),re.current=!1}},onTouchStart:ie=>{const Q=ie.changedTouches[0];de.set(Q.pageY),H.set(Q.pageY),re.current=!1},onTouchMove:ie=>{const le=ie.changedTouches[0].pageY,te=H.get()||le,fe=k.current?.scrollTop||0;if(!re.current&&fe<=0&&le>te&&z==="sheet"&&(re.current=!0,ee.current=le),re.current){const pe=le-ee.current;pe<0?J.set(pe*.2):J.set(pe)}H.set(le)},children:i}),n?g.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?g.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:g.jsx("button",{type:"button",onClick:Y,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:g.jsx(Mo,{})})}):null]})})})}):null})})})]})}),uz=e=>{const[t,n]=pF();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:bD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),g.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},dz=e=>g.jsx("p",{...e,className:Oe("text-base leading-snug",e.className)}),fz=e=>g.jsx("p",{...e,className:Oe("mb-kilo text-sm text-secondary",e.className)}),pz=e=>g.jsx("div",{className:Oe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:g.jsxs(S.Fragment,{children:[g.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),g.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),mS=e=>g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),g.jsx("p",{className:"text-secondary typography",children:e.children})]}),hz=e=>g.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[g.jsx("div",{children:g.jsx(mS,{title:e.title,children:e.description})}),g.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),gS=e=>g.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Oe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),mz=()=>g.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:g.jsx(gS,{})}),gz=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=jo(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=kr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return g.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[g.jsx(ro,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:g.jsx(Be.span,{layoutId:o,children:e.trigger})}),g.jsx(fn,{children:i?g.jsx(dr,{root:t,children:g.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:g.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},vz=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},yz=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},bz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),xz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,wz=({steps:e,active:t=!1,onClose:n=Ho,onFinish:r=Ho,onChange:o=Ho,labels:i})=>{const a=Pt(),[s,l]=S.useState(0),c=e[s],[u,d]=S.useState(null),[f,p]=S.useState(bz()),[v,h]=S.useState(!1),m=S.useRef(null),{width:y,height:x}=yz(),b={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:T,floatingStyles:E,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:Jr,middleware:[$o(10),Ds(),Ms(),Bu({element:m})]}),{getFloatingProps:w}=Yn([fr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{h(!1)},[s,t]),S.useEffect(()=>{if(!t||!c)return;const V=xz(c.element);V?(c.onEnter?.(),setTimeout(()=>{p(V.getBoundingClientRect()),T.setReference(V),d(V)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const V=()=>p(u.getBoundingClientRect());return V(),window.addEventListener("scroll",V,{capture:!0,passive:!0}),window.addEventListener("resize",V,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",V,{capture:!0}),window.removeEventListener("resize",V,{capture:!0})}},[u,y,x]),vz(u,V=>{p(V.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l(V=>V+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l(V=>V-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return g.jsx(dr,{children:g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[g.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("mask",{id:"driver-mask",children:[g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),g.jsx(Be.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>h(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),g.jsx(fn,{mode:"wait",children:c&&v&&g.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:g.jsxs(Be.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-card-background border-card-border",children:[u&&g.jsx(Hu,{ref:m,context:I,className:"fill-card-background stroke-card-border"}),c.title&&g.jsx("h3",{children:c.title}),c.description&&g.jsx(S.Fragment,{children:c.description}),g.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[g.jsx(ro,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:b.skip}),g.jsxs("div",{className:"flex gap-2",children:[F&&g.jsx(ro,{size:"small",theme:"neutral",onClick:P,children:b.previous}),g.jsx(ro,{size:"small",onClick:k,children:_?b.next:b.finish})]})]}),g.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},vS=6048e5,Sz=864e5,Tz=6e4,Ez=36e5,kz=1e3,yS=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yS in e?e[yS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Gl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function yi(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?bS(u,o+r*12):u,f=a||i?Gl(d,a+i*7):d,p=l+s*60,h=(c+p*60)*1e3;return ut(e,+f+h)}let Cz={};function yo(){return Cz}function tr(e,t){const n=yo(),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 bi(e,t){return tr(e,{...t,weekStartsOn:1})}function xS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=bi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=bi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Yl(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 Kl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function bo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function Iz(e,t,n){const[r,o]=Kl(n?.in,e,t),i=bo(r),a=bo(o),s=+i-Yl(i),l=+a-Yl(a);return Math.round((s-l)/Sz)}function Az(e,t){const n=xS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bi(r)}function Pz(e){return ut(e,Date.now())}function Oz(e,t,n){const[r,o]=Kl(n?.in,e,t);return+bo(r)==+bo(o)}function _z(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zl(e){return!(!_z(e)&&typeof e!="number"||isNaN(+Je(e)))}function Mz(e,t){const[n,r]=Kl(e,t.start,t.end);return{start:n,end:r}}function wS(e,t){const{start:n,end:r}=Mz(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function SS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Dz(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Nz(e,t){const n=yo(),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 Fz={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"}},Lz=(e,t,n)=>{let r;const o=Fz[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 Rp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Vz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$z={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jz={date:Rp({formats:Vz,defaultWidth:"full"}),time:Rp({formats:$z,defaultWidth:"full"}),dateTime:Rp({formats:zz,defaultWidth:"full"})},Rz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Bz=(e,t,n,r)=>Rz[e];function ja(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 Hz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qz={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"]},Uz={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"]},Gz={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"}},Yz={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"}},Kz={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:ja({values:Hz,defaultWidth:"wide"}),quarter:ja({values:Wz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ja({values:qz,defaultWidth:"wide"}),day:ja({values:Uz,defaultWidth:"wide"}),dayPeriod:ja({values:Gz,defaultWidth:"wide",formattingValues:Yz,defaultFormattingWidth:"wide"})};function Ra(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)?Xz(s,d=>d.test(a)):Zz(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 Zz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Xz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Qz(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 Jz=/^(\d+)(th|st|nd|rd)?/i,ej=/\d+/i,tj={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},nj={any:[/^b/i,/^(a|c)/i]},rj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oj={any:[/1/i,/2/i,/3/i,/4/i]},ij={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},aj={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]},sj={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},lj={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]},cj={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},uj={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}},dj={ordinalNumber:Qz({matchPattern:Jz,parsePattern:ej,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:tj,defaultMatchWidth:"wide",parsePatterns:nj,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:rj,defaultMatchWidth:"wide",parsePatterns:oj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:ij,defaultMatchWidth:"wide",parsePatterns:aj,defaultParseWidth:"any"}),day:Ra({matchPatterns:sj,defaultMatchWidth:"wide",parsePatterns:lj,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:cj,defaultMatchWidth:"any",parsePatterns:uj,defaultParseWidth:"any"})},TS={code:"en-US",formatDistance:Lz,formatLong:jz,formatRelative:Bz,localize:Kz,match:dj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function fj(e,t){const n=Je(e,t?.in);return Iz(n,Dz(n))+1}function ES(e,t){const n=Je(e,t?.in),r=+bi(n)-+Az(n);return Math.round(r/vS)+1}function Bp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=yo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function pj(e,t){const n=yo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Bp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function kS(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+pj(n,t);return Math.round(r/vS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $r={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},xi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},CS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return $r.y(e,t)},Y:function(e,t,n,r){const o=Bp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=xS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $r.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=kS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=ES(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){const r=fj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return dt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return dt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=xi.noon:r===0?o=xi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=xi.evening:r>=12?o=xi.afternoon:r>=4?o=xi.morning:o=xi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $r.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return AS(r);case"XXXX":case"XX":return xo(r);default:return xo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return AS(r);case"xxxx":case"xx":return xo(r);default:return xo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+IS(r,":");default:return"GMT"+xo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+IS(r,":");default:return"GMT"+xo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function IS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+dt(i,2)}function AS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):xo(e,t)}function xo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const PS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},OS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Hp={p:OS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return PS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",PS(r,t)).replace("{{time}}",OS(o,t))}},hj=/^D+$/,mj=/^Y+$/,gj=["D","DD","YY","YYYY"];function _S(e){return hj.test(e)}function MS(e){return mj.test(e)}function Wp(e,t,n){const r=vj(e,t,n);if(console.warn(r),gj.includes(e))throw new RangeError(r)}function vj(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 yj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xj=/^'([^]*?)'?$/,wj=/''/g,Sj=/[a-zA-Z]/;function qp(e,t,n){const r=yo(),o=r.locale??TS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Zl(s))throw new RangeError("Invalid time value");let l=t.match(bj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Hp[d];return f(u,o.formatLong)}return u}).join("").match(yj).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Tj(u)};if(CS[d])return{isToken:!0,value:u};if(d.match(Sj))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;(MS(d)||_S(d))&&Wp(d,t,String(e));const f=CS[d[0]];return f(s,d,o.localize,c)}).join("")}function Tj(e){const t=e.match(xj);return t?t[1].replace(wj,"'"):e}function Ej(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function kj(){return Object.assign({},yo())}function Cj(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function Ij(e,t){return+Je(e)>+Je(t)}function Aj(e,t){return+Je(e)<+Je(t)}function Pj(e,t){const n=Oj(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Oj(e){return typeof e=="function"&&e.prototype?.constructor===e}const _j=10;class DS{subPriority=0;validate(t,n){return!0}}class Mj extends DS{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 Dj extends DS{priority=_j;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Pj(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Mj(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Nj extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},nr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Ez+i*Tz+a*kz),rest:t.slice(n[0].length)}}function NS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Xl(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Up(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function FS(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 LS(e){return e%400===0||e%4===0&&e%100!==0}class Fj extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=FS(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 Lj extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Bp(t,o);if(r.isTwoDigitYear){const s=FS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Vj extends rt{priority=130;parse(t,n){return Xl(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),bi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class $j extends rt{priority=130;parse(t,n){return Xl(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 zj extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class jj extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Rj extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class Bj extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Hj(e,t,n){const r=Je(e,n?.in),o=kS(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class Wj extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Hj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function qj(e,t,n){const r=Je(e,n?.in),o=ES(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Uj extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return bi(qj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Gj=[31,28,31,30,31,30,31,31,30,31,30,31],Yj=[31,29,31,30,31,30,31,31,30,31,30,31];class Kj extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=LS(r),i=t.getMonth();return o?n>=1&&n<=Yj[i]:n>=1&&n<=Gj[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 Zj extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return LS(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 Gp(e,t,n){const r=yo(),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 Gl(i,u,n)}class Xj extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Qj extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Nt(_t(n.length,t),i);case"eo":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(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 Jj extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Nt(_t(n.length,t),i);case"co":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(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 eR(e,t,n){const r=Je(e,n?.in),o=Cj(r,n),i=t-o;return Gl(r,i,n)}class tR extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=eR(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 nR extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class rR extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class oR extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class iR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class aR extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class sR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class lR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class cR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class uR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class dR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class fR extends rt{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","x"]}class pR extends rt{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","X"]}class hR extends rt{priority=40;parse(t){return NS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class mR extends rt{priority=20;parse(t){return NS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const gR={G:new Nj,y:new Fj,Y:new Lj,R:new Vj,u:new $j,Q:new zj,q:new jj,M:new Rj,L:new Bj,w:new Wj,I:new Uj,d:new Kj,D:new Zj,E:new Xj,e:new Qj,c:new Jj,i:new tR,a:new nR,b:new rR,B:new oR,h:new iR,H:new aR,K:new sR,k:new lR,m:new cR,s:new uR,S:new dR,X:new fR,x:new pR,t:new hR,T:new mR},vR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bR=/^'([^]*?)'?$/,xR=/''/g,wR=/\S/,SR=/[a-zA-Z]/;function TR(e,t,n,r){const o=()=>ut(n,NaN),i=kj(),a=i.locale??TS,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 Dj(r?.in,n)],d=t.match(yR).map(m=>{const y=m[0];if(y in Hp){const x=Hp[y];return x(m,a.formatLong)}return m}).join("").match(vR),f=[];for(let m of d){MS(m)&&Wp(m,t,e),_S(m)&&Wp(m,t,e);const y=m[0],x=gR[y];if(x){const{incompatibleTokens:b}=x;if(Array.isArray(b)){const E=f.find(I=>b.includes(I.token)||I.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${m}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);f.push({token:y,fullToken:m});const T=x.run(e,m,a.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(y.match(SR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=ER(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&wR.test(e))return o();const p=u.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,x)=>x.indexOf(m)===y).map(m=>u.filter(y=>y.priority===m).sort((y,x)=>x.subPriority-y.subPriority)).map(m=>m[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const h={};for(const m of p){if(!m.validate(v,c))return o();const y=m.set(v,h,c);Array.isArray(y)?(v=y[0],Object.assign(h,y[1])):v=y}return v}function ER(e){return e.match(bR)[1].replace(xR,"'")}function kR(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function CR(e,t){return Oz(ut(e,e),Pz(e))}function IR(e,t,n){return Gl(e,-t,n)}function AR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Ej(a);return r.setMonth(t,Math.min(i,s)),r}function PR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=AR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function OR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function _R(e,t,n){return bS(e,-t,n)}function Ba(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=_R(e,o+r*12,n),d=IR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const MR=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function DR(e,t){return S.useRef(MR(e,t)).current}function VS(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 NR=/^(?<hour>\d\d):(?<min>\d\d)$/,FR={type:"spring",bounce:.3,duration:.6},$S=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),zS={enter:$S(1),exit:$S(-1),middle:{x:"0%",opacity:1}},jS={exit:{visibility:"hidden"}},LR=e=>{const t=tr(SS(e));return wS({start:t,end:yi(t,{days:41})})},RS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),VR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=SS(new Date(1970,o,1).setMonth(o)),a=RS(i,n);return g.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yp={ArrowLeft:(e,t)=>t==="days"?Ba(e,{days:1}):Ba(e,{months:1}),ArrowRight:(e,t)=>t==="days"?yi(e,{days:1}):yi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ba(e,{weeks:1}):Ba(e,{years:1}),ArrowDown:(e,t)=>t==="days"?yi(e,{weeks:1}):yi(e,{years:1})},BS=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},wo=e=>e.getFullYear().toString().padStart(4,"0"),$R=(e,t,n)=>e===void 0||n===void 0?!1:Ij(t,e)&&Aj(t,n),zR=e=>{const t=Pt();return g.jsx(Be.tbody,{layout:!0,variants:zS,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return g.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?bo(e.date).toISOString():void 0),l=CR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=kR(i,e.stateDate),d=!u||c,f=e.rangeMode?$R(e.range?.from,i,e.range?.to):!1;return g.jsxs("td",{align:"center",className:Oe("relative",Re.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[g.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:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Re.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?g.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},jR=()=>bo(new Date),HS=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...v})=>{const h=S.useRef(Bo()),m=Pt(),y=sl(o),x=S.useRef(null),{date:b,range:T}=v,E=b||new Date,I=S.useRef(null),[w,k]=Yf({date:E,isAnimating:!1,year:wo(E),direction:void 0,range:{from:T?.from,to:T?.to},months:VR(h.current,E,y),selectMode:l?"from":void 0,week:wS({start:tr(E),end:Nz(E)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(BS(I.current||null,x,M.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const L=C(M.state().date);return{date:L,year:wo(L)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=yi(L.date,{months:1});return{date:$,isAnimating:!0,direction:1,year:wo($)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=Ba(L.date,{months:1});return{date:$,isAnimating:!0,direction:-1,year:wo($)}},onSelectDate:C=>{const L=M.state(),$=C.currentTarget.dataset.range==="true",B=C.currentTarget.dataset.date||"",q=new Date(B);return{date:q,year:wo(q),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:$?{from:L.selectMode==="from"?q:L.range.from,to:L.selectMode==="to"?q:L.range.to}:L.range}},onChangeMonth:C=>{const L=C.target.value,B=Array.from(C.target.options).find(G=>G.value===L),q=M.state();if(B){const G=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+G),{...q,date:W,year:wo(W)}}return q},onKeyDown:C=>{const L=C.key,$=M.state();if(L in Yp){(L==="ArrowUp"||L==="ArrowDown")&&C.preventDefault();const B=M.state().date,q=Re.keyof(Yp,L)?Yp[L](B,C.shiftKey?"month":"days"):null;if(q!==null)return BS(C.target,x,q),{...$,date:q,year:wo(q)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,C,L)=>((L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&L.props.onChangeMonth?.(M.date),M),(M,C,L)=>(L.method==="onChangeYear"&&L.props.onChangeYear?.(M.date),M),(M,C,L)=>{const $=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&$&&t?(c?.(M.range),M):($&&t&&c?.(M.date),M)}]}),P=LR(w.date),_=iy(P,7),F=w.date.toISOString(),V=RS(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[F,t]);const N=DR(M=>k.date(C=>OR(new Date(C),+M)),1200),O=M=>{const C=M.currentTarget.value;k.onChangeYear(C),s?.(new Date(C)),N(C)},D=VS((M,C)=>(M.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const M=jR();k.date(()=>M),c?.(M)};return g.jsx(Mf,{transition:FR,children:g.jsxs("div",{ref:x,"data-component":"calendar",onTouchEnd:D.onTouchEnd,onTouchStart:D.onTouchStart,className:Oe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[g.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:g.jsx(fn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:g.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[g.jsxs("header",{className:"relative flex justify-between",children:[g.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:jS,onClick:k.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(KC,{className:"h-4 w-4"})}),g.jsx(Be.span,{layout:!0,variants:zS,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:g.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[g.jsx("select",{value:V,onChange:k.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${V.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),g.jsx(Sg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),g.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:jS,onClick:k.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),g.jsxs(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[g.jsx("thead",{children:g.jsx("tr",{children:w.week.map(M=>g.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),g.jsx(zR,{zip:_,range:T,styles:u,date:b||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},V)})}),f==="datetime"?g.jsx("section",{className:"grid items-center my-4",children:g.jsx(Wo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:b?qp(b,"HH:mm"):void 0,title:p||m.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,L=NR.exec(C);if(!L)return;const $=L.groups.hour,B=L.groups.min,q=PR(w.date,{hours:Number($),minutes:Number(B),seconds:0});k.date(()=>q),c?.(q)}})}):null,g.jsx("footer",{className:"mt-2 text-center text-primary",children:g.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Kp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Kp.displayName="ProgressRootContext");function RR(){const e=A.useContext(Kp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Ir(51));return e}let Zp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const WS={status(e){return e==="progressing"?{[Zp.progressing]:""}:e==="complete"?{[Zp.complete]:""}:e==="indeterminate"?{[Zp.indeterminate]:""}:null}};function BR(e,t,n){return e==null?"":n?Uo(e,t,n):Uo(e/100,t,{style:"percent"})}function HR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const qS=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=HR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=rd(r);let h="indeterminate";Number.isFinite(l)&&(h=l===a?"complete":"progressing");const m=BR(l,i,v.current),y=A.useMemo(()=>({status:h}),[h]),x={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(m,l),role:"progressbar"},b=A.useMemo(()=>({formattedValue:m,max:a,min:s,setLabelId:p,state:y,status:h,value:l}),[m,a,s,p,y,h,l]),T=an("div",t,{state:y,ref:n,props:[x,d],stateAttributesMapping:WS});return g.jsx(Kp.Provider,{value:b,children:T})});process.env.NODE_ENV!=="production"&&(qS.displayName="ProgressRoot");const US=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=RR(),u=Number.isFinite(l)&&l!==null?el(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:WS})});process.env.NODE_ENV!=="production"&&(US.displayName="ProgressIndicator");const WR=e=>g.jsxs(qS,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Oe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[g.jsx(US,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Oe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Re.number(e.percent)?g.jsx("p",{className:Oe("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]}),Ql=e=>g.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[g.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),g.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Ql.Icon=function(t){return g.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ql.Body=function(t){return g.jsx(ln,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Ql.Right=function(t){return g.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:g.jsx(ln,{...t,type:"button"})})};const qR=e=>g.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),UR=e=>g.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),GS=new Date(1970,11,31),Xp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},YS={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},GR={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Qp=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},YR={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},KR={day:"numeric",month:"numeric",year:"numeric"},ZR=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=sl(t),d=S.useId(),f=Pt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?YR:KR),[u,s]),[v,h]=S.useState(e||void 0),[m,y]=S.useState(!1),x=Qp(p,GS).flatMap(V=>Re.keyof(Xp,V.type)?Xp[V.type](V.value):[]),b=S.useMemo(()=>Qp(p,GS).reduce((V,N)=>V+(Re.keyof(YS,N.type)?YS[N.type](N.value):""),""),[p]),T=e?.toISOString(),[E,I]=S.useState(v?Qp(p,v).reduce((V,N)=>V+(Re.keyof(Xp,N.type)?GR[N.type](v,N.value):""),""):""),w=V=>{const N=V.target.value;if(I(N),x.length===N.length&&x.every((D,z)=>{const M=N.charAt(z);return typeof D=="string"?M===D:D.test(M)})){const D=TR(N,b,new Date),z=s==="datetime"?D:bo(D);return h(z),r?.(z)}return h(void 0),r?.(void 0)};S.useEffect(()=>{Zl(e)&&(h(e),I(qp(e,b)))},[T,b]);const k=V=>(h(V),r?.(V),i&&y(!1),I(V?qp(V,b):"")),P=Zl(v),_=P?v.toISOString():void 0,F=g.jsx(HS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:P?v:void 0});return g.jsx(S.Fragment,{children:g.jsx(Wo,{...l,mask:x,value:E,id:void 0,name:void 0,"data-value":_,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(b),right:a?g.jsxs(S.Fragment,{children:[g.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),g.jsx(mi,{open:m,onChange:y,buttonProps:{"aria-describedby":d},trigger:g.jsxs("span",{"aria-labelledby":d,children:[g.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),g.jsx(YC,{})]}),children:F})]}):null})})}),XR=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],QR=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],JR=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],eB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],KS=(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},ZS=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},tB=e=>typeof e=="number"?Math.log(e):ZS(e)*Math.log(10),nB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},XS=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},rB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function oB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?eB:JR:t.binary?QR:XR,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return XS(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=rB(t);let l;if(e<1){const c=KS(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?tB(e)/Math.log(1024):ZS(e)/3),n.length-1);if(e=nB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=KS(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return XS(l,t.fixedWidth)}var Jl={exports:{}},ec={exports:{}},lt={};var QS;function iB(){if(QS)return lt;QS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case s:case u:case v:case p:case a:return E;default:return I}}case n:return I}}}function T(E){return b(E)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(E){return T(E)||b(E)===l},lt.isConcurrentMode=T,lt.isContextConsumer=function(E){return b(E)===s},lt.isContextProvider=function(E){return b(E)===a},lt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},lt.isForwardRef=function(E){return b(E)===u},lt.isFragment=function(E){return b(E)===r},lt.isLazy=function(E){return b(E)===v},lt.isMemo=function(E){return b(E)===p},lt.isPortal=function(E){return b(E)===n},lt.isProfiler=function(E){return b(E)===i},lt.isStrictMode=function(E){return b(E)===o},lt.isSuspense=function(E){return b(E)===d},lt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===p||E.$$typeof===a||E.$$typeof===s||E.$$typeof===u||E.$$typeof===m||E.$$typeof===y||E.$$typeof===x||E.$$typeof===h)},lt.typeOf=b,lt}var ct={};var JS;function aB(){return JS||(JS=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===v||H.$$typeof===p||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===m||H.$$typeof===y||H.$$typeof===x||H.$$typeof===h)}function T(H){if(typeof H=="object"&&H!==null){var se=H.$$typeof;switch(se){case t:var ie=H.type;switch(ie){case l:case c:case r:case i:case o:case d:return ie;default:var Q=ie&&ie.$$typeof;switch(Q){case s:case u:case v:case p:case a:return Q;default:return se}}case n:return se}}}var E=l,I=c,w=s,k=a,P=t,_=u,F=r,V=v,N=p,O=n,D=i,z=o,M=d,C=!1;function L(H){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(H)||T(H)===l}function $(H){return T(H)===c}function B(H){return T(H)===s}function q(H){return T(H)===a}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function W(H){return T(H)===u}function J(H){return T(H)===r}function re(H){return T(H)===v}function ee(H){return T(H)===p}function Y(H){return T(H)===n}function K(H){return T(H)===i}function X(H){return T(H)===o}function de(H){return T(H)===d}ct.AsyncMode=E,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=k,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=V,ct.Memo=N,ct.Portal=O,ct.Profiler=D,ct.StrictMode=z,ct.Suspense=M,ct.isAsyncMode=L,ct.isConcurrentMode=$,ct.isContextConsumer=B,ct.isContextProvider=q,ct.isElement=G,ct.isForwardRef=W,ct.isFragment=J,ct.isLazy=re,ct.isMemo=ee,ct.isPortal=Y,ct.isProfiler=K,ct.isStrictMode=X,ct.isSuspense=de,ct.isValidElementType=b,ct.typeOf=T})()),ct}var eT;function tT(){return eT||(eT=1,process.env.NODE_ENV==="production"?ec.exports=iB():ec.exports=aB()),ec.exports}var Jp,nT;function sB(){if(nT)return Jp;nT=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 Jp=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},Jp}var eh,rT;function th(){if(rT)return eh;rT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eh=e,eh}var nh,oT;function iT(){return oT||(oT=1,nh=Function.call.bind(Object.prototype.hasOwnProperty)),nh}var rh,aT;function lB(){if(aT)return rh;aT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=th(),n={},r=iT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},rh=o,rh}var oh,sT;function cB(){if(sT)return oh;sT=1;var e=tT(),t=sB(),n=th(),r=iT(),o=lB(),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 oh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:T(),elementType:E(),instanceOf:I,node:_(),objectOf:k,oneOf:w,oneOfType:P,shape:V,exact:N};function v($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function h($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}h.prototype=Error.prototype;function m($){if(process.env.NODE_ENV!=="production")var B={},q=0;function G(J,re,ee,Y,K,X,de){if(Y=Y||f,X=X||ee,de!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=Y+":"+ee;!B[se]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[se]=!0,q++)}}return re[ee]==null?J?re[ee]===null?new h("The "+K+" `"+X+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new h("The "+K+" `"+X+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:$(re,ee,Y,K,X)}var W=G.bind(null,!1);return W.isRequired=G.bind(null,!0),W}function y($){function B(q,G,W,J,re,ee){var Y=q[G],K=z(Y);if(K!==$){var X=M(Y);return new h("Invalid "+J+" `"+re+"` of type "+("`"+X+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return m(B)}function x(){return m(a)}function b($){function B(q,G,W,J,re){if(typeof $!="function")return new h("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=q[G];if(!Array.isArray(ee)){var Y=z(ee);return new h("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var K=0;K<ee.length;K++){var X=$(ee,K,W,J,re+"["+K+"]",n);if(X instanceof Error)return X}return null}return m(B)}function T(){function $(B,q,G,W,J){var re=B[q];if(!s(re)){var ee=z(re);return new h("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return m($)}function E(){function $(B,q,G,W,J){var re=B[q];if(!e.isValidElementType(re)){var ee=z(re);return new h("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return m($)}function I($){function B(q,G,W,J,re){if(!(q[G]instanceof $)){var ee=$.name||f,Y=L(q[G]);return new h("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return m(B)}function w($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(q,G,W,J,re){for(var ee=q[G],Y=0;Y<$.length;Y++)if(v(ee,$[Y]))return null;var K=JSON.stringify($,function(de,H){var se=M(H);return se==="symbol"?String(H):H});return new h("Invalid "+J+" `"+re+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+K+"."))}return m(B)}function k($){function B(q,G,W,J,re){if(typeof $!="function")return new h("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=q[G],Y=z(ee);if(Y!=="object")return new h("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var K in ee)if(r(ee,K)){var X=$(ee,K,W,J,re+"."+K,n);if(X instanceof Error)return X}return null}return m(B)}function P($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var q=$[B];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(q)+" at index "+B+"."),a}function G(W,J,re,ee,Y){for(var K=[],X=0;X<$.length;X++){var de=$[X],H=de(W,J,re,ee,Y,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&K.push(H.data.expectedType)}var se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new h("Invalid "+ee+" `"+Y+"` supplied to "+("`"+re+"`"+se+"."))}return m(G)}function _(){function $(B,q,G,W,J){return O(B[q])?null:new h("Invalid "+W+" `"+J+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m($)}function F($,B,q,G,W){return new h(($||"React class")+": "+B+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function V($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new h("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var K in $){var X=$[K];if(typeof X!="function")return F(W,J,re,K,M(X));var de=X(ee,K,W,J,re+"."+K,n);if(de)return de}return null}return m(B)}function N($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new h("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var K=t({},q[G],$);for(var X in K){var de=$[X];if(r($,X)&&typeof de!="function")return F(W,J,re,X,M(de));if(!de)return new h("Invalid "+J+" `"+re+"` key `"+X+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
16
+ Valid keys: `+JSON.stringify(Object.keys($),null," "));var H=de(ee,X,W,J,re+"."+X,n);if(H)return H}return null}return m(B)}function O($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(O);if($===null||s($))return!0;var B=d($);if(B){var q=B.call($),G;if(B!==$.entries){for(;!(G=q.next()).done;)if(!O(G.value))return!1}else for(;!(G=q.next()).done;){var W=G.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function D($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(B,$)?"symbol":B}function M($){if(typeof $>"u"||$===null)return""+$;var B=z($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function C($){var B=M($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function L($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},oh}var ih,lT;function uB(){if(lT)return ih;lT=1;var e=th();function t(){}function n(){}return n.resetWarningCache=t,ih=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ih}var cT;function dB(){if(cT)return Jl.exports;if(cT=1,process.env.NODE_ENV!=="production"){var e=tT(),t=!0;Jl.exports=cB()(e.isElement,t)}else Jl.exports=uB()();return Jl.exports}var fB=dB();const vt=Yh(fB);function So(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const pB=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 wi(e,t,n){const r=hB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&uT(r,"path",i),uT(r,"relativePath",i),r}function hB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=pB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function uT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const mB=[".DS_Store","Thumbs.db"];function gB(e){return So(this,void 0,void 0,function*(){return tc(e)&&vB(e.dataTransfer)?wB(e.dataTransfer,e.type):yB(e)?bB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?xB(e):[]})}function vB(e){return tc(e)}function yB(e){return tc(e)&&tc(e.target)}function tc(e){return typeof e=="object"&&e!==null}function bB(e){return ah(e.target.files).map(t=>wi(t))}function xB(e){return So(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>wi(n))})}function wB(e,t){return So(this,void 0,void 0,function*(){if(e.items){const n=ah(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(SB));return dT(fT(r))}return dT(ah(e.files).map(n=>wi(n)))})}function dT(e){return e.filter(t=>mB.indexOf(t.name)===-1)}function ah(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 SB(e){if(typeof e.webkitGetAsEntry!="function")return pT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?hT(t):pT(e,t)}function fT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?fT(n):[n]],[])}function pT(e,t){return So(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,wi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function TB(e){return So(this,void 0,void 0,function*(){return e.isDirectory?hT(e):EB(e)})}function hT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>So(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(TB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function EB(e){return So(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=wi(r,e.fullPath);t(o)},r=>{n(r)})})})}var nc={},mT;function kB(){return mT||(mT=1,nc.__esModule=!0,nc.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}),nc}var CB=kB();const sh=Yh(CB);function gT(e){return PB(e)||AB(e)||xT(e)||IB()}function IB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PB(e){if(Array.isArray(e))return lh(e)}function vT(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 yT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(n),!0).forEach(function(r){bT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ha(e,t){return MB(e)||_B(e,t)||xT(e,t)||OB()}function OB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xT(e,t){if(e){if(typeof e=="string")return lh(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 lh(e,t)}}function lh(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 _B(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 MB(e){if(Array.isArray(e))return e}var DB=typeof sh=="function"?sh:sh.default,NB="file-invalid-type",FB="file-too-large",LB="file-too-small",VB="too-many-files",$B=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:NB,message:"File type must be ".concat(r)}},wT=function(t){return{code:FB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ST=function(t){return{code:LB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},zB={code:VB,message:"Too many files"};function TT(e,t){var n=e.type==="application/x-moz-file"||DB(e,t);return[n,n?null:$B(t)]}function ET(e,t,n){if(To(e.size))if(To(t)&&To(n)){if(e.size>n)return[!1,wT(n)];if(e.size<t)return[!1,ST(t)]}else{if(To(t)&&e.size<t)return[!1,ST(t)];if(To(n)&&e.size>n)return[!1,wT(n)]}return[!0,null]}function To(e){return e!=null}function jB(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=TT(l,n),u=Ha(c,1),d=u[0],f=ET(l,r,o),p=Ha(f,1),v=p[0],h=s?s(l):null;return d&&v&&!h})}function rc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function oc(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 kT(e){e.preventDefault()}function RB(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function BB(e){return e.indexOf("Edge/")!==-1}function HB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return RB(e)||BB(e)}function or(){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!rc(r)&&s&&s.apply(void 0,[r].concat(i)),rc(r)})}}function WB(){return"showOpenFilePicker"in window}function qB(e){if(To(e)){var t=Object.entries(e).filter(function(n){var r=Ha(n,2),o=r[0],i=r[1],a=!0;return CT(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(IT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Ha(r,2),i=o[0],a=o[1];return yT(yT({},n),{},bT({},i,a))},{});return[{description:"Files",accept:t}]}return e}function UB(e){if(To(e))return Object.entries(e).reduce(function(t,n){var r=Ha(n,2),o=r[0],i=r[1];return[].concat(gT(t),[o],gT(i))},[]).filter(function(t){return CT(t)||IT(t)}).join(",")}function GB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function YB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function CT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function IT(e){return/^.*\.[\w]+$/.test(e)}var KB=["children"],ZB=["open"],XB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],QB=["refKey","onChange","onClick"];function JB(e){return n4(e)||t4(e)||AT(e)||e4()}function e4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n4(e){if(Array.isArray(e))return uh(e)}function ch(e,t){return i4(e)||o4(e,t)||AT(e,t)||r4()}function r4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AT(e,t){if(e){if(typeof e=="string")return uh(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 uh(e,t)}}function uh(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 o4(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 i4(e){if(Array.isArray(e))return e}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){dh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e,t){if(e==null)return{};var n=a4(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 a4(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 fh=S.forwardRef(function(e,t){var n=e.children,r=ic(e,KB),o=_T(r),i=o.open,a=ic(o,ZB);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(At(At({},a),{},{open:i})))});fh.displayName="Dropzone";var OT={disabled:!1,getFilesFromEvent:gB,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};fh.defaultProps=OT,fh.propTypes={children:vt.func,accept:vt.objectOf(vt.arrayOf(vt.string)),multiple:vt.bool,preventDropOnDocument:vt.bool,noClick:vt.bool,noKeyboard:vt.bool,noDrag:vt.bool,noDragEventsBubbling:vt.bool,minSize:vt.number,maxSize:vt.number,maxFiles:vt.number,disabled:vt.bool,getFilesFromEvent:vt.func,onFileDialogCancel:vt.func,onFileDialogOpen:vt.func,useFsAccessApi:vt.bool,autoFocus:vt.bool,onDragEnter:vt.func,onDragLeave:vt.func,onDragOver:vt.func,onDrop:vt.func,onDropAccepted:vt.func,onDropRejected:vt.func,onError:vt.func,validator:vt.func};var ph={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _T(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=At(At({},OT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,P=t.validator,_=S.useMemo(function(){return UB(n)},[n]),F=S.useMemo(function(){return qB(n)},[n]),V=S.useMemo(function(){return typeof m=="function"?m:MT},[m]),N=S.useMemo(function(){return typeof h=="function"?h:MT},[h]),O=S.useRef(null),D=S.useRef(null),z=S.useReducer(s4,ph),M=ch(z,2),C=M[0],L=M[1],$=C.isFocused,B=C.isFileDialogActive,q=S.useRef(typeof window<"u"&&window.isSecureContext&&y&&WB()),G=function(){!q.current&&B&&setTimeout(function(){if(D.current){var R=D.current.files;R.length||(L({type:"closeDialog"}),N())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[D,B,N,q]);var W=S.useRef([]),J=function(R){O.current&&O.current.contains(R.target)||(R.preventDefault(),W.current=[])};S.useEffect(function(){return b&&(document.addEventListener("dragover",kT,!1),document.addEventListener("drop",J,!1)),function(){b&&(document.removeEventListener("dragover",kT),document.removeEventListener("drop",J))}},[O,b]),S.useEffect(function(){return!r&&x&&O.current&&O.current.focus(),function(){}},[O,x,r]);var re=S.useCallback(function(j){k?k(j):console.error(j)},[k]),ee=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[].concat(JB(W.current),[j.target]),oc(j)&&Promise.resolve(o(j)).then(function(R){if(!(rc(j)&&!w)){var ne=R.length,ce=ne>0&&jB({files:R,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:P}),xe=ne>0&&!ce;L({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(R){return re(R)})},[o,c,re,w,_,a,i,s,l,P]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=oc(j);if(R&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return R&&d&&d(j),!1},[d,w]),K=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=W.current.filter(function(ce){return O.current&&O.current.contains(ce)}),ne=R.indexOf(j.target);ne!==-1&&R.splice(ne,1),W.current=R,!(R.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oc(j)&&u&&u(j))},[O,u,w]),X=S.useCallback(function(j,R){var ne=[],ce=[];j.forEach(function(xe){var Ce=TT(xe,_),_e=ch(Ce,2),qe=_e[0],pt=_e[1],ht=ET(xe,a,i),$t=ch(ht,2),$e=$t[0],U=$t[1],Z=P?P(xe):null;if(qe&&$e&&!Z)ne.push(xe);else{var Pe=[pt,U];Z&&(Pe=Pe.concat(Z)),ce.push({file:xe,errors:Pe.filter(function(Ge){return Ge})})}}),(!s&&ne.length>1||s&&l>=1&&ne.length>l)&&(ne.forEach(function(xe){ce.push({file:xe,errors:[zB]})}),ne.splice(0)),L({acceptedFiles:ne,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(ne,ce,R),ce.length>0&&v&&v(ce,R),ne.length>0&&p&&p(ne,R)},[L,s,_,a,i,l,f,p,v,P]),de=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[],oc(j)&&Promise.resolve(o(j)).then(function(R){rc(j)&&!w||X(R,j)}).catch(function(R){return re(R)}),L({type:"reset"})},[o,X,re,w]),H=S.useCallback(function(){if(q.current){L({type:"openDialog"}),V();var j={multiple:s,types:F};window.showOpenFilePicker(j).then(function(R){return o(R)}).then(function(R){X(R,null),L({type:"closeDialog"})}).catch(function(R){GB(R)?(N(R),L({type:"closeDialog"})):YB(R)?(q.current=!1,D.current?(D.current.value=null,D.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(R)});return}D.current&&(L({type:"openDialog"}),V(),D.current.value=null,D.current.click())},[L,V,N,y,X,re,F,s]),se=S.useCallback(function(j){!O.current||!O.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),H())},[O,H]),ie=S.useCallback(function(){L({type:"focus"})},[]),Q=S.useCallback(function(){L({type:"blur"})},[]),le=S.useCallback(function(){T||(HB()?setTimeout(H,0):H())},[T,H]),te=function(R){return r?null:R},fe=function(R){return E?null:te(R)},pe=function(R){return I?null:te(R)},ve=function(R){w&&R.stopPropagation()},Ae=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.role,xe=j.onKeyDown,Ce=j.onFocus,_e=j.onBlur,qe=j.onClick,pt=j.onDragEnter,ht=j.onDragOver,$t=j.onDragLeave,$e=j.onDrop,U=ic(j,XB);return At(At(dh({onKeyDown:fe(or(xe,se)),onFocus:fe(or(Ce,ie)),onBlur:fe(or(_e,Q)),onClick:te(or(qe,le)),onDragEnter:pe(or(pt,ee)),onDragOver:pe(or(ht,Y)),onDragLeave:pe(or($t,K)),onDrop:pe(or($e,de)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},ne,O),!r&&!E?{tabIndex:0}:{}),U)}},[O,se,ie,Q,le,ee,Y,K,de,E,I,r]),me=S.useCallback(function(j){j.stopPropagation()},[]),oe=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.onChange,xe=j.onClick,Ce=ic(j,QB),_e=dh({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:te(or(ce,de)),onClick:te(or(xe,me)),tabIndex:-1},ne,D);return At(At({},_e),Ce)}},[D,n,s,de,r]);return At(At({},C),{},{isFocused:$&&!r,getRootProps:Ae,getInputProps:oe,rootRef:O,inputRef:D,open:te(H)})}function s4(e,t){switch(t.type){case"focus":return At(At({},e),{},{isFocused:!0});case"blur":return At(At({},e),{},{isFocused:!1});case"openDialog":return At(At({},ph),{},{isFileDialogActive:!0});case"closeDialog":return At(At({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return At(At({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return At(At({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return At({},ph);default:return e}}function MT(){}const DT=S.createContext([null,()=>{}]),l4=()=>S.useContext(DT),c4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,u4={csv:wu,xls:wu,mov:Ag,mp4:Ag,xlsx:wu,pdf:Ig,txt:Ig,json:QC,mp3:GC},d4=e=>{const[,t]=l4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:c4(l),size:oB(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=u4[e.file.name.split(".").at(-1)]??Pg,s=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Mo,{size:16})})})]})},f4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(d4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),NT=e=>{const t=Pt(),n=e.dragging?JC:eI;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},p4=e=>e.isDragActive?g.jsx(NT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(f4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),h4=g.jsx(NT,{dragging:!1}),m4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},g4=({idle:e=h4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Pt(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=h=>{r?.(h),l(m=>m.concat(h))},{getRootProps:f,getInputProps:p,isDragActive:v}=_T({onDrop:d});return g.jsxs(DT.Provider,{value:a,children:[g.jsx(jp,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?g.jsx(m4,{item:a[0]}):null}),g.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(p4,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},FT=()=>window.matchMedia("@media (pointer: coarse)"),v4=()=>{const e=S.useRef(Cr()?null:FT()),[t,n]=S.useState(Cr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?FT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},LT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=v4(),o=S.useRef(Cr()?"":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||ay())return;document.documentElement.style.padding=ug(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(Pk(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},y4=(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]},VT=(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},$T={basic:/[,[\]]+?/,extend:/[,[\].]+?/},zT=(e,t)=>{const n=VT(t,$T.basic,e);return n!==void 0&&n!==e?n:VT(t,$T.extend,e)},jT=e=>e.replace(/[^0-9]/g,""),ac=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),RT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?jT(e).includes(jT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?y4(e,t)!==null:!1,b4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>RT(e,o,n,r)):RT(e,t,n,r),hh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(ac):ac(`${i.value}`)}));return e.forEach(i=>{const a=zT(i,t);o.forEach(s=>{const l=zT(i,s.key);if(!l)return;const c=ac(`${s.value}`.toLocaleLowerCase()).trim(),u=ac(`${l}`.toLocaleLowerCase()).trim();if(b4(u,c,s.score,s.match))return void r.set(a,i);Re.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},x4=e=>g.jsx(S.Fragment,{children:e.children}),w4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},S4=[],T4=S.forwardRef(function(t,n){return g.jsx(Be.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:g.jsx(fn,{children:t.children})})}),E4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),k4={List:T4,Item:E4},Si=40,C4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,...h},m)=>{const y=S.useRef(null),x=S.useRef(null),b=S.useRef(null),T=h.value??h.defaultValue??"",E=Pt(),[I,w]=S.useState(()=>Math.min(320,Si*o.length)),[k,P]=S.useState(!1),[_,F]=S.useState(""),[V,N]=S.useState(T),[O,D]=S.useState(()=>o.find(R=>R.value===T)?.label??T),[z,M]=S.useState(null),C=S.useRef(S4),L=LT(k,"block-only"),$=v&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=()=>Fi.flushSync(()=>P(!0)),q=_?hh($,"value",[{key:"value",value:_},{key:"label",value:_}]):$,G=()=>{P(!1),w(0)},W=q.filter(R=>R.hidden!==!0),J=v?void 0:`^(${o.map(R=>`${ed(R.value)}${R.label?"|"+ed(R.label):""}`).join("|")})$`,{x:re,y:ee,strategy:Y,refs:K,context:X,placement:de}=Gn({open:k,transform:!0,onOpenChange:P,placement:"bottom-start",whileElementsMounted:Jr,middleware:[$o(4),xv({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),bv({padding:10,elementContext:"reference",apply(R){const ce=R.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,xe=$i(K.reference.current,window.innerHeight),Ce=Math.min(ce<Si?xe:ce,xe,R.availableHeight),_e=W.length===0?Si:Math.min(Ce,xe,ce),qe=`${x.current.getBoundingClientRect().width}px`;Object.assign(R.elements.floating.style,{width:qe,maxWidth:qe,height:_e})}})]}),H=Qv(X,w4),{getReferenceProps:se,getFloatingProps:ie,getItemProps:Q}=Yn([fr(X,{role:"listbox"}),kr(X),Hs(X,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(h.value){const R=o.find(ne=>ne.value===h.value);R&&(D(R.label??R.value),N(h.value))}},[h.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const R=K.reference;if(R.current===null)return;const ne=$i(R.current,window.innerHeight);setTimeout(()=>w(Math.min(ne,W.length*Si)),100)},[_,k,K.reference,W.length]),S.useEffect(()=>{const R=K.reference.current;if(R)return Vi(R)},[]);const le=(R,ne)=>{N(R.value);const ce=K.reference.current;if(!ce)return;ce?.setAttribute("data-value",R.value),ce.value=R.value;const xe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(xe),h.onChange&&h.onChange(xe),D(R.label??""),G(),F(""),M(ne)},te=R=>{const ne=R.target.value;return F(ne),!k&&ne===""?P(!0):(R.target.name=h.name||"",ne?P(!0):h.onChange?.(R))},fe=()=>{B(),F(""),K.reference.current?.focus()},pe=()=>{M(R=>R===null?0:R),B(),F("")},ve=()=>{K.reference.current?.setAttribute("data-value",""),F(""),N(""),D(""),cg(K.reference.current),G()},Ae=h.id||h.name,me=`${Ae}-shadow`,oe=W.length===0,j=de==="top"||de==="top-start";return g.jsxs(Xi,{...h,left:e,error:t,ref:x,form:h.form,loading:r,name:h.name,feedback:k&&j?h.title:d,hideLeft:f,required:p,title:h.title,container:i,rightLabel:a,interactive:s,id:me,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:fe,children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),V?g.jsx("button",{type:"button",onClick:ve,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsx("input",{"data-shadow":"true",...se({...h,onFocus:pe,pattern:J,onChange:te,id:me,name:me,ref:K.setReference,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),G();if(k){if(R.key==="ArrowDown"){let ne=Re.number(z)?z+1:0;return ne>W.length-1&&(ne=0),b.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="ArrowUp"){let ne=Re.number(z)?z-1:W.length-1;return ne<0&&(ne=W.length-1),b.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="Enter"){if(z!==null&&W[z])return R.preventDefault(),le(W[z],z);if(W.length===1)return R.preventDefault(),le(W[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Ae,"data-target":Ae,required:p,value:k?_:o.length===0?"":O||V,"aria-autocomplete":"list",autoComplete:"off",className:Oe("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",h.className)}),g.jsx("input",{id:Ae,name:Ae,type:"hidden","data-origin":Ae,ref:m,required:p,defaultValue:h.value||V||void 0}),g.jsx(dr,{preserveTabOrder:!0,children:k?g.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(Be.div,{...ie({ref:sr(L,K.setFloating),style:{...H.styles,left:re,top:ee??0,position:Y,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:oe?"auto":I},className:Oe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",j?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const ne=K.floating.current.querySelectorAll("li").item(0),ce=(ne?ne.getBoundingClientRect().height:Si)*W.length;return Fi.flushSync(()=>w(ce+2))},children:[oe?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,g.jsx(Tp,{overscan:40,ref:b,hidden:oe,data:W,style:{height:I},defaultItemHeight:Si,components:k4,scrollerRef:R=>{y.current=R},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(R,ne)=>{const ce=ne.Render??x4,xe=V===ne.value||V===ne.label,Ce=z===R,_e=ne.label??ne.value;return g.jsx("button",{"data-value":ne.value,...Q({ref:qe=>{C.current[R]=qe},role:"option",type:"button","aria-checked":xe,"aria-current":xe,"aria-selected":xe,"aria-busy":ne.disabled,onClick:()=>le(ne,R),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${xe?"bg-primary-hover text-primary-foreground":""} ${Ce?"bg-floating-hover text-floating-foreground":""}`}),children:g.jsx(ce,{...h,label:ne.label,value:ne.value,children:_e})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const BT=40,I4=e=>g.jsx(S.Fragment,{children:e.children}),A4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},HT=[],P4=S.forwardRef(function(t,n){return g.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(fn,{children:t.children})})}),O4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),_4={List:P4,Item:O4},M4=e=>{const t=Pt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(ts,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},D4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,onChangeOptions:h,...m},y)=>{const x=S.useMemo(()=>new zn(r.map(oe=>[oe.value,oe])),[r]),b=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??HT,I=Pt(),[w,k]=S.useState(0),[P,_]=S.useState(!1),[F,V]=S.useState(""),[N,O]=S.useState(()=>{const oe=new zn;return E.forEach(j=>{const R=x.get(j);return R?oe.set(j,R):void 0}),oe}),D=S.useMemo(()=>Array.from(N.keys()),[N]),[z,M]=S.useState(()=>{const oe=new Set(E);return r.reduce((j,R)=>oe.has(R.value)?[...j,R.label??R.value]:j,[])??E}),[C,L]=S.useState(null),$=S.useRef(HT),B=v&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,q=F.length===0?B:hh(B,"value",[{key:"value",value:F},{key:"label",value:F}]),G=LT(P,"block-only"),W=q.filter(oe=>oe.hidden!==!0),J=W.length===0,{x:re,y:ee,strategy:Y,refs:K,context:X}=Gn({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Jr,middleware:[$o(4),bv({padding:10,elementContext:"reference",apply(oe){const R=oe.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ne=$i(K.reference.current,window.innerHeight),ce=Math.min(R<BT?ne:R,ne,oe.availableHeight),xe=W.length===0?BT:Math.min(ce,ne,R),Ce=`${b.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Ce,maxWidth:Ce,height:xe})}})]}),de=Qv(X,A4),{getReferenceProps:H,getFloatingProps:se,getItemProps:ie}=Yn([fr(X,{role:"listbox"}),kr(X),Hs(X,{cols:0,listRef:$,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:oe=>L(j=>oe??j)})]);S.useEffect(()=>{if(!P)return k(0);const oe=K.reference;if(oe.current===null)return;const j=$i(oe.current,window.innerHeight);setTimeout(()=>k(Math.min(j,W.length*40)),100)},[F,P,K.reference]),S.useEffect(()=>{m.value&&O(new zn(m.value.map(oe=>[oe,x.get(oe)])))},[m.value,x]),S.useEffect(()=>{const oe=K.reference.current;if(oe)return Vi(oe)},[]);const Q=(oe,j)=>{const R=N.clone(xe=>xe.has(oe.value)?xe.remove(oe.value):xe.set(oe.value,oe));O(R);const ne=K.reference.current;if(!ne)return;const ce=R.map(xe=>xe.value);ne?.setAttribute("data-value",JSON.stringify(ce)),h&&h(ce),M(xe=>xe.concat(oe.label??"")),V(""),L(j)},le=oe=>{const j=oe.target.value;return V(j),!P&&j===""?_(!0):(oe.target.name=m.name||"",j?_(!0):void 0)},te=()=>{_(!0),V(""),K.reference.current?.focus()},fe=()=>{_(!0),V("")},pe=()=>{K.reference.current?.setAttribute("data-value","[]"),V(""),_(!1),O(new zn),h?.([])},ve=m.id||m.name,Ae=N.map((oe,j)=>g.jsx(ts,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:R=>{R.preventDefault(),R.stopPropagation(),Q(oe,j)},children:g.jsx(Mo,{size:14})}),children:oe.label??oe.value},`MultiSelect-${oe.value}-x`)),me={height:J?"0":N.size===0?w-49:w-86};return g.jsxs(Xi,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:te,children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),N?g.jsx("button",{type:"button",onClick:pe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsxs("ul",{...H({...m,onFocus:fe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),className:Oe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[D.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(M4,{label:c,children:Ae})]}),g.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:p,defaultValue:m.value||D||void 0}),g.jsx(dr,{preserveTabOrder:!0,children:P?g.jsx(Ku,{lockScroll:!0,children:g.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...se({ref:K.setFloating,style:{...de.styles,top:ee??0,position:Y,left:re,height:w-(D.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:F,onChange:le,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:oe=>{if(oe.key==="ArrowDown"){let j=C+1;return j>W.length-1&&(j=0),T.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="ArrowUp"){let j=C-1;return j<0&&(j=W.length-1),T.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="Escape")return oe.currentTarget.blur(),_(!1);if(oe.key==="Enter"){if(C!==null&&W[C])return oe.preventDefault(),Q(W[C],C);if(W.length===1)return oe.preventDefault(),Q(W[0],0)}}}),J?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:s||I.autocompleteEmpty})}):null,J?null:g.jsx(Be.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:J?"auto":w},style:me,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return k(0);const j=K.floating.current.querySelectorAll("li").item(0),R=(j?j.getBoundingClientRect().height:40)*W.length;return Fi.flushSync(()=>k(R+2))},children:g.jsx(Tp,{ref:T,hidden:J,data:W,components:_4,style:me,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(oe,j)=>{const R=j.Render??I4,ne=N.has(j.value)||N.has(j.label??""),ce=C===oe,xe=j.label??j.value;return g.jsxs("button",{"data-value":j.value,...ie({ref:Ce=>{$.current[oe]=Ce},role:"option",type:"button","aria-checked":ne,"aria-current":ne,"aria-selected":ne,"aria-busy":j.disabled,onClick:()=>Q(j,oe)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ne||ce?"bg-floating-hover text-floating-foreground":""}`,children:[g.jsx($p,{onChange:Ho,checked:ne,"aria-checked":ne,onClick:Ce=>{Ce.stopPropagation(),Q(j,oe)}}),g.jsx(R,{...m,label:j.label,value:j.value,children:xe})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:N.size===0?g.jsx(ts,{theme:"muted",size:"small",children:I.autocompleteEmpty}):Ae})]})})}):null})]})}),N4=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},F4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},L4=e=>{const t=S.useRef(null),n=N4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Wo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Tp,{height:n,useWindowScroll:!0,data:e.source,components:F4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx($p,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(ro,{children:g.jsx(vu,{})})}),g.jsx("div",{})]})};function V4(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 $4=({children:e,...t})=>{const n=Pr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:V4(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()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})};let WT=0;function z4(e){return WT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${WT}`}const Wa=0;class sc{static create(){return new sc}currentId=Wa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Wa,n()},t)}isStarted(){return this.currentId!==Wa}clear=()=>{this.currentId!==Wa&&(clearTimeout(this.currentId),this.currentId=Wa)};disposeEffect=()=>this.clear}const lc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(lc.displayName="ToastContext");function mh(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));return e}function gh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const qT=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,s]=A.useState([]),[l,c]=A.useState(!1),[u,d]=A.useState(!1),[f,p]=A.useState(null);a.length===0&&(l&&c(!1),u&&d(!1));const v=l||u,h=A.useRef(new Map),m=A.useRef(null),y=A.useRef(!0),x=A.useRef(!1);function b(N){const O=ao(In(m.current));if(!m.current||!Ar(m.current,O)||!pd(O))return;const D=a.findIndex(C=>C.id===N);let z=null,M=D+1;for(;M<a.length;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M+=1}if(!z)for(M=D-1;M>=0;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M-=1}z?z.ref?.current?.focus():f?.focus({preventScroll:!0})}const T=Ye(()=>{x.current||(x.current=!0,h.current.forEach(N=>{if(N.timeout){N.timeout.clear();const O=Date.now()-N.start,D=N.delay-O;N.remaining=D>0?D:0}}))}),E=Ye(()=>{x.current&&(x.current=!1,h.current.forEach((N,O)=>{N.remaining=N.remaining>0?N.remaining:N.delay,N.timeout??=sc.create(),N.timeout.start(N.remaining,()=>{h.current.delete(O),N.callback()}),N.start=Date.now()}))}),I=Ye(N=>{s(z=>{const M=z.map(L=>L.id===N?{...L,transitionStatus:"ending",height:0}:L),C=M.filter(L=>L.transitionStatus!=="ending");return M.map(L=>{if(L.transitionStatus==="ending")return L;const $=C.indexOf(L)>=o;return{...L,limited:$}})});const O=h.current.get(N);O&&O.timeout&&(O.timeout.clear(),h.current.delete(N)),a.find(z=>z.id===N)?.onClose?.(),b(N),a.length===1&&(c(!1),d(!1))}),w=Ye(N=>{s(D=>D.filter(z=>z.id!==N)),a.find(D=>D.id===N)?.onRemove?.()}),k=Ye((N,O,D)=>{const z=Date.now(),M=y.current&&!l&&!u,C=M?sc.create():void 0;C?.start(O,()=>{h.current.delete(N),D()}),h.current.set(N,{timeout:C,start:M?z:0,delay:O,remaining:O,callback:D})}),P=Ye(N=>{const O=N.id||z4("toast"),D={...N,id:O,transitionStatus:"starting"};s(M=>{const C=[D,...M],L=C.filter($=>$.transitionStatus!=="ending");if(L.length>o){const $=L.length-o,B=L.slice(-$);return C.map(q=>B.some(G=>G.id===q.id)?{...q,limited:!0}:{...q,limited:!1})}return C.map($=>({...$,limited:!1}))});const z=D.timeout??r;return D.type!=="loading"&&z>0&&k(O,z,()=>I(O)),(l||u||!y.current)&&T(),O}),_=Ye((N,O)=>{const D=a.find(W=>W.id===N)??null,z=D?{...D,...O}:null;if(jn.flushSync(()=>{s(W=>W.map(J=>J.id===N?{...J,...O}:J))}),!z)return;const M=z.timeout??r,C=D?.timeout??r,L=Object.hasOwn(O,"timeout"),$=z.transitionStatus!=="ending"&&z.type!=="loading"&&M>0,B=h.current.has(N),q=C!==M,G=D?.type==="loading";if(!$&&B){h.current.get(N)?.timeout?.clear(),h.current.delete(N);return}if($&&(!B||q||L||G)){const W=h.current.get(N);W&&(W.timeout?.clear(),h.current.delete(N)),k(N,M,()=>I(N)),(l||u||!y.current)&&T()}}),F=Ye((N,O)=>{const D=gh(O.loading),z=P({...D,type:"loading"}),M=N.then(C=>{const L=gh(O.success,C);return _(z,{...L,type:"success",timeout:L.timeout}),C}).catch(C=>{const L=gh(O.error,C);return _(z,{...L,type:"error",timeout:L.timeout}),Promise.reject(C)});return{}.hasOwnProperty.call(O,"setPromise")&&O.setPromise(M),M});A.useEffect(function(){return i?i[" subscribe"](({action:D,options:z})=>{const M=z.id;D==="promise"&&z.promise?F(z.promise,z):D==="update"&&M?_(M,z):D==="close"&&M?I(M):P(z)}):void 0},[P,_,k,r,i,F,I]);const V=A.useMemo(()=>({toasts:a,setToasts:s,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:v,add:P,close:I,remove:w,update:_,promise:F,pauseTimers:T,resumeTimers:E,prevFocusElement:f,setPrevFocusElement:p,viewportRef:m,scheduleTimer:k,windowFocusedRef:y}),[P,I,u,l,v,T,f,F,w,E,k,a,_]);return g.jsx(lc.Provider,{value:V,children:n})};process.env.NODE_ENV!=="production"&&(qT.displayName="ToastProvider");const Ti=A.forwardRef(function(t,n){const[r,o]=A.useState();St(()=>{lO&&o("button")},[]);const i={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:Js,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ti.displayName="FocusGuard");const UT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(UT.displayName="ToastViewportContext");let j4=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const GT=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{toasts:s,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:v,setPrevFocusElement:h,expanded:m,focused:y}=mh(),x=A.useRef(!1),b=A.useRef(!1),T=s.length,E=s[0]?.height??0,I=A.useMemo(()=>s.some(C=>C.transitionStatus==="ending"),[s]);A.useEffect(()=>{if(!f.current)return;function C($){T!==0&&$.key==="F6"&&$.target!==f.current&&($.preventDefault(),h(ao(In(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const L=qt(f.current);return L.addEventListener("keydown",C),()=>{L.removeEventListener("keydown",C)}},[l,d,h,T,f]),A.useEffect(()=>{if(!f.current||!T)return;const C=qt(f.current);function L(B){B.target===C&&(p.current=!1,l())}function $(B){if(B.relatedTarget||B.target===C)return;const q=dd(B),G=ao(In(f.current));(!Ar(f.current,q)||!pd(G))&&c(),setTimeout(()=>{p.current=!0})}return C.addEventListener("blur",L,!0),C.addEventListener("focus",$,!0),()=>{C.removeEventListener("blur",L,!0),C.removeEventListener("focus",$,!0)}},[l,c,f,p,d,T]),A.useEffect(()=>{const C=f.current;if(!C||T===0)return;const L=In(C);function $(B){if(B.pointerType!=="touch")return;const q=dd(B);Ar(C,q)||(c(),u(!1),d(!1))}return L.addEventListener("pointerdown",$,!0),()=>{L.removeEventListener("pointerdown",$,!0)}},[T,c,d,u,f]);function w(C){f.current&&(x.current=!0,C.relatedTarget===f.current?s[0]?.ref?.current?.focus():v?.focus({preventScroll:!0}))}function k(C){C.key==="Tab"&&C.shiftKey&&C.target===f.current&&(C.preventDefault(),v?.focus({preventScroll:!0}),c())}A.useEffect(()=>{!p.current||I||!b.current||(c(),u(!1),b.current=!1)},[I,c,u,p]);function P(){l(),u(!0),b.current=!1}function _(){s.some(C=>C.transitionStatus==="ending")?b.current=!0:(c(),u(!1))}function F(){if(x.current){x.current=!1;return}y||pd(In(f.current).activeElement)&&(d(!0),l())}function V(C){!y||Ar(f.current,C.relatedTarget)||(d(!1),c())}const N={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:V,onKeyDown:k,onClick:F},O=A.useMemo(()=>({expanded:m}),[m]),D=an("div",t,{ref:[n,f],state:O,props:[N,{style:{[j4.frontmostHeight]:E?`${E}px`:void 0}},a,{children:g.jsxs(A.Fragment,{children:[T>0&&v&&g.jsx(Ti,{onFocus:w}),i,T>0&&v&&g.jsx(Ti,{onFocus:w})]})}]}),z=A.useMemo(()=>({viewportRef:f}),[f]),M=A.useMemo(()=>s.filter(C=>C.priority==="high"),[s]);return g.jsxs(UT.Provider,{value:z,children:[T>0&&v&&g.jsx(Ti,{onFocus:w}),D,!y&&M.length>0&&g.jsx("div",{style:Js,children:M.map(C=>g.jsxs("div",{role:"alert","aria-atomic":!0,children:[g.jsx("div",{children:C.title}),g.jsx("div",{children:C.description})]},C.id))})]})});process.env.NODE_ENV!=="production"&&(GT.displayName="ToastViewport");function R4(e){return gy(19)?e:e?"true":void 0}const vh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(vh.displayName="ToastRootContext");function Ei(){const e=A.useContext(vh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Ir(66));return e}let yh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const B4={[yh.startingStyle]:""},H4={[yh.endingStyle]:""},W4={transitionStatus(e){return e==="starting"?B4:e==="ending"?H4:null}};function q4(e){return e==null?e:"current"in e?e.current:e}function U4(e,t=!1,n=!0){const r=Hy();return Ye((o,i=null)=>{r.cancel();function a(){jn.flushSync(o)}const s=q4(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=yh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;a()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function G4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ye(o),a=U4(r,n,!1);A.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}let Eo=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const Y4={...W4,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qa=40,K4=10,zr=.5,Z4=1;function YT(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function X4(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const s=a[1].split(", ").map(parseFloat);s.length===6?(r=s[4],o=s[5],i=Math.sqrt(s[0]*s[0]+s[1]*s[1])):s.length===16&&(r=s[12],o=s[13],i=s[0])}}return{x:r,y:o,scale:i}}const KT=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...s}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(a)?a:[a]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:v,setToasts:h,pauseTimers:m,expanded:y,setHovering:x}=mh(),[b,T]=A.useState(void 0),[E,I]=A.useState(!1),[w,k]=A.useState(!1),[P,_]=A.useState(!1),[F,V]=A.useState({x:0,y:0}),[N,O]=A.useState({x:0,y:0,scale:1}),[D,z]=A.useState(),[M,C]=A.useState(),[L,$]=A.useState(null),B=A.useRef(null),q=A.useRef({x:0,y:0}),G=A.useRef({x:0,y:0,scale:1}),W=A.useRef(void 0),J=A.useRef(0),re=A.useRef(!1),ee=A.useRef({x:0,y:0}),Y=A.useRef(!1),K=A.useMemo(()=>d.indexOf(r),[r,d]),X=A.useMemo(()=>d.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,d]),de=A.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((j,R)=>j+(R.height||0),0),[d,r]);G4({open:r.transitionStatus!=="ending",ref:B,onComplete(){r.transitionStatus==="ending"&&v(r.id)}});const H=Ye((j=!1)=>{const R=B.current;if(!R)return;const ne=R.style.height;R.style.height="auto";const ce=R.offsetHeight;R.style.height=ne;function xe(){h(Ce=>Ce.map(_e=>_e.id===r.id?{..._e,ref:B,height:ce,transitionStatus:void 0}:_e))}j?jn.flushSync(xe):xe()});St(H,[H]);function se(j,R){let ne=j,ce=R;return!c.includes("left")&&!c.includes("right")?ne=j>0?j**zr:-(Math.abs(j)**zr):(!c.includes("right")&&j>0&&(ne=j**zr),!c.includes("left")&&j<0&&(ne=-(Math.abs(j)**zr))),!c.includes("up")&&!c.includes("down")?ce=R>0?R**zr:-(Math.abs(R)**zr):(!c.includes("down")&&R>0&&(ce=R**zr),!c.includes("up")&&R<0&&(ce=-(Math.abs(R)**zr))),{x:ne,y:ce}}function ie(j){if(j.button!==0)return;j.pointerType==="touch"&&m();const R=dd(j.nativeEvent);if(!(R&&R.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(re.current=!1,W.current=void 0,J.current=0,q.current={x:j.clientX,y:j.clientY},ee.current=q.current,B.current){const ce=X4(B.current);G.current=ce,O(ce),V({x:ce.x,y:ce.y})}x(!0),I(!0),k(!1),$(null),Y.current=!0,B.current?.setPointerCapture(j.pointerId)}}function Q(j){if(!E)return;j.preventDefault(),Y.current&&(q.current={x:j.clientX,y:j.clientY},Y.current=!1);const{clientY:R,clientX:ne,movementX:ce,movementY:xe}=j;(xe<0&&R>ee.current.y||xe>0&&R<ee.current.y)&&(ee.current={x:ee.current.x,y:R}),(ce<0&&ne>ee.current.x||ce>0&&ne<ee.current.x)&&(ee.current={x:ne,y:ee.current.y});const Ce=ne-q.current.x,_e=R-q.current.y,qe=R-ee.current.y,pt=ne-ee.current.x;if(!w&&Math.sqrt(Ce*Ce+_e*_e)>=Z4&&(k(!0),L===null)){const Pe=c.includes("left")||c.includes("right"),Ge=c.includes("up")||c.includes("down");if(Pe&&Ge){const Ze=Math.abs(Ce),Ne=Math.abs(_e);$(Ze>Ne?"horizontal":"vertical")}}let ht;if(!W.current)L==="vertical"?_e>0?ht="down":_e<0&&(ht="up"):L==="horizontal"?Ce>0?ht="right":Ce<0&&(ht="left"):Math.abs(Ce)>=Math.abs(_e)?ht=Ce>0?"right":"left":ht=_e>0?"down":"up",ht&&c.includes(ht)&&(W.current=ht,J.current=YT(ht,Ce,_e),T(ht));else{const Z=W.current,Pe=YT(Z,pt,qe);Pe>qa?(re.current=!1,T(Z)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&J.current-Pe>=K4&&(re.current=!0)}const $t=se(Ce,_e);let $e=G.current.x,U=G.current.y;L==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=$t.x):(L==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=$t.x),(c.includes("up")||c.includes("down"))&&(U+=$t.y)),V({x:$e,y:U})}function le(j){if(!E)return;if(I(!1),k(!1),$(null),B.current?.releasePointerCapture(j.pointerId),re.current){V({x:N.x,y:N.y}),T(void 0);return}let R=!1;const ne=F.x-N.x,ce=F.y-N.y;let xe;for(const Ce of c){switch(Ce){case"right":ne>qa&&(R=!0,xe="right");break;case"left":ne<-qa&&(R=!0,xe="left");break;case"down":ce>qa&&(R=!0,xe="down");break;case"up":ce<-qa&&(R=!0,xe="up");break}if(R)break}R?(T(xe),_(!0),p(r.id)):(V({x:N.x,y:N.y}),T(void 0))}function te(j){if(j.key==="Escape"){if(!B.current||!Ar(B.current,ao(In(B.current))))return;p(r.id)}}A.useEffect(()=>{if(!u)return;const j=B.current;if(!j)return;function R(ne){Ar(j,ne.target)&&ne.preventDefault()}return j.addEventListener("touchmove",R,{passive:!1}),()=>{j.removeEventListener("touchmove",R)}},[u]);function fe(){if(!E&&F.x===N.x&&F.y===N.y&&!P)return{[Eo.swipeMovementX]:"0px",[Eo.swipeMovementY]:"0px"};const j=F.x-N.x,R=F.y-N.y;return{transition:E?"none":void 0,transform:E?`translateX(${F.x}px) translateY(${F.y}px) scale(${N.scale})`:void 0,[Eo.swipeMovementX]:`${j}px`,[Eo.swipeMovementY]:`${R}px`}}const pe=r.priority==="high",ve={role:pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":M,"aria-hidden":pe&&!f?!0:void 0,onPointerDown:u?ie:void 0,onPointerMove:u?Q:void 0,onPointerUp:u?le:void 0,onKeyDown:te,inert:R4(r.limited),style:{...fe(),[Eo.index]:r.transitionStatus==="ending"?K:X,[Eo.offsetY]:`${de}px`,[Eo.height]:r.height?`${r.height}px`:void 0}},Ae=A.useMemo(()=>({rootRef:B,toast:r,titleId:D,setTitleId:z,descriptionId:M,setDescriptionId:C,swiping:E,swipeDirection:b,recalculateHeight:H,index:K,visibleIndex:X,expanded:y}),[r,D,M,E,b,H,K,X,y]),me=A.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:Ae.swiping,swipeDirection:Ae.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,Ae.swiping,Ae.swipeDirection]),oe=an("div",t,{ref:[n,Ae.rootRef],state:me,stateAttributesMapping:Y4,props:[ve,s]});return g.jsx(vh.Provider,{value:Ae,children:oe})});process.env.NODE_ENV!=="production"&&(KT.displayName="ToastRoot");const ZT=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:s,recalculateHeight:l}=Ei(),c=A.useRef(null);St(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const v=new ResizeObserver(()=>l(!0)),h=new MutationObserver(()=>l(!0));return v.observe(p),h.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{v.disconnect(),h.disconnect()}},[l]);const u=a>0,d=A.useMemo(()=>({expanded:s,behind:u}),[s,u]);return an("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(ZT.displayName="ToastContent");const XT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.description,u=!!c,d=Ws(i),{setDescriptionId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("p",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(XT.displayName="ToastDescription");const QT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.title,u=!!c,d=Ws(i),{setTitleId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("h2",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(QT.displayName="ToastTitle");let bh;process.env.NODE_ENV!=="production"&&(bh=new Set);function JT(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");bh.has(t)||(bh.add(t),console.error(`Base UI: ${t}`))}}const eE=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(eE.displayName="CompositeRootContext");function Q4(e=!1){const t=A.useContext(eE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ir(16));return t}function J4(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,i,o])}}function e3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=Q4(!0)!==void 0,s=Ye(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=J4({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||JT("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&JT("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=A.useCallback(()=>{const f=i.current;t3(f)&&a&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,a]);St(c,[c]);const u=A.useCallback((f={})=>{const{onClick:p,onMouseDown:v,onKeyUp:h,onKeyDown:m,onPointerDown:y,...x}=f;return sd({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}p?.(T)},onMouseDown(T){t||v?.(T)},onKeyDown(T){if(t||(cd(T),m?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!s()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&p?.(T))},onKeyUp(T){t||(cd(T),h?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&p?.(T)},onPointerDown(T){if(t){T.preventDefault();return}y?.(T)}},o?void 0:{role:"button"},l,x)},[t,l,o,s]),d=Ye(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function t3(e){return Ot(e)&&e.tagName==="BUTTON"}const tE=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...s}=t,{close:l,expanded:c}=mh(),{toast:u}=Ei(),[d,f]=A.useState(!1),{getButtonProps:p,buttonRef:v}=e3({disabled:i,native:a}),h=A.useMemo(()=>({type:u.type}),[u.type]);return an("button",t,{ref:[n,v],state:h,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!=="production"&&(tE.displayName="ToastClose");function n3(e){return`data-base-ui-${e}`}const xh=A.createContext(null);process.env.NODE_ENV!=="production"&&(xh.displayName="PortalContext");const r3=()=>A.useContext(xh),o3=n3("portal");function nE(e={}){const{ref:t,container:n,componentProps:r=Pn,elementProps:o,elementState:i}=e,a=Ws(),l=r3()?.portalNode,[c,u]=A.useState(null),[d,f]=A.useState(null),p=Ye(y=>{y!==null&&f(y)}),v=A.useRef(null);St(()=>{if(n===null){v.current&&(v.current=null,f(null),u(null));return}if(a==null)return;const y=(n&&(ps(n)?n:n.current))??l??document.body;if(y==null){v.current&&(v.current=null,f(null),u(null));return}v.current!==y&&(v.current=y,f(null),u(y))},[n,l,a]);const h=an("div",r,{ref:[t,p],state:i,props:[{id:a,[o3]:""},o]});return{portalNode:d,portalSubtree:c&&h?jn.createPortal(h,c):null}}const i3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=nE({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),v=A.useRef(null),[h,m]=A.useState(null),y=h?.modal,x=h?.open,b=typeof s=="boolean"?s:!!h&&!h.modal&&h.open&&!!c;A.useEffect(()=>{if(!c||y)return;function E(I){c&&I.relatedTarget&&gd(I)&&(I.type==="focusin"?_y:_O)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,y]),A.useEffect(()=>{!c||x||_y(c)},[x,c]);const T=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:v,portalNode:c,setFocusManagerState:m}),[c]);return g.jsxs(A.Fragment,{children:[u,g.jsxs(xh.Provider,{value:T,children:[b&&c&&g.jsx(Ti,{"data-type":"outside",ref:d,onFocus:E=>{if(gd(E,c))p.current?.focus();else{const I=h?h.domReference:null;OO(I)?.focus()}}}),b&&c&&g.jsx("span",{"aria-owns":c.id,style:LP}),c&&jn.createPortal(r,c),b&&c&&g.jsx(Ti,{"data-type":"outside",ref:f,onFocus:E=>{if(gd(E,c))v.current?.focus();else{const I=h?h.domReference:null;PO(I)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,qo(zP,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(i3.displayName="FloatingPortal");const rE=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...s}=t,{portalNode:l,portalSubtree:c}=nE({container:o,ref:n,componentProps:t,elementProps:s});return!c&&!l?null:g.jsxs(A.Fragment,{children:[c,l&&jn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(rE.displayName="FloatingPortalLite");const a3=rE;function oE(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return A.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const s3=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},l3=Io("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-wrap 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",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),iE=S.createContext(()=>{throw new Error("Not implemented")}),c3=()=>S.useContext(iE),aE={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]}};function u3(e){const t=e.toast.data?.closable??!0,n=e.hover?"hover":e.isLast?"isLast":"other",r=l3({theme:e.toast.data?.theme||"default"});return g.jsx(KT,{toast:e.toast,swipeDirection:["down","right"],children:g.jsx(Be.li,{layout:!0,layoutScroll:!0,animate:n,"data-index":e.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:aE[e.reversedIndex]||aE.default},children:g.jsxs(ZT,{className:r,children:[g.jsxs("div",{className:"flex flex-col p-4",children:[e.toast.title?g.jsx(QT,{className:"text-lg font-medium leading-relaxed select-text"}):null,g.jsx(XT,{className:"select-text"})]}),t?g.jsx(tE,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:g.jsx(Mo,{className:"size-5"})}):null]})})})}function d3({max:e=5}){const t=S.useRef(null),n=s3(t),o=oE().toasts.slice(-e);return g.jsx(GT,{ref:t,"data-items":o.length,style:{justifyContent:"start",height:`${(n?o.length:Math.min(1,o.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",children:g.jsx(Be.ol,{className:"flex flex-col gap-4",children:g.jsx(fn,{presenceAffectsLayout:!0,mode:"popLayout",children:o.reverse().map((i,a,s)=>g.jsx(u3,{toast:i,hover:n,index:a,isLast:s.length-1===a,reversedIndex:s.length-(a+1)},i.id))})})})}function f3({children:e,max:t=5}){const n=oE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,a)=>{const s=n.add({description:i,title:a?.title,timeout:a?.timeout,data:{theme:a?.theme,closable:a?.closable}});return{close:()=>n.close(s),clear:r}},[n,r]);return g.jsxs(iE.Provider,{value:o,children:[e,g.jsx(a3,{children:g.jsx(d3,{max:t})})]})}function p3({children:e,max:t=5,timeout:n=5e3}){return g.jsx(qT,{limit:t,timeout:n,children:g.jsx(f3,{max:t,children:e})})}const h3=/Mac|iPod|iPhone|iPad/,cc=()=>h3.test(navigator.userAgent),m3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?cc()?"Meta":"Control":n==="Hyper"?cc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),sE=e=>e.map(t=>t.trim()).join("+");class g3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=sE(m3(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=sE(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const v3=e=>(e=e.trim(),e==="Alt"?cc()?g.jsx(rI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?cc()?g.jsx(XC,{"aria-label":"Command",size:12}):"Ctrl":e),y3=e=>{const t=e.value.trim().split("+");return g.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return g.jsxs(S.Fragment,{children:[g.jsx("kbd",{"aria-label":n,children:v3(n)}),o?null:g.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},b3=e=>g.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:du(e.item.title)?g.jsx(e.item.title,{text:e.text}):e.item.title}),x3=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?g.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:g.jsx(b3,{text:e.text,item:o})}):o.type!=="shortcut"?g.jsx(S.Fragment,{}):g.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[g.jsxs("span",{className:"flex gap-2 items-center",children:[o.Icon?o.Icon:null,g.jsx("span",{children:du(o.title)?g.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?g.jsx(y3,{value:o.shortcut}):null]})}),w3=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Re.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=hh(o,"title",n),a=r.filter(s=>Re.function(s.enabled)?s.enabled({text:t}):!1);return zn.unique(i.concat(a),s=>s.title)},S3=[0,0,0,0,0],lE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=lE(n.items);if(r)return r}return null},T3=e=>{const t=S.useId(),[n,r]=S.useState(""),o=S.useRef([]),i=Pt(),a=Pr(n),[s,l]=S.useState(null),c=e.bind??"Mod + k",u=Gn({open:e.open,strategy:"absolute",whileElementsMounted:Jr,onOpenChange:e.onChangeVisibility}),d=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),f=w3(d,n),p=Hs(u.context,{listRef:o,loop:!0,activeIndex:s,virtual:!0,allowEscape:!0,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:s,disabledIndices:b=>{const T=f[b];return T?T.type==="group":!1},onNavigate:b=>{Re.number(b)&&o.current[b]?.scrollIntoView({block:"start",inline:"start"}),l(T=>Re.number(b)?b:e.open?T??0:null)}}),{getItemProps:v,getReferenceProps:h,getFloatingProps:m}=Yn([p]),y=n===""?d:[{type:"group",title:"Results",items:[]},...f.filter(b=>b.type!=="group")];S.useEffect(()=>{const b=new g3;return b.add(c,()=>e.onChangeVisibility?.(!0)),d.forEach(T=>{T.type!=="group"&&T.type==="shortcut"&&T.shortcut!==void 0&&b.add(T.shortcut,E=>T.action({event:E,setText:r,text:a.current,setOpen:e.onChangeVisibility}))}),b.register()},[c,d,e,a]);const x=e.Icon??yu;return g.jsx(S.Fragment,{children:g.jsxs(jp,{...m(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[g.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[g.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?g.jsx(x,{Default:yu,text:n,size:16}):g.jsx(yu,{size:16})}),g.jsx("input",{...h({ref:u.refs.setReference,onKeyDown:b=>{const T=Re.number(s)?y[s]:null;if(b.key==="Enter")if(T)T.type==="shortcut"&&T.action({event:b,text:n,setOpen:e.onChangeVisibility,setText:r});else{const I=lE(f);I?.type==="shortcut"&&I.action({event:b,text:n,setOpen:e.onChangeVisibility,setText:r})}}}),autoFocus:!0,value:n,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>r(b.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[g.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:i.commandPaletteLoading}),S3.map((b,T)=>g.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Ip},`${t}-${T}-skeleton-index`))]}):g.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[y.map((b,T)=>S.createElement(x3,{...v({onMouseEnter:()=>l(T),ref(E){o.current[T]=E},onClick(E){E.preventDefault(),e.onChangeVisibility(!1),b.type==="shortcut"&&b.action({event:E,text:n,setOpen:e.onChangeVisibility,setText:r})}}),item:b,text:n,active:s===T,key:`${t}-${b.type}-${T}`})),y.length===1?g.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:i.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(s)?g.jsx(e.Preview,{command:y[s],text:n}):null]}),e.footer?g.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border",children:e.footer}):null]})})},E3=["INPUT","SELECT"],cE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{E3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var wh,uE;function Sh(){if(uE)return wh;uE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return wh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},wh}var Th,dE;function fE(){if(dE)return Th;dE=1;var e=Sh(),t=Hm(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,k){return o.set(w,k),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,k){o.set(w,k)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var k=w.pop(),P=k.obj[k.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);k.obj[k.prop]=_}}},d=function(w,k){for(var P=k&&k.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function I(w,k,P){if(!k)return w;if(typeof k!="object"&&typeof k!="function"){if(r(w))w.push(k);else if(w&&typeof w=="object")if(a(w)){var _=s(w)+1;w[_]=k,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,k))&&(w[k]=!0);else return[w,k];return w}if(!w||typeof w!="object"){if(a(k)){for(var F=Object.keys(k),V=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},N=0;N<F.length;N++){var O=parseInt(F[N],10);V[O+1]=k[F[N]]}return i(V,s(k)+1)}return[w].concat(k)}var D=w;return r(w)&&!r(k)&&(D=d(w,P)),r(w)&&r(k)?(k.forEach(function(z,M){if(n.call(w,M)){var C=w[M];C&&typeof C=="object"&&z&&typeof z=="object"?w[M]=I(C,z,P):w.push(z)}else w[M]=z}),w):Object.keys(k).reduce(function(z,M){var C=k[M];return n.call(z,M)?z[M]=I(z[M],C,P):z[M]=C,z},D)},p=function(w,k){return Object.keys(k).reduce(function(P,_){return P[_]=k[_],P},w)},v=function(I,w,k){var P=I.replace(/\+/g," ");if(k==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,m=function(w,k,P,_,F){if(w.length===0)return w;var V=w;if(typeof w=="symbol"?V=Symbol.prototype.toString.call(w):typeof w!="string"&&(V=String(w)),P==="iso-8859-1")return escape(V).replace(/%u[0-9a-f]{4}/gi,function(L){return"%26%23"+parseInt(L.slice(2),16)+"%3B"});for(var N="",O=0;O<V.length;O+=h){for(var D=V.length>=h?V.slice(O,O+h):V,z=[],M=0;M<D.length;++M){var C=D.charCodeAt(M);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||F===e.RFC1738&&(C===40||C===41)){z[z.length]=D.charAt(M);continue}if(C<128){z[z.length]=c[C];continue}if(C<2048){z[z.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){z[z.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}M+=1,C=65536+((C&1023)<<10|D.charCodeAt(M)&1023),z[z.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}N+=z.join("")}return N},y=function(w){for(var k=[{obj:{o:w},prop:"o"}],P=[],_=0;_<k.length;++_)for(var F=k[_],V=F.obj[F.prop],N=Object.keys(V),O=0;O<N.length;++O){var D=N[O],z=V[D];typeof z=="object"&&z!==null&&P.indexOf(z)===-1&&(k.push({obj:V,prop:D}),P.push(z))}return u(k),w},x=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},b=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,k,P,_){if(a(w)){var F=s(w)+1;return w[F]=k,l(w,F),w}var V=[].concat(w,k);return V.length>P?i(d(V,{plainObjects:_}),V.length-1):V},E=function(w,k){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(k(w[_]));return P}return k(w)};return Th={arrayToObject:d,assign:p,combine:T,compact:y,decode:v,encode:m,isBuffer:b,isOverflow:a,isRegExp:x,maybeMap:E,merge:f},Th}var Eh,pE;function k3(){if(pE)return Eh;pE=1;var e=Hm(),t=fE(),n=Sh(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(h,m){a.apply(h,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},f={},p=function h(m,y,x,b,T,E,I,w,k,P,_,F,V,N,O,D,z,M){for(var C=m,L=M,$=0,B=!1;(L=L.get(f))!==void 0&&!B;){var q=L.get(m);if($+=1,typeof q<"u"){if(q===$)throw new RangeError("Cyclic object value");B=!0}typeof L.get(f)>"u"&&($=0)}if(typeof P=="function"?C=P(y,C):C instanceof Date?C=V(C):x==="comma"&&i(C)&&(C=t.maybeMap(C,function(Q){return Q instanceof Date?V(Q):Q})),C===null){if(E)return k&&!D?k(y,u.encoder,z,"key",N):y;C=""}if(d(C)||t.isBuffer(C)){if(k){var G=D?y:k(y,u.encoder,z,"key",N);return[O(G)+"="+O(k(C,u.encoder,z,"value",N))]}return[O(y)+"="+O(String(C))]}var W=[];if(typeof C>"u")return W;var J;if(x==="comma"&&i(C))D&&k&&(C=t.maybeMap(C,k)),J=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(P))J=P;else{var re=Object.keys(C);J=_?re.sort(_):re}var ee=w?String(y).replace(/\./g,"%2E"):String(y),Y=b&&i(C)&&C.length===1?ee+"[]":ee;if(T&&i(C)&&C.length===0)return Y+"[]";for(var K=0;K<J.length;++K){var X=J[K],de=typeof X=="object"&&X&&typeof X.value<"u"?X.value:C[X];if(!(I&&de===null)){var H=F&&w?String(X).replace(/\./g,"%2E"):String(X),se=i(C)?typeof x=="function"?x(Y,H):Y:Y+(F?"."+H:"["+H+"]");M.set(m,$);var ie=e();ie.set(f,M),s(W,h(de,se,x,b,T,E,I,w,x==="comma"&&D&&i(C)?null:k,P,_,F,V,N,O,D,z,ie))}}return W},v=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");x=m.format}var b=n.formatters[x],T=u.filter;(typeof m.filter=="function"||i(m.filter))&&(T=m.filter);var E;if(m.arrayFormat in o?E=m.arrayFormat:"indices"in m?E=m.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:x,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Eh=function(h,m){var y=h,x=v(m),b,T;typeof x.filter=="function"?(T=x.filter,y=T("",y)):i(x.filter)&&(T=x.filter,b=T);var E=[];if(typeof y!="object"||y===null)return"";var I=o[x.arrayFormat],w=I==="comma"&&x.commaRoundTrip;b||(b=Object.keys(y)),x.sort&&b.sort(x.sort);for(var k=e(),P=0;P<b.length;++P){var _=b[P],F=y[_];x.skipNulls&&F===null||s(E,p(F,_,I,w,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,k))}var V=E.join(x.delimiter),N=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?N+="utf8=%26%2310003%3B&":N+="utf8=%E2%9C%93&"),V.length>0?N+V:""},Eh}var kh,hE;function C3(){if(hE)return kh;hE=1;var e=fE(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(v,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,v,h){if(p&&typeof p=="string"&&v.comma&&p.indexOf(",")>-1)return p.split(",");if(v.throwOnLimitExceeded&&h>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,h){var m={__proto__:null},y=h.ignoreQueryPrefix?v.replace(/^\?/,""):v;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var x=h.parameterLimit===1/0?void 0:h.parameterLimit,b=y.split(h.delimiter,h.throwOnLimitExceeded?x+1:x);if(h.throwOnLimitExceeded&&b.length>x)throw new RangeError("Parameter limit exceeded. Only "+x+" parameter"+(x===1?"":"s")+" allowed.");var T=-1,E,I=h.charset;if(h.charsetSentinel)for(E=0;E<b.length;++E)b[E].indexOf("utf8=")===0&&(b[E]===s?I="utf-8":b[E]===a&&(I="iso-8859-1"),T=E,E=b.length);for(E=0;E<b.length;++E)if(E!==T){var w=b[E],k=w.indexOf("]="),P=k===-1?w.indexOf("="):k+1,_,F;if(P===-1?(_=h.decoder(w,r.decoder,I,"key"),F=h.strictNullHandling?null:""):(_=h.decoder(w.slice(0,P),r.decoder,I,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),h,n(m[_])?m[_].length:0),function(N){return h.decoder(N,r.decoder,I,"value")}))),F&&h.interpretNumericEntities&&I==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var V=t.call(m,_);V&&h.duplicates==="combine"?m[_]=e.combine(m[_],F,h.arrayLimit,h.plainObjects):(!V||h.duplicates==="last")&&(m[_]=F)}}return m},c=function(p,v,h,m){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var x=p.slice(0,-1).join("");y=Array.isArray(v)&&v[x]?v[x].length:0}for(var b=m?v:i(v,h,y),T=p.length-1;T>=0;--T){var E,I=p[T];if(I==="[]"&&h.parseArrays)e.isOverflow(b)?E=b:E=h.allowEmptyArrays&&(b===""||h.strictNullHandling&&b===null)?[]:e.combine([],b,h.arrayLimit,h.plainObjects);else{E=h.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,k=h.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(k,10);!h.parseArrays&&k===""?E={0:b}:!isNaN(P)&&I!==k&&String(P)===k&&P>=0&&h.parseArrays&&P<=h.arrayLimit?(E=[],E[P]=b):k!=="__proto__"&&(E[k]=b)}b=E}return b},u=function(v,h){var m=h.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(h.depth<=0)return!h.plainObjects&&t.call(Object.prototype,m)&&!h.allowPrototypes?void 0:[m];var y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,b=y.exec(m),T=b?m.slice(0,b.index):m,E=[];if(T){if(!h.plainObjects&&t.call(Object.prototype,T)&&!h.allowPrototypes)return;E.push(T)}for(var I=0;(b=x.exec(m))!==null&&I<h.depth;){I+=1;var w=b[1].slice(1,-1);if(!h.plainObjects&&t.call(Object.prototype,w)&&!h.allowPrototypes)return;E.push(b[1])}if(b){if(h.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+h.depth+" and strictDepth is true");E.push("["+m.slice(b.index)+"]")}return E},d=function(v,h,m,y){if(v){var x=u(v,m);if(x)return c(x,h,m,y)}},f=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof v.charset>"u"?r.charset:v.charset,m=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:m,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return kh=function(p,v){var h=f(v);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var m=typeof p=="string"?l(p,h):p,y=h.plainObjects?{__proto__:null}:{},x=Object.keys(m),b=0;b<x.length;++b){var T=x[b],E=d(T,m[T],h,typeof p=="string");y=e.merge(y,E,h)}return h.allowSparse===!0?y:e.compact(y)},kh}var Ch,mE;function I3(){if(mE)return Ch;mE=1;var e=k3(),t=C3(),n=Sh();return Ch={formats:n,parse:t,stringify:e},Ch}var A3=I3(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var gE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(gE||(gE={}));const Ee=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return Number.isNaN(e)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(e)?Ee.array:e===null?Ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ee.promise:typeof Map<"u"&&e instanceof Map?Ee.map:typeof Set<"u"&&e instanceof Set?Ee.set:typeof Date<"u"&&e instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ge=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class gr 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 gr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}gr.create=e=>new gr(e);const Ih=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let P3=Ih;function O3(){return P3}const _3=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ye(e,t){const n=O3(),r=_3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ih?void 0:Ih].filter(o=>!!o)});e.common.issues.push(r)}class mn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return mn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),Ua=e=>({status:"dirty",value:e}),En=e=>({status:"valid",value:e}),vE=e=>e.status==="aborted",yE=e=>e.status==="dirty",ki=e=>e.status==="valid",uc=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));class Rr{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 bE=(e,t)=>{if(ki(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new gr(e.common.issues);return this._error=n,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class Xe{get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new mn,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(uc(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:jr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return bE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ki(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>ki(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(uc(o)?o:Promise.resolve(o));return bE(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ge.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Pi({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Hr.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this)}promise(){return hc.create(this,this._def)}or(t){return fc.create([this,t],this._def)}and(t){return pc.create(this,t,this._def)}transform(t){return new Pi({...Ue(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Oh({...Ue(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new eH({typeName:Ve.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _h({...Ue(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mh.create(this,t)}readonly(){return Dh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M3=/^c[^\s-]{8,}$/i,D3=/^[0-9a-z]+$/,N3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,F3=/^[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,L3=/^[a-z0-9_-]{21}$/i,V3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$3=/^[-+]?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)?)??$/,z3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ah;const R3=/^(?:(?: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])$/,B3=/^(?:(?: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])$/,H3=/^(([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]))$/,W3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xE="((\\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])))",G3=new RegExp(`^${xE}$`);function wE(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 Y3(e){return new RegExp(`^${wE(e)}$`)}function K3(e){let t=`${xE}T${wE(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 Z3(e,t){return!!((t==="v4"||!t)&&R3.test(e)||(t==="v6"||!t)&&H3.test(e))}function X3(e,t){if(!V3.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 Q3(e,t){return!!((t==="v4"||!t)&&B3.test(e)||(t==="v6"||!t)&&W3.test(e))}class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ee.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.string,received:i.parsedType}),Le}const r=new mn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")z3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ah||(Ah=new RegExp(j3,"u")),Ah.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")F3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")L3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")M3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")D3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")N3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:ge.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"regex",code:ge.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?K3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?G3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Y3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?$3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Z3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?X3(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Q3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?U3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...ke.errToObj(r)})}_addCheck(t){return new ko({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.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,...ke.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,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ke.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new ko({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ko.create=e=>new ko({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ue(e)});function J3(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 Ci extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ee.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.number,received:i.parsedType}),Le}let r;const o=new mn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?J3(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ci.create=e=>new Ci({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class Ga extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ee.bigint)return this._getInvalidInput(t);let r;const o=new mn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ga({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.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}}Ga.create=e=>new Ga({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class SE extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ee.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.boolean,received:r.parsedType}),Le}return En(t.data)}}SE.create=e=>new SE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class dc extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ee.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_date}),Le}const r=new mn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new dc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.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}}dc.create=e=>new dc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ue(e)});class TE extends Xe{_parse(t){if(this._getType(t)!==Ee.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.symbol,received:r.parsedType}),Le}return En(t.data)}}TE.create=e=>new TE({typeName:Ve.ZodSymbol,...Ue(e)});class EE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.undefined,received:r.parsedType}),Le}return En(t.data)}}EE.create=e=>new EE({typeName:Ve.ZodUndefined,...Ue(e)});class kE extends Xe{_parse(t){if(this._getType(t)!==Ee.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.null,received:r.parsedType}),Le}return En(t.data)}}kE.create=e=>new kE({typeName:Ve.ZodNull,...Ue(e)});class CE extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return En(t.data)}}CE.create=e=>new CE({typeName:Ve.ZodAny,...Ue(e)});class IE extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return En(t.data)}}IE.create=e=>new IE({typeName:Ve.ZodUnknown,...Ue(e)});class Br extends Xe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.never,received:n.parsedType}),Le}}Br.create=e=>new Br({typeName:Ve.ZodNever,...Ue(e)});class AE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.void,received:r.parsedType}),Le}return En(t.data)}}AE.create=e=>new AE({typeName:Ve.ZodVoid,...Ue(e)});class ir extends Xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ee.array)return ye(n,{code:ge.invalid_type,expected:Ee.array,received:n.parsedType}),Le;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ye(n,{code:a?ge.too_big:ge.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ye(n,{code:ge.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ye(n,{code:ge.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Rr(n,a,n.path,s)))).then(a=>mn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rr(n,a,n.path,s)));return mn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ir({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new ir({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new ir({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}ir.create=(e,t)=>new ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ue(t)});function Ii(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hr.create(Ii(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof ir?new ir({...e._def,type:Ii(e.element)}):e instanceof Hr?Hr.create(Ii(e.unwrap())):e instanceof Oi?Oi.create(Ii(e.unwrap())):e instanceof Co?Co.create(e.items.map(t=>Ii(t))):e}class Bt extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ee.object){const c=this._getOrReturnCtx(t);return ye(c,{code:ge.invalid_type,expected:Ee.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Br&&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 Rr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ye(o,{code:ge.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Rr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>mn.mergeObjectSync(r,c)):mn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ke.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Ii(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return ME(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)});class fc extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new gr(s.ctx.common.issues));return ye(n,{code:ge.invalid_union,unionErrors:a}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new gr(l));return ye(n,{code:ge.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}fc.create=(e,t)=>new fc({options:e,typeName:Ve.ZodUnion,...Ue(t)});function Ph(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===Ee.object&&r===Ee.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ph(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ee.array&&r===Ee.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ph(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ee.date&&r===Ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class pc extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(vE(i)||vE(a))return Le;const s=Ph(i.value,a.value);return s.valid?((yE(i)||yE(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ge.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}pc.create=(e,t,n)=>new pc({left:e,right:t,typeName:Ve.ZodIntersection,...Ue(n)});class Co extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.array)return ye(r,{code:ge.invalid_type,expected:Ee.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ye(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Rr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>mn.mergeArray(n,a)):mn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Co({...this._def,rest:t})}}Co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Co({items:e,typeName:Ve.ZodTuple,rest:null,...Ue(t)})};class PE extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.map)return ye(r,{code:ge.invalid_type,expected:Ee.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rr(r,s,r.path,[c,"key"])),value:i._parse(new Rr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}PE.create=(e,t,n)=>new PE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ue(n)});class Ya extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.set)return ye(r,{code:ge.invalid_type,expected:Ee.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:ge.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ye(r,{code:ge.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Rr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ya({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new Ya({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ya.create=(e,t)=>new Ya({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ue(t)});class OE extends Xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}OE.create=(e,t)=>new OE({getter:e,typeName:Ve.ZodLazy,...Ue(t)});class _E extends Xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}_E.create=(e,t)=>new _E({value:e,typeName:Ve.ZodLiteral,...Ue(t)});function ME(e,t){return new Ai({values:e,typeName:Ve.ZodEnum,...Ue(t)})}class Ai extends Xe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:et.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Le}return En(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ai.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ai.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ai.create=ME;class DE extends Xe{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ee.string&&r.parsedType!==Ee.number){const o=et.objectValues(n);return ye(r,{expected:et.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return ye(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Le}return En(t.data)}get enum(){return this._def.values}}DE.create=(e,t)=>new DE({values:e,typeName:Ve.ZodNativeEnum,...Ue(t)});class hc extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ee.promise&&n.common.async===!1)return ye(n,{code:ge.invalid_type,expected:Ee.promise,received:n.parsedType}),Le;const r=n.parsedType===Ee.promise?n.data:Promise.resolve(n.data);return En(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hc.create=(e,t)=>new hc({type:e,typeName:Ve.ZodPromise,...Ue(t)});class Pi extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Ua(l.value):l});{if(n.value==="aborted")return Le;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Le:s.status==="dirty"||n.value==="dirty"?Ua(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ki(a))return Le;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ki(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Le);et.assertNever(o)}}Pi.create=(e,t,n)=>new Pi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ue(n)}),Pi.createWithPreprocess=(e,t,n)=>new Pi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ue(n)});class Hr extends Xe{_parse(t){return this._getType(t)===Ee.undefined?En(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:Ve.ZodOptional,...Ue(t)});class Oi extends Xe{_parse(t){return this._getType(t)===Ee.null?En(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oi.create=(e,t)=>new Oi({innerType:e,typeName:Ve.ZodNullable,...Ue(t)});class Oh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Oh.create=(e,t)=>new Oh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class _h extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return uc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_h.create=(e,t)=>new _h({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class NE extends Xe{_parse(t){if(this._getType(t)!==Ee.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}NE.create=e=>new NE({typeName:Ve.ZodNaN,...Ue(e)});class eH extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mh extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),Ua(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Mh({in:t,out:n,typeName:Ve.ZodPipeline})}}class Dh extends Xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ki(o)&&(o.value=Object.freeze(o.value)),o);return uc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Dh.create=(e,t)=>new Dh({innerType:e,typeName:Ve.ZodReadonly,...Ue(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={})),Br.create,ir.create,fc.create,pc.create,Co.create,Ai.create,hc.create,Hr.create,Oi.create;const tH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},nH=(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]}}},FE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):FE(t),o=structuredClone(e);return nH(o,r,n),o},rH=(e,t)=>e.localeCompare(t),_i={},LE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return VE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=LE(e._def.innerType);return t==="ZodArray"?n??[]:n}},VE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,LE(n)])),$E=(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]=$E(i,o):n[r]=o||i)}return n},oH={sort:rH,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},zE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return A3.parse(n.toString(),oH)},Wr=(e,t)=>FE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),qr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Nh=e=>{const t=e.dataset.target;if(!t)return qr(e);const n=document.querySelector(`[data-origin="${t}"]`);return qr(n||e)},iH={state:{},loading:!1,useOnChange:!1},jE=e=>e.dataset.target||e.name,aH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=za.LocalStorage.get(t);return tH(n)?n:{}},clear:()=>{za.LocalStorage.delete(t)},set:n=>za.LocalStorage.set(t,n)}},sH=(e,t,n=iH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??VE(e)??{}),l=S.useCallback(b=>{const T=b.target,E=b.currentTarget;if(T.dataset.optional==="true")return;const w=jE(T),k=Nh(T)||(E?qr(E):""),P=Wr(w,e);if(T.setAttribute("data-initialized","true"),P){const _=P.safeParse(k),F=_.success?void 0:_.error.issues[0]?.message??"";o(V=>gn(V??{},w,F))}},[e]),c=S.useCallback(b=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((k,P)=>{const _=P.element,F=P.schema.safeParse(qr(_));if(_.dataset.ignore==="ignore"||F.success)return k;const V=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const N=_.dataset.name||_.name||"";return gn(k,N,V)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),b?.({form:E,errors:w||{}})},[]),u=(b,T=_i)=>{const E=Wr(b,e),I=w=>{if(!Zl(w))return;s(P=>gn(P,b,w.toISOString())),o(P=>gn(P,b,void 0));const k=i.current[b].element;if(k){const P=k.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:b,id:b,onChange:I,form:t,date:Re.string(a[b])?new Date(a[b]):a[b],required:T.required??!E.isOptional(),error:Rn(r,b),ref:w=>{w!==null&&(i.current[b]={element:w,schema:E})}}},d=(b,T=_i)=>{const E=Wr(b,e);return{...T,name:b,id:b,onChange:w=>{const k=w.target.value;s(P=>gn(P,b,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),value:Rn(a,b,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[b]={element:w,schema:E}:void 0}},f=(b,T=_i)=>{const E=Wr(b,e);return{...T,name:b,id:b,onChange:w=>{const k=w.target.checked;s(P=>gn(P??{},b,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[b]={element:w,schema:E}):void 0}},p=(b,T=_i)=>{const E=Wr(b,e),I=w=>{w.persist?.();const k=w.target.value;T?.onChange?.(w),s(P=>gn(P,b,k))};return{...T,loading:n.loading,name:b,id:b,onChange:I,form:t,onInvalid:l,error:Rn(r,b,void 0),required:T.required??!E.isOptional(),value:Rn(a,b,void 0)||T?.value||"",type:Re.instance(E,Ci)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[b]={element:w,schema:E}}},v=(b,T=_i)=>{const E=Wr(b,e);return{...T,name:b,id:b,onChangeOptions:w=>{s(k=>gn(k,b,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:T.required??!E.isOptional(),value:Rn(a,b,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[b]={element:w,schema:E})}},h=(b,T=_i)=>{const E=Wr(b,e),I=E._def.typeName==="ZodNumber";return{...T,name:b,id:b,onChange:k=>{k.persist?.();const P=I?k.target.valueAsNumber:k.target.value;T?.onChange?.(k),s(_=>gn(_,b,P))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Rn(a,b,void 0)||T?.value||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:E})}};S.useEffect(()=>{const b=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(qr(I)),k=V=>{const N=jE(V.target);if(!N)return!1;const O=V.target,D=Nh(V.target)||(V.relatedTarget?qr(V.relatedTarget):""),z=E.schema.safeParse(D);if(O.setAttribute("value",D),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const C=gn(M,N,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(C)?null:C}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(C=>{if(Re.null(C))return null;const L=gn(C,N,M||void 0);return Re.empty(L)?null:L})}return!1},P=new AbortController,_=I.getAttribute("data-trigger")||"blur";I.addEventListener(_,k,{signal:P.signal});const F=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:F,unsubscribe:()=>P.abort()}});return b.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>b.forEach(E=>E.unsubscribe())});const m=b=>T=>{T.preventDefault();const E=T.currentTarget;let I=zE(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(F=>{if(F.tagName==="SELECT"){const V=F;I=gn(I,V.name,V.value)}if(F.tagName==="INPUT"){const V=F,N=Nh(V)||(V?qr(V):"");I=gn(I,V.dataset.target||V.name,N)}});const k=$E(I,a),P=e.safeParse(k),_=()=>{cE(E),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return E.setAttribute("data-json",F),n.interceptor?.clear(),b?.(T,{form:E,event:T,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),E.reportValidity(),b?.(T,{form:E,json:I,event:T,reset:_,setErrors:o,data:I,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(V=>String(V))}))})},y=b=>Ju(a,b)||"",x=b=>({...b,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:h,state:a,errors:r,select:d,checkbox:f,onSubmit:m,setState:s,textarea:p,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:v,disabled:r!==null}},lH=e=>e?JSON.parse(e.getAttribute("data-json")):{},cH=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},RE={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},BE={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"},HE={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},uH={name:"dark",zIndex:HE,rounded:RE,spacing:BE,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",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(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,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%)"}}}},dH={rounded:RE,spacing:BE,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:HE,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(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},fH=uH,pH=dH,hH=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...ds,...e.tweaks},parser:e.parser||ls.hsla,map:{...us,...e.map}}),[e]);return g.jsx(Kr.Provider,{value:t,children:e.children})};ae.Alert=j$,ae.AnimatedList=E$,ae.AnimatedListItem=k$,ae.Autocomplete=C4,ae.Button=ro,ae.Calendar=HS,ae.Card=Hl,ae.Checkbox=$p,ae.ColType=gi,ae.Collapse=sS,ae.CommandPalette=T3,ae.ComponentsProvider=hH,ae.Context=Kr,ae.DatePicker=ZR,ae.Description=fz,ae.Dict=zn,ae.Dropdown=mi,ae.Empty=G1,ae.Expand=gz,ae.FileUpload=g4,ae.Form=SC,ae.Info=pz,ae.Input=Wo,ae.InputFeedback=sy,ae.InputField=Xi,ae.Loading=mz,ae.Menu=Q$,ae.MenuItem=X$,ae.Modal=jp,ae.MultiSelect=D4,ae.Notifications=p3,ae.PageHeader=hz,ae.PageTitle=mS,ae.Paragraph=dz,ae.Polymorph=ln,ae.Progress=WR,ae.Radiobox=J$,ae.RenderOnView=$4,ae.Select=oo,ae.Slider=f_,ae.Spinner=gS,ae.Stats=R$,ae.StatsCard=S$,ae.Step=M$,ae.Steps=D$,ae.Switch=p_,ae.Tab=V$,ae.Table=w$,ae.Tabs=F$,ae.Tag=ts,ae.TaskList=uz,ae.Textarea=ez,ae.Timeline=qR,ae.TimelineItem=Ql,ae.Toolbar=UR,ae.Tooltip=td,ae.TransferList=L4,ae.Wizard=wz,ae.createColumns=WV,ae.createCssProperties=dI,ae.createDesignTokens=Og,ae.createFormStorage=aH,ae.createOptionCols=Op,ae.createStyles=lI,ae.createTheme=uI,ae.createTokenStyles=fI,ae.css=Oe,ae.defaultDarkTheme=fH,ae.defaultLightTheme=pH,ae.defaultTranslations=us,ae.defaultTweaks=ds,ae.dispatchInput=cg,ae.formReset=cE,ae.formToJson=zE,ae.getCoords=yC,ae.getJsonForm=lH,ae.getModalScrollerRef=KV,ae.getRemainingSize=$i,ae.getSchemaShape=Wr,ae.hasVerticalScroll=ug,ae.initializeInputDataset=Vi,ae.isMobile=ay,ae.isReactComponent=vC,ae.isReactFC=du,ae.isSsr=Cr,ae.mergeRefs=sr,ae.negate=AP,ae.noop=Ho,ae.parsers=ls,ae.path=Ju,ae.reduceTokens=yr,ae.safeRegex=ed,ae.splitInto=iy,ae.useColorParser=Q1,ae.useForm=sH,ae.useLocale=sl,ae.useNotification=c3,ae.usePrevious=cH,ae.useReactive=tS,ae.useStableRef=Pr,ae.useStepContext=eS,ae.useSwipe=VS,ae.useTablePreferences=GV,ae.useTranslations=Pt,ae.uuid=Bo,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
21
21
  //# sourceMappingURL=index.umd.js.map