@g4rcez/components 1.2.0 → 1.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.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var MS=Object.defineProperty;var DS=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>DS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),y=require("react/jsx-runtime"),pa=require("react-dom");function Uy(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 R=Uy(E),Xs=Uy(pa);function Ky(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=Ky(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ky(e))&&(r&&(r+=" "),r+=t);return r}const Zp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xp=Yy,Jo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Zp(u)||Zp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[g,m]=h;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...c,d,p]:c},[]);return Xp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Qp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?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 zl,Jp;function ei(){return Jp||(Jp=1,zl=TypeError),zl}const NS={},FS=Object.freeze(Object.defineProperty({__proto__:null,default:NS},Symbol.toStringTag,{value:"Module"})),LS=jS(FS);var Bl,em;function Qs(){if(em)return Bl;em=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,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,j=typeof BigInt=="function"?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,_=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function N(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var tt=W<0?-A(-W):A(W);if(tt!==W){var st=String(tt),Me=x.call(U,st.length+1);return b.call(st,ze,"$&_")+"."+b.call(b.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,ze,"$&_")}var $=LS,M=$.custom,B=Te(M)?M:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Bl=function W(U,ze,tt,st){var Me=ze||{};if(se(Me,"quoteStyle")&&!se(X,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var rr=se(Me,"customInspect")?Me.customInspect:!0;if(typeof rr!="boolean"&&rr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _r=Me.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return Oe(U,Me);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var Zt=String(U);return _r?N(U,Zt):Zt}if(typeof U=="bigint"){var or=String(U)+"n";return _r?N(U,or):or}var Dl=typeof Me.depth>"u"?5:Me.depth;if(typeof tt>"u"&&(tt=0),tt>=Dl&&Dl>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var uo=er(Me,tt);if(typeof st>"u")st=[];else if(be(st,U)>=0)return"[Circular]";function mn(fo,Ia,OS){if(Ia&&(st=I.call(st),st.push(Ia)),OS){var Gp={depth:Me.depth};return se(Me,"quoteStyle")&&(Gp.quoteStyle=Me.quoteStyle),W(fo,Gp,tt+1,st)}return W(fo,Me,tt+1,st)}if(typeof U=="function"&&!z(U)){var Bp=le(U),Hp=nr(U,mn);return"[Function"+(Bp?": "+Bp:" (anonymous)")+"]"+(Hp.length>0?" { "+k.call(Hp,", ")+" }":"")}if(Te(U)){var Wp=P?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(U);return typeof U=="object"&&!P?Ye(Wp):Wp}if(me(U)){for(var xi="<"+w.call(String(U.nodeName)),jl=U.attributes||[],Aa=0;Aa<jl.length;Aa++)xi+=" "+jl[Aa].name+"="+J(G(jl[Aa].value),"double",Me);return xi+=">",U.childNodes&&U.childNodes.length&&(xi+="..."),xi+="</"+w.call(String(U.nodeName))+">",xi}if(Z(U)){if(U.length===0)return"[]";var Nl=nr(U,mn);return uo&&!En(Nl)?"["+tr(Nl,uo)+"]":"[ "+k.call(Nl,", ")+" ]"}if(K(U)){var Fl=nr(U,mn);return!("cause"in Error.prototype)&&"cause"in U&&!_.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+mn(U.cause),Fl),", ")+" }":Fl.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(Fl,", ")+" }"}if(typeof U=="object"&&rr){if(B&&typeof U[B]=="function"&&$)return $(U,{depth:Dl-tt});if(rr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(oe(U)){var qp=[];return r&&r.call(U,function(fo,Ia){qp.push(mn(Ia,U,!0)+" => "+mn(fo,U))}),pn("Map",n.call(U),qp,uo)}if(q(U)){var Up=[];return s&&s.call(U,function(fo){Up.push(mn(fo,U))}),pn("Set",a.call(U),Up,uo)}if(ue(U))return Ot("WeakMap");if(te(U))return Ot("WeakSet");if(ee(U))return Ot("WeakRef");if(H(U))return Ye(mn(Number(U)));if(Re(U))return Ye(mn(j.call(U)));if(ye(U))return Ye(h.call(U));if(ie(U))return Ye(mn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Qp<"u"&&U===Qp)return"{ [object globalThis] }";if(!L(U)&&!z(U)){var Ll=nr(U,mn),Kp=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,Vl=U instanceof Object?"":"null prototype",Yp=!Kp&&O&&Object(U)===U&&O in U?x.call(xe(U),8,-1):Vl?"Object":"",_S=Kp||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",$l=_S+(Yp||Vl?"["+k.call(C.call([],Yp||[],Vl||[]),": ")+"] ":"");return Ll.length===0?$l+"{}":uo?$l+"{"+tr(Ll,uo)+"}":$l+"{ "+k.call(Ll,", ")+" }"}return String(U)};function J(W,U,ze){var tt=ze.quoteStyle||U,st=X[tt];return st+W+st}function G(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!O||!(typeof W=="object"&&(O in W||typeof W[O]<"u"))}function Z(W){return xe(W)==="[object Array]"&&Y(W)}function L(W){return xe(W)==="[object Date]"&&Y(W)}function z(W){return xe(W)==="[object RegExp]"&&Y(W)}function K(W){return xe(W)==="[object Error]"&&Y(W)}function ie(W){return xe(W)==="[object String]"&&Y(W)}function H(W){return xe(W)==="[object Number]"&&Y(W)}function ye(W){return xe(W)==="[object Boolean]"&&Y(W)}function Te(W){if(P)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!F)return!1;try{return F.call(W),!0}catch{}return!1}function Re(W){if(!W||typeof W!="object"||!j)return!1;try{return j.call(W),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(W){return W in this};function se(W,U){return $e.call(W,U)}function xe(W){return g.call(W)}function le(W){if(W.name)return W.name;var U=v.call(m.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function be(W,U){if(W.indexOf)return W.indexOf(U);for(var ze=0,tt=W.length;ze<tt;ze++)if(W[ze]===U)return ze;return-1}function oe(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ee(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function te(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function me(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function Oe(W,U){if(W.length>U.maxStringLength){var ze=W.length-U.maxStringLength,tt="... "+ze+" more character"+(ze>1?"s":"");return Oe(x.call(W,0,U.maxStringLength),U)+tt}var st=Q[U.quoteStyle||"single"];st.lastIndex=0;var Me=b.call(b.call(W,st,"\\$1"),/[\x00-\x1f]/g,He);return J(Me,"single",U)}function He(W){var U=W.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return ze?"\\"+ze:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Ye(W){return"Object("+W+")"}function Ot(W){return W+" { ? }"}function pn(W,U,ze,tt){var st=tt?tr(ze,tt):k.call(ze,", ");return W+" ("+U+") {"+st+"}"}function En(W){for(var U=0;U<W.length;U++)if(be(W[U],`
1
+ "use strict";var MS=Object.defineProperty;var DS=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>DS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),y=require("react/jsx-runtime"),pa=require("react-dom");function Uy(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 R=Uy(E),Xs=Uy(pa);function Ky(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=Ky(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ky(e))&&(r&&(r+=" "),r+=t);return r}const Zp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xp=Yy,Jo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Zp(u)||Zp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[g,m]=h;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...c,d,p]:c},[]);return Xp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Qp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?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 zl,Jp;function ei(){return Jp||(Jp=1,zl=TypeError),zl}const NS={},FS=Object.freeze(Object.defineProperty({__proto__:null,default:NS},Symbol.toStringTag,{value:"Module"})),LS=jS(FS);var Bl,em;function Qs(){if(em)return Bl;em=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,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,P=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,F=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function j(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var tt=W<0?-P(-W):P(W);if(tt!==W){var st=String(tt),Me=x.call(U,st.length+1);return b.call(st,ze,"$&_")+"."+b.call(b.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,ze,"$&_")}var H=LS,_=H.custom,z=Te(_)?_:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Bl=function W(U,ze,tt,st){var Me=ze||{};if(se(Me,"quoteStyle")&&!se(X,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var rr=se(Me,"customInspect")?Me.customInspect:!0;if(typeof rr!="boolean"&&rr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _r=Me.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return Oe(U,Me);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var Zt=String(U);return _r?j(U,Zt):Zt}if(typeof U=="bigint"){var or=String(U)+"n";return _r?j(U,or):or}var Dl=typeof Me.depth>"u"?5:Me.depth;if(typeof tt>"u"&&(tt=0),tt>=Dl&&Dl>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var uo=er(Me,tt);if(typeof st>"u")st=[];else if(be(st,U)>=0)return"[Circular]";function mn(fo,Ia,OS){if(Ia&&(st=I.call(st),st.push(Ia)),OS){var Gp={depth:Me.depth};return se(Me,"quoteStyle")&&(Gp.quoteStyle=Me.quoteStyle),W(fo,Gp,tt+1,st)}return W(fo,Me,tt+1,st)}if(typeof U=="function"&&!$(U)){var Bp=le(U),Hp=nr(U,mn);return"[Function"+(Bp?": "+Bp:" (anonymous)")+"]"+(Hp.length>0?" { "+k.call(Hp,", ")+" }":"")}if(Te(U)){var Wp=A?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(U);return typeof U=="object"&&!A?Ye(Wp):Wp}if(me(U)){for(var xi="<"+w.call(String(U.nodeName)),jl=U.attributes||[],Aa=0;Aa<jl.length;Aa++)xi+=" "+jl[Aa].name+"="+J(G(jl[Aa].value),"double",Me);return xi+=">",U.childNodes&&U.childNodes.length&&(xi+="..."),xi+="</"+w.call(String(U.nodeName))+">",xi}if(Z(U)){if(U.length===0)return"[]";var Nl=nr(U,mn);return uo&&!En(Nl)?"["+tr(Nl,uo)+"]":"[ "+k.call(Nl,", ")+" ]"}if(K(U)){var Fl=nr(U,mn);return!("cause"in Error.prototype)&&"cause"in U&&!M.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+mn(U.cause),Fl),", ")+" }":Fl.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(Fl,", ")+" }"}if(typeof U=="object"&&rr){if(z&&typeof U[z]=="function"&&H)return H(U,{depth:Dl-tt});if(rr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(oe(U)){var qp=[];return r&&r.call(U,function(fo,Ia){qp.push(mn(Ia,U,!0)+" => "+mn(fo,U))}),pn("Map",n.call(U),qp,uo)}if(q(U)){var Up=[];return s&&s.call(U,function(fo){Up.push(mn(fo,U))}),pn("Set",a.call(U),Up,uo)}if(ue(U))return Ot("WeakMap");if(te(U))return Ot("WeakSet");if(ee(U))return Ot("WeakRef");if(B(U))return Ye(mn(Number(U)));if(Re(U))return Ye(mn(N.call(U)));if(ye(U))return Ye(h.call(U));if(ie(U))return Ye(mn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Qp<"u"&&U===Qp)return"{ [object globalThis] }";if(!V(U)&&!$(U)){var Ll=nr(U,mn),Kp=F?F(U)===Object.prototype:U instanceof Object||U.constructor===Object,Vl=U instanceof Object?"":"null prototype",Yp=!Kp&&O&&Object(U)===U&&O in U?x.call(xe(U),8,-1):Vl?"Object":"",_S=Kp||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",$l=_S+(Yp||Vl?"["+k.call(C.call([],Yp||[],Vl||[]),": ")+"] ":"");return Ll.length===0?$l+"{}":uo?$l+"{"+tr(Ll,uo)+"}":$l+"{ "+k.call(Ll,", ")+" }"}return String(U)};function J(W,U,ze){var tt=ze.quoteStyle||U,st=X[tt];return st+W+st}function G(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!O||!(typeof W=="object"&&(O in W||typeof W[O]<"u"))}function Z(W){return xe(W)==="[object Array]"&&Y(W)}function V(W){return xe(W)==="[object Date]"&&Y(W)}function $(W){return xe(W)==="[object RegExp]"&&Y(W)}function K(W){return xe(W)==="[object Error]"&&Y(W)}function ie(W){return xe(W)==="[object String]"&&Y(W)}function B(W){return xe(W)==="[object Number]"&&Y(W)}function ye(W){return xe(W)==="[object Boolean]"&&Y(W)}function Te(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}function Re(W){if(!W||typeof W!="object"||!N)return!1;try{return N.call(W),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(W){return W in this};function se(W,U){return $e.call(W,U)}function xe(W){return g.call(W)}function le(W){if(W.name)return W.name;var U=v.call(m.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function be(W,U){if(W.indexOf)return W.indexOf(U);for(var ze=0,tt=W.length;ze<tt;ze++)if(W[ze]===U)return ze;return-1}function oe(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ee(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function te(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function me(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function Oe(W,U){if(W.length>U.maxStringLength){var ze=W.length-U.maxStringLength,tt="... "+ze+" more character"+(ze>1?"s":"");return Oe(x.call(W,0,U.maxStringLength),U)+tt}var st=Q[U.quoteStyle||"single"];st.lastIndex=0;var Me=b.call(b.call(W,st,"\\$1"),/[\x00-\x1f]/g,He);return J(Me,"single",U)}function He(W){var U=W.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return ze?"\\"+ze:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Ye(W){return"Object("+W+")"}function Ot(W){return W+" { ? }"}function pn(W,U,ze,tt){var st=tt?tr(ze,tt):k.call(ze,", ");return W+" ("+U+") {"+st+"}"}function En(W){for(var U=0;U<W.length;U++)if(be(W[U],`
2
2
  `)>=0)return!1;return!0}function er(W,U){var ze;if(W.indent===" ")ze=" ";else if(typeof W.indent=="number"&&W.indent>0)ze=k.call(Array(W.indent+1)," ");else return null;return{base:ze,prev:k.call(Array(U+1),ze)}}function tr(W,U){if(W.length===0)return"";var ze=`
3
3
  `+U.prev+U.base;return ze+k.call(W,","+ze)+`
4
- `+U.prev}function nr(W,U){var ze=Z(W),tt=[];if(ze){tt.length=W.length;for(var st=0;st<W.length;st++)tt[st]=se(W,st)?U(W[st],W):""}var Me=typeof D=="function"?D(W):[],rr;if(P){rr={};for(var _r=0;_r<Me.length;_r++)rr["$"+Me[_r]]=Me[_r]}for(var Zt in W)se(W,Zt)&&(ze&&String(Number(Zt))===Zt&&Zt<W.length||P&&rr["$"+Zt]instanceof Symbol||(T.call(/[^\w$]/,Zt)?tt.push(U(Zt,W)+": "+U(W[Zt],W)):tt.push(Zt+": "+U(W[Zt],W))));if(typeof D=="function")for(var or=0;or<Me.length;or++)_.call(W,Me[or])&&tt.push("["+U(Me[or])+"]: "+U(W[Me[or]],W));return tt}return Bl}var Hl,tm;function VS(){if(tm)return Hl;tm=1;var e=Qs(),t=ei(),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 Hl=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,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},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},Hl}var Wl,nm;function Zy(){return nm||(nm=1,Wl=Object),Wl}var ql,rm;function $S(){return rm||(rm=1,ql=Error),ql}var Ul,om;function zS(){return om||(om=1,Ul=EvalError),Ul}var Kl,im;function BS(){return im||(im=1,Kl=RangeError),Kl}var Yl,am;function HS(){return am||(am=1,Yl=ReferenceError),Yl}var Gl,sm;function WS(){return sm||(sm=1,Gl=SyntaxError),Gl}var Zl,lm;function qS(){return lm||(lm=1,Zl=URIError),Zl}var Xl,cm;function US(){return cm||(cm=1,Xl=Math.abs),Xl}var Ql,um;function KS(){return um||(um=1,Ql=Math.floor),Ql}var Jl,dm;function YS(){return dm||(dm=1,Jl=Math.max),Jl}var ec,fm;function GS(){return fm||(fm=1,ec=Math.min),ec}var tc,pm;function ZS(){return pm||(pm=1,tc=Math.pow),tc}var nc,mm;function XS(){return mm||(mm=1,nc=Math.round),nc}var rc,hm;function QS(){return hm||(hm=1,rc=Number.isNaN||function(t){return t!==t}),rc}var oc,gm;function JS(){if(gm)return oc;gm=1;var e=QS();return oc=function(n){return e(n)||n===0?n:n<0?-1:1},oc}var ic,vm;function eT(){return vm||(vm=1,ic=Object.getOwnPropertyDescriptor),ic}var ac,ym;function Xy(){if(ym)return ac;ym=1;var e=eT();if(e)try{e([],"length")}catch{e=null}return ac=e,ac}var sc,xm;function tT(){if(xm)return sc;xm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return sc=e,sc}var lc,bm;function nT(){return bm||(bm=1,lc=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}),lc}var cc,wm;function rT(){if(wm)return cc;wm=1;var e=typeof Symbol<"u"&&Symbol,t=nT();return cc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},cc}var uc,Sm;function Qy(){return Sm||(Sm=1,uc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),uc}var dc,Tm;function Jy(){if(Tm)return dc;Tm=1;var e=Zy();return dc=e.getPrototypeOf||null,dc}var fc,Em;function oT(){if(Em)return fc;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 p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=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 fc=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,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),h=[],g=0;g<f;g++)h[g]="$"+g;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},fc}var pc,Cm;function Js(){if(Cm)return pc;Cm=1;var e=oT();return pc=Function.prototype.bind||e,pc}var mc,km;function Wd(){return km||(km=1,mc=Function.prototype.call),mc}var hc,Rm;function ex(){return Rm||(Rm=1,hc=Function.prototype.apply),hc}var gc,Pm;function iT(){return Pm||(Pm=1,gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),gc}var vc,Am;function aT(){if(Am)return vc;Am=1;var e=Js(),t=ex(),n=Wd(),r=iT();return vc=r||e.call(n,t),vc}var yc,Im;function tx(){if(Im)return yc;Im=1;var e=Js(),t=ei(),n=Wd(),r=aT();return yc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},yc}var xc,_m;function sT(){if(_m)return xc;_m=1;var e=tx(),t=Xy(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return xc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,xc}var bc,Om;function lT(){if(Om)return bc;Om=1;var e=Qy(),t=Jy(),n=sT();return bc=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,bc}var wc,Mm;function cT(){if(Mm)return wc;Mm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Js();return wc=n.call(e,t),wc}var Sc,Dm;function qd(){if(Dm)return Sc;Dm=1;var e,t=Zy(),n=$S(),r=zS(),o=BS(),i=HS(),a=WS(),s=ei(),l=qS(),c=US(),u=KS(),d=YS(),p=GS(),f=ZS(),h=XS(),g=JS(),m=Function,v=function(z){try{return m('"use strict"; return ('+z+").constructor;")()}catch{}},x=Xy(),b=tT(),S=function(){throw new s},w=x?function(){try{return arguments.callee,S}catch{try{return x(arguments,"callee").get}catch{return S}}}():S,T=rT()(),C=lT(),k=Jy(),I=Qy(),A=ex(),j=Wd(),D={},F=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%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%":D,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(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"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":F,"%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%":j,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(z){var O=C(C(z));P["%Error.prototype%"]=O}var _=function z(K){var ie;if(K==="%AsyncFunction%")ie=v("async function () {}");else if(K==="%GeneratorFunction%")ie=v("function* () {}");else if(K==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(K==="%AsyncGenerator%"){var H=z("%AsyncGeneratorFunction%");H&&(ie=H.prototype)}else if(K==="%AsyncIteratorPrototype%"){var ye=z("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[K]=ie,ie},V={__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"]},N=Js(),$=cT(),M=N.call(j,Array.prototype.concat),B=N.call(A,Array.prototype.splice),X=N.call(j,String.prototype.replace),Q=N.call(j,String.prototype.slice),J=N.call(j,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ie=Q(K,0,1),H=Q(K,-1);if(ie==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return X(K,G,function(Te,Re,$e,se){ye[ye.length]=$e?X(se,Y,"$1"):Re||Te}),ye},L=function(K,ie){var H=K,ye;if($(V,H)&&(ye=V[H],H="%"+ye[0]+"%"),$(P,H)){var Te=P[H];if(Te===D&&(Te=_(H)),typeof Te>"u"&&!ie)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:ye,name:H,value:Te}}throw new a("intrinsic "+K+" does not exist!")};return Sc=function(K,ie){if(typeof K!="string"||K.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=Z(K),ye=H.length>0?H[0]:"",Te=L("%"+ye+"%",ie),Re=Te.name,$e=Te.value,se=!1,xe=Te.alias;xe&&(ye=xe[0],B(H,M([0,1],xe)));for(var le=1,be=!0;le<H.length;le+=1){var oe=H[le],ue=Q(oe,0,1),ee=Q(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||ee==='"'||ee==="'"||ee==="`")&&ue!==ee)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!be)&&(se=!0),ye+="."+oe,Re="%"+ye+"%",$(P,Re))$e=P[Re];else if($e!=null){if(!(oe in $e)){if(!ie)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(x&&le+1>=H.length){var q=x($e,oe);be=!!q,be&&"get"in q&&!("originalValue"in q.get)?$e=q.get:$e=$e[oe]}else be=$($e,oe),$e=$e[oe];be&&!se&&(P[Re]=$e)}}return $e},Sc}var Tc,jm;function nx(){if(jm)return Tc;jm=1;var e=qd(),t=tx(),n=t([e("%String.prototype.indexOf%")]);return Tc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Tc}var Ec,Nm;function rx(){if(Nm)return Ec;Nm=1;var e=qd(),t=nx(),n=Qs(),r=ei(),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 Ec=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var h=l(d,f);return c(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},Ec}var Cc,Fm;function uT(){if(Fm)return Cc;Fm=1;var e=qd(),t=nx(),n=Qs(),r=rx(),o=ei(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Cc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!p&&p.has(h)},set:function(h,g){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,g)):r&&(p||(p=r()),p.set(h,g))}};return f}:r,Cc}var kc,Lm;function dT(){if(Lm)return kc;Lm=1;var e=ei(),t=Qs(),n=VS(),r=rx(),o=uT(),i=o||r||n;return kc=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},kc}var Vm=e=>Array.isArray(e),Rc=e=>e===void 0,Pc=e=>e===null,fT=Function.bind.call(Function.call,Object.prototype.toString),pT=e=>!!e&&fT(e)==="[object Error]"||e instanceof Error,ox=(e,t)=>e instanceof t,mT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},hT=e=>Object.prototype.toString.call(e)==="[object Date]"&&ox(e,Date),Ve={array:Vm,date:hT,empty:e=>Pc(e)||Rc(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:ox,isError:pT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Pc(e)||Rc(e),null:Pc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Vm(e)&&typeof e=="object",primitive:mT,string:e=>typeof e=="string",undefined:Rc},gT=e=>Object.keys(e),Cn=(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},vT=e=>e.replace(/[^0-9]/g,"");const Ud="-",yT=e=>{const t=bT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ud);return s[0]===""&&s.length!==1&&s.shift(),ix(s,t)||xT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},ix=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ix(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ud);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},$m=/^\[(.+)\]$/,xT=e=>{if($m.test(e)){const t=$m.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Mu(n[o],r,o,t);return r},Mu=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:zm(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(wT(o)){Mu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Mu(a,zm(t,i),n,r)})})},zm=(e,t)=>{let n=e;return t.split(Ud).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},wT=e=>e.isThemeGetter,ST=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Du="!",ju=":",TT=ju.length,ET=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let h=0;h<o.length;h++){let g=o[h];if(a===0&&s===0){if(g===ju){i.push(o.slice(l,h)),l=h+TT;continue}if(g==="/"){c=h;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=CT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+ju,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},CT=e=>e.endsWith(Du)?e.substring(0,e.length-1):e.startsWith(Du)?e.substring(1):e,kT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},RT=e=>({cache:ST(e.cacheSize),parseClassName:ET(e),sortModifiers:kT(e),...yT(e)}),PT=/\s+/,AT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(PT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!g,v=r(m?h.substring(0,g):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const x=i(p).join(":"),b=f?x+Du:x,S=b+v;if(a.includes(S))continue;a.push(S);const w=o(v,m);for(let T=0;T<w.length;++T){const C=w[T];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function IT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ax(t))&&(r&&(r+=" "),r+=n);return r}const ax=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ax(e[r]))&&(n&&(n+=" "),n+=t);return n};function _T(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=RT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=AT(l,n);return o(l,u),u}return function(){return i(IT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},sx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,OT=/^\d+\/\d+$/,MT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DT=/\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$/,jT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,NT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>OT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),Or=e=>!!e&&Number.isInteger(Number(e)),Bm=e=>e.endsWith("%")&&Le(e.slice(0,-1)),ir=e=>MT.test(e),LT=()=>!0,VT=e=>DT.test(e)&&!jT.test(e),Kd=()=>!1,$T=e=>NT.test(e),zT=e=>FT.test(e),BT=e=>!he(e)&&!ge(e),HT=e=>ti(e,dx,Kd),he=e=>sx.test(e),Mr=e=>ti(e,fx,VT),Ac=e=>ti(e,eE,Le),WT=e=>ti(e,cx,Kd),qT=e=>ti(e,ux,zT),UT=e=>ti(e,Kd,$T),ge=e=>lx.test(e),_a=e=>ni(e,fx),KT=e=>ni(e,tE),YT=e=>ni(e,cx),GT=e=>ni(e,dx),ZT=e=>ni(e,ux),XT=e=>ni(e,nE,!0),ti=(e,t,n)=>{const r=sx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ni=(e,t,n=!1)=>{const r=lx.exec(e);return r?r[1]?t(r[1]):n:!1},cx=e=>e==="position",QT=new Set(["image","url"]),ux=e=>QT.has(e),JT=new Set(["length","size","percentage"]),dx=e=>JT.has(e),fx=e=>e==="length",eE=e=>e==="number",tE=e=>e==="family-name",nE=e=>e==="shadow",rE=()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),h=It("perspective"),g=It("aspect"),m=It("ease"),v=It("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ge,he,l],C=()=>[po,"full","auto",...T()],k=()=>[Or,"none","subgrid",ge,he],I=()=>["auto",{span:["full",Or,ge,he]},ge,he],A=()=>[Or,"auto",ge,he],j=()=>["auto","min","max","fr",ge,he],D=()=>["start","end","center","between","around","evenly","stretch","baseline"],F=()=>["start","end","center","stretch"],P=()=>["auto",...T()],O=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],_=()=>[e,ge,he],V=()=>[Bm,Mr],N=()=>["","none","full",c,ge,he],$=()=>["",Le,_a,Mr],M=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,ge,he],Q=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,he],J=()=>["none",Le,ge,he],G=()=>["none",Le,ge,he],Y=()=>[Le,ge,he],Z=()=>[po,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ir],breakpoint:[ir],color:[LT],container:[ir],"drop-shadow":[ir],ease:["in","out","in-out"],font:[BT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ir],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ir],shadow:[ir],spacing:["px",Le],text:[ir],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,he,ge,g]}],container:["container"],columns:[{columns:[Le,he,ge,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),he,ge]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Or,"auto",ge,he]}],basis:[{basis:[po,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,po,"auto","initial","none",he]}],grow:[{grow:["",Le,ge,he]}],shrink:[{shrink:["",Le,ge,he]}],order:[{order:[Or,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...F(),"baseline"]}],"align-self":[{self:["auto",...F(),"baseline"]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,_a,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,he]}],"font-family":[{font:[KT,he,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,ge,he]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Ac]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Mr]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),YT,WT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",GT,HT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Or,ge,he],radial:["",ge,he],conic:[Or,ge,he]},ZT,qT]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,he]}],"outline-w":[{outline:["",Le,_a,Mr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,XT,UT]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",ge,he,d]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Le,Mr]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":_()}],opacity:[{opacity:[Le,ge,he]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",ge,he]}],blur:[{blur:X()}],brightness:[{brightness:[Le,ge,he]}],contrast:[{contrast:[Le,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,he]}],grayscale:[{grayscale:["",Le,ge,he]}],"hue-rotate":[{"hue-rotate":[Le,ge,he]}],invert:[{invert:["",Le,ge,he]}],saturate:[{saturate:[Le,ge,he]}],sepia:[{sepia:["",Le,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,he]}],ease:[{ease:["linear","initial",m,ge,he]}],delay:[{delay:[Le,ge,he]}],animate:[{animate:["none",v,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,he]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"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",ge,he]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",ge,he]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Le,_a,Mr,Ac]}],stroke:[{stroke:["none",..._()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},oE=_T(rE),Un=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},iE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Yd=e=>Ve.function(e),Ie=(...e)=>oE(Yy(e)),px=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ma=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},mx=e=>e.scrollHeight>e.clientHeight,qi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},aE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},sE="span",un=E.forwardRef(function(t,n){const r=t.as||sE;return y.jsx(r,{ref:n,...t,as:void 0})}),lE={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"},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-primary text-primary-foreground",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"}},cE=Jo("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:lE,defaultVariants:{theme:"main",size:"default",rounded:"default"}}),el=E.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 y.jsxs(un,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Ie(cE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Ur=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function uE(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 dE=({children:e,...t})=>{const n=Ur(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:uE(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),y.jsx("div",{...t,ref:r,children:o?e:null})},fE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},pE=Jo("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"}}}),mE=Jo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:fE,defaultVariants:{theme:"primary",size:"default"}}),Gd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return y.jsxs(un,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ie(mE({size:a,theme:i}),t),children:[n?y.jsx("span",{"aria-hidden":"true",className:pE({theme:n})}):null,r,s.children]})}),Ui=E.createContext({});function wn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zd=typeof window<"u",tl=Zd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class hE extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function gE({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
4
+ `+U.prev}function nr(W,U){var ze=Z(W),tt=[];if(ze){tt.length=W.length;for(var st=0;st<W.length;st++)tt[st]=se(W,st)?U(W[st],W):""}var Me=typeof D=="function"?D(W):[],rr;if(A){rr={};for(var _r=0;_r<Me.length;_r++)rr["$"+Me[_r]]=Me[_r]}for(var Zt in W)se(W,Zt)&&(ze&&String(Number(Zt))===Zt&&Zt<W.length||A&&rr["$"+Zt]instanceof Symbol||(T.call(/[^\w$]/,Zt)?tt.push(U(Zt,W)+": "+U(W[Zt],W)):tt.push(Zt+": "+U(W[Zt],W))));if(typeof D=="function")for(var or=0;or<Me.length;or++)M.call(W,Me[or])&&tt.push("["+U(Me[or])+"]: "+U(W[Me[or]],W));return tt}return Bl}var Hl,tm;function VS(){if(tm)return Hl;tm=1;var e=Qs(),t=ei(),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 Hl=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,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},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},Hl}var Wl,nm;function Zy(){return nm||(nm=1,Wl=Object),Wl}var ql,rm;function $S(){return rm||(rm=1,ql=Error),ql}var Ul,om;function zS(){return om||(om=1,Ul=EvalError),Ul}var Kl,im;function BS(){return im||(im=1,Kl=RangeError),Kl}var Yl,am;function HS(){return am||(am=1,Yl=ReferenceError),Yl}var Gl,sm;function WS(){return sm||(sm=1,Gl=SyntaxError),Gl}var Zl,lm;function qS(){return lm||(lm=1,Zl=URIError),Zl}var Xl,cm;function US(){return cm||(cm=1,Xl=Math.abs),Xl}var Ql,um;function KS(){return um||(um=1,Ql=Math.floor),Ql}var Jl,dm;function YS(){return dm||(dm=1,Jl=Math.max),Jl}var ec,fm;function GS(){return fm||(fm=1,ec=Math.min),ec}var tc,pm;function ZS(){return pm||(pm=1,tc=Math.pow),tc}var nc,mm;function XS(){return mm||(mm=1,nc=Math.round),nc}var rc,hm;function QS(){return hm||(hm=1,rc=Number.isNaN||function(t){return t!==t}),rc}var oc,gm;function JS(){if(gm)return oc;gm=1;var e=QS();return oc=function(n){return e(n)||n===0?n:n<0?-1:1},oc}var ic,vm;function eT(){return vm||(vm=1,ic=Object.getOwnPropertyDescriptor),ic}var ac,ym;function Xy(){if(ym)return ac;ym=1;var e=eT();if(e)try{e([],"length")}catch{e=null}return ac=e,ac}var sc,xm;function tT(){if(xm)return sc;xm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return sc=e,sc}var lc,bm;function nT(){return bm||(bm=1,lc=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}),lc}var cc,wm;function rT(){if(wm)return cc;wm=1;var e=typeof Symbol<"u"&&Symbol,t=nT();return cc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},cc}var uc,Sm;function Qy(){return Sm||(Sm=1,uc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),uc}var dc,Tm;function Jy(){if(Tm)return dc;Tm=1;var e=Zy();return dc=e.getPrototypeOf||null,dc}var fc,Em;function oT(){if(Em)return fc;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 p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=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 fc=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,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),h=[],g=0;g<f;g++)h[g]="$"+g;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},fc}var pc,Cm;function Js(){if(Cm)return pc;Cm=1;var e=oT();return pc=Function.prototype.bind||e,pc}var mc,km;function Wd(){return km||(km=1,mc=Function.prototype.call),mc}var hc,Rm;function ex(){return Rm||(Rm=1,hc=Function.prototype.apply),hc}var gc,Pm;function iT(){return Pm||(Pm=1,gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),gc}var vc,Am;function aT(){if(Am)return vc;Am=1;var e=Js(),t=ex(),n=Wd(),r=iT();return vc=r||e.call(n,t),vc}var yc,Im;function tx(){if(Im)return yc;Im=1;var e=Js(),t=ei(),n=Wd(),r=aT();return yc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},yc}var xc,_m;function sT(){if(_m)return xc;_m=1;var e=tx(),t=Xy(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return xc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,xc}var bc,Om;function lT(){if(Om)return bc;Om=1;var e=Qy(),t=Jy(),n=sT();return bc=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,bc}var wc,Mm;function cT(){if(Mm)return wc;Mm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Js();return wc=n.call(e,t),wc}var Sc,Dm;function qd(){if(Dm)return Sc;Dm=1;var e,t=Zy(),n=$S(),r=zS(),o=BS(),i=HS(),a=WS(),s=ei(),l=qS(),c=US(),u=KS(),d=YS(),p=GS(),f=ZS(),h=XS(),g=JS(),m=Function,v=function($){try{return m('"use strict"; return ('+$+").constructor;")()}catch{}},x=Xy(),b=tT(),S=function(){throw new s},w=x?function(){try{return arguments.callee,S}catch{try{return x(arguments,"callee").get}catch{return S}}}():S,T=rT()(),C=lT(),k=Jy(),I=Qy(),P=ex(),N=Wd(),D={},L=typeof Uint8Array>"u"||!C?e:C(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%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%":D,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(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"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":L,"%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%":N,"%Function.prototype.apply%":P,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch($){var O=C(C($));A["%Error.prototype%"]=O}var M=function $(K){var ie;if(K==="%AsyncFunction%")ie=v("async function () {}");else if(K==="%GeneratorFunction%")ie=v("function* () {}");else if(K==="%AsyncGeneratorFunction%")ie=v("async function* () {}");else if(K==="%AsyncGenerator%"){var B=$("%AsyncGeneratorFunction%");B&&(ie=B.prototype)}else if(K==="%AsyncIteratorPrototype%"){var ye=$("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return A[K]=ie,ie},F={__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"]},j=Js(),H=cT(),_=j.call(N,Array.prototype.concat),z=j.call(P,Array.prototype.splice),X=j.call(N,String.prototype.replace),Q=j.call(N,String.prototype.slice),J=j.call(N,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ie=Q(K,0,1),B=Q(K,-1);if(ie==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return X(K,G,function(Te,Re,$e,se){ye[ye.length]=$e?X(se,Y,"$1"):Re||Te}),ye},V=function(K,ie){var B=K,ye;if(H(F,B)&&(ye=F[B],B="%"+ye[0]+"%"),H(A,B)){var Te=A[B];if(Te===D&&(Te=M(B)),typeof Te>"u"&&!ie)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:ye,name:B,value:Te}}throw new a("intrinsic "+K+" does not exist!")};return Sc=function(K,ie){if(typeof K!="string"||K.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Z(K),ye=B.length>0?B[0]:"",Te=V("%"+ye+"%",ie),Re=Te.name,$e=Te.value,se=!1,xe=Te.alias;xe&&(ye=xe[0],z(B,_([0,1],xe)));for(var le=1,be=!0;le<B.length;le+=1){var oe=B[le],ue=Q(oe,0,1),ee=Q(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||ee==='"'||ee==="'"||ee==="`")&&ue!==ee)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!be)&&(se=!0),ye+="."+oe,Re="%"+ye+"%",H(A,Re))$e=A[Re];else if($e!=null){if(!(oe in $e)){if(!ie)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(x&&le+1>=B.length){var q=x($e,oe);be=!!q,be&&"get"in q&&!("originalValue"in q.get)?$e=q.get:$e=$e[oe]}else be=H($e,oe),$e=$e[oe];be&&!se&&(A[Re]=$e)}}return $e},Sc}var Tc,jm;function nx(){if(jm)return Tc;jm=1;var e=qd(),t=tx(),n=t([e("%String.prototype.indexOf%")]);return Tc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Tc}var Ec,Nm;function rx(){if(Nm)return Ec;Nm=1;var e=qd(),t=nx(),n=Qs(),r=ei(),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 Ec=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var h=l(d,f);return c(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},Ec}var Cc,Fm;function uT(){if(Fm)return Cc;Fm=1;var e=qd(),t=nx(),n=Qs(),r=rx(),o=ei(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Cc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!p&&p.has(h)},set:function(h,g){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,g)):r&&(p||(p=r()),p.set(h,g))}};return f}:r,Cc}var kc,Lm;function dT(){if(Lm)return kc;Lm=1;var e=ei(),t=Qs(),n=VS(),r=rx(),o=uT(),i=o||r||n;return kc=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},kc}var Vm=e=>Array.isArray(e),Rc=e=>e===void 0,Pc=e=>e===null,fT=Function.bind.call(Function.call,Object.prototype.toString),pT=e=>!!e&&fT(e)==="[object Error]"||e instanceof Error,ox=(e,t)=>e instanceof t,mT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},hT=e=>Object.prototype.toString.call(e)==="[object Date]"&&ox(e,Date),Ve={array:Vm,date:hT,empty:e=>Pc(e)||Rc(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:ox,isError:pT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Pc(e)||Rc(e),null:Pc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Vm(e)&&typeof e=="object",primitive:mT,string:e=>typeof e=="string",undefined:Rc},gT=e=>Object.keys(e),Cn=(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},vT=e=>e.replace(/[^0-9]/g,"");const Ud="-",yT=e=>{const t=bT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ud);return s[0]===""&&s.length!==1&&s.shift(),ix(s,t)||xT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},ix=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ix(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ud);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},$m=/^\[(.+)\]$/,xT=e=>{if($m.test(e)){const t=$m.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Mu(n[o],r,o,t);return r},Mu=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:zm(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(wT(o)){Mu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Mu(a,zm(t,i),n,r)})})},zm=(e,t)=>{let n=e;return t.split(Ud).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},wT=e=>e.isThemeGetter,ST=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Du="!",ju=":",TT=ju.length,ET=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let h=0;h<o.length;h++){let g=o[h];if(a===0&&s===0){if(g===ju){i.push(o.slice(l,h)),l=h+TT;continue}if(g==="/"){c=h;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=CT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+ju,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},CT=e=>e.endsWith(Du)?e.substring(0,e.length-1):e.startsWith(Du)?e.substring(1):e,kT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},RT=e=>({cache:ST(e.cacheSize),parseClassName:ET(e),sortModifiers:kT(e),...yT(e)}),PT=/\s+/,AT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(PT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!g,v=r(m?h.substring(0,g):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const x=i(p).join(":"),b=f?x+Du:x,S=b+v;if(a.includes(S))continue;a.push(S);const w=o(v,m);for(let T=0;T<w.length;++T){const C=w[T];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function IT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ax(t))&&(r&&(r+=" "),r+=n);return r}const ax=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ax(e[r]))&&(n&&(n+=" "),n+=t);return n};function _T(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=RT(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=AT(l,n);return o(l,u),u}return function(){return i(IT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},sx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,OT=/^\d+\/\d+$/,MT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DT=/\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$/,jT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,NT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>OT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),Or=e=>!!e&&Number.isInteger(Number(e)),Bm=e=>e.endsWith("%")&&Le(e.slice(0,-1)),ir=e=>MT.test(e),LT=()=>!0,VT=e=>DT.test(e)&&!jT.test(e),Kd=()=>!1,$T=e=>NT.test(e),zT=e=>FT.test(e),BT=e=>!he(e)&&!ge(e),HT=e=>ti(e,dx,Kd),he=e=>sx.test(e),Mr=e=>ti(e,fx,VT),Ac=e=>ti(e,eE,Le),WT=e=>ti(e,cx,Kd),qT=e=>ti(e,ux,zT),UT=e=>ti(e,Kd,$T),ge=e=>lx.test(e),_a=e=>ni(e,fx),KT=e=>ni(e,tE),YT=e=>ni(e,cx),GT=e=>ni(e,dx),ZT=e=>ni(e,ux),XT=e=>ni(e,nE,!0),ti=(e,t,n)=>{const r=sx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ni=(e,t,n=!1)=>{const r=lx.exec(e);return r?r[1]?t(r[1]):n:!1},cx=e=>e==="position",QT=new Set(["image","url"]),ux=e=>QT.has(e),JT=new Set(["length","size","percentage"]),dx=e=>JT.has(e),fx=e=>e==="length",eE=e=>e==="number",tE=e=>e==="family-name",nE=e=>e==="shadow",rE=()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),h=It("perspective"),g=It("aspect"),m=It("ease"),v=It("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ge,he,l],C=()=>[po,"full","auto",...T()],k=()=>[Or,"none","subgrid",ge,he],I=()=>["auto",{span:["full",Or,ge,he]},ge,he],P=()=>[Or,"auto",ge,he],N=()=>["auto","min","max","fr",ge,he],D=()=>["start","end","center","between","around","evenly","stretch","baseline"],L=()=>["start","end","center","stretch"],A=()=>["auto",...T()],O=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],M=()=>[e,ge,he],F=()=>[Bm,Mr],j=()=>["","none","full",c,ge,he],H=()=>["",Le,_a,Mr],_=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,ge,he],Q=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,he],J=()=>["none",Le,ge,he],G=()=>["none",Le,ge,he],Y=()=>[Le,ge,he],Z=()=>[po,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ir],breakpoint:[ir],color:[LT],container:[ir],"drop-shadow":[ir],ease:["in","out","in-out"],font:[BT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ir],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ir],shadow:[ir],spacing:["px",Le],text:[ir],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,he,ge,g]}],container:["container"],columns:[{columns:[Le,he,ge,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),he,ge]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Or,"auto",ge,he]}],basis:[{basis:[po,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,po,"auto","initial","none",he]}],grow:[{grow:["",Le,ge,he]}],shrink:[{shrink:["",Le,ge,he]}],order:[{order:[Or,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...L(),"baseline"]}],"align-self":[{self:["auto",...L(),"baseline"]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,_a,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,he]}],"font-family":[{font:[KT,he,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,ge,he]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Ac]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Mr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),YT,WT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",GT,HT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Or,ge,he],radial:["",ge,he],conic:[Or,ge,he]},ZT,qT]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"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:[..._(),"hidden","none"]}],"divide-style":[{divide:[..._(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[..._(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,he]}],"outline-w":[{outline:["",Le,_a,Mr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,XT,UT]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",ge,he,d]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Le,Mr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":M()}],opacity:[{opacity:[Le,ge,he]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none",ge,he]}],blur:[{blur:X()}],brightness:[{brightness:[Le,ge,he]}],contrast:[{contrast:[Le,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,he]}],grayscale:[{grayscale:["",Le,ge,he]}],"hue-rotate":[{"hue-rotate":[Le,ge,he]}],invert:[{invert:["",Le,ge,he]}],saturate:[{saturate:[Le,ge,he]}],sepia:[{sepia:["",Le,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,he]}],ease:[{ease:["linear","initial",m,ge,he]}],delay:[{delay:[Le,ge,he]}],animate:[{animate:["none",v,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,he]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"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",ge,he]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",ge,he]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Le,_a,Mr,Ac]}],stroke:[{stroke:["none",...M()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},oE=_T(rE),Un=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},iE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Yd=e=>Ve.function(e),Ie=(...e)=>oE(Yy(e)),px=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ma=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},mx=e=>e.scrollHeight>e.clientHeight,qi=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},aE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},sE="span",un=E.forwardRef(function(t,n){const r=t.as||sE;return y.jsx(r,{ref:n,...t,as:void 0})}),lE={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"},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-primary text-primary-foreground",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"}},cE=Jo("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:lE,defaultVariants:{theme:"main",size:"default",rounded:"default"}}),el=E.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 y.jsxs(un,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Ie(cE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Ur=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function uE(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 dE=({children:e,...t})=>{const n=Ur(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:uE(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),y.jsx("div",{...t,ref:r,children:o?e:null})},fE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},pE=Jo("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"}}}),mE=Jo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:fE,defaultVariants:{theme:"primary",size:"default"}}),Gd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return y.jsxs(un,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ie(mE({size:a,theme:i}),t),children:[n?y.jsx("span",{"aria-hidden":"true",className:pE({theme:n})}):null,r,s.children]})}),Ui=E.createContext({});function wn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zd=typeof window<"u",tl=Zd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class hE extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function gE({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
5
5
  [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
@@ -9,7 +9,7 @@
9
9
  ${p}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(f)}},[t]),y.jsx(hE,{isPresent:t,childRef:o,sizeRef:i,children:R.cloneElement(e,{ref:o})})}const vE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=wn(yE),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=y.jsx(gE,{isPresent:n,anchorX:s,children:e})),y.jsx(nl.Provider,{value:d,children:e})};function yE(){return new Map}function hx(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Oa=e=>e.key||"";function Hm(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const wr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=hx(a),u=E.useMemo(()=>Hm(e),[e]),d=a&&!l?[]:u.map(Oa),p=E.useRef(!0),f=E.useRef(u),h=wn(()=>new Map),[g,m]=E.useState(u),[v,x]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const T=Oa(v[w]);d.includes(T)?h.delete(T):h.get(T)!==!0&&h.set(T,!1)}},[v,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let T=0;T<v.length;T++){const C=v[T],k=Oa(C);d.includes(k)||(w.splice(T,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),x(Hm(w)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=E.useContext(Ui);return y.jsx(y.Fragment,{children:v.map(w=>{const T=Oa(w),C=a&&!l?!1:u===v||d.includes(T),k=()=>{if(h.has(T))h.set(T,!0);else return;let I=!0;h.forEach(A=>{A||(I=!1)}),I&&(S==null||S(),x(f.current),a&&(c==null||c()),r&&r())};return y.jsx(vE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},T)})})},xE=E.createContext(null),Kt=e=>e;let ri=Kt,fn=Kt;process.env.NODE_ENV!=="production"&&(ri=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},fn=(e,t)=>{if(!e)throw new Error(t)});const bE={useManualTiming:!1},Ma=["read","resolveKeyframes","update","preRender","render","postRender"];function wE(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,p=!1)=>{const h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.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 SE=40;function gx(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ma.reduce((v,x)=>(v[x]=wE(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,SE),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Ma.reduce((v,x)=>{const b=a[x];return v[x]=(S,w=!1,T=!1)=>(n||h(),b.schedule(S,w,T)),v},{}),cancel:v=>{for(let x=0;x<Ma.length;x++)a[Ma[x]].cancel(v)},state:o,steps:a}}const{schedule:rt,cancel:Kn,state:Mt,steps:Ic}=gx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Kt,!0);function TE(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function EE(){const e=TE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>rt.postRender(r),[r]),t]}const CE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(CE);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 vx=e=>e===!0,kE=e=>vx(e===!0)||e==="id",RE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ui),o=E.useContext(xE),[i,a]=EE(),s=E.useRef(null),l=r.id||o;s.current===null&&(kE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:vx(n)&&r.group||Wm()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return y.jsx(Ui.Provider,{value:c,children:e})},yx=E.createContext({strict:!1}),qm={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"]},jo={};for(const e in qm)jo[e]={isEnabled:t=>qm[e].some(n=>!!t[n])};function PE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const AE=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 cs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AE.has(e)}let xx=e=>!cs(e);function bx(e){e&&(xx=t=>t.startsWith("on")?!cs(t):e(t))}try{bx(require("@emotion/is-prop-valid").default)}catch{}function IE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(xx(o)||n===!0&&cs(o)||!t&&!cs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _E({children:e,isValidProp:t,...n}){t&&bx(t),n={...E.useContext(Do),...n},n.isStatic=wn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return y.jsx(Do.Provider,{value:r,children:e})}const Um=new Set;function rl(e,t,n){e||Um.has(t)||(console.warn(t),Um.add(t))}function OE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ki(e){return typeof e=="string"||Array.isArray(e)}const Xd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qd=["initial",...Xd];function al(e){return il(e.animate)||Qd.some(t=>Ki(e[t]))}function wx(e){return!!(al(e)||e.variants)}function ME(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ki(n)?n:void 0,animate:Ki(r)?r:void 0}}return e.inherit!==!1?t:{}}function DE(e){const{initial:t,animate:n}=ME(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[Km(t),Km(n)])}function Km(e){return Array.isArray(e)?e.join(" "):e}const jE=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function NE(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):wo(n)&&(n.current=r))},[t])}const{schedule:Jd}=gx(queueMicrotask,!1),ef=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),FE="framerAppearId",Sx="data-"+ef(FE),Tx=E.createContext({});function LE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),l=E.useContext(yx),c=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(Tx);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&VE(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const g=n[Sx],m=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Jd.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),m.current=!1))}),p}function VE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ex(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&wo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Ex(e){if(e)return e.options.allowProjection!==!1?e.projection:Ex(e.parent)}function $E({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&PE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:zE(c)},{isStatic:f}=p,h=DE(c),g=r(c,f);if(!f&&Zd){BE(p,e);const m=HE(p);d=m.MeasureLayout,h.visualElement=LE(o,g,p,t,m.ProjectionNode)}return y.jsxs(ol.Provider,{value:h,children:[d&&h.visualElement?y.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,NE(g,h.visualElement,u),g,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[jE]=o,l}function zE({layoutId:e}){const t=E.useContext(Ui).id;return t&&e!==void 0?t+"-"+e:e}function BE(e,t){const n=E.useContext(yx).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?ri(!1,r):fn(!1,r)}}function HE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Cx=e=>t=>typeof t=="string"&&t.startsWith(e),tf=Cx("--"),WE=Cx("var(--"),nf=e=>WE(e)?qE.test(e.split("/*")[0].trim()):!1,qE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yi={};function UE(e){for(const t in e)Yi[t]=e[t],tf(t)&&(Yi[t].isCSSVariable=!0)}const oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ro=new Set(oi);function kx(e,{layout:t,layoutId:n}){return ro.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yi[e]||e==="opacity")}const At=e=>!!(e&&e.getVelocity),Rx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Yn=(e,t,n)=>n>t?t:n<e?e:n,ii={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gi={...ii,transform:e=>Yn(0,1,e)},Da={...ii,default:1},ha=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sr=ha("deg"),Mn=ha("%"),Se=ha("px"),KE=ha("vh"),YE=ha("vw"),Ym={...Mn,parse:e=>Mn.parse(e)/100,transform:e=>Mn.transform(e*100)},GE={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,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},ZE={rotate:sr,rotateX:sr,rotateY:sr,rotateZ:sr,scale:Da,scaleX:Da,scaleY:Da,scaleZ:Da,skew:sr,skewX:sr,skewY:sr,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Gi,originX:Ym,originY:Ym,originZ:Se},Gm={...ii,transform:Math.round},rf={...GE,...ZE,zIndex:Gm,size:Se,fillOpacity:Gi,strokeOpacity:Gi,numOctaves:Gm},XE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QE=oi.length;function JE(e,t,n){let r="",o=!0;for(let i=0;i<QE;i++){const a=oi[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=Rx(s,rf[a]);if(!l){o=!1;const u=XE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function of(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(ro.has(l)){a=!0;continue}else if(tf(l)){o[l]=c;continue}else{const u=Rx(c,rf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=JE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const af=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Px(e,t,n){for(const r in t)!At(t[r])&&!kx(r,n)&&(e[r]=t[r])}function eC({transformTemplate:e},t){return E.useMemo(()=>{const n=af();return of(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tC(e,t){const n=e.style||{},r={};return Px(r,n,e),Object.assign(r,eC(e,t)),r}function nC(e,t){const n={},r=tC(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 rC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sf(e){return typeof e!="string"||e.includes("-")?!1:!!(rC.indexOf(e)>-1||/[A-Z]/u.test(e))}const oC={offset:"stroke-dashoffset",array:"stroke-dasharray"},iC={offset:"strokeDashoffset",array:"strokeDasharray"};function aC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?oC:iC;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function Zm(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function sC(e,t,n){const r=Zm(t,e.x,e.width),o=Zm(n,e.y,e.height);return`${r} ${o}`}function lf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(of(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=sC(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&aC(p,a,s,l,!1)}const Ax=()=>({...af(),attrs:{}}),cf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lC(e,t,n,r){const o=E.useMemo(()=>{const i=Ax();return lf(i,t,cf(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Px(i,e.style,e),o.style={...i,...o.style}}return o}function cC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(sf(n)?lC:nC)(r,i,a,n),c=IE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>At(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Xm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uf(e,t,n,r){if(typeof t=="function"){const[o,i]=Xm(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]=Xm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Nu=e=>Array.isArray(e),uC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),dC=e=>Nu(e)?e[e.length-1]||0:e;function es(e){const t=At(e)?e.get():e;return uC(t)?t.toValue():t}function fC({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:pC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const Ix=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>fC(e,t,r,o);return n?i():wn(i)};function pC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=es(i[p]);let{initial:a,animate:s}=e;const l=al(e),c=wx(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"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=uf(e,p[f]);if(h){const{transitionEnd:g,transition:m,...v}=h;for(const x in v){let b=v[x];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[x]=b)}for(const x in g)o[x]=g[x]}}}return o}function df(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(At(o[a])||t.style&&At(t.style[a])||kx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const mC={useVisualState:Ix({scrapeMotionValuesFromProps:df,createRenderState:af})};function _x(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Ox(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Mx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Dx(e,t,n,r){Ox(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Mx.has(o)?o:ef(o),t.attrs[o])}function jx(e,t,n){const r=df(e,t,n);for(const o in e)if(At(e[o])||At(t[o])){const i=oi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Qm=["x","y","width","height","cx","cy","r"],hC={useVisualState:Ix({scrapeMotionValuesFromProps:jx,createRenderState:Ax,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(ro.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Qm.length;s++){const l=Qm[s];e[l]!==t[l]&&(a=!0)}a&&rt.read(()=>{_x(n,r),rt.render(()=>{lf(r,o,cf(n.tagName),e.transformTemplate),Dx(n,r)})})}})};function gC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...sf(r)?hC:mC,preloadedFeatures:e,useRender:cC(o),createVisualElement:t,Component:r};return $E(a)}}function Zi(e,t,n){const r=e.getProps();return uf(r,t,n!==void 0?n:r.custom,e)}function ff(e,t){return e?e[t]||e.default||e:void 0}const Nx=new Set(["width","height","top","left","right","bottom",...oi]);function pf(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function vC([...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}class mf{constructor(){this.subscriptions=[]}add(t){return pf(this.subscriptions,t),()=>sl(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}}function Fx(e,t){return t?e*(1e3/t):0}let ts;function yC(){ts=void 0}const Dn={now:()=>(ts===void 0&&Dn.set(Mt.isProcessing||bE.useManualTiming?Mt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(yC)}},Jm=30,xC=e=>!isNaN(parseFloat(e)),_i={current:void 0};class bC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Dn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 mf);const r=this.events[t].add(n);return t==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return _i.current&&_i.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Jm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Jm);return Fx(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new bC(e,t)}function wC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function SC(e,t){const n=Zi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=dC(i[a]);wC(e,a,s)}}function TC(e){return!!(At(e)&&e.add)}function Fu(e,t){const n=e.getValue("willChange");if(TC(n))return n.add(t)}function Lx(e){return e.props[Sx]}function hf(e){let t;return()=>(t===void 0&&(t=e()),t)}const EC=hf(()=>window.ScrollTimeline!==void 0);class CC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(EC()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Vx extends CC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const xn=e=>e*1e3,jn=e=>e/1e3;function ll(e){return typeof e=="function"}function eh(e,t){e.timeline=t,e.onfinish=null}const gf=e=>Array.isArray(e)&&typeof e[0]=="number",kC={linearEasing:void 0};function RC(e,t){const n=hf(e);return()=>{var r;return(r=kC[t])!==null&&r!==void 0?r:n()}}const us=RC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Kr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$x=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Kr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function zx(e){return!!(typeof e=="function"&&us()||!e||typeof e=="string"&&(e in Lu||us())||gf(e)||Array.isArray(e)&&e.every(zx))}const Ei=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ei([0,.65,.55,1]),circOut:Ei([.55,0,1,.45]),backIn:Ei([.31,.01,.66,-.59]),backOut:Ei([.33,1.53,.69,.99])};function Bx(e,t){if(e)return typeof e=="function"&&us()?$x(e,t):gf(e)?Ei(e):Array.isArray(e)?e.map(n=>Bx(n,t)||Lu.easeOut):Lu[e]}const Hx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,PC=1e-7,AC=12;function IC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Hx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>PC&&++s<AC);return a}function ga(e,t,n,r){if(e===t&&n===r)return Kt;const o=i=>IC(i,0,1,e,n);return i=>i===0||i===1?i:Hx(o(i),t,r)}const Wx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qx=e=>t=>1-e(1-t),Ux=ga(.33,1.53,.69,.99),vf=qx(Ux),Kx=Wx(vf),Yx=e=>(e*=2)<1?.5*vf(e):.5*(2-Math.pow(2,-10*(e-1))),yf=e=>1-Math.sin(Math.acos(e)),Gx=qx(yf),Zx=Wx(yf),Xx=e=>/^0[^.\s]+$/u.test(e);function _C(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xx(e):!0}const Oi=e=>Math.round(e*1e5)/1e5,xf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function OC(e){return e==null}const MC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bf=(e,t)=>n=>!!(typeof n=="string"&&MC.test(n)&&n.startsWith(e)||t&&!OC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Qx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(xf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},DC=e=>Yn(0,255,e),_c={...ii,transform:e=>Math.round(DC(e))},zr={test:bf("rgb","red"),parse:Qx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_c.transform(e)+", "+_c.transform(t)+", "+_c.transform(n)+", "+Oi(Gi.transform(r))+")"};function jC(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 Vu={test:bf("#"),parse:jC,transform:zr.transform},So={test:bf("hsl","hue"),parse:Qx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mn.transform(Oi(t))+", "+Mn.transform(Oi(n))+", "+Oi(Gi.transform(r))+")"},Nt={test:e=>zr.test(e)||Vu.test(e)||So.test(e),parse:e=>zr.test(e)?zr.parse(e):So.test(e)?So.parse(e):Vu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zr.transform(e):So.transform(e)},NC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(NC))===null||n===void 0?void 0:n.length)||0)>0}const Jx="number",eb="color",LC="var",VC="var(",th="${}",$C=/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 Xi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace($C,l=>(Nt.test(l)?(r.color.push(i),o.push(eb),n.push(Nt.parse(l))):l.startsWith(VC)?(r.var.push(i),o.push(LC),n.push(l)):(r.number.push(i),o.push(Jx),n.push(parseFloat(l))),++i,th)).split(th);return{values:n,split:s,indexes:r,types:o}}function tb(e){return Xi(e).values}function nb(e){const{split:t,types:n}=Xi(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===Jx?i+=Oi(o[a]):s===eb?i+=Nt.transform(o[a]):i+=o[a]}return i}}const zC=e=>typeof e=="number"?0:e;function BC(e){const t=tb(e);return nb(e)(t.map(zC))}const hr={test:FC,parse:tb,createTransformer:nb,getAnimatableNone:BC},HC=new Set(["brightness","contrast","saturate","opacity"]);function WC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xf)||[];if(!r)return e;const o=n.replace(r,"");let i=HC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const qC=/\b([a-z-]*)\(.*?\)/gu,$u={...hr,getAnimatableNone:e=>{const t=e.match(qC);return t?t.map(WC).join(" "):e}},UC={...rf,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:$u,WebkitFilter:$u},rb=e=>UC[e];function ob(e,t){let n=rb(e);return n!==$u&&(n=hr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const KC=new Set(["auto","none","0"]);function YC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!KC.has(i)&&Xi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ob(n,o)}const Br=e=>e*180/Math.PI,zu=e=>{const t=Br(Math.atan2(e[1],e[0]));return Bu(t)},GC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zu,rotateZ:zu,skewX:e=>Br(Math.atan(e[1])),skewY:e=>Br(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bu=e=>(e=e%360,e<0&&(e+=360),e),nh=zu,rh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ZC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rh,scaleY:oh,scale:e=>(rh(e)+oh(e))/2,rotateX:e=>Bu(Br(Math.atan2(e[6],e[5]))),rotateY:e=>Bu(Br(Math.atan2(-e[2],e[0]))),rotateZ:nh,rotate:nh,skewX:e=>Br(Math.atan(e[4])),skewY:e=>Br(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ih(e){return e.includes("scale")?1:0}function Hu(e,t){if(!e||e==="none")return ih(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ZC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=GC,o=s}if(!o)return ih(t);const i=r[t],a=o[1].split(",").map(QC);return typeof i=="function"?i(a):a[i]}const XC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hu(n,t)};function QC(e){return parseFloat(e.trim())}const ah=e=>e===ii||e===Se,JC=new Set(["x","y","z"]),ek=oi.filter(e=>!JC.has(e));function tk(e){const t=[];return ek.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>Hu(t,"x"),y:(e,{transform:t})=>Hu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Wr=new Set;let Wu=!1,qu=!1;function ib(){if(qu){const e=Array.from(Wr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=tk(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])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}qu=!1,Wu=!1,Wr.forEach(e=>e.complete()),Wr.clear()}function ab(){Wr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qu=!0)})}function nk(){ab(),ib()}class wf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Wr.add(this),Wu||(Wu=!0,rt.read(ab),rt.resolveKeyframes(ib))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Wr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Wr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const sb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),rk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ok(e){const t=rk.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ik=4;function lb(e,t,n=1){fn(n<=ik,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=ok(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return sb(a)?parseFloat(a):a}return nf(o)?lb(o,t,n+1):o}const cb=e=>t=>t.test(e),ak={test:e=>e==="auto",parse:e=>e},ub=[ii,Se,Mn,sr,YE,KE,ak],sh=e=>ub.find(cb(e));class db extends wf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),nf(c))){const u=lb(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Nx.has(r)||t.length!==2)return;const[o,i]=t,a=sh(o),s=sh(i);if(a!==s)if(ah(a)&&ah(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)_C(t[o])&&r.push(o);r.length&&YC(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=Fo[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(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const lh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hr.test(e)||e==="0")&&!e.startsWith("url("));function sk(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 lk(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=lh(o,t),s=lh(i,t);return ri(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:sk(e)||(n==="spring"||ll(n))&&r}const ck=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ck),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const uk=40;class fb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Dn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>uk?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nk(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Dn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!lk(t,r,o,i))if(a)this.options.duration=0;else{l&&l(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ds=2e4;function Sf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ds;)t+=n,r=e.next(t);return t>=ds?1/0:t}const lt=(e,t,n)=>e+(t-e)*n;function Oc(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 dk({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=Oc(l,s,e+1/3),i=Oc(l,s,e),a=Oc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function fs(e,t){return n=>n>0?t:e}const Mc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},fk=[Vu,zr,So],pk=e=>fk.find(t=>t.test(e));function ch(e){const t=pk(e);if(ri(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===So&&(n=dk(n)),n}const uh=(e,t)=>{const n=ch(e),r=ch(t);if(!n||!r)return fs(e,t);const o={...n};return i=>(o.red=Mc(n.red,r.red,i),o.green=Mc(n.green,r.green,i),o.blue=Mc(n.blue,r.blue,i),o.alpha=lt(n.alpha,r.alpha,i),zr.transform(o))},mk=(e,t)=>n=>t(e(n)),va=(...e)=>e.reduce(mk),Uu=new Set(["none","hidden"]);function hk(e,t){return Uu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gk(e,t){return n=>lt(e,t,n)}function Tf(e){return typeof e=="number"?gk:typeof e=="string"?nf(e)?fs:Nt.test(e)?uh:xk:Array.isArray(e)?pb:typeof e=="object"?Nt.test(e)?uh:vk:fs}function pb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Tf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function vk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Tf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function yk(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const xk=(e,t)=>{const n=hr.createTransformer(t),r=Xi(e),o=Xi(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?Uu.has(e)&&!o.values.length||Uu.has(t)&&!r.values.length?hk(e,t):va(pb(yk(r,o),o.values),n):(ri(!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.`),fs(e,t))};function mb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):Tf(e)(e,t)}const bk=5;function hb(e,t,n){const r=Math.max(t-bk,0);return Fx(n-e(r),t-r)}const ht={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},dh=.001;function wk({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;ri(e<=xn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Yn(ht.minDamping,ht.maxDamping,a),e=Yn(ht.minDuration,ht.maxDuration,jn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Ku(c,a),h=Math.exp(-d);return dh-p/f*h},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-d),g=Ku(Math.pow(c,2),a);return(-o(c)+dh>0?-1:1)*((p-f)*h)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=Tk(o,i,s);if(e=xn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Sk=12;function Tk(e,t,n){let r=n;for(let o=1;o<Sk;o++)r=r-e(r)/t(r);return r}function Ku(e,t){return e*Math.sqrt(1-t*t)}const Ek=["duration","bounce"],Ck=["stiffness","damping","mass"];function fh(e,t){return t.some(n=>e[n]!==void 0)}function kk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!fh(e,Ck)&&fh(e,Ek))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Yn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=wk(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Ef(e=ht.visualDuration,t=ht.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=kk({...n,velocity:-jn(n.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(l*u)),m=a-i,v=jn(Math.sqrt(l/u)),x=Math.abs(m)<5;r||(r=x?ht.restSpeed.granular:ht.restSpeed.default),o||(o=x?ht.restDelta.granular:ht.restDelta.default);let b;if(g<1){const w=Ku(v,g);b=T=>{const C=Math.exp(-g*v*T);return a-C*((h+g*v*m)/w*Math.sin(w*T)+m*Math.cos(w*T))}}else if(g===1)b=w=>a-Math.exp(-v*w)*(m+(h+v*m)*w);else{const w=v*Math.sqrt(g*g-1);b=T=>{const C=Math.exp(-g*v*T),k=Math.min(w*T,300);return a-C*((h+g*v*m)*Math.sinh(k)+w*m*Math.cosh(k))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const T=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?xn(h):hb(b,w,T));const k=Math.abs(C)<=r,I=Math.abs(a-T)<=o;s.done=k&&I}return s.value=s.done?a:T,s},toString:()=>{const w=Math.min(Sf(S),ds),T=$x(C=>S.next(w*C).value,w,30);return w+"ms "+T}};return S}function ph({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],p={done:!1,value:d},f=k=>s!==void 0&&k<s||l!==void 0&&k>l,h=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const m=d+g,v=a===void 0?m:a(m);v!==m&&(g=v-d);const x=k=>-g*Math.exp(-k/r),b=k=>v+x(k),S=k=>{const I=x(k),A=b(k);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let w,T;const C=k=>{f(p.value)&&(w=k,T=Ef({keyframes:[p.value,h(p.value)],velocity:hb(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!T&&w===void 0&&(I=!0,S(k),C(k)),w!==void 0&&k>=w?T.next(k-w):(!I&&S(k),p)}}}const Rk=ga(.42,0,1,1),Pk=ga(0,0,.58,1),gb=ga(.42,0,.58,1),vb=e=>Array.isArray(e)&&typeof e[0]!="number",mh={linear:Kt,easeIn:Rk,easeInOut:gb,easeOut:Pk,circIn:yf,circInOut:Zx,circOut:Gx,backIn:vf,backInOut:Kx,backOut:Ux,anticipate:Yx},Yu=e=>{if(gf(e)){fn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ga(t,n,r,o)}else if(typeof e=="string")return fn(mh[e]!==void 0,`Invalid easing type '${e}'`),mh[e];return e};function Ak(e,t,n){const r=[],o=n||mb,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]||Kt:t;s=va(l,s)}r.push(s)}return r}function yb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(fn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Ak(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 p=Kr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Yn(e[0],e[i-1],u)):c}function xb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Kr(0,t,r);e.push(lt(n,1,o))}}function bb(e){const t=[0];return xb(t,e.length-1),t}function Ik(e,t){return e.map(n=>n*t)}function _k(e,t){return e.map(()=>t||gb).splice(0,e.length-1)}function Mi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=vb(r)?r.map(Yu):Yu(r),i={done:!1,value:t[0]},a=Ik(n&&n.length===t.length?n:bb(t),e),s=yb(a,t,{ease:Array.isArray(o)?o:_k(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Ok=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>Kn(t),now:()=>Mt.isProcessing?Mt.timestamp:Dn.now()}},Mk={decay:ph,inertia:ph,tween:Mi,keyframes:Mi,spring:Ef},Dk=e=>e/100;class Cf extends fb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||wf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:Mk[n]||Mi;let l,c;process.env.NODE_ENV!=="production"&&s!==Mi&&fn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Mi&&typeof t[0]!="number"&&(l=va(Dk,mb(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=Sf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,S=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(A=1-A,g&&(A-=g/d)):h==="mirror"&&(S=a)),b=Yn(0,1,A)*d}const w=x?{done:!1,value:l[0]}:S.next(b);s&&(w.value=s(w.value));let{done:T}=w;!x&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&o!==void 0&&(w.value=cl(l,this.options,o)),m&&m(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?jn(t.calculatedDuration):0}get time(){return jn(this.currentTime)}set time(t){t=xn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=jn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Ok,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const jk=new Set(["opacity","clipPath","filter","transform"]);function Nk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Bx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const Fk=hf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ps=10,Lk=2e4;function Vk(e){return ll(e.type)||e.type==="spring"||!zx(e.ease)}function $k(e,t){const n=new Cf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Lk;)r=n.sample(i),o.push(r.value),i+=ps;return{times:void 0,keyframes:o,duration:i-ps,ease:"linear"}}const wb={anticipate:Yx,backInOut:Kx,circInOut:Zx};function zk(e){return e in wb}class hh extends fb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new db(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&us()&&zk(i)&&(i=wb[i]),Vk(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...g}=this.options,m=$k(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=Nk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(eh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return jn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return jn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Kt;const{animation:r}=n;eh(r,t)}return Kt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new Cf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=xn(this.time);c.setWithVelocity(h.sample(g-ps).value,h.sample(g).value,ps)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Fk()&&r&&jk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Bk={type:"spring",stiffness:500,damping:25,restSpeed:10},Hk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Wk={type:"keyframes",duration:.8},qk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Uk=(e,{keyframes:t})=>t.length>2?Wk:ro.has(e)?e.startsWith("scale")?Hk(t[1]):Bk:qk;function Kk({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 kf=(e,t,n,r={},o,i)=>a=>{const s=ff(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};Kk(s)||(u={...u,...Uk(e,u)}),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return rt.update(()=>{u.onUpdate(p),u.onComplete()}),new Vx([])}return!i&&hh.supports(u)?new hh(u):new Cf(u)};function Yk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Rf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&Yk(u,d))continue;const h={delay:n,...ff(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=Lx(e);if(v){const x=window.MotionHandoffAnimation(v,d,rt);x!==null&&(h.startTime=x,g=!0)}}Fu(e,d),p.start(kf(d,p,f,e.shouldReduceMotion&&Nx.has(d)?{type:!1}:h,e,g));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{rt.update(()=>{s&&SC(e,s)})}),c}function Gu(e,t,n={}){var r;const o=Zi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Rf(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Gk(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Gk(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(Zk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Gu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Zk(e,t){return e.sortNodePosition(t)}function Xk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Gu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Gu(e,t,n);else{const o=typeof t=="function"?Zi(e,t,n.custom):t;r=Promise.all(Rf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Sb(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 Qk=Qd.length;function Tb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Tb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Qk;n++){const r=Qd[n],o=e.props[r];(Ki(o)||o===!1)&&(t[r]=o)}return t}const Jk=[...Xd].reverse(),eR=Xd.length;function tR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Xk(e,n,r)))}function nR(e){let t=tR(e),n=gh(),r=!0;const o=l=>(c,u)=>{var d;const p=Zi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...g}=p;c={...c,...g,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Tb(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<eR;m++){const v=Jk[m],x=n[v],b=c[v]!==void 0?c[v]:u[v],S=Ki(b),w=v===l?x.isActive:null;w===!1&&(h=m);let T=b===u[v]&&b!==c[v]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...f},!x.isActive&&w===null||!b&&!x.prevProp||il(b)||typeof b=="boolean")continue;const C=rR(x.prevProp,b);let k=C||v===l&&x.isActive&&!T&&S||m>h&&S,I=!1;const A=Array.isArray(b)?b:[b];let j=A.reduce(o(v),{});w===!1&&(j={});const{prevResolvedValues:D={}}=x,F={...D,...j},P=V=>{k=!0,p.has(V)&&(I=!0,p.delete(V)),x.needsAnimating[V]=!0;const N=e.getValue(V);N&&(N.liveStyle=!1)};for(const V in F){const N=j[V],$=D[V];if(f.hasOwnProperty(V))continue;let M=!1;Nu(N)&&Nu($)?M=!Sb(N,$):M=N!==$,M?N!=null?P(V):p.add(V):N!==void 0&&p.has(V)?P(V):x.protectedKeys[V]=!0}x.prevProp=b,x.prevResolvedValues=j,x.isActive&&(f={...f,...j}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(T&&C)||I)&&d.push(...A.map(V=>({animation:V,options:{type:v}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const v=Zi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}p.forEach(v=>{const x=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),m[v]=x??null}),d.push({animation:m})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=gh(),r=!0}}}function rR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Sb(t,e):!1}function Dr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gh(){return{animate:Dr(!0),whileInView:Dr(),whileHover:Dr(),whileTap:Dr(),whileDrag:Dr(),whileFocus:Dr(),exit:Dr()}}class Sr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class oR extends Sr{constructor(t){super(t),t.animationState||(t.animationState=nR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let iR=0;class aR extends Sr{constructor(){super(...arguments),this.id=iR++}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 sR={animation:{Feature:oR},exit:{Feature:aR}},hn={x:!1,y:!1};function Eb(){return hn.x||hn.y}function lR(e){return e==="x"||e==="y"?hn[e]?null:(hn[e]=!0,()=>{hn[e]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function Qi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Pf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ya(e){return{point:{x:e.pageX,y:e.pageY}}}const cR=e=>t=>Pf(t)&&e(t,ya(t));function Di(e,t,n,r){return Qi(e,t,cR(n),r)}function Cb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function uR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const kb=1e-4,fR=1-kb,pR=1+kb,Rb=.01,mR=0-Rb,hR=0+Rb;function zt(e){return e.max-e.min}function gR(e,t,n){return Math.abs(e-t)<=n}function vh(e,t,n,r=.5){e.origin=r,e.originPoint=lt(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=fR&&e.scale<=pR||isNaN(e.scale))&&(e.scale=1),(e.translate>=mR&&e.translate<=hR||isNaN(e.translate))&&(e.translate=0)}function ji(e,t,n,r){vh(e.x,t.x,n.x,r?r.originX:void 0),vh(e.y,t.y,n.y,r?r.originY:void 0)}function yh(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function vR(e,t,n){yh(e.x,t.x,n.x),yh(e.y,t.y,n.y)}function xh(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Ni(e,t,n){xh(e.x,t.x,n.x),xh(e.y,t.y,n.y)}const bh=()=>({translate:0,scale:1,origin:0,originPoint:0}),To=()=>({x:bh(),y:bh()}),wh=()=>({min:0,max:0}),vt=()=>({x:wh(),y:wh()});function sn(e){return[e("x"),e("y")]}function Dc(e){return e===void 0||e===1}function Zu({scale:e,scaleX:t,scaleY:n}){return!Dc(e)||!Dc(t)||!Dc(n)}function Nr(e){return Zu(e)||Pb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Pb(e){return Sh(e.x)||Sh(e.y)}function Sh(e){return e&&e!=="0%"}function ms(e,t,n){const r=e-n,o=t*r;return n+o}function Th(e,t,n,r,o){return o!==void 0&&(e=ms(e,o,r)),ms(e,n,r)+t}function Xu(e,t=0,n=1,r,o){e.min=Th(e.min,t,n,r,o),e.max=Th(e.max,t,n,r,o)}function Ab(e,{x:t,y:n}){Xu(e.x,t.translate,t.scale,t.originPoint),Xu(e.y,n.translate,n.scale,n.originPoint)}const Eh=.999999999999,Ch=1.0000000000001;function yR(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&&Co(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ab(e,a)),r&&Nr(i.latestValues)&&Co(e,i.latestValues))}t.x<Ch&&t.x>Eh&&(t.x=1),t.y<Ch&&t.y>Eh&&(t.y=1)}function Eo(e,t){e.min=e.min+t,e.max=e.max+t}function kh(e,t,n,r,o=.5){const i=lt(e.min,e.max,o);Xu(e,t,n,i,r)}function Co(e,t){kh(e.x,t.x,t.scaleX,t.scale,t.originX),kh(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ib(e,t){return Cb(dR(e.getBoundingClientRect(),t))}function xR(e,t,n){const r=Ib(e,n),{scroll:o}=t;return o&&(Eo(r.x,o.offset.x),Eo(r.y,o.offset.y)),r}const _b=({current:e})=>e?e.ownerDocument.defaultView:null,Rh=(e,t)=>Math.abs(e-t);function bR(e,t){const n=Rh(e.x,t.x),r=Rh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ob{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Nc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=bR(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:g}=Mt;this.history.push({...h,timestamp:g});const{onStart:m,onMove:v}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=jc(p,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Nc(d.type==="pointercancel"?this.lastMoveEventInfo:jc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!Pf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ya(t),s=jc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Nc(s,this.history)),this.removeListeners=va(Di(this.contextWindow,"pointermove",this.handlePointerMove),Di(this.contextWindow,"pointerup",this.handlePointerUp),Di(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Kn(this.updatePoint)}}function jc(e,t){return t?{point:t(e.point)}:e}function Ph(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nc({point:e},t){return{point:e,delta:Ph(e,Mb(t)),offset:Ph(e,wR(t)),velocity:SR(t,.1)}}function wR(e){return e[0]}function Mb(e){return e[e.length-1]}function SR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Mb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=jn(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 TR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?lt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?lt(n,e,r.max):Math.min(e,n)),e}function Ah(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 ER(e,{top:t,left:n,bottom:r,right:o}){return{x:Ah(e.x,n,o),y:Ah(e.y,t,r)}}function Ih(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 CR(e,t){return{x:Ih(e.x,t.x),y:Ih(e.y,t.y)}}function kR(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Kr(t.min,t.max-r,e.min):r>o&&(n=Kr(e.min,e.max-o,t.min)),Yn(0,1,n)}function RR(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 Qu=.35;function PR(e=Qu){return e===!1?e=0:e===!0&&(e=Qu),{x:_h(e,"left","right"),y:_h(e,"top","bottom")}}function _h(e,t,n){return{min:Oh(e,t),max:Oh(e,n)}}function Oh(e,t){return typeof e=="number"?e:e[t]||0}const AR=new WeakMap;class IR{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=vt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ya(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lR(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(m=>{let v=this.getAxisMotionValue(m).get()||0;if(Mn.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[m];b&&(v=zt(b)*(parseFloat(v)/100))}}this.originPoint[m]=v}),h&&rt.postRender(()=>h(u,d)),Fu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=_R(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>sn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ob(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:_b(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&rt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ja(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=TR(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&wo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=ER(o.layoutBox,n):this.constraints=!1,this.elastic=PR(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=RR(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;fn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=xR(r,o.root,this.visualElement.getTransformPagePoint());let a=CR(o.layout.layoutBox,i);if(n){const s=n(uR(a));this.hasMutatedConstraints=!!s,s&&(a=Cb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=sn(u=>{if(!ja(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Fu(this.visualElement,t),r.start(kf(t,r,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.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){sn(n=>{const{drag:r}=this.getProps();if(!ja(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-lt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=kR({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(),sn(a=>{if(!ja(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(lt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;AR.set(this.visualElement,this);const t=this.visualElement.current,n=Di(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),rt.read(r);const a=Qi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(sn(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=Qu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ja(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _R(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OR extends Sr{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new IR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mh=e=>(t,n)=>{e&&rt.postRender(()=>e(t,n))};class MR extends Sr{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new Ob(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_b(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mh(t),onStart:Mh(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&rt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Di(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=Dh(e,t.target.x),r=Dh(e,t.target.y);return`${n}% ${r}%`}},DR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=hr.parse(e);if(o.length>5)return r;const i=hr.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=lt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class jR extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;UE(NR),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||rt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Jd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Db(e){const[t,n]=hx(),r=E.useContext(Ui);return y.jsx(jR,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(Tx),isPresent:t,safeToRemove:n})}const NR={borderRadius:{...bi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bi,borderTopRightRadius:bi,borderBottomLeftRadius:bi,borderBottomRightRadius:bi,boxShadow:DR};function jb(e,t,n){const r=At(e)?e:No(e);return r.start(kf("",r,t,n)),r.animation}function Nb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const FR=(e,t)=>e.depth-t.depth;class LR{constructor(){this.children=[],this.isDirty=!1}add(t){pf(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(FR),this.isDirty=!1,this.children.forEach(t)}}function VR(e,t){const n=Dn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Kn(r),e(i-t))};return rt.read(r,!0),()=>Kn(r)}const Fb=["TopLeft","TopRight","BottomLeft","BottomRight"],$R=Fb.length,jh=e=>typeof e=="string"?parseFloat(e):e,Nh=e=>typeof e=="number"||Se.test(e);function zR(e,t,n,r,o,i){o?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,BR(r)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,HR(r))):i&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<$R;a++){const s=`border${Fb[a]}Radius`;let l=Fh(t,s),c=Fh(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Nh(l)===Nh(c)?(e[s]=Math.max(lt(jh(l),jh(c),r),0),(Mn.test(c)||Mn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,r))}function Fh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const BR=Lb(0,.5,Gx),HR=Lb(.5,.95,Kt);function Lb(e,t,n){return r=>r<e?0:r>t?1:n(Kr(e,t,r))}function Lh(e,t){e.min=t.min,e.max=t.max}function on(e,t){Lh(e.x,t.x),Lh(e.y,t.y)}function Vh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function $h(e,t,n,r,o){return e-=t,e=ms(e,1/n,r),o!==void 0&&(e=ms(e,1/o,r)),e}function WR(e,t=0,n=1,r=.5,o,i=e,a=e){if(Mn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=lt(i.min,i.max,r);e===i&&(s-=t),e.min=$h(e.min,t,n,s,o),e.max=$h(e.max,t,n,s,o)}function zh(e,t,[n,r,o],i,a){WR(e,t[n],t[r],t[o],t.scale,i,a)}const qR=["x","scaleX","originX"],UR=["y","scaleY","originY"];function Bh(e,t,n,r){zh(e.x,t,qR,n?n.x:void 0,r?r.x:void 0),zh(e.y,t,UR,n?n.y:void 0,r?r.y:void 0)}function Hh(e){return e.translate===0&&e.scale===1}function Vb(e){return Hh(e.x)&&Hh(e.y)}function Wh(e,t){return e.min===t.min&&e.max===t.max}function KR(e,t){return Wh(e.x,t.x)&&Wh(e.y,t.y)}function qh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $b(e,t){return qh(e.x,t.x)&&qh(e.y,t.y)}function Uh(e){return zt(e.x)/zt(e.y)}function Kh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class YR{constructor(){this.members=[]}add(t){pf(this.members,t),t.scheduleRender()}remove(t){if(sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GR(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0: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:p,skewX:f,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),h&&(r+=`skewY(${h}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 Fc=["","X","Y","Z"],ZR={visibility:"hidden"},Yh=1e3;let XR=0;function Lc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function zb(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",rt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&zb(r)}function Bb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=XR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(eP),this.nodes.forEach(iP),this.nodes.forEach(aP),this.nodes.forEach(tP)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new LR)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new mf),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,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Nb(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=VR(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Zh))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||dP,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!$b(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const S={...ff(g,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Zh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Kn(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(sP),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&&zb(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(Gh);return}this.isUpdating||this.nodes.forEach(rP),this.isUpdating=!1,this.nodes.forEach(oP),this.nodes.forEach(QR),this.nodes.forEach(JR),this.clearAllSnapshots();const s=Dn.now();Mt.delta=Yn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Ic.update.process(Mt),Ic.preRender.process(Mt),Ic.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nP),this.sharedNodes.forEach(lP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vt(),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){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&&!Vb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Nr(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)),fP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return vt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(pP))){const{scroll:u}=this.root;u&&(Eo(l.x,u.offset.x),Eo(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=vt();if(on(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&on(l,a),Eo(l.x,d.offset.x),Eo(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=vt();on(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&&Co(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Nr(u.latestValues)&&Co(l,u.latestValues)}return Nr(this.latestValues)&&Co(l,this.latestValues),l}removeTransform(a){const s=vt();on(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Nr(c.latestValues))continue;Zu(c.latestValues)&&c.updateSnapshot();const u=vt(),d=c.measurePageBox();on(u,d),Bh(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Nr(this.latestValues)&&Bh(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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Ni(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),on(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):on(this.target,this.layout.layoutBox),Ab(this.target,this.targetDelta)):on(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Ni(this.relativeTargetOrigin,this.target,f.target),on(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Zu(this.parent.latestValues)||Pb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;on(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;yR(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=vt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vh(this.prevProjectionDelta.x,this.projectionDelta.x),Vh(this.prevProjectionDelta.y,this.projectionDelta.y)),ji(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Kh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Kh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=To(),this.projectionDelta=To(),this.projectionDeltaWithTransform=To()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=To();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=vt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=f!==h,m=this.getStack(),v=!m||m.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(uP));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const w=S/1e3;Xh(d.x,a.x,w),Xh(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ni(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cP(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&KR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=vt()),on(b,this.relativeTarget)),g&&(this.animationValues=u,zR(u,c,this.latestValues,w,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Kn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=jb(0,Yh,{...a,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(Yh),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&&Hb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||vt();const d=zt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=zt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}on(s,l),Co(s,u),ji(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new YR),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(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.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&&Lc("z",a,c,this.animationValues);for(let u=0;u<Fc.length;u++)Lc(`rotate${Fc[u]}`,a,c,this.animationValues),Lc(`skew${Fc[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ZR;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=es(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=es(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Nr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=GR(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:h}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Yi){if(p[g]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:x}=Yi[g],b=c.transform==="none"?p[g]:m(p[g],d);if(v){const S=v.length;for(let w=0;w<S;w++)c[v[w]]=b}else x?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?es(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Gh),this.root.sharedNodes.clear()}}}function QR(e){e.updateLayout()}function JR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Hb(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=To();ji(s,r,n.layoutBox);const l=To();a?ji(l,e.applyTransform(o,!0),n.measuredBox):ji(l,r,n.layoutBox);const c=!Vb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=vt();Ni(h,n.layoutBox,p.layoutBox);const g=vt();Ni(g,r,f.layoutBox),$b(h,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function eP(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 tP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nP(e){e.clearSnapshot()}function Gh(e){e.clearMeasurements()}function rP(e){e.isLayoutDirty=!1}function oP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iP(e){e.resolveTargetDelta()}function aP(e){e.calcProjection()}function sP(e){e.resetSkewAndRotation()}function lP(e){e.removeLeadSnapshot()}function Xh(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Qh(e,t,n,r){e.min=lt(t.min,n.min,r),e.max=lt(t.max,n.max,r)}function cP(e,t,n,r){Qh(e.x,t.x,n.x,r),Qh(e.y,t.y,n.y,r)}function uP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dP={duration:.45,ease:[.4,0,.1,1]},Jh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eg=Jh("applewebkit/")&&!Jh("chrome/")?Math.round:Kt;function tg(e){e.min=eg(e.min),e.max=eg(e.max)}function fP(e){tg(e.x),tg(e.y)}function Hb(e,t,n){return e==="position"||e==="preserve-aspect"&&!gR(Uh(t),Uh(n),.2)}function pP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const mP=Bb({attachResizeListener:(e,t)=>Qi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},Wb=Bb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new mP({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hP={pan:{Feature:MR},drag:{Feature:OR,ProjectionNode:Wb,MeasureLayout:Db}};function qb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ub(e,t){const n=qb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ng(e){return!(e.pointerType==="touch"||Eb())}function gP(e,t,n={}){const[r,o,i]=Ub(e,n),a=s=>{if(!ng(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{ng(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function rg(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&&rt.postRender(()=>i(t,ya(t)))}class vP extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=gP(t,(n,r)=>(rg(this.node,r,"Start"),o=>rg(this.node,o,"End"))))}unmount(){}}class yP extends Sr{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=va(Qi(this.node.current,"focus",()=>this.onFocus()),Qi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Kb=(e,t)=>t?e===t?!0:Kb(e,t.parentElement):!1,xP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bP(e){return xP.has(e.tagName)||e.tabIndex!==-1}const Ci=new WeakSet;function og(e){return t=>{t.key==="Enter"&&e(t)}}function $c(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=og(()=>{if(Ci.has(n))return;$c(n,"down");const o=og(()=>{$c(n,"up")}),i=()=>$c(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 ig(e){return Pf(e)&&!Eb()}function SP(e,t,n={}){const[r,o,i]=Ub(e,n),a=s=>{const l=s.currentTarget;if(!ig(s)||Ci.has(l))return;Ci.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!ig(f)||!Ci.has(l))&&(Ci.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Kb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>wP(c,o)),!bP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function ag(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&&rt.postRender(()=>i(t,ya(t)))}class TP extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=SP(t,(n,r)=>(ag(this.node,r,"Start"),(o,{success:i})=>ag(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ju=new WeakMap,zc=new WeakMap,EP=e=>{const t=Ju.get(e.target);t&&t(e)},CP=e=>{e.forEach(EP)};function kP({root:e,...t}){const n=e||document;zc.has(n)||zc.set(n,{});const r=zc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(CP,{root:e,...t})),r[o]}function RP(e,t,n){const r=kP(t);return Ju.set(e,n),r.observe(e),()=>{Ju.delete(e),r.unobserve(e)}}const PP={some:0,all:1};class AP extends Sr{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:PP[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(),p=c?u:d;p&&p(l)};return RP(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(IP(t,n))&&this.startObserver()}unmount(){}}function IP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _P={inView:{Feature:AP},tap:{Feature:TP},focus:{Feature:yP},hover:{Feature:vP}},OP={layout:{ProjectionNode:Wb,MeasureLayout:Db}},ed={current:null},Yb={current:!1};function MP(){if(Yb.current=!0,!!Zd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ed.current=e.matches;e.addListener(t),t()}else ed.current=!1}const DP=[...ub,Nt,hr],jP=e=>DP.find(cb(e)),Ji=new WeakMap;function NP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(At(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(At(i))e.addValue(r,No(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,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const sg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Gb{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=wf,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=Dn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,rt.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=al(n),this.isVariantNode=wx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];l[f]!==void 0&&At(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Ji.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)),Yb.current||MP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ed.current,process.env.NODE_ENV!=="production"&&rl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Kn(this.notifyUpdate),Kn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ro.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jo){const n=jo[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):vt()}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<sg.length;r++){const o=sg[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=NP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(sb(o)||Xx(o))?o=parseFloat(o):!jP(o)&&hr.test(n)&&(o=ob(t,n)),this.setBaseTarget(t,At(o)?o.get():o)),At(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=uf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!At(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Zb extends Gb{constructor(){super(...arguments),this.KeyframeResolver=db}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function FP(e){return window.getComputedStyle(e)}class Xb extends Zb{constructor(){super(...arguments),this.type="html",this.renderInstance=Ox}readValueFromInstance(t,n){if(ro.has(n))return XC(t,n);{const r=FP(t),o=(tf(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ib(t,n)}build(t,n,r){of(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return df(t,n,r)}}class Qb extends Zb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&_x(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ro.has(n)){const r=rb(n);return r&&r.default||0}return n=Mx.has(n)?n:ef(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&rt.postRender(this.updateDimensions)}build(t,n,r){lf(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Dx(t,n,r,o)}mount(t){this.isSVGTag=cf(t.tagName),super.mount(t)}}const LP=(e,t)=>sf(e)?new Qb(t):new Xb(t,{allowProjection:e!==E.Fragment}),VP=gC({...sR,..._P,...hP,...OP},LP),pt=OE(VP);function $P(e){return E.useEffect(()=>()=>e(),[])}function ul(e){const t=wn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Jb(e,t){const n=ul(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>rt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Kn(r)}}),n}const zP=e=>e&&typeof e=="object"&&e.mix,BP=e=>zP(e)?e.mix:void 0;function HP(...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=yb(o,i,{mixer:BP(i[0]),...a});return t?s(r):s}function WP(e){_i.current=[],e();const t=Jb(_i.current,e);return _i.current=void 0,t}function qP(e,t,n,r){if(typeof e=="function")return WP(e);const o=typeof t=="function"?t:HP(t,n,r);return Array.isArray(e)?lg(e,o):lg([e],([i])=>o(i))}function lg(e,t){const n=wn(()=>[]);return Jb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function UP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Sf(r),ds);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:jn(o)}}const KP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function e0(e,t){return vb(e)?e[KP(0,e.length,t)]:e}function Af(e){return typeof e=="object"&&!Array.isArray(e)}function t0(e,t,n,r){return typeof e=="string"&&Af(t)?qb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function YP(e,t,n){return e*(t+1)}function cg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function GP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function ZP(e,t,n,r,o,i){GP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:lt(o,i,r[a]),easing:e0(n,a)})}function XP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function QP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const JP="easeInOut",eA=20;function tA(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,p=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,cg(d,h.at,u,c));continue}let[g,m,v={}]=h;v.at!==void 0&&(d=cg(d,v.at,u,c));let x=0;const b=(S,w,T,C=0,k=0)=>{const I=nA(S),{delay:A=0,times:j=bb(I),type:D="keyframes",repeat:F,repeatType:P,repeatDelay:O=0,..._}=w;let{ease:V=t.ease||"easeOut",duration:N}=w;const $=typeof A=="function"?A(C,k):A,M=I.length,B=ll(D)?D:o==null?void 0:o[D];if(M<=2&&B){let G=100;if(M===2&&iA(I)){const L=I[1]-I[0];G=Math.abs(L)}const Y={..._};N!==void 0&&(Y.duration=xn(N));const Z=UP(Y,G,B);V=Z.ease,N=Z.duration}N??(N=i);const X=d+$;j.length===1&&j[0]===0&&(j[1]=1);const Q=j.length-I.length;if(Q>0&&xb(j,Q),I.length===1&&I.unshift(null),F){fn(F<eA,"Repeat count too high, must be less than 20"),N=YP(N,F);const G=[...I],Y=[...j];V=Array.isArray(V)?[...V]:[V];const Z=[...V];for(let L=0;L<F;L++){I.push(...G);for(let z=0;z<G.length;z++)j.push(Y[z]+(L+1)),V.push(z===0?"linear":e0(Z,z-1))}XP(j,F)}const J=X+N;ZP(T,I,V,j,X,J),x=Math.max($+N,x),p=Math.max(J,p)};if(At(g)){const S=ug(g,s);b(m,v,dg("default",S))}else{const S=t0(g,m,r,l),w=S.length;for(let T=0;T<w;T++){m=m,v=v;const C=S[T],k=ug(C,s);for(const I in m)b(m[I],rA(v,I),dg(I,k),T,w)}}u=d,d+=x}return s.forEach((f,h)=>{for(const g in f){const m=f[g];m.sort(QP);const v=[],x=[],b=[];for(let w=0;w<m.length;w++){const{at:T,value:C,easing:k}=m[w];v.push(C),x.push(Kr(0,p,T)),b.push(k||"easeOut")}x[0]!==0&&(x.unshift(0),v.unshift(v[0]),b.unshift(JP)),x[x.length-1]!==1&&(x.push(1),v.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[g]=v,S.transition[g]={...t,duration:p,ease:b,times:x,...n}}}),a}function ug(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function dg(e,t){return t[e]||(t[e]=[]),t[e]}function nA(e){return Array.isArray(e)?e:[e]}function rA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const oA=e=>typeof e=="number",iA=e=>e.every(oA);function aA(e,t){return e in t}class sA extends Gb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(aA(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 vt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function lA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Nb(e)?new Qb(t):new Xb(t);n.mount(e),Ji.set(e,n)}function cA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new sA(t);n.mount(e),Ji.set(e,n)}function uA(e,t){return At(e)||typeof e=="number"||typeof e=="string"&&!Af(t)}function n0(e,t,n,r){const o=[];if(uA(e,t))o.push(jb(e,Af(t)&&t.default||t,n&&(n.default||n)));else{const i=t0(e,t,r),a=i.length;fn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?lA:cA;Ji.has(l)||c(l);const u=Ji.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Rf(u,{...t,transition:d},{}))}}return o}function dA(e,t,n){const r=[];return tA(e,t,n,{spring:Ef}).forEach(({keyframes:i,transition:a},s)=>{r.push(...n0(s,i,a))}),r}function fA(e){return Array.isArray(e)&&e.some(Array.isArray)}function pA(e){function t(n,r,o){let i=[];fA(n)?i=dA(n,r,e):i=n0(n,r,o,e);const a=new Vx(i);return e&&e.animations.push(a),a}return t}function mA(){const e=wn(()=>({current:null,animations:[]})),t=wn(()=>pA(e));return $P(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class hA{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const gA=()=>new hA;function vA(){return wn(gA)}function yA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function xA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:yA(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Yu(r)(l/c)*c}return t+l}}const r0=E.createContext(null);function bA(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=lt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?vC(e,o,o+i):e}function wA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=wn(()=>pt[t]),l=[],c=E.useRef(!1);fn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(h=>d===h.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(TA)},updateOrder:(d,p,f)=>{if(c.current)return;const h=bA(l,d,p,f);l!==h&&(c.current=!0,r(h.map(SA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),y.jsx(s,{...i,ref:a,ignoreStrict:!0,children:y.jsx(r0.Provider,{value:u,children:e})})}const o0=E.forwardRef(wA);function SA(e){return e.value}function TA(e,t){return e.layout.min-t.layout.min}function fg(e,t=0){return At(e)?e:ul(t)}function EA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=wn(()=>pt[r]),c=E.useContext(r0),u={x:fg(t.x),y:fg(t.y)},d=qP([u.x,u.y],([g,m])=>g||m?1:"unset");fn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return y.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:v}=m;v[p]&&h(n,u[p].get(),v[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const i0=E.forwardRef(EA);/**
12
+ `),()=>{document.head.removeChild(f)}},[t]),y.jsx(hE,{isPresent:t,childRef:o,sizeRef:i,children:R.cloneElement(e,{ref:o})})}const vE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=wn(yE),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=y.jsx(gE,{isPresent:n,anchorX:s,children:e})),y.jsx(nl.Provider,{value:d,children:e})};function yE(){return new Map}function hx(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Oa=e=>e.key||"";function Hm(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const wr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=hx(a),u=E.useMemo(()=>Hm(e),[e]),d=a&&!l?[]:u.map(Oa),p=E.useRef(!0),f=E.useRef(u),h=wn(()=>new Map),[g,m]=E.useState(u),[v,x]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const T=Oa(v[w]);d.includes(T)?h.delete(T):h.get(T)!==!0&&h.set(T,!1)}},[v,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let T=0;T<v.length;T++){const C=v[T],k=Oa(C);d.includes(k)||(w.splice(T,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),x(Hm(w)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=E.useContext(Ui);return y.jsx(y.Fragment,{children:v.map(w=>{const T=Oa(w),C=a&&!l?!1:u===v||d.includes(T),k=()=>{if(h.has(T))h.set(T,!0);else return;let I=!0;h.forEach(P=>{P||(I=!1)}),I&&(S==null||S(),x(f.current),a&&(c==null||c()),r&&r())};return y.jsx(vE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},T)})})},xE=E.createContext(null),Kt=e=>e;let ri=Kt,fn=Kt;process.env.NODE_ENV!=="production"&&(ri=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},fn=(e,t)=>{if(!e)throw new Error(t)});const bE={useManualTiming:!1},Ma=["read","resolveKeyframes","update","preRender","render","postRender"];function wE(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,p=!1)=>{const h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.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 SE=40;function gx(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ma.reduce((v,x)=>(v[x]=wE(i),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,SE),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Ma.reduce((v,x)=>{const b=a[x];return v[x]=(S,w=!1,T=!1)=>(n||h(),b.schedule(S,w,T)),v},{}),cancel:v=>{for(let x=0;x<Ma.length;x++)a[Ma[x]].cancel(v)},state:o,steps:a}}const{schedule:rt,cancel:Kn,state:Mt,steps:Ic}=gx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Kt,!0);function TE(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function EE(){const e=TE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>rt.postRender(r),[r]),t]}const CE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(CE);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 vx=e=>e===!0,kE=e=>vx(e===!0)||e==="id",RE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ui),o=E.useContext(xE),[i,a]=EE(),s=E.useRef(null),l=r.id||o;s.current===null&&(kE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:vx(n)&&r.group||Wm()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return y.jsx(Ui.Provider,{value:c,children:e})},yx=E.createContext({strict:!1}),qm={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"]},jo={};for(const e in qm)jo[e]={isEnabled:t=>qm[e].some(n=>!!t[n])};function PE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const AE=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 cs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AE.has(e)}let xx=e=>!cs(e);function bx(e){e&&(xx=t=>t.startsWith("on")?!cs(t):e(t))}try{bx(require("@emotion/is-prop-valid").default)}catch{}function IE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(xx(o)||n===!0&&cs(o)||!t&&!cs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _E({children:e,isValidProp:t,...n}){t&&bx(t),n={...E.useContext(Do),...n},n.isStatic=wn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return y.jsx(Do.Provider,{value:r,children:e})}const Um=new Set;function rl(e,t,n){e||Um.has(t)||(console.warn(t),Um.add(t))}function OE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ki(e){return typeof e=="string"||Array.isArray(e)}const Xd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qd=["initial",...Xd];function al(e){return il(e.animate)||Qd.some(t=>Ki(e[t]))}function wx(e){return!!(al(e)||e.variants)}function ME(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ki(n)?n:void 0,animate:Ki(r)?r:void 0}}return e.inherit!==!1?t:{}}function DE(e){const{initial:t,animate:n}=ME(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[Km(t),Km(n)])}function Km(e){return Array.isArray(e)?e.join(" "):e}const jE=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function NE(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):wo(n)&&(n.current=r))},[t])}const{schedule:Jd}=gx(queueMicrotask,!1),ef=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),FE="framerAppearId",Sx="data-"+ef(FE),Tx=E.createContext({});function LE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),l=E.useContext(yx),c=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(Tx);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&VE(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const g=n[Sx],m=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Jd.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),m.current=!1))}),p}function VE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ex(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&wo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Ex(e){if(e)return e.options.allowProjection!==!1?e.projection:Ex(e.parent)}function $E({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&PE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:zE(c)},{isStatic:f}=p,h=DE(c),g=r(c,f);if(!f&&Zd){BE(p,e);const m=HE(p);d=m.MeasureLayout,h.visualElement=LE(o,g,p,t,m.ProjectionNode)}return y.jsxs(ol.Provider,{value:h,children:[d&&h.visualElement?y.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,NE(g,h.visualElement,u),g,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[jE]=o,l}function zE({layoutId:e}){const t=E.useContext(Ui).id;return t&&e!==void 0?t+"-"+e:e}function BE(e,t){const n=E.useContext(yx).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?ri(!1,r):fn(!1,r)}}function HE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Cx=e=>t=>typeof t=="string"&&t.startsWith(e),tf=Cx("--"),WE=Cx("var(--"),nf=e=>WE(e)?qE.test(e.split("/*")[0].trim()):!1,qE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yi={};function UE(e){for(const t in e)Yi[t]=e[t],tf(t)&&(Yi[t].isCSSVariable=!0)}const oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ro=new Set(oi);function kx(e,{layout:t,layoutId:n}){return ro.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yi[e]||e==="opacity")}const At=e=>!!(e&&e.getVelocity),Rx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Yn=(e,t,n)=>n>t?t:n<e?e:n,ii={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gi={...ii,transform:e=>Yn(0,1,e)},Da={...ii,default:1},ha=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sr=ha("deg"),Mn=ha("%"),Se=ha("px"),KE=ha("vh"),YE=ha("vw"),Ym={...Mn,parse:e=>Mn.parse(e)/100,transform:e=>Mn.transform(e*100)},GE={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,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},ZE={rotate:sr,rotateX:sr,rotateY:sr,rotateZ:sr,scale:Da,scaleX:Da,scaleY:Da,scaleZ:Da,skew:sr,skewX:sr,skewY:sr,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Gi,originX:Ym,originY:Ym,originZ:Se},Gm={...ii,transform:Math.round},rf={...GE,...ZE,zIndex:Gm,size:Se,fillOpacity:Gi,strokeOpacity:Gi,numOctaves:Gm},XE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QE=oi.length;function JE(e,t,n){let r="",o=!0;for(let i=0;i<QE;i++){const a=oi[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=Rx(s,rf[a]);if(!l){o=!1;const u=XE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function of(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(ro.has(l)){a=!0;continue}else if(tf(l)){o[l]=c;continue}else{const u=Rx(c,rf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=JE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const af=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Px(e,t,n){for(const r in t)!At(t[r])&&!kx(r,n)&&(e[r]=t[r])}function eC({transformTemplate:e},t){return E.useMemo(()=>{const n=af();return of(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tC(e,t){const n=e.style||{},r={};return Px(r,n,e),Object.assign(r,eC(e,t)),r}function nC(e,t){const n={},r=tC(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 rC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sf(e){return typeof e!="string"||e.includes("-")?!1:!!(rC.indexOf(e)>-1||/[A-Z]/u.test(e))}const oC={offset:"stroke-dashoffset",array:"stroke-dasharray"},iC={offset:"strokeDashoffset",array:"strokeDasharray"};function aC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?oC:iC;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function Zm(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function sC(e,t,n){const r=Zm(t,e.x,e.width),o=Zm(n,e.y,e.height);return`${r} ${o}`}function lf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(of(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=sC(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&aC(p,a,s,l,!1)}const Ax=()=>({...af(),attrs:{}}),cf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lC(e,t,n,r){const o=E.useMemo(()=>{const i=Ax();return lf(i,t,cf(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Px(i,e.style,e),o.style={...i,...o.style}}return o}function cC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(sf(n)?lC:nC)(r,i,a,n),c=IE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>At(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Xm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uf(e,t,n,r){if(typeof t=="function"){const[o,i]=Xm(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]=Xm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Nu=e=>Array.isArray(e),uC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),dC=e=>Nu(e)?e[e.length-1]||0:e;function es(e){const t=At(e)?e.get():e;return uC(t)?t.toValue():t}function fC({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:pC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const Ix=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>fC(e,t,r,o);return n?i():wn(i)};function pC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=es(i[p]);let{initial:a,animate:s}=e;const l=al(e),c=wx(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"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=uf(e,p[f]);if(h){const{transitionEnd:g,transition:m,...v}=h;for(const x in v){let b=v[x];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[x]=b)}for(const x in g)o[x]=g[x]}}}return o}function df(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(At(o[a])||t.style&&At(t.style[a])||kx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const mC={useVisualState:Ix({scrapeMotionValuesFromProps:df,createRenderState:af})};function _x(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Ox(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Mx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Dx(e,t,n,r){Ox(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Mx.has(o)?o:ef(o),t.attrs[o])}function jx(e,t,n){const r=df(e,t,n);for(const o in e)if(At(e[o])||At(t[o])){const i=oi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Qm=["x","y","width","height","cx","cy","r"],hC={useVisualState:Ix({scrapeMotionValuesFromProps:jx,createRenderState:Ax,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(ro.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Qm.length;s++){const l=Qm[s];e[l]!==t[l]&&(a=!0)}a&&rt.read(()=>{_x(n,r),rt.render(()=>{lf(r,o,cf(n.tagName),e.transformTemplate),Dx(n,r)})})}})};function gC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...sf(r)?hC:mC,preloadedFeatures:e,useRender:cC(o),createVisualElement:t,Component:r};return $E(a)}}function Zi(e,t,n){const r=e.getProps();return uf(r,t,n!==void 0?n:r.custom,e)}function ff(e,t){return e?e[t]||e.default||e:void 0}const Nx=new Set(["width","height","top","left","right","bottom",...oi]);function pf(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function vC([...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}class mf{constructor(){this.subscriptions=[]}add(t){return pf(this.subscriptions,t),()=>sl(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}}function Fx(e,t){return t?e*(1e3/t):0}let ts;function yC(){ts=void 0}const Dn={now:()=>(ts===void 0&&Dn.set(Mt.isProcessing||bE.useManualTiming?Mt.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(yC)}},Jm=30,xC=e=>!isNaN(parseFloat(e)),_i={current:void 0};class bC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Dn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 mf);const r=this.events[t].add(n);return t==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return _i.current&&_i.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Jm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Jm);return Fx(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new bC(e,t)}function wC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function SC(e,t){const n=Zi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=dC(i[a]);wC(e,a,s)}}function TC(e){return!!(At(e)&&e.add)}function Fu(e,t){const n=e.getValue("willChange");if(TC(n))return n.add(t)}function Lx(e){return e.props[Sx]}function hf(e){let t;return()=>(t===void 0&&(t=e()),t)}const EC=hf(()=>window.ScrollTimeline!==void 0);class CC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,n){const r=this.animations.map(o=>{if(EC()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Vx extends CC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const xn=e=>e*1e3,jn=e=>e/1e3;function ll(e){return typeof e=="function"}function eh(e,t){e.timeline=t,e.onfinish=null}const gf=e=>Array.isArray(e)&&typeof e[0]=="number",kC={linearEasing:void 0};function RC(e,t){const n=hf(e);return()=>{var r;return(r=kC[t])!==null&&r!==void 0?r:n()}}const us=RC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Kr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$x=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Kr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function zx(e){return!!(typeof e=="function"&&us()||!e||typeof e=="string"&&(e in Lu||us())||gf(e)||Array.isArray(e)&&e.every(zx))}const Ei=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ei([0,.65,.55,1]),circOut:Ei([.55,0,1,.45]),backIn:Ei([.31,.01,.66,-.59]),backOut:Ei([.33,1.53,.69,.99])};function Bx(e,t){if(e)return typeof e=="function"&&us()?$x(e,t):gf(e)?Ei(e):Array.isArray(e)?e.map(n=>Bx(n,t)||Lu.easeOut):Lu[e]}const Hx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,PC=1e-7,AC=12;function IC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Hx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>PC&&++s<AC);return a}function ga(e,t,n,r){if(e===t&&n===r)return Kt;const o=i=>IC(i,0,1,e,n);return i=>i===0||i===1?i:Hx(o(i),t,r)}const Wx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qx=e=>t=>1-e(1-t),Ux=ga(.33,1.53,.69,.99),vf=qx(Ux),Kx=Wx(vf),Yx=e=>(e*=2)<1?.5*vf(e):.5*(2-Math.pow(2,-10*(e-1))),yf=e=>1-Math.sin(Math.acos(e)),Gx=qx(yf),Zx=Wx(yf),Xx=e=>/^0[^.\s]+$/u.test(e);function _C(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xx(e):!0}const Oi=e=>Math.round(e*1e5)/1e5,xf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function OC(e){return e==null}const MC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bf=(e,t)=>n=>!!(typeof n=="string"&&MC.test(n)&&n.startsWith(e)||t&&!OC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Qx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(xf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},DC=e=>Yn(0,255,e),_c={...ii,transform:e=>Math.round(DC(e))},zr={test:bf("rgb","red"),parse:Qx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_c.transform(e)+", "+_c.transform(t)+", "+_c.transform(n)+", "+Oi(Gi.transform(r))+")"};function jC(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 Vu={test:bf("#"),parse:jC,transform:zr.transform},So={test:bf("hsl","hue"),parse:Qx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mn.transform(Oi(t))+", "+Mn.transform(Oi(n))+", "+Oi(Gi.transform(r))+")"},Nt={test:e=>zr.test(e)||Vu.test(e)||So.test(e),parse:e=>zr.test(e)?zr.parse(e):So.test(e)?So.parse(e):Vu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zr.transform(e):So.transform(e)},NC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(NC))===null||n===void 0?void 0:n.length)||0)>0}const Jx="number",eb="color",LC="var",VC="var(",th="${}",$C=/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 Xi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace($C,l=>(Nt.test(l)?(r.color.push(i),o.push(eb),n.push(Nt.parse(l))):l.startsWith(VC)?(r.var.push(i),o.push(LC),n.push(l)):(r.number.push(i),o.push(Jx),n.push(parseFloat(l))),++i,th)).split(th);return{values:n,split:s,indexes:r,types:o}}function tb(e){return Xi(e).values}function nb(e){const{split:t,types:n}=Xi(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===Jx?i+=Oi(o[a]):s===eb?i+=Nt.transform(o[a]):i+=o[a]}return i}}const zC=e=>typeof e=="number"?0:e;function BC(e){const t=tb(e);return nb(e)(t.map(zC))}const hr={test:FC,parse:tb,createTransformer:nb,getAnimatableNone:BC},HC=new Set(["brightness","contrast","saturate","opacity"]);function WC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xf)||[];if(!r)return e;const o=n.replace(r,"");let i=HC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const qC=/\b([a-z-]*)\(.*?\)/gu,$u={...hr,getAnimatableNone:e=>{const t=e.match(qC);return t?t.map(WC).join(" "):e}},UC={...rf,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:$u,WebkitFilter:$u},rb=e=>UC[e];function ob(e,t){let n=rb(e);return n!==$u&&(n=hr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const KC=new Set(["auto","none","0"]);function YC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!KC.has(i)&&Xi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ob(n,o)}const Br=e=>e*180/Math.PI,zu=e=>{const t=Br(Math.atan2(e[1],e[0]));return Bu(t)},GC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zu,rotateZ:zu,skewX:e=>Br(Math.atan(e[1])),skewY:e=>Br(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bu=e=>(e=e%360,e<0&&(e+=360),e),nh=zu,rh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ZC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rh,scaleY:oh,scale:e=>(rh(e)+oh(e))/2,rotateX:e=>Bu(Br(Math.atan2(e[6],e[5]))),rotateY:e=>Bu(Br(Math.atan2(-e[2],e[0]))),rotateZ:nh,rotate:nh,skewX:e=>Br(Math.atan(e[4])),skewY:e=>Br(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ih(e){return e.includes("scale")?1:0}function Hu(e,t){if(!e||e==="none")return ih(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ZC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=GC,o=s}if(!o)return ih(t);const i=r[t],a=o[1].split(",").map(QC);return typeof i=="function"?i(a):a[i]}const XC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hu(n,t)};function QC(e){return parseFloat(e.trim())}const ah=e=>e===ii||e===Se,JC=new Set(["x","y","z"]),ek=oi.filter(e=>!JC.has(e));function tk(e){const t=[];return ek.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>Hu(t,"x"),y:(e,{transform:t})=>Hu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Wr=new Set;let Wu=!1,qu=!1;function ib(){if(qu){const e=Array.from(Wr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=tk(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])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}qu=!1,Wu=!1,Wr.forEach(e=>e.complete()),Wr.clear()}function ab(){Wr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qu=!0)})}function nk(){ab(),ib()}class wf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Wr.add(this),Wu||(Wu=!0,rt.read(ab),rt.resolveKeyframes(ib))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Wr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Wr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const sb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),rk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ok(e){const t=rk.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ik=4;function lb(e,t,n=1){fn(n<=ik,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=ok(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return sb(a)?parseFloat(a):a}return nf(o)?lb(o,t,n+1):o}const cb=e=>t=>t.test(e),ak={test:e=>e==="auto",parse:e=>e},ub=[ii,Se,Mn,sr,YE,KE,ak],sh=e=>ub.find(cb(e));class db extends wf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),nf(c))){const u=lb(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Nx.has(r)||t.length!==2)return;const[o,i]=t,a=sh(o),s=sh(i);if(a!==s)if(ah(a)&&ah(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)_C(t[o])&&r.push(o);r.length&&YC(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=Fo[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(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const lh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hr.test(e)||e==="0")&&!e.startsWith("url("));function sk(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 lk(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=lh(o,t),s=lh(i,t);return ri(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:sk(e)||(n==="spring"||ll(n))&&r}const ck=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ck),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const uk=40;class fb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Dn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>uk?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nk(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Dn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!lk(t,r,o,i))if(a)this.options.duration=0;else{l&&l(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ds=2e4;function Sf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ds;)t+=n,r=e.next(t);return t>=ds?1/0:t}const lt=(e,t,n)=>e+(t-e)*n;function Oc(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 dk({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=Oc(l,s,e+1/3),i=Oc(l,s,e),a=Oc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function fs(e,t){return n=>n>0?t:e}const Mc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},fk=[Vu,zr,So],pk=e=>fk.find(t=>t.test(e));function ch(e){const t=pk(e);if(ri(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===So&&(n=dk(n)),n}const uh=(e,t)=>{const n=ch(e),r=ch(t);if(!n||!r)return fs(e,t);const o={...n};return i=>(o.red=Mc(n.red,r.red,i),o.green=Mc(n.green,r.green,i),o.blue=Mc(n.blue,r.blue,i),o.alpha=lt(n.alpha,r.alpha,i),zr.transform(o))},mk=(e,t)=>n=>t(e(n)),va=(...e)=>e.reduce(mk),Uu=new Set(["none","hidden"]);function hk(e,t){return Uu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gk(e,t){return n=>lt(e,t,n)}function Tf(e){return typeof e=="number"?gk:typeof e=="string"?nf(e)?fs:Nt.test(e)?uh:xk:Array.isArray(e)?pb:typeof e=="object"?Nt.test(e)?uh:vk:fs}function pb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Tf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function vk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Tf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function yk(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const xk=(e,t)=>{const n=hr.createTransformer(t),r=Xi(e),o=Xi(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?Uu.has(e)&&!o.values.length||Uu.has(t)&&!r.values.length?hk(e,t):va(pb(yk(r,o),o.values),n):(ri(!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.`),fs(e,t))};function mb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):Tf(e)(e,t)}const bk=5;function hb(e,t,n){const r=Math.max(t-bk,0);return Fx(n-e(r),t-r)}const ht={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},dh=.001;function wk({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;ri(e<=xn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Yn(ht.minDamping,ht.maxDamping,a),e=Yn(ht.minDuration,ht.maxDuration,jn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Ku(c,a),h=Math.exp(-d);return dh-p/f*h},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-d),g=Ku(Math.pow(c,2),a);return(-o(c)+dh>0?-1:1)*((p-f)*h)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=Tk(o,i,s);if(e=xn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Sk=12;function Tk(e,t,n){let r=n;for(let o=1;o<Sk;o++)r=r-e(r)/t(r);return r}function Ku(e,t){return e*Math.sqrt(1-t*t)}const Ek=["duration","bounce"],Ck=["stiffness","damping","mass"];function fh(e,t){return t.some(n=>e[n]!==void 0)}function kk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!fh(e,Ck)&&fh(e,Ek))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Yn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=wk(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Ef(e=ht.visualDuration,t=ht.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=kk({...n,velocity:-jn(n.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(l*u)),m=a-i,v=jn(Math.sqrt(l/u)),x=Math.abs(m)<5;r||(r=x?ht.restSpeed.granular:ht.restSpeed.default),o||(o=x?ht.restDelta.granular:ht.restDelta.default);let b;if(g<1){const w=Ku(v,g);b=T=>{const C=Math.exp(-g*v*T);return a-C*((h+g*v*m)/w*Math.sin(w*T)+m*Math.cos(w*T))}}else if(g===1)b=w=>a-Math.exp(-v*w)*(m+(h+v*m)*w);else{const w=v*Math.sqrt(g*g-1);b=T=>{const C=Math.exp(-g*v*T),k=Math.min(w*T,300);return a-C*((h+g*v*m)*Math.sinh(k)+w*m*Math.cosh(k))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const T=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?xn(h):hb(b,w,T));const k=Math.abs(C)<=r,I=Math.abs(a-T)<=o;s.done=k&&I}return s.value=s.done?a:T,s},toString:()=>{const w=Math.min(Sf(S),ds),T=$x(C=>S.next(w*C).value,w,30);return w+"ms "+T}};return S}function ph({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],p={done:!1,value:d},f=k=>s!==void 0&&k<s||l!==void 0&&k>l,h=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const m=d+g,v=a===void 0?m:a(m);v!==m&&(g=v-d);const x=k=>-g*Math.exp(-k/r),b=k=>v+x(k),S=k=>{const I=x(k),P=b(k);p.done=Math.abs(I)<=c,p.value=p.done?v:P};let w,T;const C=k=>{f(p.value)&&(w=k,T=Ef({keyframes:[p.value,h(p.value)],velocity:hb(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!T&&w===void 0&&(I=!0,S(k),C(k)),w!==void 0&&k>=w?T.next(k-w):(!I&&S(k),p)}}}const Rk=ga(.42,0,1,1),Pk=ga(0,0,.58,1),gb=ga(.42,0,.58,1),vb=e=>Array.isArray(e)&&typeof e[0]!="number",mh={linear:Kt,easeIn:Rk,easeInOut:gb,easeOut:Pk,circIn:yf,circInOut:Zx,circOut:Gx,backIn:vf,backInOut:Kx,backOut:Ux,anticipate:Yx},Yu=e=>{if(gf(e)){fn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ga(t,n,r,o)}else if(typeof e=="string")return fn(mh[e]!==void 0,`Invalid easing type '${e}'`),mh[e];return e};function Ak(e,t,n){const r=[],o=n||mb,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]||Kt:t;s=va(l,s)}r.push(s)}return r}function yb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(fn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Ak(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 p=Kr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Yn(e[0],e[i-1],u)):c}function xb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Kr(0,t,r);e.push(lt(n,1,o))}}function bb(e){const t=[0];return xb(t,e.length-1),t}function Ik(e,t){return e.map(n=>n*t)}function _k(e,t){return e.map(()=>t||gb).splice(0,e.length-1)}function Mi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=vb(r)?r.map(Yu):Yu(r),i={done:!1,value:t[0]},a=Ik(n&&n.length===t.length?n:bb(t),e),s=yb(a,t,{ease:Array.isArray(o)?o:_k(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Ok=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>Kn(t),now:()=>Mt.isProcessing?Mt.timestamp:Dn.now()}},Mk={decay:ph,inertia:ph,tween:Mi,keyframes:Mi,spring:Ef},Dk=e=>e/100;class Cf extends fb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||wf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:Mk[n]||Mi;let l,c;process.env.NODE_ENV!=="production"&&s!==Mi&&fn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Mi&&typeof t[0]!="number"&&(l=va(Dk,mb(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=Sf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,S=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),P=k%1;!P&&k>=1&&(P=1),P===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(P=1-P,g&&(P-=g/d)):h==="mirror"&&(S=a)),b=Yn(0,1,P)*d}const w=x?{done:!1,value:l[0]}:S.next(b);s&&(w.value=s(w.value));let{done:T}=w;!x&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&o!==void 0&&(w.value=cl(l,this.options,o)),m&&m(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?jn(t.calculatedDuration):0}get time(){return jn(this.currentTime)}set time(t){t=xn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=jn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Ok,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const jk=new Set(["opacity","clipPath","filter","transform"]);function Nk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Bx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const Fk=hf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ps=10,Lk=2e4;function Vk(e){return ll(e.type)||e.type==="spring"||!zx(e.ease)}function $k(e,t){const n=new Cf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Lk;)r=n.sample(i),o.push(r.value),i+=ps;return{times:void 0,keyframes:o,duration:i-ps,ease:"linear"}}const wb={anticipate:Yx,backInOut:Kx,circInOut:Zx};function zk(e){return e in wb}class hh extends fb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new db(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&us()&&zk(i)&&(i=wb[i]),Vk(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...g}=this.options,m=$k(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=Nk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(eh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return jn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return jn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Kt;const{animation:r}=n;eh(r,t)}return Kt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new Cf({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=xn(this.time);c.setWithVelocity(h.sample(g-ps).value,h.sample(g).value,ps)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Fk()&&r&&jk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Bk={type:"spring",stiffness:500,damping:25,restSpeed:10},Hk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Wk={type:"keyframes",duration:.8},qk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Uk=(e,{keyframes:t})=>t.length>2?Wk:ro.has(e)?e.startsWith("scale")?Hk(t[1]):Bk:qk;function Kk({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 kf=(e,t,n,r={},o,i)=>a=>{const s=ff(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};Kk(s)||(u={...u,...Uk(e,u)}),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return rt.update(()=>{u.onUpdate(p),u.onComplete()}),new Vx([])}return!i&&hh.supports(u)?new hh(u):new Cf(u)};function Yk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Rf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&Yk(u,d))continue;const h={delay:n,...ff(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=Lx(e);if(v){const x=window.MotionHandoffAnimation(v,d,rt);x!==null&&(h.startTime=x,g=!0)}}Fu(e,d),p.start(kf(d,p,f,e.shouldReduceMotion&&Nx.has(d)?{type:!1}:h,e,g));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{rt.update(()=>{s&&SC(e,s)})}),c}function Gu(e,t,n={}){var r;const o=Zi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Rf(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Gk(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Gk(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(Zk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Gu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Zk(e,t){return e.sortNodePosition(t)}function Xk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Gu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Gu(e,t,n);else{const o=typeof t=="function"?Zi(e,t,n.custom):t;r=Promise.all(Rf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Sb(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 Qk=Qd.length;function Tb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Tb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Qk;n++){const r=Qd[n],o=e.props[r];(Ki(o)||o===!1)&&(t[r]=o)}return t}const Jk=[...Xd].reverse(),eR=Xd.length;function tR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Xk(e,n,r)))}function nR(e){let t=tR(e),n=gh(),r=!0;const o=l=>(c,u)=>{var d;const p=Zi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...g}=p;c={...c,...g,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Tb(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<eR;m++){const v=Jk[m],x=n[v],b=c[v]!==void 0?c[v]:u[v],S=Ki(b),w=v===l?x.isActive:null;w===!1&&(h=m);let T=b===u[v]&&b!==c[v]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),x.protectedKeys={...f},!x.isActive&&w===null||!b&&!x.prevProp||il(b)||typeof b=="boolean")continue;const C=rR(x.prevProp,b);let k=C||v===l&&x.isActive&&!T&&S||m>h&&S,I=!1;const P=Array.isArray(b)?b:[b];let N=P.reduce(o(v),{});w===!1&&(N={});const{prevResolvedValues:D={}}=x,L={...D,...N},A=F=>{k=!0,p.has(F)&&(I=!0,p.delete(F)),x.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in L){const j=N[F],H=D[F];if(f.hasOwnProperty(F))continue;let _=!1;Nu(j)&&Nu(H)?_=!Sb(j,H):_=j!==H,_?j!=null?A(F):p.add(F):j!==void 0&&p.has(F)?A(F):x.protectedKeys[F]=!0}x.prevProp=b,x.prevResolvedValues=N,x.isActive&&(f={...f,...N}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(T&&C)||I)&&d.push(...P.map(F=>({animation:F,options:{type:v}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const v=Zi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}p.forEach(v=>{const x=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),m[v]=x??null}),d.push({animation:m})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=gh(),r=!0}}}function rR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Sb(t,e):!1}function Dr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gh(){return{animate:Dr(!0),whileInView:Dr(),whileHover:Dr(),whileTap:Dr(),whileDrag:Dr(),whileFocus:Dr(),exit:Dr()}}class Sr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class oR extends Sr{constructor(t){super(t),t.animationState||(t.animationState=nR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let iR=0;class aR extends Sr{constructor(){super(...arguments),this.id=iR++}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 sR={animation:{Feature:oR},exit:{Feature:aR}},hn={x:!1,y:!1};function Eb(){return hn.x||hn.y}function lR(e){return e==="x"||e==="y"?hn[e]?null:(hn[e]=!0,()=>{hn[e]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function Qi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Pf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ya(e){return{point:{x:e.pageX,y:e.pageY}}}const cR=e=>t=>Pf(t)&&e(t,ya(t));function Di(e,t,n,r){return Qi(e,t,cR(n),r)}function Cb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function uR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const kb=1e-4,fR=1-kb,pR=1+kb,Rb=.01,mR=0-Rb,hR=0+Rb;function zt(e){return e.max-e.min}function gR(e,t,n){return Math.abs(e-t)<=n}function vh(e,t,n,r=.5){e.origin=r,e.originPoint=lt(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=fR&&e.scale<=pR||isNaN(e.scale))&&(e.scale=1),(e.translate>=mR&&e.translate<=hR||isNaN(e.translate))&&(e.translate=0)}function ji(e,t,n,r){vh(e.x,t.x,n.x,r?r.originX:void 0),vh(e.y,t.y,n.y,r?r.originY:void 0)}function yh(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function vR(e,t,n){yh(e.x,t.x,n.x),yh(e.y,t.y,n.y)}function xh(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Ni(e,t,n){xh(e.x,t.x,n.x),xh(e.y,t.y,n.y)}const bh=()=>({translate:0,scale:1,origin:0,originPoint:0}),To=()=>({x:bh(),y:bh()}),wh=()=>({min:0,max:0}),vt=()=>({x:wh(),y:wh()});function sn(e){return[e("x"),e("y")]}function Dc(e){return e===void 0||e===1}function Zu({scale:e,scaleX:t,scaleY:n}){return!Dc(e)||!Dc(t)||!Dc(n)}function Nr(e){return Zu(e)||Pb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Pb(e){return Sh(e.x)||Sh(e.y)}function Sh(e){return e&&e!=="0%"}function ms(e,t,n){const r=e-n,o=t*r;return n+o}function Th(e,t,n,r,o){return o!==void 0&&(e=ms(e,o,r)),ms(e,n,r)+t}function Xu(e,t=0,n=1,r,o){e.min=Th(e.min,t,n,r,o),e.max=Th(e.max,t,n,r,o)}function Ab(e,{x:t,y:n}){Xu(e.x,t.translate,t.scale,t.originPoint),Xu(e.y,n.translate,n.scale,n.originPoint)}const Eh=.999999999999,Ch=1.0000000000001;function yR(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&&Co(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ab(e,a)),r&&Nr(i.latestValues)&&Co(e,i.latestValues))}t.x<Ch&&t.x>Eh&&(t.x=1),t.y<Ch&&t.y>Eh&&(t.y=1)}function Eo(e,t){e.min=e.min+t,e.max=e.max+t}function kh(e,t,n,r,o=.5){const i=lt(e.min,e.max,o);Xu(e,t,n,i,r)}function Co(e,t){kh(e.x,t.x,t.scaleX,t.scale,t.originX),kh(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ib(e,t){return Cb(dR(e.getBoundingClientRect(),t))}function xR(e,t,n){const r=Ib(e,n),{scroll:o}=t;return o&&(Eo(r.x,o.offset.x),Eo(r.y,o.offset.y)),r}const _b=({current:e})=>e?e.ownerDocument.defaultView:null,Rh=(e,t)=>Math.abs(e-t);function bR(e,t){const n=Rh(e.x,t.x),r=Rh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ob{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Nc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=bR(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:g}=Mt;this.history.push({...h,timestamp:g});const{onStart:m,onMove:v}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=jc(p,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Nc(d.type==="pointercancel"?this.lastMoveEventInfo:jc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!Pf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ya(t),s=jc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Nc(s,this.history)),this.removeListeners=va(Di(this.contextWindow,"pointermove",this.handlePointerMove),Di(this.contextWindow,"pointerup",this.handlePointerUp),Di(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Kn(this.updatePoint)}}function jc(e,t){return t?{point:t(e.point)}:e}function Ph(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nc({point:e},t){return{point:e,delta:Ph(e,Mb(t)),offset:Ph(e,wR(t)),velocity:SR(t,.1)}}function wR(e){return e[0]}function Mb(e){return e[e.length-1]}function SR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Mb(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=jn(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 TR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?lt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?lt(n,e,r.max):Math.min(e,n)),e}function Ah(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 ER(e,{top:t,left:n,bottom:r,right:o}){return{x:Ah(e.x,n,o),y:Ah(e.y,t,r)}}function Ih(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 CR(e,t){return{x:Ih(e.x,t.x),y:Ih(e.y,t.y)}}function kR(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Kr(t.min,t.max-r,e.min):r>o&&(n=Kr(e.min,e.max-o,t.min)),Yn(0,1,n)}function RR(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 Qu=.35;function PR(e=Qu){return e===!1?e=0:e===!0&&(e=Qu),{x:_h(e,"left","right"),y:_h(e,"top","bottom")}}function _h(e,t,n){return{min:Oh(e,t),max:Oh(e,n)}}function Oh(e,t){return typeof e=="number"?e:e[t]||0}const AR=new WeakMap;class IR{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=vt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ya(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lR(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(m=>{let v=this.getAxisMotionValue(m).get()||0;if(Mn.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[m];b&&(v=zt(b)*(parseFloat(v)/100))}}this.originPoint[m]=v}),h&&rt.postRender(()=>h(u,d)),Fu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=_R(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>sn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ob(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:_b(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&rt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ja(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=TR(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&wo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=ER(o.layoutBox,n):this.constraints=!1,this.elastic=PR(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=RR(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;fn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=xR(r,o.root,this.visualElement.getTransformPagePoint());let a=CR(o.layout.layoutBox,i);if(n){const s=n(uR(a));this.hasMutatedConstraints=!!s,s&&(a=Cb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=sn(u=>{if(!ja(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Fu(this.visualElement,t),r.start(kf(t,r,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.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){sn(n=>{const{drag:r}=this.getProps();if(!ja(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-lt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};sn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=kR({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(),sn(a=>{if(!ja(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(lt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;AR.set(this.visualElement,this);const t=this.visualElement.current,n=Di(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),rt.read(r);const a=Qi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(sn(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=Qu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ja(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _R(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OR extends Sr{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new IR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mh=e=>(t,n)=>{e&&rt.postRender(()=>e(t,n))};class MR extends Sr{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new Ob(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_b(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mh(t),onStart:Mh(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&rt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Di(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=Dh(e,t.target.x),r=Dh(e,t.target.y);return`${n}% ${r}%`}},DR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=hr.parse(e);if(o.length>5)return r;const i=hr.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=lt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class jR extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;UE(NR),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||rt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Jd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Db(e){const[t,n]=hx(),r=E.useContext(Ui);return y.jsx(jR,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(Tx),isPresent:t,safeToRemove:n})}const NR={borderRadius:{...bi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bi,borderTopRightRadius:bi,borderBottomLeftRadius:bi,borderBottomRightRadius:bi,boxShadow:DR};function jb(e,t,n){const r=At(e)?e:No(e);return r.start(kf("",r,t,n)),r.animation}function Nb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const FR=(e,t)=>e.depth-t.depth;class LR{constructor(){this.children=[],this.isDirty=!1}add(t){pf(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(FR),this.isDirty=!1,this.children.forEach(t)}}function VR(e,t){const n=Dn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Kn(r),e(i-t))};return rt.read(r,!0),()=>Kn(r)}const Fb=["TopLeft","TopRight","BottomLeft","BottomRight"],$R=Fb.length,jh=e=>typeof e=="string"?parseFloat(e):e,Nh=e=>typeof e=="number"||Se.test(e);function zR(e,t,n,r,o,i){o?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,BR(r)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,HR(r))):i&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<$R;a++){const s=`border${Fb[a]}Radius`;let l=Fh(t,s),c=Fh(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Nh(l)===Nh(c)?(e[s]=Math.max(lt(jh(l),jh(c),r),0),(Mn.test(c)||Mn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,r))}function Fh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const BR=Lb(0,.5,Gx),HR=Lb(.5,.95,Kt);function Lb(e,t,n){return r=>r<e?0:r>t?1:n(Kr(e,t,r))}function Lh(e,t){e.min=t.min,e.max=t.max}function on(e,t){Lh(e.x,t.x),Lh(e.y,t.y)}function Vh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function $h(e,t,n,r,o){return e-=t,e=ms(e,1/n,r),o!==void 0&&(e=ms(e,1/o,r)),e}function WR(e,t=0,n=1,r=.5,o,i=e,a=e){if(Mn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=lt(i.min,i.max,r);e===i&&(s-=t),e.min=$h(e.min,t,n,s,o),e.max=$h(e.max,t,n,s,o)}function zh(e,t,[n,r,o],i,a){WR(e,t[n],t[r],t[o],t.scale,i,a)}const qR=["x","scaleX","originX"],UR=["y","scaleY","originY"];function Bh(e,t,n,r){zh(e.x,t,qR,n?n.x:void 0,r?r.x:void 0),zh(e.y,t,UR,n?n.y:void 0,r?r.y:void 0)}function Hh(e){return e.translate===0&&e.scale===1}function Vb(e){return Hh(e.x)&&Hh(e.y)}function Wh(e,t){return e.min===t.min&&e.max===t.max}function KR(e,t){return Wh(e.x,t.x)&&Wh(e.y,t.y)}function qh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $b(e,t){return qh(e.x,t.x)&&qh(e.y,t.y)}function Uh(e){return zt(e.x)/zt(e.y)}function Kh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class YR{constructor(){this.members=[]}add(t){pf(this.members,t),t.scheduleRender()}remove(t){if(sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GR(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0: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:p,skewX:f,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),h&&(r+=`skewY(${h}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 Fc=["","X","Y","Z"],ZR={visibility:"hidden"},Yh=1e3;let XR=0;function Lc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function zb(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",rt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&zb(r)}function Bb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=XR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(eP),this.nodes.forEach(iP),this.nodes.forEach(aP),this.nodes.forEach(tP)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new LR)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new mf),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,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Nb(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=VR(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Zh))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||dP,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!$b(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const S={...ff(g,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Zh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Kn(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(sP),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&&zb(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(Gh);return}this.isUpdating||this.nodes.forEach(rP),this.isUpdating=!1,this.nodes.forEach(oP),this.nodes.forEach(QR),this.nodes.forEach(JR),this.clearAllSnapshots();const s=Dn.now();Mt.delta=Yn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Ic.update.process(Mt),Ic.preRender.process(Mt),Ic.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nP),this.sharedNodes.forEach(lP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vt(),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){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&&!Vb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Nr(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)),fP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return vt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(pP))){const{scroll:u}=this.root;u&&(Eo(l.x,u.offset.x),Eo(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=vt();if(on(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&on(l,a),Eo(l.x,d.offset.x),Eo(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=vt();on(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&&Co(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Nr(u.latestValues)&&Co(l,u.latestValues)}return Nr(this.latestValues)&&Co(l,this.latestValues),l}removeTransform(a){const s=vt();on(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Nr(c.latestValues))continue;Zu(c.latestValues)&&c.updateSnapshot();const u=vt(),d=c.measurePageBox();on(u,d),Bh(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Nr(this.latestValues)&&Bh(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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Ni(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),on(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):on(this.target,this.layout.layoutBox),Ab(this.target,this.targetDelta)):on(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Ni(this.relativeTargetOrigin,this.target,f.target),on(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Zu(this.parent.latestValues)||Pb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;on(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;yR(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=vt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vh(this.prevProjectionDelta.x,this.projectionDelta.x),Vh(this.prevProjectionDelta.y,this.projectionDelta.y)),ji(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Kh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Kh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=To(),this.projectionDelta=To(),this.projectionDeltaWithTransform=To()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=To();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=vt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=f!==h,m=this.getStack(),v=!m||m.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(uP));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const w=S/1e3;Xh(d.x,a.x,w),Xh(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ni(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cP(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&KR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=vt()),on(b,this.relativeTarget)),g&&(this.animationValues=u,zR(u,c,this.latestValues,w,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Kn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=jb(0,Yh,{...a,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(Yh),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&&Hb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||vt();const d=zt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=zt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}on(s,l),Co(s,u),ji(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new YR),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(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.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&&Lc("z",a,c,this.animationValues);for(let u=0;u<Fc.length;u++)Lc(`rotate${Fc[u]}`,a,c,this.animationValues),Lc(`skew${Fc[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ZR;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=es(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=es(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Nr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=GR(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:h}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Yi){if(p[g]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:x}=Yi[g],b=c.transform==="none"?p[g]:m(p[g],d);if(v){const S=v.length;for(let w=0;w<S;w++)c[v[w]]=b}else x?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?es(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Gh),this.root.sharedNodes.clear()}}}function QR(e){e.updateLayout()}function JR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Hb(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=To();ji(s,r,n.layoutBox);const l=To();a?ji(l,e.applyTransform(o,!0),n.measuredBox):ji(l,r,n.layoutBox);const c=!Vb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=vt();Ni(h,n.layoutBox,p.layoutBox);const g=vt();Ni(g,r,f.layoutBox),$b(h,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function eP(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 tP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nP(e){e.clearSnapshot()}function Gh(e){e.clearMeasurements()}function rP(e){e.isLayoutDirty=!1}function oP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iP(e){e.resolveTargetDelta()}function aP(e){e.calcProjection()}function sP(e){e.resetSkewAndRotation()}function lP(e){e.removeLeadSnapshot()}function Xh(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Qh(e,t,n,r){e.min=lt(t.min,n.min,r),e.max=lt(t.max,n.max,r)}function cP(e,t,n,r){Qh(e.x,t.x,n.x,r),Qh(e.y,t.y,n.y,r)}function uP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dP={duration:.45,ease:[.4,0,.1,1]},Jh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eg=Jh("applewebkit/")&&!Jh("chrome/")?Math.round:Kt;function tg(e){e.min=eg(e.min),e.max=eg(e.max)}function fP(e){tg(e.x),tg(e.y)}function Hb(e,t,n){return e==="position"||e==="preserve-aspect"&&!gR(Uh(t),Uh(n),.2)}function pP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const mP=Bb({attachResizeListener:(e,t)=>Qi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},Wb=Bb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new mP({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hP={pan:{Feature:MR},drag:{Feature:OR,ProjectionNode:Wb,MeasureLayout:Db}};function qb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ub(e,t){const n=qb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ng(e){return!(e.pointerType==="touch"||Eb())}function gP(e,t,n={}){const[r,o,i]=Ub(e,n),a=s=>{if(!ng(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{ng(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function rg(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&&rt.postRender(()=>i(t,ya(t)))}class vP extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=gP(t,(n,r)=>(rg(this.node,r,"Start"),o=>rg(this.node,o,"End"))))}unmount(){}}class yP extends Sr{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=va(Qi(this.node.current,"focus",()=>this.onFocus()),Qi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Kb=(e,t)=>t?e===t?!0:Kb(e,t.parentElement):!1,xP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bP(e){return xP.has(e.tagName)||e.tabIndex!==-1}const Ci=new WeakSet;function og(e){return t=>{t.key==="Enter"&&e(t)}}function $c(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=og(()=>{if(Ci.has(n))return;$c(n,"down");const o=og(()=>{$c(n,"up")}),i=()=>$c(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 ig(e){return Pf(e)&&!Eb()}function SP(e,t,n={}){const[r,o,i]=Ub(e,n),a=s=>{const l=s.currentTarget;if(!ig(s)||Ci.has(l))return;Ci.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!ig(f)||!Ci.has(l))&&(Ci.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Kb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>wP(c,o)),!bP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function ag(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&&rt.postRender(()=>i(t,ya(t)))}class TP extends Sr{mount(){const{current:t}=this.node;t&&(this.unmount=SP(t,(n,r)=>(ag(this.node,r,"Start"),(o,{success:i})=>ag(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ju=new WeakMap,zc=new WeakMap,EP=e=>{const t=Ju.get(e.target);t&&t(e)},CP=e=>{e.forEach(EP)};function kP({root:e,...t}){const n=e||document;zc.has(n)||zc.set(n,{});const r=zc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(CP,{root:e,...t})),r[o]}function RP(e,t,n){const r=kP(t);return Ju.set(e,n),r.observe(e),()=>{Ju.delete(e),r.unobserve(e)}}const PP={some:0,all:1};class AP extends Sr{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:PP[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(),p=c?u:d;p&&p(l)};return RP(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(IP(t,n))&&this.startObserver()}unmount(){}}function IP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _P={inView:{Feature:AP},tap:{Feature:TP},focus:{Feature:yP},hover:{Feature:vP}},OP={layout:{ProjectionNode:Wb,MeasureLayout:Db}},ed={current:null},Yb={current:!1};function MP(){if(Yb.current=!0,!!Zd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ed.current=e.matches;e.addListener(t),t()}else ed.current=!1}const DP=[...ub,Nt,hr],jP=e=>DP.find(cb(e)),Ji=new WeakMap;function NP(e,t,n){for(const r in t){const o=t[r],i=n[r];if(At(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(At(i))e.addValue(r,No(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,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const sg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Gb{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=wf,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=Dn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,rt.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,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=al(n),this.isVariantNode=wx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];l[f]!==void 0&&At(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Ji.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)),Yb.current||MP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ed.current,process.env.NODE_ENV!=="production"&&rl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Kn(this.notifyUpdate),Kn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ro.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jo){const n=jo[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):vt()}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<sg.length;r++){const o=sg[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=NP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(sb(o)||Xx(o))?o=parseFloat(o):!jP(o)&&hr.test(n)&&(o=ob(t,n)),this.setBaseTarget(t,At(o)?o.get():o)),At(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=uf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!At(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Zb extends Gb{constructor(){super(...arguments),this.KeyframeResolver=db}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function FP(e){return window.getComputedStyle(e)}class Xb extends Zb{constructor(){super(...arguments),this.type="html",this.renderInstance=Ox}readValueFromInstance(t,n){if(ro.has(n))return XC(t,n);{const r=FP(t),o=(tf(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ib(t,n)}build(t,n,r){of(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return df(t,n,r)}}class Qb extends Zb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&_x(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ro.has(n)){const r=rb(n);return r&&r.default||0}return n=Mx.has(n)?n:ef(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jx(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&rt.postRender(this.updateDimensions)}build(t,n,r){lf(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Dx(t,n,r,o)}mount(t){this.isSVGTag=cf(t.tagName),super.mount(t)}}const LP=(e,t)=>sf(e)?new Qb(t):new Xb(t,{allowProjection:e!==E.Fragment}),VP=gC({...sR,..._P,...hP,...OP},LP),pt=OE(VP);function $P(e){return E.useEffect(()=>()=>e(),[])}function ul(e){const t=wn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Jb(e,t){const n=ul(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>rt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Kn(r)}}),n}const zP=e=>e&&typeof e=="object"&&e.mix,BP=e=>zP(e)?e.mix:void 0;function HP(...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=yb(o,i,{mixer:BP(i[0]),...a});return t?s(r):s}function WP(e){_i.current=[],e();const t=Jb(_i.current,e);return _i.current=void 0,t}function qP(e,t,n,r){if(typeof e=="function")return WP(e);const o=typeof t=="function"?t:HP(t,n,r);return Array.isArray(e)?lg(e,o):lg([e],([i])=>o(i))}function lg(e,t){const n=wn(()=>[]);return Jb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function UP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Sf(r),ds);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:jn(o)}}const KP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function e0(e,t){return vb(e)?e[KP(0,e.length,t)]:e}function Af(e){return typeof e=="object"&&!Array.isArray(e)}function t0(e,t,n,r){return typeof e=="string"&&Af(t)?qb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function YP(e,t,n){return e*(t+1)}function cg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function GP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function ZP(e,t,n,r,o,i){GP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:lt(o,i,r[a]),easing:e0(n,a)})}function XP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function QP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const JP="easeInOut",eA=20;function tA(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,p=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,cg(d,h.at,u,c));continue}let[g,m,v={}]=h;v.at!==void 0&&(d=cg(d,v.at,u,c));let x=0;const b=(S,w,T,C=0,k=0)=>{const I=nA(S),{delay:P=0,times:N=bb(I),type:D="keyframes",repeat:L,repeatType:A,repeatDelay:O=0,...M}=w;let{ease:F=t.ease||"easeOut",duration:j}=w;const H=typeof P=="function"?P(C,k):P,_=I.length,z=ll(D)?D:o==null?void 0:o[D];if(_<=2&&z){let G=100;if(_===2&&iA(I)){const V=I[1]-I[0];G=Math.abs(V)}const Y={...M};j!==void 0&&(Y.duration=xn(j));const Z=UP(Y,G,z);F=Z.ease,j=Z.duration}j??(j=i);const X=d+H;N.length===1&&N[0]===0&&(N[1]=1);const Q=N.length-I.length;if(Q>0&&xb(N,Q),I.length===1&&I.unshift(null),L){fn(L<eA,"Repeat count too high, must be less than 20"),j=YP(j,L);const G=[...I],Y=[...N];F=Array.isArray(F)?[...F]:[F];const Z=[...F];for(let V=0;V<L;V++){I.push(...G);for(let $=0;$<G.length;$++)N.push(Y[$]+(V+1)),F.push($===0?"linear":e0(Z,$-1))}XP(N,L)}const J=X+j;ZP(T,I,F,N,X,J),x=Math.max(H+j,x),p=Math.max(J,p)};if(At(g)){const S=ug(g,s);b(m,v,dg("default",S))}else{const S=t0(g,m,r,l),w=S.length;for(let T=0;T<w;T++){m=m,v=v;const C=S[T],k=ug(C,s);for(const I in m)b(m[I],rA(v,I),dg(I,k),T,w)}}u=d,d+=x}return s.forEach((f,h)=>{for(const g in f){const m=f[g];m.sort(QP);const v=[],x=[],b=[];for(let w=0;w<m.length;w++){const{at:T,value:C,easing:k}=m[w];v.push(C),x.push(Kr(0,p,T)),b.push(k||"easeOut")}x[0]!==0&&(x.unshift(0),v.unshift(v[0]),b.unshift(JP)),x[x.length-1]!==1&&(x.push(1),v.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[g]=v,S.transition[g]={...t,duration:p,ease:b,times:x,...n}}}),a}function ug(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function dg(e,t){return t[e]||(t[e]=[]),t[e]}function nA(e){return Array.isArray(e)?e:[e]}function rA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const oA=e=>typeof e=="number",iA=e=>e.every(oA);function aA(e,t){return e in t}class sA extends Gb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(aA(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 vt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function lA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Nb(e)?new Qb(t):new Xb(t);n.mount(e),Ji.set(e,n)}function cA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new sA(t);n.mount(e),Ji.set(e,n)}function uA(e,t){return At(e)||typeof e=="number"||typeof e=="string"&&!Af(t)}function n0(e,t,n,r){const o=[];if(uA(e,t))o.push(jb(e,Af(t)&&t.default||t,n&&(n.default||n)));else{const i=t0(e,t,r),a=i.length;fn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?lA:cA;Ji.has(l)||c(l);const u=Ji.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...Rf(u,{...t,transition:d},{}))}}return o}function dA(e,t,n){const r=[];return tA(e,t,n,{spring:Ef}).forEach(({keyframes:i,transition:a},s)=>{r.push(...n0(s,i,a))}),r}function fA(e){return Array.isArray(e)&&e.some(Array.isArray)}function pA(e){function t(n,r,o){let i=[];fA(n)?i=dA(n,r,e):i=n0(n,r,o,e);const a=new Vx(i);return e&&e.animations.push(a),a}return t}function mA(){const e=wn(()=>({current:null,animations:[]})),t=wn(()=>pA(e));return $P(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class hA{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const gA=()=>new hA;function vA(){return wn(gA)}function yA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function xA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:yA(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Yu(r)(l/c)*c}return t+l}}const r0=E.createContext(null);function bA(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=lt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?vC(e,o,o+i):e}function wA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=wn(()=>pt[t]),l=[],c=E.useRef(!1);fn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(h=>d===h.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(TA)},updateOrder:(d,p,f)=>{if(c.current)return;const h=bA(l,d,p,f);l!==h&&(c.current=!0,r(h.map(SA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),y.jsx(s,{...i,ref:a,ignoreStrict:!0,children:y.jsx(r0.Provider,{value:u,children:e})})}const o0=E.forwardRef(wA);function SA(e){return e.value}function TA(e,t){return e.layout.min-t.layout.min}function fg(e,t=0){return At(e)?e:ul(t)}function EA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=wn(()=>pt[r]),c=E.useContext(r0),u={x:fg(t.x),y:fg(t.y)},d=qP([u.x,u.y],([g,m])=>g||m?1:"unset");fn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return y.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:v}=m;v[p]&&h(n,u[p].get(),v[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const i0=E.forwardRef(EA);/**
13
13
  * @license lucide-react v0.485.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -179,7 +179,7 @@
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const wI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xa=Xe("x",wI),vg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},SI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},d0=e=>y.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:vg,exit:vg.false,transition:SI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ie("aria-hidden:pointer-events-none",e.className),children:e.children}),TI={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"}},EI=Jo("p-4 w-full block border relative rounded-lg text-sm",{variants:TI,defaultVariants:{theme:"neutral"}}),CI=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return y.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ie("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:y.jsx(d0,{"data-open":!!i,open:!!i,children:y.jsxs(un,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ie(EI({theme:n}),t),children:[y.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?y.jsx(l0,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?y.jsx(u0,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?y.jsx(yI,{"aria-hidden":"true",size:20}):null,r,y.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?y.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:y.jsx(xa,{size:20})}):null]})})})}),f0=6048e5,kI=864e5,RI=6e4,PI=36e5,AI=1e3,yg=Symbol.for("constructDateFrom");function at(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yg in e?e[yg](t):e instanceof Date?new e.constructor(t):new Date(t)}function et(e,t){return at(t||e,e)}function fl(e,t,n){const r=et(e,n==null?void 0:n.in);return isNaN(t)?at((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function p0(e,t,n){const r=et(e,n==null?void 0:n.in);if(isNaN(t))return at(e,NaN);if(!t)return r;const o=r.getDate(),i=at(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ko(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=et(e,n==null?void 0:n.in),d=o||r?p0(u,o+r*12):u,p=a||i?fl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return at(e,+p+g)}let II={};function oo(){return II}function Fn(e,t){var s,l,c,u;const n=oo(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=et(e,t==null?void 0: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 Lo(e,t){return Fn(e,{...t,weekStartsOn:1})}function m0(e,t){const n=et(e,t==null?void 0:t.in),r=n.getFullYear(),o=at(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Lo(o),a=at(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Lo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hs(e){const t=et(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function pl(e,...t){const n=at.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Vo(e,t){const n=et(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function _I(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t),i=Vo(r),a=Vo(o),s=+i-hs(i),l=+a-hs(a);return Math.round((s-l)/kI)}function OI(e,t){const n=m0(e,t),r=at(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Lo(r)}function MI(e){return at(e,Date.now())}function DI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return+Vo(r)==+Vo(o)}function jI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mf(e){return!(!jI(e)&&typeof e!="number"||isNaN(+et(e)))}function NI(e,t){const[n,r]=pl(e,t.start,t.end);return{start:n,end:r}}function h0(e,t){const{start:n,end:r}=NI(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(at(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function g0(e,t){const n=et(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function FI(e,t){const n=et(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function LI(e,t){var s,l;const n=oo(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=et(e,t==null?void 0: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 VI={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"}},$I=(e,t,n)=>{let r;const o=VI[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Hc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const zI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},HI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},WI={date:Hc({formats:zI,defaultWidth:"full"}),time:Hc({formats:BI,defaultWidth:"full"}),dateTime:Hc({formats:HI,defaultWidth:"full"})},qI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},UI=(e,t,n,r)=>qI[e];function wi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&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 KI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},GI={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"]},ZI={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"]},XI={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"}},QI={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"}},JI=(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"},e_={ordinalNumber:JI,era:wi({values:KI,defaultWidth:"wide"}),quarter:wi({values:YI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:wi({values:GI,defaultWidth:"wide"}),day:wi({values:ZI,defaultWidth:"wide"}),dayPeriod:wi({values:XI,defaultWidth:"wide",formattingValues:QI,defaultFormattingWidth:"wide"})};function Si(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)?n_(s,d=>d.test(a)):t_(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 t_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function n_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function r_(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 o_=/^(\d+)(th|st|nd|rd)?/i,i_=/\d+/i,a_={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},s_={any:[/^b/i,/^(a|c)/i]},l_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},c_={any:[/1/i,/2/i,/3/i,/4/i]},u_={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},d_={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]},f_={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},p_={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]},m_={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},h_={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}},g_={ordinalNumber:r_({matchPattern:o_,parsePattern:i_,valueCallback:e=>parseInt(e,10)}),era:Si({matchPatterns:a_,defaultMatchWidth:"wide",parsePatterns:s_,defaultParseWidth:"any"}),quarter:Si({matchPatterns:l_,defaultMatchWidth:"wide",parsePatterns:c_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Si({matchPatterns:u_,defaultMatchWidth:"wide",parsePatterns:d_,defaultParseWidth:"any"}),day:Si({matchPatterns:f_,defaultMatchWidth:"wide",parsePatterns:p_,defaultParseWidth:"any"}),dayPeriod:Si({matchPatterns:m_,defaultMatchWidth:"any",parsePatterns:h_,defaultParseWidth:"any"})},v0={code:"en-US",formatDistance:$I,formatLong:WI,formatRelative:UI,localize:e_,match:g_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function v_(e,t){const n=et(e,t==null?void 0:t.in);return _I(n,FI(n))+1}function y0(e,t){const n=et(e,t==null?void 0:t.in),r=+Lo(n)-+OI(n);return Math.round(r/f0)+1}function Df(e,t){var u,d,p,f;const n=et(e,t==null?void 0:t.in),r=n.getFullYear(),o=oo(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=at((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Fn(a,t),l=at((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Fn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function y_(e,t){var s,l,c,u;const n=oo(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Df(e,t),i=at((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Fn(i,t)}function x0(e,t){const n=et(e,t==null?void 0:t.in),r=+Fn(n,t)-+y_(n,t);return Math.round(r/f0)+1}function Qe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ar={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Qe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Qe(n+1,2)},d(e,t){return Qe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Qe(e.getHours()%12||12,t.length)},H(e,t){return Qe(e.getHours(),t.length)},m(e,t){return Qe(e.getMinutes(),t.length)},s(e,t){return Qe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Qe(o,t.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ar.y(e,t)},Y:function(e,t,n,r){const o=Df(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Qe(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Qe(i,t.length)},R:function(e,t){const n=m0(e);return Qe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Qe(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 Qe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Qe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ar.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Qe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=x0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Qe(o,t.length)},I:function(e,t,n){const r=y0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Qe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ar.d(e,t)},D:function(e,t,n){const r=v_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Qe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Qe(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Qe(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Qe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=mo.noon:r===0?o=mo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=mo.evening:r>=12?o=mo.afternoon:r>=4?o=mo.morning:o=mo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ar.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ar.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ar.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ar.s(e,t)},S:function(e,t){return ar.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wg(r);case"XXXX":case"XX":return Fr(r);case"XXXXX":case"XXX":default:return Fr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wg(r);case"xxxx":case"xx":return Fr(r);case"xxxxx":case"xxx":default:return Fr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bg(r,":");case"OOOO":default:return"GMT"+Fr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bg(r,":");case"zzzz":default:return"GMT"+Fr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Qe(r,t.length)},T:function(e,t,n){return Qe(+e,t.length)}};function bg(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+Qe(i,2)}function wg(e,t){return e%60===0?(e>0?"-":"+")+Qe(Math.abs(e)/60,2):Fr(e,t)}function Fr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Qe(Math.trunc(r/60),2),i=Qe(r%60,2);return n+o+t+i}const Sg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},b0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},x_=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Sg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Sg(r,t)).replace("{{time}}",b0(o,t))},td={p:b0,P:x_},b_=/^D+$/,w_=/^Y+$/,S_=["D","DD","YY","YYYY"];function w0(e){return b_.test(e)}function S0(e){return w_.test(e)}function nd(e,t,n){const r=T_(e,t,n);if(console.warn(r),S_.includes(e))throw new RangeError(r)}function T_(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 E_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,C_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k_=/^'([^]*?)'?$/,R_=/''/g,P_=/[a-zA-Z]/;function A_(e,t,n){var u,d,p,f;const r=oo(),o=r.locale??v0,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=et(e,n==null?void 0:n.in);if(!Mf(s))throw new RangeError("Invalid time value");let l=t.match(C_).map(h=>{const g=h[0];if(g==="p"||g==="P"){const m=td[g];return m(h,o.formatLong)}return h}).join("").match(E_).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:I_(h)};if(xg[g])return{isToken:!0,value:h};if(g.match(P_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(S0(g)||w0(g))&&nd(g,t,String(e));const m=xg[g[0]];return m(s,g,o.localize,c)}).join("")}function I_(e){const t=e.match(k_);return t?t[1].replace(R_,"'"):e}function __(){return Object.assign({},oo())}function O_(e,t){const n=et(e,t==null?void 0:t.in).getDay();return n===0?7:n}function M_(e,t){return+et(e)>+et(t)}function D_(e,t){return+et(e)<+et(t)}function j_(e,t){const n=N_(t)?new t(0):at(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function N_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const F_=10;class T0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class L_ extends T0{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 V_ extends T0{constructor(n,r){super();de(this,"priority",F_);de(this,"subPriority",-1);this.context=n||(o=>at(r,o))}set(n,r){return r.timestampIsSet?n:at(n,j_(n,this.context))}}class Ue{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new L_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class $_ extends Ue{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const St={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}/},Pn={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 Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function An(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*PI+i*RI+a*AI),rest:t.slice(n[0].length)}}function E0(e){return gt(St.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(St.singleDigit,t);case 2:return gt(St.twoDigits,t);case 3:return gt(St.threeDigits,t);case 4:return gt(St.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function gs(e,t){switch(e){case 1:return gt(St.singleDigitSigned,t);case 2:return gt(St.twoDigitsSigned,t);case 3:return gt(St.threeDigitsSigned,t);case 4:return gt(St.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function jf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function C0(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 k0(e){return e%400===0||e%4===0&&e%100!==0}class z_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return Tt(bt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=C0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class B_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Tt(bt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Df(n,i);if(o.isTwoDigitYear){const l=C0(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fn(n,i)}}class H_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return gs(r==="R"?4:r.length,n)}set(n,r,o){const i=at(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Lo(i)}}class W_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class q_ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return bt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class U_ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return bt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class K_ extends Ue{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(gt(St.month,n),i);case"MM":return Tt(bt(2,n),i);case"Mo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Y_ extends Ue{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return Tt(gt(St.month,n),i);case"LL":return Tt(bt(2,n),i);case"Lo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function G_(e,t,n){const r=et(e,n==null?void 0:n.in),o=x0(r,n)-t;return r.setDate(r.getDate()-o*7),et(r,n==null?void 0:n.in)}class Z_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return gt(St.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return Fn(G_(n,o,i),i)}}function X_(e,t,n){const r=et(e,n==null?void 0:n.in),o=y0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Q_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return gt(St.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Lo(X_(n,o))}}const J_=[31,28,31,30,31,30,31,31,30,31,30,31],eO=[31,29,31,30,31,30,31,31,30,31,30,31];class tO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return gt(St.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=k0(o),a=n.getMonth();return i?r>=1&&r<=eO[a]:r>=1&&r<=J_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class nO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return gt(St.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return k0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Nf(e,t,n){var d,p,f,h;const r=oo(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=et(e,n==null?void 0: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 fl(i,u,n)}class rO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Nf(n,o,i),n.setHours(0,0,0,0),n}}class oO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Tt(bt(r.length,n),a);case"eo":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Nf(n,o,i),n.setHours(0,0,0,0),n}}class iO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Tt(bt(r.length,n),a);case"co":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Nf(n,o,i),n.setHours(0,0,0,0),n}}function aO(e,t,n){const r=et(e,n==null?void 0:n.in),o=O_(r,n),i=t-o;return fl(r,i,n)}class sO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return bt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=aO(n,o),n.setHours(0,0,0,0),n}}class lO extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(jf(o),0,0,0),n}}class cO extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(jf(o),0,0,0),n}}class uO extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(jf(o),0,0,0),n}}class dO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(St.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class fO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return gt(St.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class pO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(St.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class mO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return gt(St.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class hO extends Ue{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(St.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class gO extends Ue{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(St.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class vO extends Ue{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class yO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return An(Pn.basicOptionalMinutes,n);case"XX":return An(Pn.basic,n);case"XXXX":return An(Pn.basicOptionalSeconds,n);case"XXXXX":return An(Pn.extendedOptionalSeconds,n);case"XXX":default:return An(Pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-hs(n)-o)}}class xO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return An(Pn.basicOptionalMinutes,n);case"xx":return An(Pn.basic,n);case"xxxx":return An(Pn.basicOptionalSeconds,n);case"xxxxx":return An(Pn.extendedOptionalSeconds,n);case"xxx":default:return An(Pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-hs(n)-o)}}class bO extends Ue{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return E0(n)}set(n,r,o){return[at(n,o*1e3),{timestampIsSet:!0}]}}class wO extends Ue{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return E0(n)}set(n,r,o){return[at(n,o),{timestampIsSet:!0}]}}const SO={G:new $_,y:new z_,Y:new B_,R:new H_,u:new W_,Q:new q_,q:new U_,M:new K_,L:new Y_,w:new Z_,I:new Q_,d:new tO,D:new nO,E:new rO,e:new oO,c:new iO,i:new sO,a:new lO,b:new cO,B:new uO,h:new dO,H:new fO,K:new pO,k:new mO,m:new hO,s:new gO,S:new vO,X:new yO,x:new xO,t:new bO,T:new wO},TO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CO=/^'([^]*?)'?$/,kO=/''/g,RO=/\S/,PO=/[a-zA-Z]/;function AO(e,t,n,r){var m,v,x,b;const o=()=>at(n,NaN),i=__(),a=i.locale??v0,s=i.firstWeekContainsDate??((v=(m=i.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(x=i.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():et(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new V_(r==null?void 0:r.in,n)],d=t.match(EO).map(S=>{const w=S[0];if(w in td){const T=td[w];return T(S,a.formatLong)}return S}).join("").match(TO),p=[];for(let S of d){S0(S)&&nd(S,t,e),w0(S)&&nd(S,t,e);const w=S[0],T=SO[w];if(T){const{incompatibleTokens:C}=T;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(T.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:w,fullToken:S});const k=T.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match(PO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=IO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&RO.test(e))return o();const f=u.map(S=>S.priority).sort((S,w)=>w-S).filter((S,w,T)=>T.indexOf(S)===w).map(S=>u.filter(w=>w.priority===S).sort((w,T)=>T.subPriority-w.subPriority)).map(S=>S[0]);let h=et(n,r==null?void 0:r.in);if(isNaN(+h))return o();const g={};for(const S of f){if(!S.validate(h,c))return o();const w=S.set(h,g,c);Array.isArray(w)?(h=w[0],Object.assign(g,w[1])):h=w}return h}function IO(e){return e.match(CO)[1].replace(kO,"'")}function _O(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function OO(e,t){return DI(at(e,e),MI(e))}function MO(e,t,n){return fl(e,-t,n)}function DO(e,t,n){const r=et(e,n==null?void 0:n.in);return isNaN(+r)?at(e,NaN):(r.setFullYear(t),r)}function jO(e,t,n){return p0(e,-t,n)}function ki(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=jO(e,o+r*12,n),d=MO(u,a+i*7,n),p=l+s*60,h=(c+p*60)*1e3;return at(e,+d-h)}var Et=function(){return Et=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},Et.apply(this,arguments)};function Ff(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 rd(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}var ea=function(e){return e.replace(new RegExp(" ","g")," ")},R0=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)},NO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},P0=function(e,t,n){var r=e.length-2,o=NO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},A0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},FO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Wc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},LO=function(e){return e==="money"||e==="currency"},VO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Na=function(e,t){var n=R0(A0(e),t.fraction.length),r="".concat(t.currency).concat(P0(n,t.group,t.decimal));return ea(r)},$O=E.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=Ff(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=VO(r,i,s);return h.currency=ea("".concat(h.currency.trim()," ")),h.literal=ea(h.literal.trim()),h},[r,i]),p=function(h){var g=Na(h.target.value,d),m=vs(g);h.target.value=g,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var g=Na(h,d),m=vs(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l==null||l(Et(Et({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Na(c.defaultValue,d):void 0;return E.createElement("input",Et({},c,{value:typeof c.value=="string"?Na(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),zO=1,BO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},HO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Fa=function(e,t){var n=R0(A0(e),t.fraction.length),r="".concat(P0(n,t.group,t.decimal)," ").concat(t.percentSign);return ea(r)},WO=E.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=Ff(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=rd(E.useState(function(){var v,x;return(x=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,x=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Fa(x,d))},[a.value]);var d=E.useMemo(function(){var v=HO(r);return v.percentSign=ea("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-zO,f=function(v){var x,b=s.current;b&&(b.setSelectionRange(p,p),v&&((x=a.onFocus)===null||x===void 0||x.call(a,v)))},h=function(v){var x=v.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,S=x.selectionEnd,w=b!==S,T=p<b;!w&&T&&f()}i==null||i(v)},g=function(v){var x=Fa(v.target.value,d),b=vs(x);u(x),v.target.value=x,v.target.setAttribute("data-number",b.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var x=Fa(v,d),b=vs(x);u(x),s.current.value=x,s.current.setAttribute("data-number",b.toString());var S=new InputEvent("change",{});o==null||o(Et(Et({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var m=a.defaultValue?Fa(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Ri={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},qO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ys[i];a===void 0?r.push(i.replace(Ri.dots,"\\.").replace(Ri.openParenthesis,"\\(").replace(Ri.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ri.leadingBars,"\\")},Fi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return od(o,n);var i=qO(o);return n?"^".concat(i,"$"):i},UO=function(e){return e.replace(Ri.escape,"\\$&")},od=function(e,t){var n=e.map(function(r){return typeof r=="string"?UO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ys={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]/}},KO=/\d/,Tg="(dd) 9dddd-dddd",Eg="(dd) dddd-dddd",Cg="ddd.ddd.ddd-dd",kg="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},YO=["2",/[0-3]/,":",/[0-5]/,/\d/],GO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Cg,isoDate:"dddd-dd-dd",cnpj:kg,telephone:Eg,cellphone:Tg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?Cg:kg},int:function(e){return e===void 0&&(e=""),KO.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=rs(e);return t.length<11?Eg:Tg},time:function(e){var t=rs(e),n=t[0];return n==="2"?YO:GO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Fi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:rs}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Rg(e,t,n,r){var o,i;r===void 0&&(r=ys);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],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var Pg=function(e){return e},ZO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Fi(e,n,t));return r.test(n)};function XO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var QO=E.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,p=e.as,f=Ff(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var g=Wc(s),m=Wc(d),v=Wc(u),x=E.useRef(ZO(u,i,f.value||f.defaultValue)),b=p??"input",S=rd(E.useState(""),2),w=S[0],T=S[1],C=XO(w),k=E.useCallback(function(O,_){var V,N,$=(V=O??_)!==null&&V!==void 0?V:"";if(u===void 0)return $;var M=(N=$==null?void 0:$.toString())!==null&&N!==void 0?N:"";return Rg(M,typeof u=="function"?u(M):u,a??Pg,c??ys)},[a,u,c]),I=rd(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=I[0],j=I[1],D=k(f.defaultValue,f.defaultValue),F=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?od(O,i):Fi(u,A,i)}return typeof u=="string"?Fi(u,A,i):od(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=k(f.value,f.defaultValue);j(O),h.current!==null&&(h.current.value=O)}},[f.value,u,a,f.defaultValue]);var P=function(O){var _,V,N,$,M,B=O.currentTarget,X=O.target.value;if(v.current===void 0)return j(X),(_=m.current)===null||_===void 0||_.call(m,X),(V=g.current)===null||V===void 0||V.call(g,O),d==null?void 0:d(X);var Q=new RegExp(Fi(v.current,X,i)),J=(N=B.selectionEnd)!==null&&N!==void 0?N:0,G=function(K,ie,H){if(K.type!=="number")return K.setSelectionRange(ie,H)};if(r&&x.current&&X.length>=A.length)return B.value=A,G(B,J-1,J-1);var Y=!1;X.length<C.length&&(x.current=!1,Y=!0),Q.test(X)&&(x.current=!0);var Z=J,L=X[Z-1],z=Rg(X,typeof v.current=="function"?v.current(X):v.current,a??Pg,c??ys);for(B.value=z,j(z);Z<z.length&&z.charAt(Z-1)!==L;)Z+=1;Y?G(B,J,J):G(B,Z,Z),O.target.value=z,T(z),($=m.current)===null||$===void 0||$.call(m,z),(M=g.current)===null||M===void 0||M.call(g,O)};return E.createElement(b,Et({},f,{ref:h,pattern:F,onChange:P,defaultValue:Ag(f.defaultValue)?D:void 0,value:Ag(f.value)?k(f.value,f.value):f.value}))}),Ag=function(e){return typeof e=="string"},I0=E.forwardRef(function(e,t){return LO(e.mask)?E.createElement($O,Et({},e,{mask:void 0,ref:t})):BO(e.mask)?E.createElement(WO,Et({},e,{mask:void 0,ref:t})):E.createElement(QO,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(I0,Et({},e,t))}};Gt($t.cellTelephone);Gt($t.cellphone);Gt($t.cep);Gt($t.cnpj);Gt($t.color);Gt($t.cpf);Gt($t.cpfCnpj);Gt($t.creditCard);Gt($t.date);Gt($t.int);Gt($t.isoDate);Gt($t.telephone);Gt($t.time);Gt($t.uuid);var _0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&FO($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(I0,Et({},o,{ref:n}))}),La={exports:{}},qc={},Va={exports:{}},Uc={};/**
182
+ */const wI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xa=Xe("x",wI),vg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},SI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},d0=e=>y.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:vg,exit:vg.false,transition:SI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ie("aria-hidden:pointer-events-none",e.className),children:e.children}),TI={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"}},EI=Jo("p-4 w-full block border relative rounded-lg text-sm",{variants:TI,defaultVariants:{theme:"neutral"}}),CI=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return y.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ie("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:y.jsx(d0,{"data-open":!!i,open:!!i,children:y.jsxs(un,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ie(EI({theme:n}),t),children:[y.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?y.jsx(l0,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?y.jsx(u0,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?y.jsx(yI,{"aria-hidden":"true",size:20}):null,r,y.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?y.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:y.jsx(xa,{size:20})}):null]})})})}),f0=6048e5,kI=864e5,RI=6e4,PI=36e5,AI=1e3,yg=Symbol.for("constructDateFrom");function at(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yg in e?e[yg](t):e instanceof Date?new e.constructor(t):new Date(t)}function et(e,t){return at(t||e,e)}function fl(e,t,n){const r=et(e,n==null?void 0:n.in);return isNaN(t)?at((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function p0(e,t,n){const r=et(e,n==null?void 0:n.in);if(isNaN(t))return at(e,NaN);if(!t)return r;const o=r.getDate(),i=at(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ko(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=et(e,n==null?void 0:n.in),d=o||r?p0(u,o+r*12):u,p=a||i?fl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return at(e,+p+g)}let II={};function oo(){return II}function Fn(e,t){var s,l,c,u;const n=oo(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=et(e,t==null?void 0: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 Lo(e,t){return Fn(e,{...t,weekStartsOn:1})}function m0(e,t){const n=et(e,t==null?void 0:t.in),r=n.getFullYear(),o=at(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Lo(o),a=at(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Lo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hs(e){const t=et(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function pl(e,...t){const n=at.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Vo(e,t){const n=et(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function _I(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t),i=Vo(r),a=Vo(o),s=+i-hs(i),l=+a-hs(a);return Math.round((s-l)/kI)}function OI(e,t){const n=m0(e,t),r=at(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Lo(r)}function MI(e){return at(e,Date.now())}function DI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return+Vo(r)==+Vo(o)}function jI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mf(e){return!(!jI(e)&&typeof e!="number"||isNaN(+et(e)))}function NI(e,t){const[n,r]=pl(e,t.start,t.end);return{start:n,end:r}}function h0(e,t){const{start:n,end:r}=NI(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(at(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function g0(e,t){const n=et(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function FI(e,t){const n=et(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function LI(e,t){var s,l;const n=oo(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=et(e,t==null?void 0: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 VI={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"}},$I=(e,t,n)=>{let r;const o=VI[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Hc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const zI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},HI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},WI={date:Hc({formats:zI,defaultWidth:"full"}),time:Hc({formats:BI,defaultWidth:"full"}),dateTime:Hc({formats:HI,defaultWidth:"full"})},qI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},UI=(e,t,n,r)=>qI[e];function wi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&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 KI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},GI={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"]},ZI={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"]},XI={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"}},QI={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"}},JI=(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"},e_={ordinalNumber:JI,era:wi({values:KI,defaultWidth:"wide"}),quarter:wi({values:YI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:wi({values:GI,defaultWidth:"wide"}),day:wi({values:ZI,defaultWidth:"wide"}),dayPeriod:wi({values:XI,defaultWidth:"wide",formattingValues:QI,defaultFormattingWidth:"wide"})};function Si(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)?n_(s,d=>d.test(a)):t_(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 t_(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function n_(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function r_(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 o_=/^(\d+)(th|st|nd|rd)?/i,i_=/\d+/i,a_={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},s_={any:[/^b/i,/^(a|c)/i]},l_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},c_={any:[/1/i,/2/i,/3/i,/4/i]},u_={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},d_={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]},f_={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},p_={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]},m_={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},h_={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}},g_={ordinalNumber:r_({matchPattern:o_,parsePattern:i_,valueCallback:e=>parseInt(e,10)}),era:Si({matchPatterns:a_,defaultMatchWidth:"wide",parsePatterns:s_,defaultParseWidth:"any"}),quarter:Si({matchPatterns:l_,defaultMatchWidth:"wide",parsePatterns:c_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Si({matchPatterns:u_,defaultMatchWidth:"wide",parsePatterns:d_,defaultParseWidth:"any"}),day:Si({matchPatterns:f_,defaultMatchWidth:"wide",parsePatterns:p_,defaultParseWidth:"any"}),dayPeriod:Si({matchPatterns:m_,defaultMatchWidth:"any",parsePatterns:h_,defaultParseWidth:"any"})},v0={code:"en-US",formatDistance:$I,formatLong:WI,formatRelative:UI,localize:e_,match:g_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function v_(e,t){const n=et(e,t==null?void 0:t.in);return _I(n,FI(n))+1}function y0(e,t){const n=et(e,t==null?void 0:t.in),r=+Lo(n)-+OI(n);return Math.round(r/f0)+1}function Df(e,t){var u,d,p,f;const n=et(e,t==null?void 0:t.in),r=n.getFullYear(),o=oo(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=at((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Fn(a,t),l=at((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Fn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function y_(e,t){var s,l,c,u;const n=oo(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Df(e,t),i=at((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Fn(i,t)}function x0(e,t){const n=et(e,t==null?void 0:t.in),r=+Fn(n,t)-+y_(n,t);return Math.round(r/f0)+1}function Qe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ar={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Qe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Qe(n+1,2)},d(e,t){return Qe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Qe(e.getHours()%12||12,t.length)},H(e,t){return Qe(e.getHours(),t.length)},m(e,t){return Qe(e.getMinutes(),t.length)},s(e,t){return Qe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Qe(o,t.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ar.y(e,t)},Y:function(e,t,n,r){const o=Df(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Qe(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Qe(i,t.length)},R:function(e,t){const n=m0(e);return Qe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Qe(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 Qe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Qe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ar.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Qe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=x0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Qe(o,t.length)},I:function(e,t,n){const r=y0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Qe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ar.d(e,t)},D:function(e,t,n){const r=v_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Qe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Qe(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Qe(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Qe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=mo.noon:r===0?o=mo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=mo.evening:r>=12?o=mo.afternoon:r>=4?o=mo.morning:o=mo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ar.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ar.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ar.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ar.s(e,t)},S:function(e,t){return ar.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wg(r);case"XXXX":case"XX":return Fr(r);case"XXXXX":case"XXX":default:return Fr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wg(r);case"xxxx":case"xx":return Fr(r);case"xxxxx":case"xxx":default:return Fr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bg(r,":");case"OOOO":default:return"GMT"+Fr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bg(r,":");case"zzzz":default:return"GMT"+Fr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Qe(r,t.length)},T:function(e,t,n){return Qe(+e,t.length)}};function bg(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+Qe(i,2)}function wg(e,t){return e%60===0?(e>0?"-":"+")+Qe(Math.abs(e)/60,2):Fr(e,t)}function Fr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Qe(Math.trunc(r/60),2),i=Qe(r%60,2);return n+o+t+i}const Sg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},b0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},x_=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Sg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Sg(r,t)).replace("{{time}}",b0(o,t))},td={p:b0,P:x_},b_=/^D+$/,w_=/^Y+$/,S_=["D","DD","YY","YYYY"];function w0(e){return b_.test(e)}function S0(e){return w_.test(e)}function nd(e,t,n){const r=T_(e,t,n);if(console.warn(r),S_.includes(e))throw new RangeError(r)}function T_(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 E_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,C_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,k_=/^'([^]*?)'?$/,R_=/''/g,P_=/[a-zA-Z]/;function A_(e,t,n){var u,d,p,f;const r=oo(),o=r.locale??v0,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=et(e,n==null?void 0:n.in);if(!Mf(s))throw new RangeError("Invalid time value");let l=t.match(C_).map(h=>{const g=h[0];if(g==="p"||g==="P"){const m=td[g];return m(h,o.formatLong)}return h}).join("").match(E_).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:I_(h)};if(xg[g])return{isToken:!0,value:h};if(g.match(P_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(S0(g)||w0(g))&&nd(g,t,String(e));const m=xg[g[0]];return m(s,g,o.localize,c)}).join("")}function I_(e){const t=e.match(k_);return t?t[1].replace(R_,"'"):e}function __(){return Object.assign({},oo())}function O_(e,t){const n=et(e,t==null?void 0:t.in).getDay();return n===0?7:n}function M_(e,t){return+et(e)>+et(t)}function D_(e,t){return+et(e)<+et(t)}function j_(e,t){const n=N_(t)?new t(0):at(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function N_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const F_=10;class T0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class L_ extends T0{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 V_ extends T0{constructor(n,r){super();de(this,"priority",F_);de(this,"subPriority",-1);this.context=n||(o=>at(r,o))}set(n,r){return r.timestampIsSet?n:at(n,j_(n,this.context))}}class Ue{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new L_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class $_ extends Ue{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const St={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}/},Pn={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 Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function An(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*PI+i*RI+a*AI),rest:t.slice(n[0].length)}}function E0(e){return gt(St.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(St.singleDigit,t);case 2:return gt(St.twoDigits,t);case 3:return gt(St.threeDigits,t);case 4:return gt(St.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function gs(e,t){switch(e){case 1:return gt(St.singleDigitSigned,t);case 2:return gt(St.twoDigitsSigned,t);case 3:return gt(St.threeDigitsSigned,t);case 4:return gt(St.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function jf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function C0(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 k0(e){return e%400===0||e%4===0&&e%100!==0}class z_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return Tt(bt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=C0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class B_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Tt(bt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Df(n,i);if(o.isTwoDigitYear){const l=C0(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fn(n,i)}}class H_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return gs(r==="R"?4:r.length,n)}set(n,r,o){const i=at(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Lo(i)}}class W_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class q_ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return bt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class U_ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return bt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class K_ extends Ue{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(gt(St.month,n),i);case"MM":return Tt(bt(2,n),i);case"Mo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Y_ extends Ue{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return Tt(gt(St.month,n),i);case"LL":return Tt(bt(2,n),i);case"Lo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function G_(e,t,n){const r=et(e,n==null?void 0:n.in),o=x0(r,n)-t;return r.setDate(r.getDate()-o*7),et(r,n==null?void 0:n.in)}class Z_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return gt(St.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return Fn(G_(n,o,i),i)}}function X_(e,t,n){const r=et(e,n==null?void 0:n.in),o=y0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Q_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return gt(St.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Lo(X_(n,o))}}const J_=[31,28,31,30,31,30,31,31,30,31,30,31],eO=[31,29,31,30,31,30,31,31,30,31,30,31];class tO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return gt(St.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=k0(o),a=n.getMonth();return i?r>=1&&r<=eO[a]:r>=1&&r<=J_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class nO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return gt(St.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return k0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Nf(e,t,n){var d,p,f,h;const r=oo(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=et(e,n==null?void 0: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 fl(i,u,n)}class rO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Nf(n,o,i),n.setHours(0,0,0,0),n}}class oO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Tt(bt(r.length,n),a);case"eo":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Nf(n,o,i),n.setHours(0,0,0,0),n}}class iO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Tt(bt(r.length,n),a);case"co":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Nf(n,o,i),n.setHours(0,0,0,0),n}}function aO(e,t,n){const r=et(e,n==null?void 0:n.in),o=O_(r,n),i=t-o;return fl(r,i,n)}class sO extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return bt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=aO(n,o),n.setHours(0,0,0,0),n}}class lO extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(jf(o),0,0,0),n}}class cO extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(jf(o),0,0,0),n}}class uO extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(jf(o),0,0,0),n}}class dO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(St.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class fO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return gt(St.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class pO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(St.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class mO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return gt(St.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class hO extends Ue{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(St.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class gO extends Ue{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(St.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class vO extends Ue{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class yO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return An(Pn.basicOptionalMinutes,n);case"XX":return An(Pn.basic,n);case"XXXX":return An(Pn.basicOptionalSeconds,n);case"XXXXX":return An(Pn.extendedOptionalSeconds,n);case"XXX":default:return An(Pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-hs(n)-o)}}class xO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return An(Pn.basicOptionalMinutes,n);case"xx":return An(Pn.basic,n);case"xxxx":return An(Pn.basicOptionalSeconds,n);case"xxxxx":return An(Pn.extendedOptionalSeconds,n);case"xxx":default:return An(Pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-hs(n)-o)}}class bO extends Ue{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return E0(n)}set(n,r,o){return[at(n,o*1e3),{timestampIsSet:!0}]}}class wO extends Ue{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return E0(n)}set(n,r,o){return[at(n,o),{timestampIsSet:!0}]}}const SO={G:new $_,y:new z_,Y:new B_,R:new H_,u:new W_,Q:new q_,q:new U_,M:new K_,L:new Y_,w:new Z_,I:new Q_,d:new tO,D:new nO,E:new rO,e:new oO,c:new iO,i:new sO,a:new lO,b:new cO,B:new uO,h:new dO,H:new fO,K:new pO,k:new mO,m:new hO,s:new gO,S:new vO,X:new yO,x:new xO,t:new bO,T:new wO},TO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CO=/^'([^]*?)'?$/,kO=/''/g,RO=/\S/,PO=/[a-zA-Z]/;function AO(e,t,n,r){var m,v,x,b;const o=()=>at(n,NaN),i=__(),a=i.locale??v0,s=i.firstWeekContainsDate??((v=(m=i.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(x=i.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():et(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new V_(r==null?void 0:r.in,n)],d=t.match(EO).map(S=>{const w=S[0];if(w in td){const T=td[w];return T(S,a.formatLong)}return S}).join("").match(TO),p=[];for(let S of d){S0(S)&&nd(S,t,e),w0(S)&&nd(S,t,e);const w=S[0],T=SO[w];if(T){const{incompatibleTokens:C}=T;if(Array.isArray(C)){const I=p.find(P=>C.includes(P.token)||P.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(T.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:w,fullToken:S});const k=T.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match(PO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=IO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&RO.test(e))return o();const f=u.map(S=>S.priority).sort((S,w)=>w-S).filter((S,w,T)=>T.indexOf(S)===w).map(S=>u.filter(w=>w.priority===S).sort((w,T)=>T.subPriority-w.subPriority)).map(S=>S[0]);let h=et(n,r==null?void 0:r.in);if(isNaN(+h))return o();const g={};for(const S of f){if(!S.validate(h,c))return o();const w=S.set(h,g,c);Array.isArray(w)?(h=w[0],Object.assign(g,w[1])):h=w}return h}function IO(e){return e.match(CO)[1].replace(kO,"'")}function _O(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function OO(e,t){return DI(at(e,e),MI(e))}function MO(e,t,n){return fl(e,-t,n)}function DO(e,t,n){const r=et(e,n==null?void 0:n.in);return isNaN(+r)?at(e,NaN):(r.setFullYear(t),r)}function jO(e,t,n){return p0(e,-t,n)}function ki(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=jO(e,o+r*12,n),d=MO(u,a+i*7,n),p=l+s*60,h=(c+p*60)*1e3;return at(e,+d-h)}var Et=function(){return Et=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},Et.apply(this,arguments)};function Ff(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 rd(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}var ea=function(e){return e.replace(new RegExp(" ","g")," ")},R0=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)},NO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},P0=function(e,t,n){var r=e.length-2,o=NO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},A0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},vs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},FO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Wc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},LO=function(e){return e==="money"||e==="currency"},VO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Na=function(e,t){var n=R0(A0(e),t.fraction.length),r="".concat(t.currency).concat(P0(n,t.group,t.decimal));return ea(r)},$O=E.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=Ff(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=VO(r,i,s);return h.currency=ea("".concat(h.currency.trim()," ")),h.literal=ea(h.literal.trim()),h},[r,i]),p=function(h){var g=Na(h.target.value,d),m=vs(g);h.target.value=g,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var g=Na(h,d),m=vs(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l==null||l(Et(Et({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Na(c.defaultValue,d):void 0;return E.createElement("input",Et({},c,{value:typeof c.value=="string"?Na(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),zO=1,BO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},HO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Fa=function(e,t){var n=R0(A0(e),t.fraction.length),r="".concat(P0(n,t.group,t.decimal)," ").concat(t.percentSign);return ea(r)},WO=E.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=Ff(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=rd(E.useState(function(){var v,x;return(x=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,x=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(Fa(x,d))},[a.value]);var d=E.useMemo(function(){var v=HO(r);return v.percentSign=ea("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-zO,f=function(v){var x,b=s.current;b&&(b.setSelectionRange(p,p),v&&((x=a.onFocus)===null||x===void 0||x.call(a,v)))},h=function(v){var x=v.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,S=x.selectionEnd,w=b!==S,T=p<b;!w&&T&&f()}i==null||i(v)},g=function(v){var x=Fa(v.target.value,d),b=vs(x);u(x),v.target.value=x,v.target.setAttribute("data-number",b.toString()),o==null||o(v)};E.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var x=Fa(v,d),b=vs(x);u(x),s.current.value=x,s.current.setAttribute("data-number",b.toString());var S=new InputEvent("change",{});o==null||o(Et(Et({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var m=a.defaultValue?Fa(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Ri={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},qO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ys[i];a===void 0?r.push(i.replace(Ri.dots,"\\.").replace(Ri.openParenthesis,"\\(").replace(Ri.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ri.leadingBars,"\\")},Fi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return od(o,n);var i=qO(o);return n?"^".concat(i,"$"):i},UO=function(e){return e.replace(Ri.escape,"\\$&")},od=function(e,t){var n=e.map(function(r){return typeof r=="string"?UO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ys={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]/}},KO=/\d/,Tg="(dd) 9dddd-dddd",Eg="(dd) dddd-dddd",Cg="ddd.ddd.ddd-dd",kg="dd.ddd.ddd/dddd-dd",rs=function(e){return e.replace(/\D/g,"")},YO=["2",/[0-3]/,":",/[0-5]/,/\d/],GO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Cg,isoDate:"dddd-dd-dd",cnpj:kg,telephone:Eg,cellphone:Tg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return rs(e).length<=11?Cg:kg},int:function(e){return e===void 0&&(e=""),KO.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=rs(e);return t.length<11?Eg:Tg},time:function(e){var t=rs(e),n=t[0];return n==="2"?YO:GO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Fi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:rs}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Rg(e,t,n,r){var o,i;r===void 0&&(r=ys);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],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var Pg=function(e){return e},ZO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Fi(e,n,t));return r.test(n)};function XO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var QO=E.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,p=e.as,f=Ff(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var g=Wc(s),m=Wc(d),v=Wc(u),x=E.useRef(ZO(u,i,f.value||f.defaultValue)),b=p??"input",S=rd(E.useState(""),2),w=S[0],T=S[1],C=XO(w),k=E.useCallback(function(O,M){var F,j,H=(F=O??M)!==null&&F!==void 0?F:"";if(u===void 0)return H;var _=(j=H==null?void 0:H.toString())!==null&&j!==void 0?j:"";return Rg(_,typeof u=="function"?u(_):u,a??Pg,c??ys)},[a,u,c]),I=rd(E.useState(function(){return k(f.value,f.defaultValue)}),2),P=I[0],N=I[1],D=k(f.defaultValue,f.defaultValue),L=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(P);return Array.isArray(O)?od(O,i):Fi(u,P,i)}return typeof u=="string"?Fi(u,P,i):od(u,i)},[l,P,i,u]);E.useEffect(function(){if(f.value!==void 0){var O=k(f.value,f.defaultValue);N(O),h.current!==null&&(h.current.value=O)}},[f.value,u,a,f.defaultValue]);var A=function(O){var M,F,j,H,_,z=O.currentTarget,X=O.target.value;if(v.current===void 0)return N(X),(M=m.current)===null||M===void 0||M.call(m,X),(F=g.current)===null||F===void 0||F.call(g,O),d==null?void 0:d(X);var Q=new RegExp(Fi(v.current,X,i)),J=(j=z.selectionEnd)!==null&&j!==void 0?j:0,G=function(K,ie,B){if(K.type!=="number")return K.setSelectionRange(ie,B)};if(r&&x.current&&X.length>=P.length)return z.value=P,G(z,J-1,J-1);var Y=!1;X.length<C.length&&(x.current=!1,Y=!0),Q.test(X)&&(x.current=!0);var Z=J,V=X[Z-1],$=Rg(X,typeof v.current=="function"?v.current(X):v.current,a??Pg,c??ys);for(z.value=$,N($);Z<$.length&&$.charAt(Z-1)!==V;)Z+=1;Y?G(z,J,J):G(z,Z,Z),O.target.value=$,T($),(H=m.current)===null||H===void 0||H.call(m,$),(_=g.current)===null||_===void 0||_.call(g,O)};return E.createElement(b,Et({},f,{ref:h,pattern:L,onChange:A,defaultValue:Ag(f.defaultValue)?D:void 0,value:Ag(f.value)?k(f.value,f.value):f.value}))}),Ag=function(e){return typeof e=="string"},I0=E.forwardRef(function(e,t){return LO(e.mask)?E.createElement($O,Et({},e,{mask:void 0,ref:t})):BO(e.mask)?E.createElement(WO,Et({},e,{mask:void 0,ref:t})):E.createElement(QO,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(I0,Et({},e,t))}};Gt($t.cellTelephone);Gt($t.cellphone);Gt($t.cep);Gt($t.cnpj);Gt($t.color);Gt($t.cpf);Gt($t.cpfCnpj);Gt($t.creditCard);Gt($t.date);Gt($t.int);Gt($t.isoDate);Gt($t.telephone);Gt($t.time);Gt($t.uuid);var _0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&FO($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(I0,Et({},o,{ref:n}))}),La={exports:{}},qc={},Va={exports:{}},Uc={};/**
183
183
  * @license React
184
184
  * use-sync-external-store-shim.production.js
185
185
  *
@@ -211,10 +211,10 @@
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var Dg;function nM(){return Dg||(Dg=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=E,n=O0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Yc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function v(T){if(!x){if(x=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var x=!1,b,S,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.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())}()),Yc}var jg;function rM(){return jg||(jg=1,process.env.NODE_ENV==="production"?La.exports=tM():La.exports=nM()),La.exports}rM();var $o=function(){return $o=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$o.apply(this,arguments)};function Li(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 M0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},oM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},iM=function(e){return Object.entries(e)},D0=function(e){return e instanceof Promise},j0=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},$o($o({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},aM=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,M0([],Li(a),!1)),u=function(d,p){return n(function(f){return j0(d,f,i,p)})};return D0(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))}},sM=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,M0([],Li(a),!1)),c=function(u){return n(function(d){return j0(u,d,i,o.current)})};return D0(l)?l.then(function(u){return c(u)}):c(l)}},Lf=function(e,t,n){var r,o,i,a=Li(E.useState(function(){return e}),2),s=a[0],l=a[1],c=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),g=oM(s),m=ho(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var S=v.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var x=Li(E.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return iM(w).reduce(function(T,C){var k,I=Li(C,2),A=I[0],j=I[1];return $o($o({},T),(k={},k[A]=n!=null&&n.debug?aM(A,j,l,S,v,f.current):sM(A,j,l,S,v,f.current),k))},{})}),1),b=x[0];return[s,b,u.current]};const lM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function cM(e,t){return E.useRef(lM(e,t)).current}const ml={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>)`},Vr=(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(Vr(a,t,n,s))},[]),N0=(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]:N0(a,t,n,s)}},{}),Ng={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},xs=(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)},uM={default:e=>xs(e,{result:Ng.default}),dark:e=>xs(e,{result:Ng.dark})},Ti=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},dM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Vf=(e,t)=>{const n=Vr(e.colors,Ti(t==null?void 0:t.colors)),r=Vr(e.spacing,Ti(t==null?void 0:t.spacing)),o=Vr(e.rounded,Ti(t==null?void 0:t.rounded)),i=Vr(e.zIndex,Ti((t==null?void 0:t.zIndex)??dM)),a=e.custom?Vr(e.custom,Ti(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},fM=(e,t)=>xs(Vf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),pM=(e,t)=>Vf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),mM=(e,t)=>xs(Vf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>y.jsxs(E.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"},gl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},ai=E.createContext({tweaks:gl,parser:ml.hsla,map:hl,locale:void 0}),$f=e=>{const t=E.useContext(ai);if(e)return e;if(t)return t.locale||e};function hM(e,t){const n=E.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 Ct=()=>{const e=E.useContext(ai);return e?e.map:hl},an=(e,t=2)=>e.toString(16).padStart(t,"0"),si=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${an(t,4)+an(n,3)}-${an(r[0])+an(r[1])}-${an(r[2])+an(r[3])}-${an(r[4])+an(r[5])}-${an(r[6])+an(r[7])+an(r[8])+an(r[9])}`},Fg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Lg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},zf=(e,t)=>{const n=Fg(t,Lg.basic,e)||Fg(t,Lg.extend,e);return n===void 0||n===e?void 0:n},Yr=()=>typeof window>"u",id=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F0=(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},gM=e=>!e,Bf=()=>{},L0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},vM={type:"spring",bounce:.3,duration:.6},Vg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),V0={enter:Vg(1),exit:Vg(-1),middle:{x:"0%",opacity:1}},$g={exit:{visibility:"hidden"}},yM=e=>{const t=Fn(g0(e));return h0({start:t,end:ko(t,{days:41})})},$0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),xM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=g0(new Date(1970,o,1).setMonth(o)),a=$0(i,n);return y.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Gc={ArrowLeft:(e,t)=>t==="days"?ki(e,{days:1}):ki(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ko(e,{days:1}):ko(e,{months:1}),ArrowUp:(e,t)=>t==="days"?ki(e,{weeks:1}):ki(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ko(e,{weeks:1}):ko(e,{years:1})},zg=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},jr=e=>e.getFullYear().toString().padStart(4,"0"),bM=(e,t,n)=>e===void 0||n===void 0?!1:M_(t,e)&&D_(t,n),wM=e=>{var n;const t=Ct();return y.jsx(pt.tbody,{layout:!0,variants:V0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ie((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=Ve.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return y.jsx("tr",{className:i,children:r.map(c=>{var v,x,b,S,w,T,C,k,I,A,j,D,F,P,O,_,V,N;const u=c.toISOString(),d=e.rangeMode?u===((x=(v=e.range)==null?void 0:v.to)==null?void 0:x.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=OO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,h=_O(c,e.stateDate),g=!h||f,m=e.rangeMode?bM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return y.jsxs("td",{align:"center",className:Ie("relative",Ve.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(j=e.styles)==null?void 0:j.dayFrame),children:[y.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ie(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",Ve.function((D=e.styles)==null?void 0:D.day)?(F=e.styles)==null?void 0:F.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((_=e.labelRange)==null?void 0:_.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((N=e.labelRange)==null?void 0:N.to)??t.calendarToDate})}):null]}),e.RenderOnDay?y.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},SM=()=>Vo(new Date),z0=({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,...p})=>{const f=E.useRef(si()),h=Ct(),g=$f(o),m=E.useRef(null),{date:v,range:x}=p,b=v||new Date,S=E.useRef(null),[w,T]=Lf({date:b,isAnimating:!1,year:jr(b),direction:void 0,range:{from:x==null?void 0:x.from,to:x==null?void 0:x.to},months:xM(f.current,b,g),selectMode:l?"from":void 0,week:h0({start:Fn(b),end:LI(b)})},P=>({onChangeYear:O=>({year:O}),onExitComplete:()=>(zg(S.current||null,m,P.state().date,200),S.current=null,{isAnimating:!1}),date:O=>{const _=O(P.state().date);return{date:_,year:jr(_)}},nextMonth:O=>{O&&(S.current=O.currentTarget);const _=P.state();if(_.isAnimating)return _;const V=ko(_.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:jr(V)}},previousMonth:O=>{O&&(S.current=O.currentTarget);const _=P.state();if(_.isAnimating)return _;const V=ki(_.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:jr(V)}},onSelectDate:O=>{const _=P.state(),V=O.currentTarget.dataset.range==="true",N=O.currentTarget.dataset.date||"",$=new Date(N);return{date:$,year:jr($),selectMode:_.selectMode===void 0?void 0:_.selectMode==="from"?"to":"from",range:V?{from:_.selectMode==="from"?$:_.range.from,to:_.selectMode==="to"?$:_.range.to}:_.range}},onChangeMonth:O=>{const _=O.target.value,N=Array.from(O.target.options).find(M=>M.value===_),$=P.state();if(N){const M=N.dataset.index||"",B=new Date(P.state().date);return B.setMonth(+M),{...$,date:B,year:jr(B)}}return $},onKeyDown:O=>{const _=O.key,V=P.state();if(_ in Gc){(_==="ArrowUp"||_==="ArrowDown")&&O.preventDefault();const N=P.state().date,$=Ve.keyof(Gc,_)?Gc[_](N,O.shiftKey?"month":"days"):null;if($!==null)return zg(O.target,m,$),{...V,date:$,year:jr($)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,O,_)=>{var N,$;return(_.method==="onChangeMonth"||_.method==="previousMonth"||_.method==="nextMonth")&&(($=(N=_.props).onChangeMonth)==null||$.call(N,P.date)),P},(P,O,_)=>{var N,$;return _.method==="onChangeYear"&&(($=(N=_.props).onChangeYear)==null||$.call(N,P.date)),P},(P,O,_)=>{const V=_.method==="onSelectDate"||_.method==="setToday"||_.method==="onKeyDown";return l&&V&&t?(c==null||c(P.range),P):(V&&t&&(c==null||c(P.date)),P)}]}),C=yM(w.date),k=F0(C,7),I=w.date.toISOString(),A=$0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const j=cM(P=>T.date(O=>DO(new Date(O),+P)),1200),D=P=>{const O=P.currentTarget.value;T.onChangeYear(O),s==null||s(new Date(O)),j(O)},F=hM((P,O)=>(P.preventDefault(),O==="right"?T.previousMonth():T.nextMonth()),10);return y.jsx(_E,{transition:vM,children:y.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Ie("relative overflow-hidden",Ve.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[y.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:y.jsx(wr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:y.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[y.jsxs("header",{className:"relative flex justify-between",children:[y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:$g,onClick:T.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx($A,{className:"h-4 w-4"})}),y.jsx(pt.span,{layout:!0,variants:V0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:y.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[y.jsx("select",{value:A,onChange:T.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),y.jsx(_0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:D,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:$g,onClick:T.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(_f,{className:"h-4 w-4"})}),y.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%)"}})]}),y.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[y.jsx("thead",{children:y.jsx("tr",{children:w.week.map(P=>y.jsx("th",{role:"columnheader",className:Ie("py-2 text-sm font-medium capitalize",Ve.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),y.jsx(wM,{zip:k,range:x,styles:u,date:v||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},A)})}),y.jsx("footer",{className:"mt-2 text-center text-primary",children:y.jsx("button",{type:"button",onClick:()=>T.date(SM),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Hf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>y.jsxs(un,{...s,as:r,"data-component":"card",className:Ie("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?y.jsx("header",{"data-component":"card-title",className:Ie("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,y.jsx("div",{"data-component":"card-body",className:Ie("min-w-full px-4 lg:px-8",a),children:e})]});Hf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return y.jsxs(i,{...o,title:Ve.string(o.title)?o.title:void 0,className:Ie("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[y.jsx(a,{className:"font-semibold",children:o.title}),r?y.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const B0=e=>{const t=e.Icon??c0,n=Ct();return y.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[y.jsx(t,{size:64,className:"text-disabled"}),y.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Jt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Bg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Bg(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():Bg(e[o],null)}}}}function Gr(...e){return R.useCallback(H0(...e),e)}function W0(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...h}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,m=R.useMemo(()=>h,Object.values(h));return y.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,TM(o,...t)]}function TM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var zo=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),i=o.find(CM);if(i){const a=i.props.children,s=o.map(l=>l===i?R.Children.count(a)>1?R.Children.only(null):R.isValidElement(a)?a.props.children:null:l);return y.jsx(ad,{...r,ref:t,children:R.isValidElement(a)?R.cloneElement(a,void 0,s):null})}return y.jsx(ad,{...r,ref:t,children:n})});zo.displayName="Slot";var ad=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=RM(n),i=kM(r,n.props);return n.type!==R.Fragment&&(i.ref=t?H0(t,o):o),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});ad.displayName="SlotClone";var EM=({children:e})=>y.jsx(y.Fragment,{children:e});function CM(e){return R.isValidElement(e)&&e.type===EM}function kM(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function RM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function PM(e){const t=e+"CollectionProvider",[n,r]=W0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:g}=f,m=E.useRef(null),v=E.useRef(new Map).current;return y.jsx(o,{scope:h,itemMap:v,collectionRef:m,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:g,children:m}=f,v=i(s,g),x=Gr(h,v.collectionRef);return y.jsx(zo,{ref:x,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:g,children:m,...v}=f,x=E.useRef(null),b=Gr(h,x),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(x,{ref:x,...v}),()=>void S.itemMap.delete(x))),y.jsx(zo,{[u]:"",ref:b,children:m})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,w)=>v.indexOf(S.ref.current)-v.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var AM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zn=AM.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?zo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function q0(e,t){e&&Xs.flushSync(()=>e.dispatchEvent(t))}function Gn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function IM(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _M="DismissableLayer",sd="dismissableLayer.update",OM="dismissableLayer.pointerDownOutside",MM="dismissableLayer.focusOutside",Hg,U0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=R.useContext(U0),[u,d]=R.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=R.useState({}),h=Gr(t,C=>d(C)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),x=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,w=jM(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=NM(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return IM(C=>{x===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Hg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Wg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Hg)}},[u,p,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Wg())},[u,c]),R.useEffect(()=>{const C=()=>f({});return document.addEventListener(sd,C),()=>document.removeEventListener(sd,C)},[]),y.jsx(zn.div,{...l,ref:h,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Jt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Jt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Jt(e.onPointerDownCapture,w.onPointerDownCapture)})});K0.displayName=_M;var DM="DismissableLayerBranch",Y0=R.forwardRef((e,t)=>{const n=R.useContext(U0),r=R.useRef(null),o=Gr(t,r);return R.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),y.jsx(zn.div,{...e,ref:o})});Y0.displayName=DM;function jM(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){G0(OM,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NM(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=i=>{i.target&&!r.current&&G0(MM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wg(){const e=new CustomEvent(sd);document.dispatchEvent(e)}function G0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?q0(o,i):o.dispatchEvent(i)}var FM=K0,LM=Y0,bs=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},VM="Portal",Z0=R.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=R.useState(!1);bs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?pa.createPortal(y.jsx(zn.div,{...r,ref:t}),a):null});Z0.displayName=VM;function $M(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var X0=e=>{const{present:t,children:n}=e,r=zM(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),i=Gr(r.ref,BM(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:i}):null};X0.displayName="Presence";function zM(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),i=R.useRef("none"),a=e?"mounted":"unmounted",[s,l]=$M(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=$a(r.current);i.current=s==="mounted"?c:"none"},[s]),bs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=$a(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),bs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=$a(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=$a(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function $a(e){return(e==null?void 0:e.animationName)||"none"}function BM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function HM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=WM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Gn(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function WM({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=Gn(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var qM="VisuallyHidden",Wf=R.forwardRef((e,t)=>y.jsx(zn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Wf.displayName=qM;var qf="ToastProvider",[Uf,UM,KM]=PM("Toast"),[Q0,qz]=W0("Toast",[KM]),[YM,vl]=Q0(qf),J0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),p=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${qf}\`. Expected non-empty \`string\`.`),y.jsx(Uf.Provider,{scope:t,children:y.jsx(YM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:R.useCallback(()=>u(f=>f+1),[]),onToastRemove:R.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};J0.displayName=qf;var ew="ToastViewport",GM=["F8"],ld="toast.viewportPause",cd="toast.viewportResume",tw=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=GM,label:o="Notifications ({hotkey})",...i}=e,a=vl(ew,n),s=UM(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=Gr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;R.useEffect(()=>{const m=v=>{var b;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),R.useEffect(()=>{const m=l.current,v=d.current;if(h&&m&&v){const x=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(ld);v.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(cd);v.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!m.contains(T.relatedTarget)&&b()},w=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",x),m.addEventListener("focusout",S),m.addEventListener("pointermove",x),m.addEventListener("pointerleave",w),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",x),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",x),m.removeEventListener("pointerleave",w),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const g=R.useCallback(({tabbingDirection:m})=>{const x=s().map(b=>{const S=b.ref.current,w=[S,...cD(S)];return m==="forwards"?w:w.reverse()});return(m==="forwards"?x.reverse():x).flat()},[s]);return R.useEffect(()=>{const m=d.current;if(m){const v=x=>{var w,T,C;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const k=document.activeElement,I=x.shiftKey;if(x.target===m&&I){(w=c.current)==null||w.focus();return}const D=g({tabbingDirection:I?"backwards":"forwards"}),F=D.findIndex(P=>P===k);Zc(D.slice(F+1))?x.preventDefault():I?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",v),()=>m.removeEventListener("keydown",v)}},[s,g]),y.jsxs(LM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&y.jsx(ud,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});Zc(m)}}),y.jsx(Uf.Slot,{scope:n,children:y.jsx(zn.ol,{tabIndex:-1,...i,ref:p})}),h&&y.jsx(ud,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});Zc(m)}})]})});tw.displayName=ew;var nw="ToastFocusProxy",ud=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vl(nw,n);return y.jsx(Wf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});ud.displayName=nw;var yl="Toast",ZM="toast.swipeStart",XM="toast.swipeMove",QM="toast.swipeCancel",JM="toast.swipeEnd",rw=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=HM({prop:r,defaultProp:o,onChange:i});return y.jsx(X0,{present:n||s,children:y.jsx(nD,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Gn(e.onPause),onResume:Gn(e.onResume),onSwipeStart:Jt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Jt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Jt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Jt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});rw.displayName=yl;var[eD,tD]=Q0(yl,{onClose(){}}),nD=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...h}=e,g=vl(yl,n),[m,v]=R.useState(null),x=Gr(t,P=>v(P)),b=R.useRef(null),S=R.useRef(null),w=o||g.duration,T=R.useRef(0),C=R.useRef(w),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=g,j=Gn(()=>{var O;(m==null?void 0:m.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),D=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(j,P))},[j]);R.useEffect(()=>{const P=g.viewport;if(P){const O=()=>{D(C.current),c==null||c()},_=()=>{const V=new Date().getTime()-T.current;C.current=C.current-V,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(ld,_),P.addEventListener(cd,O),()=>{P.removeEventListener(ld,_),P.removeEventListener(cd,O)}}},[g.viewport,w,l,c,D]),R.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(w)},[i,w,g.isClosePausedRef,D]),R.useEffect(()=>(I(),()=>A()),[I,A]);const F=R.useMemo(()=>m?cw(m):null,[m]);return g.viewport?y.jsxs(y.Fragment,{children:[F&&y.jsx(rD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),y.jsx(eD,{scope:n,onClose:j,children:Xs.createPortal(y.jsx(Uf.ItemSlot,{scope:n,children:y.jsx(FM,{asChild:!0,onEscapeKeyDown:Jt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||j(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(zn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Jt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:Jt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Jt(e.onPointerMove,P=>{if(!b.current)return;const O=P.clientX-b.current.x,_=P.clientY-b.current.y,V=!!S.current,N=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=N?$(0,O):0,B=N?0:$(0,_),X=P.pointerType==="touch"?10:2,Q={x:M,y:B},J={originalEvent:P,delta:Q};V?(S.current=Q,za(XM,d,J,{discrete:!1})):qg(Q,g.swipeDirection,X)?(S.current=Q,za(ZM,u,J,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>X||Math.abs(_)>X)&&(b.current=null)}),onPointerUp:Jt(e.onPointerUp,P=>{const O=S.current,_=P.target;if(_.hasPointerCapture(P.pointerId)&&_.releasePointerCapture(P.pointerId),S.current=null,b.current=null,O){const V=P.currentTarget,N={originalEvent:P,delta:O};qg(O,g.swipeDirection,g.swipeThreshold)?za(JM,f,N,{discrete:!0}):za(QM,p,N,{discrete:!0}),V.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),rD=e=>{const{__scopeToast:t,children:n,...r}=e,o=vl(yl,t),[i,a]=R.useState(!1),[s,l]=R.useState(!1);return sD(()=>a(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:y.jsx(Z0,{asChild:!0,children:y.jsx(Wf,{...r,children:i&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},oD="ToastTitle",ow=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(zn.div,{...r,ref:t})});ow.displayName=oD;var iD="ToastDescription",iw=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(zn.div,{...r,ref:t})});iw.displayName=iD;var aw="ToastAction",aD=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?y.jsx(lw,{altText:n,asChild:!0,children:y.jsx(Kf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${aw}\`. Expected non-empty \`string\`.`),null)});aD.displayName=aw;var sw="ToastClose",Kf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=tD(sw,n);return y.jsx(lw,{asChild:!0,children:y.jsx(zn.button,{type:"button",...r,ref:t,onClick:Jt(e.onClick,o.onClose)})})});Kf.displayName=sw;var lw=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return y.jsx(zn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function cw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),lD(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...cw(r))}}),t}function za(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?q0(o,i):o.dispatchEvent(i)}var qg=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function sD(e=()=>{}){const t=Gn(e);bs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function lD(e){return e.nodeType===e.ELEMENT_NODE}function cD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var uD=J0,dD=tw,fD=rw,pD=ow,mD=iw,hD=Kf;const gD=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.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},vD=Jo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),uw=E.createContext(()=>{throw new Error("Not implemented")}),yD=()=>E.useContext(uw),Ug={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]}},xD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=vD({theme:t.theme||"default"});return y.jsx(fD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:y.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Ug[t.reversedIndex]||Ug.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:y.jsxs("div",{className:a,children:[y.jsxs("div",{className:"flex flex-col p-4",children:[t.title?y.jsx(pD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,y.jsx(mD,{className:"select-text truncate",children:t.text})]}),r?y.jsx(hD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:y.jsx(xa,{className:"h-5 w-5"})}):null]})})})});function bD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=gD(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const h=[...f,{...u,id:d,text:c}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return y.jsxs(uD,{duration:n,swipeThreshold:150,children:[y.jsx(uw.Provider,{value:l,children:e}),y.jsx(wr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(xD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),y.jsx(dD,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const wD=e=>y.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[y.jsxs("header",{className:"flex items-start gap-4 p-6",children:[y.jsx("div",{className:Ie("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:y.jsx("div",{children:y.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("header",{children:y.jsx("h3",{className:"text-base leading-none",children:e.title})}),y.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?y.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),dw=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Kg={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},fw=E.createContext(""),SD=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",dd=(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(!SD(a))return a}return n==="backward"?dd(e,e.length-1,"backward"):dd(e,-1,"forward")},Yg=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=dd(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Gg={[Kg.ArrowLeft]:(e,t)=>Yg(t,"backward"),[Kg.ArrowRight]:(e,t)=>Yg(t,"forward")},TD=e=>{const[t,n]=dw(e.active),r=E.useRef(null),o=Ur(e.onChange);E.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]),E.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=E.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Ve.keyof(Gg,c)){const u=Gg[c],d=u(l,r.current);if(d===null)return;n(d)}};return y.jsx(fw.Provider,{value:t,children:y.jsx(Hf,{className:e.className,container:Ie("pt-0 max-w-full w-full min-w-0",e.container),header:y.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[y.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),y.jsx("nav",{className:"min-w-0",children:y.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return y.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Ie("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:y.jsx(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},ED=()=>E.useContext(fw),CD=e=>{const t=ED();return y.jsx(E.Fragment,{children:e.id===t?e.children:null})},xl=e=>y.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[y.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),y.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});xl.Icon=function(t){return y.jsx("header",{...t,className:Ie("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};xl.Body=function(t){return y.jsx(un,{...t,className:Ie("min-w-0 flex-1",t.className),children:t.children})};xl.Right=function(t){return y.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:y.jsx(un,{...t,type:"button"})})};const kD=e=>y.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function bl(){return typeof window<"u"}function Tr(e){return pw(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(pw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pw(e){return bl()?e instanceof Node||e instanceof Bt(e).Node:!1}function nt(e){return bl()?e instanceof Element||e instanceof Bt(e).Element:!1}function wt(e){return bl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function fd(e){return!bl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ba(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function RD(e){return["table","td","th"].includes(Tr(e))}function wl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yf(e){const t=Gf(),n=nt(e)?rn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function PD(e){let t=Zn(e);for(;wt(t)&&!gr(t);){if(Yf(t))return t;if(wl(t))return null;t=Zn(t)}return null}function Gf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(Tr(e))}function rn(e){return Bt(e).getComputedStyle(e)}function Sl(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zn(e){if(Tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fd(e)&&e.host||Jn(e);return fd(t)?t.host:t}function mw(e){const t=Zn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&ba(t)?t:mw(t)}function pr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mw(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=pd(a);return t.concat(a,a.visualViewport||[],ba(o)?o:[],s&&n?pr(s):[])}return t.concat(o,pr(o,[],n))}function pd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(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 yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Zf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function hw(){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 gw(e){return e.mozInputSource===0&&e.isTrusted?!0:md()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Xf(e){return AD()?!1:!md()&&e.width===0&&e.height===0||md()&&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 Qf(){return/apple/i.test(navigator.vendor)}function md(){const e=/android/i;return e.test(Zf())||e.test(hw())}function vw(){return Zf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function AD(){return hw().includes("jsdom/")}function Bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ID(e){return"nativeEvent"in e}function _D(e){return e.matches("html,body")}function _t(e){return(e==null?void 0:e.ownerDocument)||document}function Xc(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 In(e){return"composedPath"in e?e.composedPath()[0]:e.target}const OD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Jf(e){return wt(e)&&e.matches(OD)}function Dt(e){e.preventDefault(),e.stopPropagation()}function yw(e){return e?e.getAttribute("role")==="combobox"&&Jf(e):!1}const _n=Math.min,Qt=Math.max,ws=Math.round,Ro=Math.floor,vr=e=>({x:e,y:e}),MD={left:"right",right:"left",bottom:"top",top:"bottom"},DD={start:"end",end:"start"};function hd(e,t,n){return Qt(e,_n(t,n))}function li(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function ci(e){return e.split("-")[1]}function xw(e){return e==="x"?"y":"x"}function ep(e){return e==="y"?"height":"width"}function Zr(e){return["top","bottom"].includes(yr(e))?"y":"x"}function tp(e){return xw(Zr(e))}function jD(e,t,n){n===void 0&&(n=!1);const r=ci(e),o=tp(e),i=ep(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}function ND(e){const t=Ss(e);return[gd(e),t,gd(t)]}function gd(e){return e.replace(/start|end/g,t=>DD[t])}function FD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function LD(e,t,n,r){const o=ci(e);let i=FD(yr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(gd)))),i}function Ss(e){return e.replace(/left|right|bottom|top/g,t=>MD[t])}function VD(e){return{top:0,right:0,bottom:0,left:0,...e}}function bw(e){return typeof e!="number"?VD(e):{top:e,right:e,bottom:e,left:e}}function Ts(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}}/*!
214
+ */var Dg;function nM(){return Dg||(Dg=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=E,n=O0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Yc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function v(T){if(!x){if(x=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var x=!1,b,S,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.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())}()),Yc}var jg;function rM(){return jg||(jg=1,process.env.NODE_ENV==="production"?La.exports=tM():La.exports=nM()),La.exports}rM();var $o=function(){return $o=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$o.apply(this,arguments)};function Li(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 M0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},oM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},iM=function(e){return Object.entries(e)},D0=function(e){return e instanceof Promise},j0=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},$o($o({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},aM=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,M0([],Li(a),!1)),u=function(d,p){return n(function(f){return j0(d,f,i,p)})};return D0(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))}},sM=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,M0([],Li(a),!1)),c=function(u){return n(function(d){return j0(u,d,i,o.current)})};return D0(l)?l.then(function(u){return c(u)}):c(l)}},Lf=function(e,t,n){var r,o,i,a=Li(E.useState(function(){return e}),2),s=a[0],l=a[1],c=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),g=oM(s),m=ho(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var S=v.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var x=Li(E.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return iM(w).reduce(function(T,C){var k,I=Li(C,2),P=I[0],N=I[1];return $o($o({},T),(k={},k[P]=n!=null&&n.debug?aM(P,N,l,S,v,f.current):sM(P,N,l,S,v,f.current),k))},{})}),1),b=x[0];return[s,b,u.current]};const lM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function cM(e,t){return E.useRef(lM(e,t)).current}const ml={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>)`},Vr=(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(Vr(a,t,n,s))},[]),N0=(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]:N0(a,t,n,s)}},{}),Ng={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},xs=(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)},uM={default:e=>xs(e,{result:Ng.default}),dark:e=>xs(e,{result:Ng.dark})},Ti=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},dM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Vf=(e,t)=>{const n=Vr(e.colors,Ti(t==null?void 0:t.colors)),r=Vr(e.spacing,Ti(t==null?void 0:t.spacing)),o=Vr(e.rounded,Ti(t==null?void 0:t.rounded)),i=Vr(e.zIndex,Ti((t==null?void 0:t.zIndex)??dM)),a=e.custom?Vr(e.custom,Ti(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},fM=(e,t)=>xs(Vf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),pM=(e,t)=>Vf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),mM=(e,t)=>xs(Vf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>y.jsxs(E.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"},gl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},ai=E.createContext({tweaks:gl,parser:ml.hsla,map:hl,locale:void 0}),$f=e=>{const t=E.useContext(ai);if(e)return e;if(t)return t.locale||e};function hM(e,t){const n=E.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 Ct=()=>{const e=E.useContext(ai);return e?e.map:hl},an=(e,t=2)=>e.toString(16).padStart(t,"0"),si=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${an(t,4)+an(n,3)}-${an(r[0])+an(r[1])}-${an(r[2])+an(r[3])}-${an(r[4])+an(r[5])}-${an(r[6])+an(r[7])+an(r[8])+an(r[9])}`},Fg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Lg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},zf=(e,t)=>{const n=Fg(t,Lg.basic,e)||Fg(t,Lg.extend,e);return n===void 0||n===e?void 0:n},Yr=()=>typeof window>"u",id=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F0=(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},gM=e=>!e,Bf=()=>{},L0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},vM={type:"spring",bounce:.3,duration:.6},Vg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),V0={enter:Vg(1),exit:Vg(-1),middle:{x:"0%",opacity:1}},$g={exit:{visibility:"hidden"}},yM=e=>{const t=Fn(g0(e));return h0({start:t,end:ko(t,{days:41})})},$0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),xM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=g0(new Date(1970,o,1).setMonth(o)),a=$0(i,n);return y.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Gc={ArrowLeft:(e,t)=>t==="days"?ki(e,{days:1}):ki(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ko(e,{days:1}):ko(e,{months:1}),ArrowUp:(e,t)=>t==="days"?ki(e,{weeks:1}):ki(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ko(e,{weeks:1}):ko(e,{years:1})},zg=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},jr=e=>e.getFullYear().toString().padStart(4,"0"),bM=(e,t,n)=>e===void 0||n===void 0?!1:M_(t,e)&&D_(t,n),wM=e=>{var n;const t=Ct();return y.jsx(pt.tbody,{layout:!0,variants:V0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ie((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=Ve.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return y.jsx("tr",{className:i,children:r.map(c=>{var v,x,b,S,w,T,C,k,I,P,N,D,L,A,O,M,F,j;const u=c.toISOString(),d=e.rangeMode?u===((x=(v=e.range)==null?void 0:v.to)==null?void 0:x.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=OO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,h=_O(c,e.stateDate),g=!h||f,m=e.rangeMode?bM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return y.jsxs("td",{align:"center",className:Ie("relative",Ve.function((I=e.styles)==null?void 0:I.dayFrame)?(P=e.styles)==null?void 0:P.dayFrame(c):(N=e.styles)==null?void 0:N.dayFrame),children:[y.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ie(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",Ve.function((D=e.styles)==null?void 0:D.day)?(L=e.styles)==null?void 0:L.day(c):(A=e.styles)==null?void 0:A.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((M=e.labelRange)==null?void 0:M.from)??t.calendarFromDate})}):null,d&&((F=e.stateRange.to)==null?void 0:F.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?y.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},SM=()=>Vo(new Date),z0=({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,...p})=>{const f=E.useRef(si()),h=Ct(),g=$f(o),m=E.useRef(null),{date:v,range:x}=p,b=v||new Date,S=E.useRef(null),[w,T]=Lf({date:b,isAnimating:!1,year:jr(b),direction:void 0,range:{from:x==null?void 0:x.from,to:x==null?void 0:x.to},months:xM(f.current,b,g),selectMode:l?"from":void 0,week:h0({start:Fn(b),end:LI(b)})},O=>({onChangeYear:M=>({year:M}),onExitComplete:()=>(zg(S.current||null,m,O.state().date,200),S.current=null,{isAnimating:!1}),date:M=>{const F=M(O.state().date);return{date:F,year:jr(F)}},nextMonth:M=>{M&&(S.current=M.currentTarget);const F=O.state();if(F.isAnimating)return F;const j=ko(F.date,{months:1});return{date:j,isAnimating:!0,direction:1,year:jr(j)}},previousMonth:M=>{M&&(S.current=M.currentTarget);const F=O.state();if(F.isAnimating)return F;const j=ki(F.date,{months:1});return{date:j,isAnimating:!0,direction:-1,year:jr(j)}},onSelectDate:M=>{const F=O.state(),j=M.currentTarget.dataset.range==="true",H=M.currentTarget.dataset.date||"",_=new Date(H);return{date:_,year:jr(_),selectMode:F.selectMode===void 0?void 0:F.selectMode==="from"?"to":"from",range:j?{from:F.selectMode==="from"?_:F.range.from,to:F.selectMode==="to"?_:F.range.to}:F.range}},onChangeMonth:M=>{const F=M.target.value,H=Array.from(M.target.options).find(z=>z.value===F),_=O.state();if(H){const z=H.dataset.index||"",X=new Date(O.state().date);return X.setMonth(+z),{..._,date:X,year:jr(X)}}return _},onKeyDown:M=>{const F=M.key,j=O.state();if(F in Gc){(F==="ArrowUp"||F==="ArrowDown")&&M.preventDefault();const H=O.state().date,_=Ve.keyof(Gc,F)?Gc[F](H,M.shiftKey?"month":"days"):null;if(_!==null)return zg(M.target,m,_),{...j,date:_,year:jr(_)}}return O.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(O,M,F)=>{var H,_;return(F.method==="onChangeMonth"||F.method==="previousMonth"||F.method==="nextMonth")&&((_=(H=F.props).onChangeMonth)==null||_.call(H,O.date)),O},(O,M,F)=>{var H,_;return F.method==="onChangeYear"&&((_=(H=F.props).onChangeYear)==null||_.call(H,O.date)),O},(O,M,F)=>{const j=F.method==="onSelectDate"||F.method==="setToday"||F.method==="onKeyDown";return l&&j&&t?(c==null||c(O.range),O):(j&&t&&(c==null||c(O.date)),O)}]}),C=yM(w.date),k=F0(C,7),I=w.date.toISOString(),P=$0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const N=cM(O=>T.date(M=>DO(new Date(M),+O)),1200),D=O=>{const M=O.currentTarget.value;T.onChangeYear(M),s==null||s(new Date(M)),N(M)},L=hM((O,M)=>(O.preventDefault(),M==="right"?T.previousMonth():T.nextMonth()),10),A=()=>{const O=SM();T.date(()=>O),c==null||c(O)};return y.jsx(_E,{transition:vM,children:y.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:L.onTouchEnd,onTouchStart:L.onTouchStart,className:Ie("relative overflow-hidden",Ve.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[y.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:y.jsx(wr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:y.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[y.jsxs("header",{className:"relative flex justify-between",children:[y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:$g,onClick:T.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx($A,{className:"h-4 w-4"})}),y.jsx(pt.span,{layout:!0,variants:V0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:y.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[y.jsx("select",{value:P,onChange:T.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${P.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),y.jsx(_0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:D,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:$g,onClick:T.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(_f,{className:"h-4 w-4"})}),y.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%)"}})]}),y.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[y.jsx("thead",{children:y.jsx("tr",{children:w.week.map(O=>y.jsx("th",{role:"columnheader",className:Ie("py-2 text-sm font-medium capitalize",Ve.function(u==null?void 0:u.weekDay)?u.weekDay(O):u==null?void 0:u.weekDay),children:O.toLocaleDateString(g,{weekday:"short"})},O.toString()))})}),y.jsx(wM,{zip:k,range:x,styles:u,date:v||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},P)})}),y.jsx("footer",{className:"mt-2 text-center text-primary",children:y.jsx("button",{type:"button",onClick:A,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Hf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>y.jsxs(un,{...s,as:r,"data-component":"card",className:Ie("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?y.jsx("header",{"data-component":"card-title",className:Ie("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,y.jsx("div",{"data-component":"card-body",className:Ie("min-w-full px-4 lg:px-8",a),children:e})]});Hf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return y.jsxs(i,{...o,title:Ve.string(o.title)?o.title:void 0,className:Ie("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[y.jsx(a,{className:"font-semibold",children:o.title}),r?y.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const B0=e=>{const t=e.Icon??c0,n=Ct();return y.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[y.jsx(t,{size:64,className:"text-disabled"}),y.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Jt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Bg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Bg(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():Bg(e[o],null)}}}}function Gr(...e){return R.useCallback(H0(...e),e)}function W0(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...h}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,m=R.useMemo(()=>h,Object.values(h));return y.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,TM(o,...t)]}function TM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var zo=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),i=o.find(CM);if(i){const a=i.props.children,s=o.map(l=>l===i?R.Children.count(a)>1?R.Children.only(null):R.isValidElement(a)?a.props.children:null:l);return y.jsx(ad,{...r,ref:t,children:R.isValidElement(a)?R.cloneElement(a,void 0,s):null})}return y.jsx(ad,{...r,ref:t,children:n})});zo.displayName="Slot";var ad=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=RM(n),i=kM(r,n.props);return n.type!==R.Fragment&&(i.ref=t?H0(t,o):o),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});ad.displayName="SlotClone";var EM=({children:e})=>y.jsx(y.Fragment,{children:e});function CM(e){return R.isValidElement(e)&&e.type===EM}function kM(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function RM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function PM(e){const t=e+"CollectionProvider",[n,r]=W0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:g}=f,m=E.useRef(null),v=E.useRef(new Map).current;return y.jsx(o,{scope:h,itemMap:v,collectionRef:m,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:g,children:m}=f,v=i(s,g),x=Gr(h,v.collectionRef);return y.jsx(zo,{ref:x,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:g,children:m,...v}=f,x=E.useRef(null),b=Gr(h,x),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(x,{ref:x,...v}),()=>void S.itemMap.delete(x))),y.jsx(zo,{[u]:"",ref:b,children:m})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,w)=>v.indexOf(S.ref.current)-v.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var AM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zn=AM.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?zo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function q0(e,t){e&&Xs.flushSync(()=>e.dispatchEvent(t))}function Gn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function IM(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _M="DismissableLayer",sd="dismissableLayer.update",OM="dismissableLayer.pointerDownOutside",MM="dismissableLayer.focusOutside",Hg,U0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=R.useContext(U0),[u,d]=R.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=R.useState({}),h=Gr(t,C=>d(C)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),x=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,w=jM(C=>{const k=C.target,I=[...c.branches].some(P=>P.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=NM(C=>{const k=C.target;[...c.branches].some(P=>P.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return IM(C=>{x===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Hg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Wg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Hg)}},[u,p,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Wg())},[u,c]),R.useEffect(()=>{const C=()=>f({});return document.addEventListener(sd,C),()=>document.removeEventListener(sd,C)},[]),y.jsx(zn.div,{...l,ref:h,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Jt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Jt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Jt(e.onPointerDownCapture,w.onPointerDownCapture)})});K0.displayName=_M;var DM="DismissableLayerBranch",Y0=R.forwardRef((e,t)=>{const n=R.useContext(U0),r=R.useRef(null),o=Gr(t,r);return R.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),y.jsx(zn.div,{...e,ref:o})});Y0.displayName=DM;function jM(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){G0(OM,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NM(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=i=>{i.target&&!r.current&&G0(MM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wg(){const e=new CustomEvent(sd);document.dispatchEvent(e)}function G0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?q0(o,i):o.dispatchEvent(i)}var FM=K0,LM=Y0,bs=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},VM="Portal",Z0=R.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=R.useState(!1);bs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?pa.createPortal(y.jsx(zn.div,{...r,ref:t}),a):null});Z0.displayName=VM;function $M(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var X0=e=>{const{present:t,children:n}=e,r=zM(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),i=Gr(r.ref,BM(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:i}):null};X0.displayName="Presence";function zM(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),i=R.useRef("none"),a=e?"mounted":"unmounted",[s,l]=$M(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=$a(r.current);i.current=s==="mounted"?c:"none"},[s]),bs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=$a(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),bs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=$a(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=$a(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function $a(e){return(e==null?void 0:e.animationName)||"none"}function BM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function HM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=WM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Gn(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function WM({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=Gn(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var qM="VisuallyHidden",Wf=R.forwardRef((e,t)=>y.jsx(zn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Wf.displayName=qM;var qf="ToastProvider",[Uf,UM,KM]=PM("Toast"),[Q0,qz]=W0("Toast",[KM]),[YM,vl]=Q0(qf),J0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),p=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${qf}\`. Expected non-empty \`string\`.`),y.jsx(Uf.Provider,{scope:t,children:y.jsx(YM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:R.useCallback(()=>u(f=>f+1),[]),onToastRemove:R.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};J0.displayName=qf;var ew="ToastViewport",GM=["F8"],ld="toast.viewportPause",cd="toast.viewportResume",tw=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=GM,label:o="Notifications ({hotkey})",...i}=e,a=vl(ew,n),s=UM(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=Gr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;R.useEffect(()=>{const m=v=>{var b;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),R.useEffect(()=>{const m=l.current,v=d.current;if(h&&m&&v){const x=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(ld);v.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(cd);v.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!m.contains(T.relatedTarget)&&b()},w=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",x),m.addEventListener("focusout",S),m.addEventListener("pointermove",x),m.addEventListener("pointerleave",w),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",x),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",x),m.removeEventListener("pointerleave",w),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const g=R.useCallback(({tabbingDirection:m})=>{const x=s().map(b=>{const S=b.ref.current,w=[S,...cD(S)];return m==="forwards"?w:w.reverse()});return(m==="forwards"?x.reverse():x).flat()},[s]);return R.useEffect(()=>{const m=d.current;if(m){const v=x=>{var w,T,C;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const k=document.activeElement,I=x.shiftKey;if(x.target===m&&I){(w=c.current)==null||w.focus();return}const D=g({tabbingDirection:I?"backwards":"forwards"}),L=D.findIndex(A=>A===k);Zc(D.slice(L+1))?x.preventDefault():I?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",v),()=>m.removeEventListener("keydown",v)}},[s,g]),y.jsxs(LM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&y.jsx(ud,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});Zc(m)}}),y.jsx(Uf.Slot,{scope:n,children:y.jsx(zn.ol,{tabIndex:-1,...i,ref:p})}),h&&y.jsx(ud,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});Zc(m)}})]})});tw.displayName=ew;var nw="ToastFocusProxy",ud=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vl(nw,n);return y.jsx(Wf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});ud.displayName=nw;var yl="Toast",ZM="toast.swipeStart",XM="toast.swipeMove",QM="toast.swipeCancel",JM="toast.swipeEnd",rw=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=HM({prop:r,defaultProp:o,onChange:i});return y.jsx(X0,{present:n||s,children:y.jsx(nD,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Gn(e.onPause),onResume:Gn(e.onResume),onSwipeStart:Jt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Jt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Jt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Jt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});rw.displayName=yl;var[eD,tD]=Q0(yl,{onClose(){}}),nD=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...h}=e,g=vl(yl,n),[m,v]=R.useState(null),x=Gr(t,A=>v(A)),b=R.useRef(null),S=R.useRef(null),w=o||g.duration,T=R.useRef(0),C=R.useRef(w),k=R.useRef(0),{onToastAdd:I,onToastRemove:P}=g,N=Gn(()=>{var O;(m==null?void 0:m.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),a()}),D=R.useCallback(A=>{!A||A===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(N,A))},[N]);R.useEffect(()=>{const A=g.viewport;if(A){const O=()=>{D(C.current),c==null||c()},M=()=>{const F=new Date().getTime()-T.current;C.current=C.current-F,window.clearTimeout(k.current),l==null||l()};return A.addEventListener(ld,M),A.addEventListener(cd,O),()=>{A.removeEventListener(ld,M),A.removeEventListener(cd,O)}}},[g.viewport,w,l,c,D]),R.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(w)},[i,w,g.isClosePausedRef,D]),R.useEffect(()=>(I(),()=>P()),[I,P]);const L=R.useMemo(()=>m?cw(m):null,[m]);return g.viewport?y.jsxs(y.Fragment,{children:[L&&y.jsx(rD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),y.jsx(eD,{scope:n,onClose:N,children:Xs.createPortal(y.jsx(Uf.ItemSlot,{scope:n,children:y.jsx(FM,{asChild:!0,onEscapeKeyDown:Jt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||N(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(zn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Jt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:Jt(e.onPointerDown,A=>{A.button===0&&(b.current={x:A.clientX,y:A.clientY})}),onPointerMove:Jt(e.onPointerMove,A=>{if(!b.current)return;const O=A.clientX-b.current.x,M=A.clientY-b.current.y,F=!!S.current,j=["left","right"].includes(g.swipeDirection),H=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,_=j?H(0,O):0,z=j?0:H(0,M),X=A.pointerType==="touch"?10:2,Q={x:_,y:z},J={originalEvent:A,delta:Q};F?(S.current=Q,za(XM,d,J,{discrete:!1})):qg(Q,g.swipeDirection,X)?(S.current=Q,za(ZM,u,J,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(O)>X||Math.abs(M)>X)&&(b.current=null)}),onPointerUp:Jt(e.onPointerUp,A=>{const O=S.current,M=A.target;if(M.hasPointerCapture(A.pointerId)&&M.releasePointerCapture(A.pointerId),S.current=null,b.current=null,O){const F=A.currentTarget,j={originalEvent:A,delta:O};qg(O,g.swipeDirection,g.swipeThreshold)?za(JM,f,j,{discrete:!0}):za(QM,p,j,{discrete:!0}),F.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),rD=e=>{const{__scopeToast:t,children:n,...r}=e,o=vl(yl,t),[i,a]=R.useState(!1),[s,l]=R.useState(!1);return sD(()=>a(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:y.jsx(Z0,{asChild:!0,children:y.jsx(Wf,{...r,children:i&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},oD="ToastTitle",ow=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(zn.div,{...r,ref:t})});ow.displayName=oD;var iD="ToastDescription",iw=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(zn.div,{...r,ref:t})});iw.displayName=iD;var aw="ToastAction",aD=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?y.jsx(lw,{altText:n,asChild:!0,children:y.jsx(Kf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${aw}\`. Expected non-empty \`string\`.`),null)});aD.displayName=aw;var sw="ToastClose",Kf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=tD(sw,n);return y.jsx(lw,{asChild:!0,children:y.jsx(zn.button,{type:"button",...r,ref:t,onClick:Jt(e.onClick,o.onClose)})})});Kf.displayName=sw;var lw=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return y.jsx(zn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function cw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),lD(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...cw(r))}}),t}function za(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?q0(o,i):o.dispatchEvent(i)}var qg=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function sD(e=()=>{}){const t=Gn(e);bs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function lD(e){return e.nodeType===e.ELEMENT_NODE}function cD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var uD=J0,dD=tw,fD=rw,pD=ow,mD=iw,hD=Kf;const gD=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.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},vD=Jo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),uw=E.createContext(()=>{throw new Error("Not implemented")}),yD=()=>E.useContext(uw),Ug={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]}},xD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=vD({theme:t.theme||"default"});return y.jsx(fD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:y.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Ug[t.reversedIndex]||Ug.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:y.jsxs("div",{className:a,children:[y.jsxs("div",{className:"flex flex-col p-4",children:[t.title?y.jsx(pD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,y.jsx(mD,{className:"select-text truncate",children:t.text})]}),r?y.jsx(hD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:y.jsx(xa,{className:"h-5 w-5"})}):null]})})})});function bD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=gD(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const h=[...f,{...u,id:d,text:c}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return y.jsxs(uD,{duration:n,swipeThreshold:150,children:[y.jsx(uw.Provider,{value:l,children:e}),y.jsx(wr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(xD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),y.jsx(dD,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const wD=e=>y.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[y.jsxs("header",{className:"flex items-start gap-4 p-6",children:[y.jsx("div",{className:Ie("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:y.jsx("div",{children:y.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("header",{children:y.jsx("h3",{className:"text-base leading-none",children:e.title})}),y.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?y.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),dw=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Kg={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},fw=E.createContext(""),SD=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",dd=(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(!SD(a))return a}return n==="backward"?dd(e,e.length-1,"backward"):dd(e,-1,"forward")},Yg=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=dd(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Gg={[Kg.ArrowLeft]:(e,t)=>Yg(t,"backward"),[Kg.ArrowRight]:(e,t)=>Yg(t,"forward")},TD=e=>{const[t,n]=dw(e.active),r=E.useRef(null),o=Ur(e.onChange);E.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]),E.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=E.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Ve.keyof(Gg,c)){const u=Gg[c],d=u(l,r.current);if(d===null)return;n(d)}};return y.jsx(fw.Provider,{value:t,children:y.jsx(Hf,{className:e.className,container:Ie("pt-0 max-w-full w-full min-w-0",e.container),header:y.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[y.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),y.jsx("nav",{className:"min-w-0",children:y.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return y.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Ie("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:y.jsx(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},ED=()=>E.useContext(fw),CD=e=>{const t=ED();return y.jsx(E.Fragment,{children:e.id===t?e.children:null})},xl=e=>y.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[y.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),y.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});xl.Icon=function(t){return y.jsx("header",{...t,className:Ie("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};xl.Body=function(t){return y.jsx(un,{...t,className:Ie("min-w-0 flex-1",t.className),children:t.children})};xl.Right=function(t){return y.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:y.jsx(un,{...t,type:"button"})})};const kD=e=>y.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function bl(){return typeof window<"u"}function Tr(e){return pw(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(pw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pw(e){return bl()?e instanceof Node||e instanceof Bt(e).Node:!1}function nt(e){return bl()?e instanceof Element||e instanceof Bt(e).Element:!1}function wt(e){return bl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function fd(e){return!bl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function ba(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function RD(e){return["table","td","th"].includes(Tr(e))}function wl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yf(e){const t=Gf(),n=nt(e)?rn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function PD(e){let t=Zn(e);for(;wt(t)&&!gr(t);){if(Yf(t))return t;if(wl(t))return null;t=Zn(t)}return null}function Gf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(Tr(e))}function rn(e){return Bt(e).getComputedStyle(e)}function Sl(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zn(e){if(Tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fd(e)&&e.host||Jn(e);return fd(t)?t.host:t}function mw(e){const t=Zn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&ba(t)?t:mw(t)}function pr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mw(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=pd(a);return t.concat(a,a.visualViewport||[],ba(o)?o:[],s&&n?pr(s):[])}return t.concat(o,pr(o,[],n))}function pd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(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 yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Zf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function hw(){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 gw(e){return e.mozInputSource===0&&e.isTrusted?!0:md()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Xf(e){return AD()?!1:!md()&&e.width===0&&e.height===0||md()&&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 Qf(){return/apple/i.test(navigator.vendor)}function md(){const e=/android/i;return e.test(Zf())||e.test(hw())}function vw(){return Zf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function AD(){return hw().includes("jsdom/")}function Bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ID(e){return"nativeEvent"in e}function _D(e){return e.matches("html,body")}function _t(e){return(e==null?void 0:e.ownerDocument)||document}function Xc(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 In(e){return"composedPath"in e?e.composedPath()[0]:e.target}const OD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Jf(e){return wt(e)&&e.matches(OD)}function Dt(e){e.preventDefault(),e.stopPropagation()}function yw(e){return e?e.getAttribute("role")==="combobox"&&Jf(e):!1}const _n=Math.min,Qt=Math.max,ws=Math.round,Ro=Math.floor,vr=e=>({x:e,y:e}),MD={left:"right",right:"left",bottom:"top",top:"bottom"},DD={start:"end",end:"start"};function hd(e,t,n){return Qt(e,_n(t,n))}function li(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function ci(e){return e.split("-")[1]}function xw(e){return e==="x"?"y":"x"}function ep(e){return e==="y"?"height":"width"}function Zr(e){return["top","bottom"].includes(yr(e))?"y":"x"}function tp(e){return xw(Zr(e))}function jD(e,t,n){n===void 0&&(n=!1);const r=ci(e),o=tp(e),i=ep(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ss(a)),[a,Ss(a)]}function ND(e){const t=Ss(e);return[gd(e),t,gd(t)]}function gd(e){return e.replace(/start|end/g,t=>DD[t])}function FD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function LD(e,t,n,r){const o=ci(e);let i=FD(yr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(gd)))),i}function Ss(e){return e.replace(/left|right|bottom|top/g,t=>MD[t])}function VD(e){return{top:0,right:0,bottom:0,left:0,...e}}function bw(e){return typeof e!="number"?VD(e):{top:e,right:e,bottom:e,left:e}}function Ts(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}}/*!
215
215
  * tabbable 6.2.0
216
216
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
217
- */var $D=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Es=$D.join(","),ww=typeof Element>"u",Ho=ww?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cs=!ww&&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==null?void 0:e.ownerDocument},ks=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},zD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},BD=function(t,n,r){if(ks(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&Ho.call(t,Es)&&o.unshift(t),o=o.filter(r),o},HD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ks(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Ho.call(a,Es);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!ks(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},Sw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Tw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zD(t))&&!Sw(t)?0:t.tabIndex},WD=function(t,n){var r=Tw(t);return r<0&&n&&!Sw(t)?0:r},qD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ew=function(t){return t.tagName==="INPUT"},UD=function(t){return Ew(t)&&t.type==="hidden"},KD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},GD=function(t){if(!t.name)return!0;var n=t.form||Cs(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=YD(o,t.form);return!i||i===t},ZD=function(t){return Ew(t)&&t.type==="radio"},XD=function(t){return ZD(t)&&!GD(t)},QD=function(t){var n,r=t&&Cs(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Cs(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Zg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},JD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ho.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ho.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Cs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Zg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(QD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Zg(t);return!1},ej=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},tj=function(t,n){return!(n.disabled||ks(n)||UD(n)||JD(n,t)||KD(n)||ej(n))},vd=function(t,n){return!(XD(n)||Tw(n)<0||!tj(t,n))},nj=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},rj=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=WD(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(qD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ta=function(t,n){n=n||{};var r;return n.getShadowRoot?r=HD([t],n.includeContainer,{filter:vd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:nj}):r=BD(t,n.includeContainer,vd.bind(null,n)),rj(r)},oj=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,Es)===!1?!1:vd(n,t)};function Xg(e,t,n){let{reference:r,floating:o}=e;const i=Zr(t),a=tp(t),s=ep(a),l=yr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ci(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const ij=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}=Xg(c,r,l),p=r,f={},h=0;for(let g=0;g<s.length;g++){const{name:m,fn:v}=s[g],{x,y:b,data:S,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,f={...f,[m]:{...f[m],...S}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Xg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function np(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:p=!1,padding:f=0}=li(t,e),h=bw(f),m=s[p?d==="floating"?"reference":"floating":d],v=Ts(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)),S=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},w=Ts(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(v.top-w.top+h.top)/S.y,bottom:(w.bottom-v.bottom+h.bottom)/S.y,left:(v.left-w.left+h.left)/S.x,right:(w.right-v.right+h.right)/S.x}}const aj=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}=li(e,t)||{};if(c==null)return{};const d=bw(u),p={x:n,y:r},f=tp(o),h=ep(f),g=await a.getDimensions(c),m=f==="y",v=m?"top":"left",x=m?"bottom":"right",b=m?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[f]-p[f]-i.floating[h],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[b]||i.floating[h]);const k=S/2-w/2,I=C/2-g[h]/2-1,A=_n(d[v],I),j=_n(d[x],I),D=A,F=C-g[h]-j,P=C/2-g[h]/2+k,O=hd(D,P,F),_=!l.arrow&&ci(o)!=null&&P!==O&&i.reference[h]/2-(P<D?A:j)-g[h]/2<0,V=_?P<D?P-D:P-F:0;return{[f]:p[f]+V,data:{[f]:O,centerOffset:P-O-V,..._&&{alignmentOffset:V}},reset:_}}}),sj=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:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=li(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=yr(o),x=Zr(s),b=yr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Ss(s)]:ND(s)),T=h!=="none";!p&&T&&w.push(...LD(s,g,h,S));const C=[s,...w],k=await np(t,m),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const P=jD(o,a,S);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var j,D;const P=(((j=i.flip)==null?void 0:j.index)||0)+1,O=C[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let _=(D=A.filter(V=>V.overflows[0]<=0).sort((V,N)=>V.overflows[1]-N.overflows[1])[0])==null?void 0:D.placement;if(!_)switch(f){case"bestFit":{var F;const V=(F=A.filter(N=>{if(T){const $=Zr(N.placement);return $===x||$==="y"}return!0}).map(N=>[N.placement,N.overflows.filter($=>$>0).reduce(($,M)=>$+M,0)]).sort((N,$)=>N[1]-$[1])[0])==null?void 0:F[0];V&&(_=V);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function lj(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=yr(n),s=ci(n),l=Zr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=li(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const cj=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 lj(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}}}}},uj=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:v,y:x}=m;return{x:v,y:x}}},...l}=li(e,t),c={x:n,y:r},u=await np(t,l),d=Zr(yr(o)),p=xw(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",v=p==="y"?"bottom":"right",x=f+u[m],b=f-u[v];f=hd(x,f,b)}if(a){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=h+u[m],b=h-u[v];h=hd(x,h,b)}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},dj=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=li(e,t),l=await np(t,s),c=yr(n),u=ci(n),d=Zr(n)==="y",{width:p,height:f}=r.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,v=p-l.left-l.right,x=_n(f-l[h],m),b=_n(p-l[g],v),S=!t.middlewareData.shift;let w=x,T=b;if(d?T=u||S?_n(b,v):v:w=u||S?_n(x,m):m,S&&!u){const k=Qt(l.left,0),I=Qt(l.right,0),A=Qt(l.top,0),j=Qt(l.bottom,0);d?T=p-2*(k!==0||I!==0?k+I:Qt(l.left,l.right)):w=f-2*(A!==0||j!==0?A+j:Qt(l.top,l.bottom))}await a({...t,availableWidth:T,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Cw(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ws(n)!==i||ws(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function rp(e){return nt(e)?e:e.contextElement}function Ao(e){const t=rp(e);if(!wt(t))return vr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Cw(t);let a=(i?ws(n.width):n.width)/r,s=(i?ws(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const fj=vr(0);function kw(e){const t=Bt(e);return!Gf()||!t.visualViewport?fj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Xr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=rp(e);let a=vr(1);t&&(r?nt(r)&&(a=Ao(r)):a=Ao(e));const s=pj(i,n,r)?kw(i):vr(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 p=Bt(i),f=r&&nt(r)?Bt(r):r;let h=p,g=pd(h);for(;g&&r&&f!==h;){const m=Ao(g),v=g.getBoundingClientRect(),x=rn(g),b=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*m.x,S=v.top+(g.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=S,h=Bt(g),g=pd(h)}}return Ts({width:u,height:d,x:l,y:c})}function mj(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Jn(r),s=t?wl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=vr(1);const u=vr(0),d=wt(r);if((d||!d&&!i)&&((Tr(r)!=="body"||ba(a))&&(l=Sl(r)),wt(r))){const p=Xr(r);c=Ao(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function hj(e){return Array.from(e.getClientRects())}function Rw(e){return Xr(Jn(e)).left+Sl(e).scrollLeft}function gj(e){const t=Jn(e),n=Sl(e),r=e.ownerDocument.body,o=Qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Rw(e);const s=-n.scrollTop;return rn(r).direction==="rtl"&&(a+=Qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function vj(e,t){const n=Bt(e),r=Jn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Gf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function yj(e,t){const n=Xr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wt(e)?Ao(e):vr(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 Qg(e,t,n){let r;if(t==="viewport")r=vj(e,n);else if(t==="document")r=gj(Jn(e));else if(nt(t))r=yj(t,n);else{const o=kw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ts(r)}function Pw(e,t){const n=Zn(e);return n===t||!nt(n)||gr(n)?!1:rn(n).position==="fixed"||Pw(n,t)}function xj(e,t){const n=t.get(e);if(n)return n;let r=pr(e,[],!1).filter(s=>nt(s)&&Tr(s)!=="body"),o=null;const i=rn(e).position==="fixed";let a=i?Zn(e):e;for(;nt(a)&&!gr(a);){const s=rn(a),l=Yf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ba(a)&&!l&&Pw(e,a))?r=r.filter(u=>u!==a):o=s,a=Zn(a)}return t.set(e,r),r}function bj(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?wl(t)?[]:xj(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Qg(t,u,o);return c.top=Qt(d.top,c.top),c.right=_n(d.right,c.right),c.bottom=_n(d.bottom,c.bottom),c.left=Qt(d.left,c.left),c},Qg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wj(e){const{width:t,height:n}=Cw(e);return{width:t,height:n}}function Sj(e,t,n){const r=wt(t),o=Jn(t),i=n==="fixed",a=Xr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=vr(0);if(r||!r&&!i)if((Tr(t)!=="body"||ba(o))&&(s=Sl(t)),r){const d=Xr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Rw(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Qc(e){return rn(e).position==="static"}function Jg(e,t){return!wt(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Aw(e,t){const n=Bt(e);if(wl(e))return n;if(!wt(e)){let o=Zn(e);for(;o&&!gr(o);){if(nt(o)&&!Qc(o))return o;o=Zn(o)}return n}let r=Jg(e,t);for(;r&&RD(r)&&Qc(r);)r=Jg(r,t);return r&&gr(r)&&Qc(r)&&!Yf(r)?n:r||PD(e)||n}const Tj=async function(e){const t=this.getOffsetParent||Aw,n=this.getDimensions,r=await n(e.floating);return{reference:Sj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ej(e){return rn(e).direction==="rtl"}const Cj={convertOffsetParentRelativeRectToViewportRelativeRect:mj,getDocumentElement:Jn,getClippingRect:bj,getOffsetParent:Aw,getElementRects:Tj,getClientRects:hj,getDimensions:wj,getScale:Ao,isElement:nt,isRTL:Ej};function kj(e,t){let n=null,r;const o=Jn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Ro(u),h=Ro(o.clientWidth-(c+d)),g=Ro(o.clientHeight-(u+p)),m=Ro(c),x={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Qt(0,_n(1,l))||1};let b=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!b)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),i}function ui(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=rp(e),u=o||i?[...c?pr(c):[],...pr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?kj(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,g=l?Xr(e):null;l&&m();function m(){const v=Xr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Rj=cj,Pj=uj,Aj=sj,Ij=dj,ev=aj,_j=(e,t,n)=>{const r=new Map,o={platform:Cj,...n},i={...o.platform,_c:r};return ij(e,t,{...o,platform:i})};var os=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Rs(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(!Rs(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)&&!Rs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tv(e,t){const n=Iw(e);return Math.round(t*n)/n}function Jc(e){const t=R.useRef(e);return os(()=>{t.current=e}),t}function Oj(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]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=R.useState(r);Rs(p,r)||f(r);const[h,g]=R.useState(null),[m,v]=R.useState(null),x=R.useCallback(N=>{N!==T.current&&(T.current=N,g(N))},[]),b=R.useCallback(N=>{N!==C.current&&(C.current=N,v(N))},[]),S=i||h,w=a||m,T=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Jc(l),j=Jc(o),D=Jc(c),F=R.useCallback(()=>{if(!T.current||!C.current)return;const N={placement:t,strategy:n,middleware:p};j.current&&(N.platform=j.current),_j(T.current,C.current,N).then($=>{const M={...$,isPositioned:D.current!==!1};P.current&&!Rs(k.current,M)&&(k.current=M,Xs.flushSync(()=>{d(M)}))})},[p,t,n,j,D]);os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[c]);const P=R.useRef(!1);os(()=>(P.current=!0,()=>{P.current=!1}),[]),os(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(A.current)return A.current(S,w,F);F()}},[S,w,F,A,I]);const O=R.useMemo(()=>({reference:T,floating:C,setReference:x,setFloating:b}),[x,b]),_=R.useMemo(()=>({reference:S,floating:w}),[S,w]),V=R.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const $=tv(_.floating,u.x),M=tv(_.floating,u.y);return s?{...N,transform:"translate("+$+"px, "+M+"px)",...Iw(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:M}},[n,s,_.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:F,refs:O,elements:_,floatingStyles:V}),[u,F,O,_,V])}const Mj=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?ev({element:r.current,padding:o}).fn(n):{}:r?ev({element:r,padding:o}).fn(n):{}}}},wa=(e,t)=>({...Rj(e),options:[e,t]}),op=(e,t)=>({...Pj(e),options:[e,t]}),ip=(e,t)=>({...Aj(e),options:[e,t]}),_w=(e,t)=>({...Ij(e),options:[e,t]}),Ow=(e,t)=>({...Mj(e),options:[e,t]}),Mw={...R},Dj=Mw.useInsertionEffect,jj=Dj||(e=>e());function Rt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jj(()=>{t.current=e}),R.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)},[])}const ap="ArrowUp",Sa="ArrowDown",Wo="ArrowLeft",di="ArrowRight";function Ba(e,t,n){return Math.floor(e/t)!==n}function Vi(e,t){return t<0||t>=e.current.length}function eu(e,t){return Ft(e,{disabledIndices:t})}function nv(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&is(a,s,o));return s}function Nj(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===ap){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,h=l-(f-p);f===p?d=l:d=f>p?h:h-i}Vi(e,d)&&(d=c)}if(n.key===Sa&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Vi(e,d)&&(d=c)),r==="both"){const p=Ro(c/i);n.key===di&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Ba(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ba(d,i,p)&&(d=c)),n.key===Wo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ba(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ba(d,i,p)&&(d=c));const f=Ro(l/i)===p;Vi(e,d)&&(o&&f?d=n.key===Wo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function Fj(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 p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function Lj(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 Vj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let rv=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(rv);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():rv=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function $j(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 zj(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const Dw=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Bj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=R.useState(()=>new Map),a=R.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=R.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort($j).forEach((u,d)=>{l.set(u,d)}),zj(o,l)||i(l)},[o]),R.createElement(Dw.Provider,{value:R.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function jw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=R.useContext(Dw),[s,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return We(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qo.apply(this,arguments)}let ov=!1,Hj=0;const iv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Hj++;function Wj(){const[e,t]=R.useState(()=>ov?iv():void 0);return We(()=>{e==null&&t(iv())},[]),R.useEffect(()=>{ov=!0},[]),e}const qj=Mw.useId,fi=qj||Wj;let na;process.env.NODE_ENV!=="production"&&(na=new Set);function as(){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=na)!=null&&e.has(o))){var i;(i=na)==null||i.add(o),console.warn(o)}}function Uj(){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=na)!=null&&e.has(o))){var i;(i=na)==null||i.add(o),console.error(o)}}const Nw=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||as("The `ref` prop is required for `FloatingArrow`."));const m=fi(),[v,x]=R.useState(!1);if(We(()=>{if(!o)return;rn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const b=c*2,S=b/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",j=u&&k==="end"?"bottom":"top";let D=u&&k==="end"?"right":"left";u&&v&&(D=k==="end"?"left":"right");const F=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",_={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",qo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[D]:F,[j]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+_+(f??""),...h}}),b>0&&R.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:O}),R.createElement("path",{stroke:b&&!p?g.fill:"none",d:O}),R.createElement("clipPath",{id:m},R.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+b,height:a})))});function Fw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Lw=R.createContext(null),Vw=R.createContext(null),Er=()=>{var e;return((e=R.useContext(Lw))==null?void 0:e.id)||null},Cr=()=>R.useContext(Vw);function Kj(e){const t=fi(),n=Cr(),o=Er();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function Yj(e){const{children:t,id:n}=e,r=Er();return R.createElement(Lw.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function Gj(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(a=>{n.current=[...n.current,a]},[]),o=R.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=R.useState(()=>Fw())[0];return R.createElement(Vw.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function xr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const av=xr("safe-polygon");function tu(e,t,n){return n&&!Bo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function $w(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:p=!0}=t,f=Cr(),h=Er(),g=jt(c),m=jt(l),v=jt(n),x=R.useRef(),b=R.useRef(-1),S=R.useRef(),w=R.useRef(-1),T=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var O;const _=(O=o.current.openEvent)==null?void 0:O.type;return(_==null?void 0:_.includes("mouse"))&&_!=="mousedown"},[o]);R.useEffect(()=>{if(!s)return;function O(_){let{open:V}=_;V||(clearTimeout(b.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),R.useEffect(()=>{if(!s||!g.current||!n)return;function O(V){I()&&r(!1,V,"hover")}const _=_t(a.floating).documentElement;return _.addEventListener("mouseleave",O),()=>{_.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const A=R.useCallback(function(O,_,V){_===void 0&&(_=!0),V===void 0&&(V="hover");const N=tu(m.current,"close",x.current);N&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,O,V),N)):_&&(clearTimeout(b.current),r(!1,O,V))},[m,r]),j=Rt(()=>{k.current(),S.current=void 0}),D=Rt(()=>{if(C.current){const O=_t(a.floating).body;O.style.pointerEvents="",O.removeAttribute(av),C.current=!1}});R.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function _(M){if(clearTimeout(b.current),T.current=!1,u&&!Bo(x.current)||d>0&&!tu(m.current,"open"))return;const B=tu(m.current,"open",x.current);B?b.current=window.setTimeout(()=>{v.current||r(!0,M,"hover")},B):r(!0,M,"hover")}function V(M){if(O())return;k.current();const B=_t(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){D(),j(),A(M,!0,"safe-polygon")}});const Q=S.current;B.addEventListener("mousemove",Q),k.current=()=>{B.removeEventListener("mousemove",Q)};return}(x.current==="touch"?!yt(a.floating,M.relatedTarget):!0)&&A(M)}function N(M){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){D(),j(),A(M)}})(M))}if(nt(a.domReference)){var $;const M=a.domReference;return n&&M.addEventListener("mouseleave",N),($=a.floating)==null||$.addEventListener("mouseleave",N),p&&M.addEventListener("mousemove",_,{once:!0}),M.addEventListener("mouseenter",_),M.addEventListener("mouseleave",V),()=>{var B;n&&M.removeEventListener("mouseleave",N),(B=a.floating)==null||B.removeEventListener("mouseleave",N),p&&M.removeEventListener("mousemove",_),M.removeEventListener("mouseenter",_),M.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,A,j,D,r,n,v,f,m,g,o]),We(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const V=_t(a.floating).body;V.setAttribute(av,""),V.style.pointerEvents="none",C.current=!0;const N=a.floating;if(nt(a.domReference)&&N){var _;const $=a.domReference,M=f==null||(_=f.nodesRef.current.find(B=>B.id===h))==null||(_=_.context)==null?void 0:_.elements.floating;return M&&(M.style.pointerEvents=""),$.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{$.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,n,h,a,f,g,I]),We(()=>{n||(x.current=void 0,j(),D())},[n,j,D]),R.useEffect(()=>()=>{j(),clearTimeout(b.current),clearTimeout(w.current),D()},[s,a.domReference,j,D]);const F=R.useMemo(()=>{function O(_){x.current=_.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(_){const{nativeEvent:V}=_;function N(){!T.current&&!v.current&&r(!0,V,"hover")}u&&!Bo(x.current)||n||d===0||(clearTimeout(w.current),x.current==="touch"?N():w.current=window.setTimeout(N,d))}}},[u,r,n,v,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return R.useMemo(()=>s?{reference:F,floating:P}:{},[s,F,P])}function Zj(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==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function qr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function Xj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),qr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let go=new WeakMap,Ha=new WeakSet,Wa={},nu=0;const Qj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,zw=e=>e&&(e.host||zw(e.parentNode)),Jj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function e2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=Jj(t,e),s=new Set,l=new Set(a),c=[];Wa[o]||(Wa[o]=new WeakMap);const u=Wa[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(Tr(h)!=="script")if(s.has(h))p(h);else{const g=i?h.getAttribute(i):null,m=g!==null&&g!=="false",v=(go.get(h)||0)+1,x=(u.get(h)||0)+1;go.set(h,v),u.set(h,x),c.push(h),v===1&&m&&Ha.add(h),x===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return nu++,()=>{c.forEach(f=>{const h=(go.get(f)||0)-1,g=(u.get(f)||0)-1;go.set(f,h),u.set(f,g),h||(!Ha.has(f)&&i&&f.removeAttribute(i),Ha.delete(f)),g||f.removeAttribute(o)}),nu--,nu||(go=new WeakMap,go=new WeakMap,Ha=new WeakSet,Wa={})}}function sv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=_t(e[0]).body;return e2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Uo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Bw(e,t){const n=ta(e,Uo());t==="prev"&&n.reverse();const r=n.indexOf(gn(_t(e)));return n.slice(r+1)[0]}function Hw(){return Bw(document.body,"next")}function Ww(){return Bw(document.body,"prev")}function $i(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function t2(e){ta(e,Uo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function n2(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 r2(e,t,n){const r=e.indexOf(t);function o(a){const s=xr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const sp={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};let o2;function lv(e){e.key==="Tab"&&(e.target,clearTimeout(o2))}const Ps=R.forwardRef(function(t,n){const[r,o]=R.useState();We(()=>(Qf()&&o("button"),document.addEventListener("keydown",lv),()=>{document.removeEventListener("keydown",lv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[xr("focus-guard")]:"",style:sp};return R.createElement("span",qo({},t,i))}),qw=R.createContext(null),cv=xr("portal");function i2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=fi(),o=Uw(),[i,a]=R.useState(null),s=R.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{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(cv,""),l.appendChild(c),s.current=c,a(c)},[t,r]),We(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!nt(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(cv,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function io(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=i2({id:n,root:r}),[a,s]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&$i(h)&&(h.type==="focusin"?n2:t2)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),R.createElement(qw.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&R.createElement(Ps,{"data-type":"outside",ref:l,onFocus:f=>{if($i(f,i)){var h;(h=u.current)==null||h.focus()}else{const g=Ww()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&R.createElement("span",{"aria-owns":i.id,style:sp}),i&&Xs.createPortal(t,i),p&&i&&R.createElement(Ps,{"data-type":"outside",ref:c,onFocus:f=>{if($i(f,i)){var h;(h=d.current)==null||h.focus()}else{const g=Hw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Uw=()=>R.useContext(qw),a2=20;let Lr=[];function ru(e){Lr=Lr.filter(n=>n.isConnected);let t=e;if(!(!t||Tr(t)==="body")){if(!oj(t,Uo())){const n=ta(t,Uo())[0];n&&(t=n)}Lr.push(t),Lr.length>a2&&(Lr=Lr.slice(-20))}}function uv(){return Lr.slice().reverse().find(e=>e.isConnected)}const s2=R.forwardRef(function(t,n){return R.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:sp}))});function pi(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}=e,{open:p,refs:f,nodeId:h,onOpenChange:g,events:m,dataRef:v,floatingId:x,elements:{domReference:b,floating:S}}=t,w=typeof a=="number"&&a<0,T=yw(b)&&w,C=Qj()?i:!0,k=jt(o),I=jt(a),A=jt(s),j=Cr(),D=Uw(),F=R.useRef(null),P=R.useRef(null),O=R.useRef(!1),_=R.useRef(!1),V=R.useRef(-1),N=D!=null,$=S==null?void 0:S.firstElementChild,M=($==null?void 0:$.id)===x?$:S,B=Rt(function(G){return G===void 0&&(G=M),G?ta(G,Uo()):[]}),X=Rt(G=>{const Y=B(G);return k.current.map(Z=>b&&Z==="reference"?b:M&&Z==="floating"?M:Y).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){yt(M,gn(_t(M)))&&B().length===0&&!T&&Dt(Z);const L=X(),z=In(Z);k.current[0]==="reference"&&z===b&&(Dt(Z),Z.shiftKey?cr(L[L.length-1]):cr(L[1])),k.current[1]==="floating"&&z===M&&Z.shiftKey&&(Dt(Z),cr(L[0]))}}const Y=_t(M);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,b,M,c,k,T,B,X]),R.useEffect(()=>{if(r||!S)return;function G(Y){const Z=In(Y),z=B().indexOf(Z);z!==-1&&(V.current=z)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,B]),R.useEffect(()=>{if(r||!d)return;function G(){_.current=!0,setTimeout(()=>{_.current=!1})}function Y(Z){const L=Z.relatedTarget;queueMicrotask(()=>{const z=!(yt(b,L)||yt(S,L)||yt(L,S)||yt(D==null?void 0:D.portalNode,L)||L!=null&&L.hasAttribute(xr("focus-guard"))||j&&(qr(j.nodesRef.current,h).find(K=>{var ie,H;return yt((ie=K.context)==null?void 0:ie.elements.floating,L)||yt((H=K.context)==null?void 0:H.elements.domReference,L)})||Zj(j.nodesRef.current,h).find(K=>{var ie,H;return((ie=K.context)==null?void 0:ie.elements.floating)===L||((H=K.context)==null?void 0:H.elements.domReference)===L})));if(l&&z&&gn(_t(M))===_t(M).body){wt(M)&&(M==null||M.focus());const K=V.current,ie=B(),H=ie[K]||ie[ie.length-1]||M;wt(H)&&H.focus()}(T||!c)&&L&&z&&!_.current&&L!==uv()&&(O.current=!0,g(!1,Z))})}if(S&&wt(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,b,S,M,c,h,j,D,g,d,l,B,T]),R.useEffect(()=>{var G;if(r)return;const Y=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+xr("portal")+"]"))||[]);if(S){const Z=[S,...Y,F.current,P.current,k.current.includes("reference")||T?b:null].filter(z=>z!=null),L=c||T?sv(Z,C,!C):sv(Z);return()=>{L()}}},[r,b,S,c,k,D,T,C]),We(()=>{if(r||!wt(M))return;const G=_t(M),Y=gn(G);queueMicrotask(()=>{const Z=X(M),L=I.current,z=(typeof L=="number"?Z[L]:L.current)||M,K=yt(M,Y);!w&&!K&&p&&cr(z,{preventScroll:z===M})})},[r,p,M,w,X,I]),We(()=>{if(r||!M)return;let G=!1;const Y=_t(M),Z=gn(Y);let z=v.current.openEvent;const K=f.domReference.current;ru(Z);function ie(H){let{open:ye,reason:Te,event:Re,nested:$e}=H;ye&&(z=Re),Te==="escape-key"&&f.domReference.current&&ru(f.domReference.current),Te==="hover"&&Re.type==="mouseleave"&&(O.current=!0),Te==="outside-press"&&($e?(O.current=!1,G=!0):O.current=!(gw(Re)||Xf(Re)))}return m.on("openchange",ie),()=>{m.off("openchange",ie);const H=gn(Y),ye=yt(S,H)||j&&qr(j.nodesRef.current,h).some(se=>{var xe;return yt((xe=se.context)==null?void 0:xe.elements.floating,H)});(ye||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&ru(f.domReference.current);const Re=K||Z,$e=ta(_t(Re).body,Uo());queueMicrotask(()=>{let se=uv();!se&&wt(Re)&&S&&(se=r2($e,Re,S)),A.current&&!O.current&&wt(se)&&(!(se!==H&&H!==Y.body)||ye)&&se.focus({preventScroll:G})})}},[r,S,M,A,v,f,m,j,h]),We(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{D.setFocusManagerState(null)}},[r,D,c,p,g,f,d]),We(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const G=()=>{const Z=M.getAttribute("tabindex"),L=B(),z=gn(_t(S)),K=L.indexOf(z);K!==-1&&(V.current=K),k.current.includes("floating")||z!==f.domReference.current&&L.length===0?Z!=="0"&&M.setAttribute("tabindex","0"):Z!=="-1"&&M.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,M,f,k,B,w]);function Q(G){return r||!u||!c?null:R.createElement(s2,{ref:G==="start"?F:P,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(N||c);return R.createElement(R.Fragment,null,J&&R.createElement(Ps,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const Z=X();cr(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(O.current=!1,$i(G,D.portalNode)){const Z=Hw()||b;Z==null||Z.focus()}else{var Y;(Y=D.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&Q("start"),n,Q("end"),J&&R.createElement(Ps,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)cr(X()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(O.current=!0),$i(G,D.portalNode)){const Z=Ww()||b;Z==null||Z.focus()}else{var Y;(Y=D.afterOutsideRef.current)==null||Y.focus()}}}))}const ou=new Set,Kw=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=fi();return We(()=>{if(!r)return;ou.add(i);const a=/iP(hone|ad|od)|iOS/.test(Zf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,h;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{ou.delete(i),ou.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),R.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function dv(e){return wt(e.target)&&e.target.tagName==="BUTTON"}function fv(e){return Jf(e)}function Ta(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}=t,d=R.useRef(),p=R.useRef(!1),f=R.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const g=d.current;h.button===0&&s!=="click"&&(Bo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Bo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||dv(h))&&(h.key===" "&&!fv(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||dv(h)||fv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}function l2(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0: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,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function pv(e){return e!=null&&e.clientX!=null}function c2(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=R.useRef(!1),p=R.useRef(null),[f,h]=R.useState(),[g,m]=R.useState([]),v=Rt((T,C)=>{d.current||r.current.openEvent&&!pv(r.current.openEvent)||a.setPositionReference(l2(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),x=Rt(T=>{c!=null||u!=null||(n?p.current||m([]):v(T.clientX,T.clientY))}),b=Bo(f)?o:n,S=R.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const T=Bt(o);function C(k){const I=In(k);yt(o,I)?(T.removeEventListener("mousemove",C),p.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||pv(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,v]);R.useEffect(()=>S(),[S,g]),R.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),R.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=R.useMemo(()=>{function T(C){let{pointerType:k}=C;h(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:x,onMouseEnter:x}},[x]);return R.useMemo(()=>s?{reference:w}:{},[s,w])}const u2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},d2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ao(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:p=!1,bubbles:f,capture:h}=t,g=Cr(),m=Rt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,x=R.useRef(!1),b=R.useRef(!1),{escapeKey:S,outsidePress:w}=mv(f),{escapeKey:T,outsidePress:C}=mv(h),k=Rt(P=>{var O;if(!n||!a||!s||P.key!=="Escape")return;const _=(O=i.current.floatingContext)==null?void 0:O.nodeId,V=g?qr(g.nodesRef.current,_):[];if(!S&&(P.stopPropagation(),V.length>0)){let N=!0;if(V.forEach($=>{var M;if((M=$.context)!=null&&M.open&&!$.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,ID(P)?P.nativeEvent:P,"escape-key")}),I=Rt(P=>{var O;const _=()=>{var V;k(P),(V=In(P))==null||V.removeEventListener("keydown",_)};(O=In(P))==null||O.addEventListener("keydown",_)}),A=Rt(P=>{var O;const _=x.current;x.current=!1;const V=b.current;if(b.current=!1,c==="click"&&V||_||typeof v=="function"&&!v(P))return;const N=In(P),$="["+xr("inert")+"]",M=_t(o.floating).querySelectorAll($);let B=nt(N)?N:null;for(;B&&!gr(B);){const G=Zn(B);if(gr(G)||!nt(G))break;B=G}if(M.length&&nt(N)&&!_D(N)&&!yt(N,o.floating)&&Array.from(M).every(G=>!yt(B,G)))return;if(wt(N)&&F){const G=N.clientWidth>0&&N.scrollWidth>N.clientWidth,Y=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let Z=Y&&P.offsetX>N.clientWidth;if(Y&&rn(N).direction==="rtl"&&(Z=P.offsetX<=N.offsetWidth-N.clientWidth),Z||G&&P.offsetY>N.clientHeight)return}const X=(O=i.current.floatingContext)==null?void 0:O.nodeId,Q=g&&qr(g.nodesRef.current,X).some(G=>{var Y;return Xc(P,(Y=G.context)==null?void 0:Y.elements.floating)});if(Xc(P,o.floating)||Xc(P,o.domReference)||Q)return;const J=g?qr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),j=Rt(P=>{var O;const _=()=>{var V;A(P),(V=In(P))==null||V.removeEventListener(c,_)};(O=In(P))==null||O.addEventListener(c,_)});R.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function P(V){r(!1,V,"ancestor-scroll")}const O=_t(o.floating);s&&O.addEventListener("keydown",T?I:k,T),v&&O.addEventListener(c,C?j:A,C);let _=[];return p&&(nt(o.domReference)&&(_=pr(o.domReference)),nt(o.floating)&&(_=_.concat(pr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(_=_.concat(pr(o.reference.contextElement)))),_=_.filter(V=>{var N;return V!==((N=O.defaultView)==null?void 0:N.visualViewport)}),_.forEach(V=>{V.addEventListener("scroll",P,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",T?I:k,T),v&&O.removeEventListener(c,C?j:A,C),_.forEach(V=>{V.removeEventListener("scroll",P)})}},[i,o,s,v,c,n,r,p,a,S,w,k,T,I,A,C,j]),R.useEffect(()=>{x.current=!1},[v,c]);const D=R.useMemo(()=>({onKeyDown:k,[u2[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),F=R.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[d2[c]]:()=>{x.current=!0}}),[k,c]);return R.useMemo(()=>a?{reference:D,floating:F}:{},[a,D,F])}function f2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fi(),i=R.useRef({}),[a]=R.useState(()=>Fw()),s=Er()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&Uj("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]=R.useState(r.reference),u=Rt((f,h,g)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:g,nested:s}),n==null||n(f,h,g)}),d=R.useMemo(()=>({setPositionReference:c}),[]),p=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function kr(e){e===void 0&&(e={});const{nodeId:t}=e,n=f2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=R.useState(null),[s,l]=R.useState(null),u=(o==null?void 0:o.reference)||i,d=R.useRef(null),p=Cr();We(()=>{u&&(d.current=u)},[u]);const f=Oj({...e,elements:{...o,...s&&{reference:s}}}),h=R.useCallback(b=>{const S=nt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=R.useCallback(b=>{(nt(b)||b===null)&&(d.current=b,a(b)),(nt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!nt(b))&&f.refs.setReference(b)},[f.refs]),m=R.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:d}),[f.refs,g,h]),v=R.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),x=R.useMemo(()=>({...f,...r,refs:m,elements:v,nodeId:t}),[f,m,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=x;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=x)}),R.useMemo(()=>({...f,context:x,refs:m,elements:v}),[f,m,v,x])}function p2(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=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function h(){!n&&wt(a.domReference)&&a.domReference===gn(_t(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),R.useEffect(()=>{if(!s)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=R.useMemo(()=>({onPointerDown(f){Xf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=In(f.nativeEvent);if(l&&nt(h))try{if(Qf()&&vw())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Jf(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,g=f.nativeEvent,m=nt(h)&&h.hasAttribute(xr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const x=gn(a.domReference?a.domReference.ownerDocument:document);!h&&x===a.domReference||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||yt(a.domReference,x)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return R.useMemo(()=>s?{reference:p}:{},[s,p])}const hv="active",gv="selected";function iu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[hv]:a,[gv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...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&&[hv,gv].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 p,f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Rr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=R.useCallback(s=>iu(s,e,"reference"),t),i=R.useCallback(s=>iu(s,e,"floating"),n),a=R.useCallback(s=>iu(s,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let vv=!1;function Tl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function yv(e,t){return Tl(t,e===ap||e===Sa,e===Wo||e===di)}function au(e,t,n){return Tl(t,e===Sa,n?e===Wo:e===di)||e==="Enter"||e===" "||e===""}function m2(e,t,n){return Tl(t,n?e===Wo:e===di,e===Sa)}function xv(e,t,n){return Tl(t,n?e===di:e===Wo,e===ap)}function El(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:v=!0,disabledIndices:x=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||as("`useListNavigation` looping must be enabled to allow escaping."),h||as("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&as("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=Er(),A=Cr(),j=Rt(s),D=R.useRef(g),F=R.useRef(c??-1),P=R.useRef(null),O=R.useRef(!0),_=R.useRef(j),V=R.useRef(!!o.floating),N=R.useRef(n),$=R.useRef(!1),M=R.useRef(!1),B=jt(x),X=jt(n),Q=jt(w),J=jt(o.floating),G=jt(c),[Y,Z]=R.useState(),[L,z]=R.useState(),K=Rt(function(se,xe,le){le===void 0&&(le=!1);function be(ue){h?(Z(ue.id),A==null||A.events.emit("virtualfocus",ue),T&&(T.current=ue)):cr(ue,{preventScroll:!0,sync:vw()&&Qf()?vv||$.current:!1})}const oe=se.current[xe.current];oe&&be(oe),requestAnimationFrame(()=>{const ue=se.current[xe.current]||oe;if(!ue)return;oe||be(ue);const ee=Q.current;ee&&H&&(le||!O.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return vv=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?D.current&&c!=null&&(M.current=!0,F.current=c,j(c)):V.current&&(F.current=-1,_.current(null)))},[l,n,o.floating,c,j]),We(()=>{if(l&&n&&o.floating)if(a==null){if($.current=!1,G.current!=null)return;if(V.current&&(F.current=-1,K(i,F)),(!N.current||!V.current)&&D.current&&(P.current!=null||D.current===!0&&P.current==null)){let se=0;const xe=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(xe),se++):(F.current=P.current==null||au(P.current,b,f)||p?eu(i,B.current):nv(i,B.current),P.current=null,j(F.current))};xe()}}else Vi(i,a)||(F.current=a,K(i,F,M.current),M.current=!1)},[l,n,o.floating,a,G,p,i,b,f,j,K,B]),We(()=>{var se;if(!l||o.floating||!A||h||!V.current)return;const xe=A.nodesRef.current,le=(se=xe.find(ue=>ue.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,be=gn(_t(o.floating)),oe=xe.some(ue=>ue.context&&yt(ue.context.elements.floating,be));le&&!oe&&O.current&&le.focus({preventScroll:!0})},[l,o.floating,A,I,h]),We(()=>{if(!l||!A||!h||I)return;function se(xe){z(xe.id),T&&(T.current=xe)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,h,I,T]),We(()=>{_.current=j,V.current=!!o.floating}),We(()=>{n||(P.current=null)},[n]),We(()=>{N.current=n},[n]);const ie=a!=null,H=R.useMemo(()=>{function se(le){if(!n)return;const be=i.current.indexOf(le);be!==-1&&j(be)}return{onFocus(le){let{currentTarget:be}=le;se(be)},onClick:le=>{let{currentTarget:be}=le;return be.focus({preventScroll:!0})},...m&&{onMouseMove(le){let{currentTarget:be}=le;se(be)},onPointerLeave(le){let{pointerType:be}=le;!O.current||be==="touch"||(F.current=-1,K(i,F),j(null),h||cr(J.current,{preventScroll:!0}))}}}},[n,J,K,m,i,j,h]),ye=Rt(se=>{if(O.current=!1,$.current=!0,!X.current&&se.currentTarget===J.current)return;if(p&&xv(se.key,b,f)){Dt(se),r(!1,se.nativeEvent,"list-navigation"),wt(o.domReference)&&!h&&o.domReference.focus();return}const xe=F.current,le=eu(i,x),be=nv(i,x);if(se.key==="Home"&&(Dt(se),F.current=le,j(F.current)),se.key==="End"&&(Dt(se),F.current=be,j(F.current)),S>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=Fj(oe,S,k),ee=ue.findIndex(te=>te!=null&&!is(i.current,te,x)),q=ue.reduce((te,me,Oe)=>me!=null&&!is(i.current,me,x)?Oe:te,-1);if(F.current=ue[Nj({current:ue.map(te=>te!=null?i.current[te]:null)},{event:se,orientation:b,loop:d,cols:S,disabledIndices:Vj([...x||i.current.map((te,me)=>is(i.current,me)?me:void 0),void 0],ue),minIndex:ee,maxIndex:q,prevIndex:Lj(F.current>be?le:F.current,oe,ue,S,se.key===Sa?"bl":se.key===di?"tr":"tl"),stopEvent:!0})],j(F.current),b==="both")return}if(yv(se.key,b)){if(Dt(se),n&&!h&&gn(se.currentTarget.ownerDocument)===se.currentTarget){F.current=au(se.key,b,f)?le:be,j(F.current);return}au(se.key,b,f)?d?F.current=xe>=be?u&&xe!==i.current.length?-1:le:Ft(i,{startingIndex:xe,disabledIndices:x}):F.current=Math.min(be,Ft(i,{startingIndex:xe,disabledIndices:x})):d?F.current=xe<=le?u&&xe!==-1?i.current.length:be:Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:x}):F.current=Math.max(le,Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:x})),Vi(i,F.current)?j(null):j(F.current)}}),Te=R.useMemo(()=>h&&n&&ie&&{"aria-activedescendant":L||Y},[h,n,ie,L,Y]),Re=R.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!yw(o.domReference)&&Te,onKeyDown:ye,onPointerMove(){O.current=!0}}),[Te,ye,o.domReference,b]),$e=R.useMemo(()=>{function se(le){g==="auto"&&gw(le.nativeEvent)&&(D.current=!0)}function xe(le){D.current=g,g==="auto"&&Xf(le.nativeEvent)&&(D.current=!0)}return{...Te,onKeyDown(le){O.current=!1;const be=le.key.indexOf("Arrow")===0,oe=m2(le.key,b,f),ue=xv(le.key,b,f),ee=yv(le.key,b),q=(p?oe:ee)||le.key==="Enter"||le.key.trim()==="";if(h&&n){const He=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),Ye=A&&He?Xj(A.nodesRef.current,He.id):null;if(be&&Ye&&T){const Ot=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(oe||ue){var te,me;const pn=((te=Ye.context)==null?void 0:te.elements.domReference)===le.currentTarget,En=ue&&!pn?(me=Ye.context)==null?void 0:me.elements.domReference:oe?i.current.find(er=>(er==null?void 0:er.id)===Y):null;En&&(Dt(le),En.dispatchEvent(Ot),z(void 0))}if(ee&&Ye.context&&Ye.context.open&&Ye.parentId&&le.currentTarget!==Ye.context.elements.domReference){var Oe;Dt(le),(Oe=Ye.context.elements.domReference)==null||Oe.dispatchEvent(Ot);return}}return ye(le)}if(!(!n&&!v&&be)){if(q&&(P.current=p&&ee?null:le.key),p){oe&&(Dt(le),n?(F.current=eu(i,B.current),j(F.current)):r(!0,le.nativeEvent,"list-navigation"));return}ee&&(c!=null&&(F.current=c),Dt(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):ye(le),n&&j(F.current))}},onFocus(){n&&!h&&j(null)},onPointerDown:xe,onMouseDown:se,onClick:se}},[Y,Te,ye,B,g,i,p,j,r,n,v,b,f,c,A,h,T]);return R.useMemo(()=>l?{reference:$e,floating:Re,item:H}:{},[l,$e,Re,H])}const h2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function so(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=h2.get(a))!=null?n:a,l=fi(),u=Er()!=null,d=R.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=R.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=R.useCallback(h=>{let{active:g,selected:m}=h;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&m};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return R.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const bv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function vo(e,t){return typeof e=="function"?e(t):e}function g2(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function v2(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]=R.useState("unmounted"),c=g2(n,a);return!c&&s==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Yw(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=R.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=R.useState(()=>({...vo(i,c),...vo(n,c)})),{isMounted:g,status:m}=v2(e,{duration:a}),v=jt(n),x=jt(r),b=jt(o),S=jt(i);return We(()=>{const w=vo(v.current,c),T=vo(b.current,c),C=vo(S.current,c),k=vo(x.current,c)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...w})),m==="open"&&h({transitionProperty:Object.keys(k).map(bv).join(","),transitionDuration:d+"ms",...C,...k}),m==="close"){const I=T||w;h({transitionProperty:Object.keys(I).map(bv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,x,S,d,m,c]),{isMounted:g,styles:f}}function y2(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:p=[],selectedIndex:f=null}=t,h=R.useRef(),g=R.useRef(""),m=R.useRef((n=f??a)!=null?n:-1),v=R.useRef(null),x=Rt(s),b=Rt(l),S=jt(u),w=jt(p);We(()=>{r&&(clearTimeout(h.current),v.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var A;m.current=(A=f??a)!=null?A:-1}},[r,f,a]);const T=Rt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=Rt(A=>{function j(_,V,N){const $=S.current?S.current(V,N):V.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return $?_.indexOf($):-1}const D=i.current;if(g.current.length>0&&g.current[0]!==" "&&(j(D,D,g.current)===-1?T(!1):A.key===" "&&Dt(A)),D==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),T(!0)),D.every(_=>{var V,N;return _?((V=_[0])==null?void 0:V.toLocaleLowerCase())!==((N=_[1])==null?void 0:N.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",m.current=v.current),g.current+=A.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",m.current=v.current,T(!1)},d);const P=m.current,O=j(D,[...D.slice((P||0)+1),...D.slice(0,(P||0)+1)],g.current);O!==-1?(x(O),v.current=O):A.key!==" "&&(g.current="",T(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&T(!1)}}),[C,T]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function wv(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 x2(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Gw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),h=f-l;if(a===null||s===null||h===0)return a=d,s=p,l=f,null;const g=d-a,m=p-s,x=Math.sqrt(g*g+m*m)/h;return a=d,s=p,l=f,x}const u=d=>{let{x:p,y:f,placement:h,elements:g,onClose:m,nodeId:v,tree:x}=d;return function(S){function w(){clearTimeout(o),m()}if(clearTimeout(o),!g.domReference||!g.floating||h==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],I=In(S),A=S.type==="mouseleave",j=yt(g.floating,I),D=yt(g.domReference,I),F=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),O=h.split("-")[0],_=p>P.right-P.width/2,V=f>P.bottom-P.height/2,N=x2(k,F),$=P.width>F.width,M=P.height>F.height,B=($?F:P).left,X=($?F:P).right,Q=(M?F:P).top,J=(M?F:P).bottom;if(j&&(i=!0,!A))return;if(D&&(i=!1),D&&!A){i=!0;return}if(A&&nt(S.relatedTarget)&&yt(g.floating,S.relatedTarget)||x&&qr(x.nodesRef.current,v).some(Z=>{let{context:L}=Z;return L==null?void 0:L.open}))return;if(O==="top"&&f>=F.bottom-1||O==="bottom"&&f<=F.top+1||O==="left"&&p>=F.right-1||O==="right"&&p<=F.left+1)return w();let G=[];switch(O){case"top":G=[[B,F.top+1],[B,P.bottom-1],[X,P.bottom-1],[X,F.top+1]];break;case"bottom":G=[[B,P.top+1],[B,F.bottom-1],[X,F.bottom-1],[X,P.top+1]];break;case"left":G=[[P.right-1,J],[P.right-1,Q],[F.left+1,Q],[F.left+1,J]];break;case"right":G=[[F.right-1,J],[F.right-1,Q],[P.left+1,Q],[P.left+1,J]];break}function Y(Z){let[L,z]=Z;switch(O){case"top":{const K=[$?L+t/2:_?L+t*4:L-t*4,z+t+1],ie=[$?L-t/2:_?L+t*4:L-t*4,z+t+1],H=[[P.left,_||$?P.bottom-t:P.top],[P.right,_?$?P.bottom-t:P.top:P.bottom-t]];return[K,ie,...H]}case"bottom":{const K=[$?L+t/2:_?L+t*4:L-t*4,z-t],ie=[$?L-t/2:_?L+t*4:L-t*4,z-t],H=[[P.left,_||$?P.top+t:P.bottom],[P.right,_?$?P.top+t:P.bottom:P.top+t]];return[K,ie,...H]}case"left":{const K=[L+t+1,M?z+t/2:V?z+t*4:z-t*4],ie=[L+t+1,M?z-t/2:V?z+t*4:z-t*4];return[...[[V||M?P.right-t:P.left,P.top],[V?M?P.right-t:P.left:P.right-t,P.bottom]],K,ie]}case"right":{const K=[L-t,M?z+t/2:V?z+t*4:z-t*4],ie=[L-t,M?z-t/2:V?z+t*4:z-t*4],H=[[V||M?P.left+t:P.right,P.top],[V?M?P.left+t:P.right:P.left+t,P.bottom]];return[K,ie,...H]}}}if(!wv([T,C],G)){if(i&&!N)return w();if(!A&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return w()}wv([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const b2=/Mac|iPod|iPhone|iPad/,As=()=>b2.test(navigator.userAgent),w2=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?As()?"Meta":"Control":n==="Hyper"?As()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),Sv=e=>e.map(t=>t.trim()).join("+");class S2{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=Sv(w2(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=Sv(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class yn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof yn&&(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 yn(this);return t?t(n):n}static from(t,n){return new yn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(yn.from(t,n).values())}toArray(){return Array.from(this.values())}}const T2=(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]},Tv=(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},Ev={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Cv=(e,t)=>{const n=Tv(t,Ev.basic,e);return n!==void 0&&n!==e?n:Tv(t,Ev.extend,e)},kv=e=>e.replace(/[^0-9]/g,""),qa=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),Rv=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?kv(e).includes(kv(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?T2(e,t)!==null:!1,E2=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>Rv(e,o,n,r)):Rv(e,t,n,r),lp=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Ve.array(i.value)?i.value.map(qa):qa(`${i.value}`)}));return e.forEach(i=>{const a=Cv(i,t);o.forEach(s=>{const l=Cv(i,s.key);if(!l)return;const c=qa(`${s.value}`.toLocaleLowerCase()).trim(),u=qa(`${l}`.toLocaleLowerCase()).trim();if(E2(u,c,s.score,s.match))return void r.set(a,i);Ve.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},C2=e=>(e=e.trim(),e==="Alt"?As()?y.jsx(cI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?As()?y.jsx(UA,{"aria-label":"Command",size:14}):"Ctrl":e),k2=e=>{const t=e.value.trim().split("+");return y.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return y.jsxs(E.Fragment,{children:[y.jsx("kbd",{"aria-label":n,children:C2(n)}),o?null:y.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},cp=y.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),R2=(e,t)=>Yr()?t:window.matchMedia(e).matches,P2=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(R2(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},Pv=()=>window.matchMedia("@media (pointer: coarse)"),A2=()=>{var r;const e=E.useRef(Yr()?null:Pv()),[t,n]=E.useState(Yr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Pv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},up=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=A2(),o=E.useRef(Yr()?"":document.documentElement.style.overflowY);return E.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||L0())return;document.documentElement.style.padding=mx(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.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(vT(c.style.height)):null,p=Ve.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vn="500ms",I2={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},_2={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},su={drawer:e=>e==="left"?I2:_2,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:vn},initial:{opacity:.5,scale:.95,animationDuration:vn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},O2=Jo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Zw={top:0,left:0,right:0,bottom:0},Xw=e=>e*.65,M2=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=Xw(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return y.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:Zw,whileDrag:{cursor:"grabbing"},className:Ie("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?y.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ua={drawer:"right",sheet:"none",dialog:"none"},D2=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ua.drawer:Ua[o]:t?Ua[o]:Ua.sheet},j2=[],dp=E.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:p=!0,forceType:f=!1,layoutId:h=void 0,overlayClassName:g="",type:m="dialog",position:v,overlayClickClose:x=!1,role:b="dialog",interactions:S=j2,...w},T)=>{const C=up(e,"block-only"),k=E.useId(),I=E.useId(),A=P2("(min-width: 64rem)"),j=m!=="dialog",D=D2(A,f,m,v),F=A||f?su[m]:su.sheet,P=typeof F=="function"?F(D):F,O=A||f?m:"sheet",_=kr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),V=Ta(_.context),N=so(_.context,{role:b}),$=ao(_.context,{escapeKey:!0,referencePress:!0,outsidePress:x}),M=Rr([V,N,$].concat(S)),B=o,X=ul(void 0);E.useEffect(()=>{X.set(void 0)},[X,O]);const Q=()=>a(!1);E.useImperativeHandle(T,()=>({context:_.context,floating:C.current}),[_.context,C]);const J=(Z,L)=>{const z=_.refs.floating;if(z.current&&O==="sheet"){const ie=z.current.getBoundingClientRect(),H=X.get()||ie.height,ye=Math.abs(H-L.delta.y),Te=Xw(window.outerHeight);return ye<Te?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(ye)}},G={layoutId:h,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:P},Y=d&&O==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:Zw,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:O==="sheet",drag:O==="sheet"?"y":"x"}:G;return y.jsxs(E.Fragment,{children:[o?y.jsx(E.Fragment,{children:r?y.jsx(zo,{ref:_.refs.setReference,...M.getReferenceProps({layoutId:h}),children:B}):y.jsx(pt.button,{ref:_.refs.setReference,...M.getReferenceProps(),layoutId:h,type:"button",children:B})}):null,y.jsx(io,{preserveTabOrder:!0,children:y.jsx(wr,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?y.jsx(Kw,{lockScroll:!0,className:Ie(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${O==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:y.jsx(pi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:_.context,children:y.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":k,"aria-describedby":I}:{"aria-label":s},...M.getFloatingProps({"aria-modal":e,ref:Un(_.refs.setFloating,C),className:Ie(O2({position:D,type:O}),l,"overscroll-contain")}),"data-component":"modal",style:O==="drawer"?{width:X}:{height:X},children:[t?y.jsx("header",{className:"relative w-full",children:t?y.jsx("h2",{id:k,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,y.jsx("section",{className:Ie("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?y.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,p?y.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:y.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:y.jsx(xa,{})})}):null,j&&u?y.jsx(M2,{onChange:a,value:X,sheet:O==="sheet",position:D,parent:_.refs.floating}):null]})})}):null},k)})]})}),N2=e=>y.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Yd(e.item.title)?y.jsx(e.item.title,{text:e.text}):e.item.title}),F2=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?y.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:y.jsx(N2,{text:e.text,item:o})}):o.type!=="shortcut"?y.jsx(E.Fragment,{}):y.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[y.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,y.jsx("span",{children:Yd(o.title)?y.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?y.jsx(k2,{value:o.shortcut}):null]})}),L2=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Ve.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Ve.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=lp(o,"title",n),a=r.filter(s=>Ve.function(s.enabled)?s.enabled({text:t}):!1);return yn.unique(i.concat(a),s=>s.title)},V2=[0,0,0,0,0],$2=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Ct(),[o,i]=E.useState(""),a=Ur(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=kr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:ui}),p=El(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:x=>u(b=>Ve.number(x)?x:e.open?b??0:null)}),{getItemProps:f}=Rr([p]),h=e.commands.flatMap(x=>x.type==="group"?[x,...x.items]:[x]),g=L2(h,o),m=o===""?h:[{type:"group",title:"Results",items:[]},...g.filter(x=>x.type!=="group")];E.useEffect(()=>{const x=new S2;return x.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),h.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&x.add(b.shortcut,S=>b.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),x.register()},[t]);const v=e.Icon??gg;return y.jsx(E.Fragment,{children:y.jsxs(dp,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[y.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[y.jsx("div",{className:"flex size-10 items-center justify-center",children:y.jsx(v,{Default:gg,text:o,size:16})}),y.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:x=>i(x.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:x=>{var b;if((x.key==="ArrowDown"||x.key==="ArrowUp")&&c!==null&&((b=n.current[c])==null||b.scrollIntoView({block:"start",inline:"start"})),x.key==="Enter"){if(c!==null&&m[c]){x.preventDefault();const S=m[c],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}if(m.length===1){x.preventDefault();const S=m[0],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[y.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),V2.map((x,b)=>y.jsx("li",{className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:cp},`${s}-${b}-skeleton-index`))]}):y.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.map((x,b)=>E.createElement(F2,{...f({onMouseEnter:()=>u(b),ref(S){n.current[b]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),x.type==="shortcut"&&x.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:x,text:o,active:c===b,key:`${s}-${x.type}-${b}`})),m.length===1?y.jsx("div",{className:Ie("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Ve.number(c)?y.jsx(e.Preview,{command:m[c],text:o}):null]}),e.footer?y.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},mi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[wa(10),ip({fallbackAxisSideDirection:"end"}),op(),Ow({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=kr({open:n,middleware:i,transform:!0,whileElementsMounted:ui,onOpenChange:(h,g)=>{var v;const m=g==null?void 0:g.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(v=e.onChange)==null||v.call(e,h))}}),c=Ta(l),u=ao(l),d=so(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Rr([c,u,d]);return y.jsxs(E.Fragment,{children:[y.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&y.jsx(io,{preserveTabOrder:!0,id:`${t}-portal`,children:y.jsx(pi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:y.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[y.jsx(Nw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),y.jsx("header",{className:"mb-2",children:y.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},z2=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=kr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ta(s,{enabled:e.disabled??!0}),u=so(s,{role:"tooltip"}),d=ao(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Rr([c,u,d]);return y.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[y.jsx(el,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:y.jsx(pt.span,{layoutId:o,children:e.trigger})}),y.jsx(wr,{children:i?y.jsx(io,{root:t,children:y.jsx(pi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:y.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Qw=200,B2=500,Jw=(e="")=>Ie("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),yd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Av=E.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]=E.useState(r??!1),[p,f]=E.useState(!1),[h,g]=E.useState(null),m=E.useRef([]),v=E.useRef([]),x=E.useContext(yd),b=Er(),S=Cr(),w=Kj(),T=jw(),C=b!==null,{floatingStyles:k,refs:I,context:A}=kr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:ui,placement:C?"right":"bottom-start",middleware:[wa({mainAxis:C?0:4,alignmentAxis:C?-4:0}),ip(),op()]}),j=so(A,{role:"menu"}),D=ao(A,{bubbles:!0}),F=$w(A,{move:!1,enabled:n,delay:{open:Qw},handleClose:Gw({blockPointerEvents:!0})}),P=Ta(A,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),O=El(A,{loop:!0,activeIndex:h,nested:C,listRef:m,onNavigate:g}),_=y2(A,{activeIndex:h,listRef:v,resetMs:B2,onMatch:u?g:void 0}),{getReferenceProps:V,getFloatingProps:N,getItemProps:$}=Rr([F,P,j,D,O,_]);E.useEffect(()=>{if(!S)return;const B=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===b&&d(!1)};return S.events.on("click",B),S.events.on("menuopen",X),()=>{S.events.off("click",B),S.events.off("menuopen",X)}},[S,w,b]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:b,nodeId:w})},[S,u,w,b]);const M=o?l.className:Ie(Jw(l.className));return y.jsxs(Yj,{id:w,children:[y.jsx(E.Fragment,{children:l.asChild?y.jsx(zo,{...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:s,className:M,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Un(I.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0}):y.jsxs("button",{type:"button",className:M,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Un(I.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0,...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:[s,C&&y.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[y.jsx("span",{className:"sr-only",children:"Next menu"}),y.jsx(_f,{size:14})]})]})}),y.jsx(yd.Provider,{value:{activeIndex:h,setActiveIndex:g,getItemProps:$,setHasFocusInside:f,isOpen:u},children:y.jsx(Bj,{elementsRef:m,labelsRef:v,children:u&&y.jsx(io,{preserveTabOrder:!0,children:y.jsx(pi,{context:A,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:y.jsx(t,{...N(),ref:I.setFloating,style:{...l.style,...k},className:Ie("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-xl outline-none",a),children:e})})})})})]})}),H2=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(yd),s=jw({label:n?null:e}),l=Cr(),c=s.index===a.activeIndex;return y.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Un(s.ref,i),className:Jw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?y.jsx(t,{size:16}):null]})}),W2=E.forwardRef((e,t)=>Er()===null?y.jsx(Gj,{children:y.jsx(Av,{...e,isParent:!0,ref:t})}):y.jsx(Av,{...e,isParent:!1,ref:t})),q2=e=>y.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),fp=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=Bf,...p},f){const[h,g]=E.useState(i??!1),m=E.useRef(null),v=t||"span",x=P=>{g(P),d==null||d(P)},{refs:b,floatingStyles:S,context:w}=kr({open:h,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:ui,onOpenChange:i?void 0:x,middleware:[op(),wa(5),ip({fallbackAxisSideDirection:"start"}),Ow({padding:5,element:m})]}),T=$w(w,{move:!0,delay:{open:Qw},enabled:l?s:!1,handleClose:c?Gw():null}),C=p2(w,{enabled:l?a:!1}),k=Ta(w,{enabled:l?c:!1}),I=ao(w,{enabled:l}),A=so(w,{role:"tooltip",enabled:l}),j=c2(w,{enabled:!!l&&!!u}),{getReferenceProps:D,getFloatingProps:F}=Rr([A,I,j,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),y.jsxs(E.Fragment,{children:[y.jsx(v,{...D(p),ref:Un(b.setReference,f),children:n}),h&&y.jsx(io,{preserveTabOrder:!0,children:y.jsxs(un,{...F(),ref:b.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[y.jsx(Nw,{ref:m,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Cl=0,Pr=1,hi=2,e1=4;function Iv(e){return()=>e}function U2(e){e()}function ra(e,t){return n=>e(t(n))}function _v(e,t){return()=>e(t)}function t1(e,t){return n=>e(t,n)}function pp(e){return e!==void 0}function K2(...e){return()=>{e.map(U2)}}function gi(){}function kl(e,t){return t(e),e}function Y2(e,t){return t(e)}function dt(...e){return e}function Je(e,t){return e(Pr,t)}function De(e,t){e(Cl,t)}function mp(e){e(hi)}function Lt(e){return e(e1)}function we(e,t){return Je(e,t1(t,Cl))}function Ln(e,t){const n=e(Pr,r=>{n(),t(r)});return n}function Ov(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function n1(e,t){return e===t}function ct(e=n1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ra(t,e)}function Rn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=G2(...t);return(r,o)=>{switch(r){case hi:mp(e);return;case Pr:return Je(e,n(o))}}}function On(e,t){return n=>r=>{n(t=e(t,r))}}function Ko(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...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);Je(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 G2(...e){return t=>e.reduceRight(Y2,t)}function Z2(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Pr:return i?n===i?void 0:(r(),n=i,t=Je(e,i),t):(r(),gi);case hi:r(),n=null;return}}}function ae(e){let t=e;const n=Be();return(r,o)=>{switch(r){case Cl:t=o;break;case Pr:{o(t);break}case e1:return t}return n(r,o)}}function Vt(e,t){return kl(ae(t),n=>we(e,n))}function Be(){const e=[];return(t,n)=>{switch(t){case Cl:e.slice().forEach(r=>{r(n)});return;case hi:e.splice(0,e.length);return;case Pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function tn(e){return kl(Be(),t=>we(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:X2(),singleton:n}}const X2=()=>Symbol();function Q2(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 Pt(...e){const t=Be(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Je(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case hi:{mp(t);return}case Pr:return r===o&&a(n),Je(t,a)}}}function Pe(e,t=n1){return ne(e,ct(t))}function Mv(...e){return function(t,n){switch(t){case hi:return;case Pr:return K2(...e.map(r=>Je(r,n)))}}}var nn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nn||{});const J2={0:"debug",3:"error",1:"log",2:"warn"},eN=()=>typeof globalThis>"u"?window:globalThis,Ar=Ke(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=eN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[J2[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Vn(e,t,n){return hp(e,t,n).callbackRef}function hp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function r1(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=tN(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let h;f&&(h=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?Dv("column-gap",getComputedStyle(u).columnGap,o):Dv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return hp(c,n,l)}function tN(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},nn.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 Dv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nn.WARN),t==="normal"?0:parseInt(t??"0",10)}function gp(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),h=c.top-f.top;p=f.height-Math.max(0,h),d=h+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=hp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.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==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ke(()=>{const e=Be(),t=Be(),n=ae(0),r=Be(),o=ae(0),i=Be(),a=Be(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Be(),p=Be(),f=ae(!1),h=ae(!1),g=ae(!1);return we(ne(e,pe(({scrollTop:m})=>m)),t),we(ne(e,pe(({scrollHeight:m})=>m)),a),we(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),oa={lvl:0};function o1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function it(e){return e===oa}function ia(e,t){if(!it(e))return t===e.k?e.v:t<e.k?ia(e.l,t):ia(e.r,t)}function Sn(e,t,n="k"){if(it(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Sn(e.l,t,n)}function en(e,t,n){return it(e)?s1(t,n,1):t===e.k?kt(e,{k:t,v:n}):t<e.k?jv(kt(e,{l:en(e.l,t,n)})):jv(kt(e,{r:en(e.r,t,n)}))}function Io(){return oa}function Rl(e,t,n){if(it(e))return[];const r=Sn(e,t)[0];return nN(bd(e,r,n))}function xd(e,t){if(it(e))return oa;const{k:n,l:r,r:o}=e;if(t===n){if(it(r))return o;if(it(o))return r;{const[i,a]=a1(r);return ss(kt(e,{k:i,l:i1(r),v:a}))}}else return t<n?ss(kt(e,{l:xd(r,t)})):ss(kt(e,{r:xd(o,t)}))}function Hr(e){return it(e)?[]:[...Hr(e.l),{k:e.k,v:e.v},...Hr(e.r)]}function bd(e,t,n){if(it(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(bd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(bd(i,t,n))),s}function ss(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(lu(t))return l1(kt(e,{lvl:n-1}));if(!it(t)&&!it(t.r))return kt(t.r,{l:kt(t,{r:t.r.l}),lvl:n,r:kt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(lu(e))return wd(kt(e,{lvl:n-1}));if(!it(r)&&!it(r.l)){const o=r.l,i=lu(o)?r.lvl-1:r.lvl;return kt(o,{l:kt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:wd(kt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function kt(e,t){return s1(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 i1(e){return it(e.r)?e.l:ss(kt(e,{r:i1(e.r)}))}function lu(e){return it(e)||e.lvl>e.r.lvl}function a1(e){return it(e.r)?[e.k,e.v]:a1(e.r)}function s1(e,t,n,r=oa,o=oa){return{k:e,l:r,lvl:n,r:o,v:t}}function jv(e){return wd(l1(e))}function l1(e){const{l:t}=e;return!it(t)&&t.lvl===e.lvl?kt(t,{r:kt(e,{l:t.r})}):e}function wd(e){const{lvl:t,r:n}=e;return!it(n)&&!it(n.r)&&n.lvl===t&&n.r.lvl===t?kt(n,{l:kt(e,{r:n.l}),lvl:t+1}):e}function nN(e){return o1(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 vp=Ke(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function u1(e,t,n){return e[Is(e,t,n)]}function Is(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 rN(e,t,n,r){const o=Is(e,t,r),i=Is(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Pl(e){return!it(e.groupOffsetTree)}function yp({index:e},t){return t===e?0:t<e?-1:1}function oN(){return{groupIndices:[],groupOffsetTree:Io(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Io()}}function iN(e,t){let n=it(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),it(e)){e=en(e,0,i);continue}const s=Rl(e,a-1,o+1);if(s.some(fN(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=xd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=en(e,o+1,p));c&&(e=en(e,a,i))}return[e,n]}function aN(e){return typeof e.groupIndex<"u"}function sN({offset:e},t){return t===e?0:t<e?-1:1}function sa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=u1(t,e,yp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function d1(e,t){if(!Pl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function f1(e,t,n){if(aN(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 lN(e,t,n,r=0){return r>0&&(t=Math.max(t,u1(e,r,yp).offset)),o1(rN(e,t,n,sN),dN)}function cN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,nn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&it(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,g)=>en(en(h,g,p),g+1,f),a)}else[a,s]=iN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Sd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>en(p,f,sa(f,d,o)),Io()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function uN(e){return Hr(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 Nv(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 Sd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Is(o,t-1,yp),s=o[l].offset;const c=Sn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Rl(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function dN(e){return{index:e.index,value:e}}function fN(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 pN={offsetHeight:"height",offsetWidth:"width"},Bn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Be(),r=Be(),o=Vt(r,0),i=Be(),a=Be(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,T)=>Tn(w,pN[T])),p=ae(void 0),f=ae(0),h=oN(),g=Vt(ne(n,Ne(l,e,f),On(cN,h),ct()),h),m=Vt(ne(l,ct(),On((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);we(ne(l,Ce(w=>w.length>0),Ne(g,f),pe(([w,T,C])=>{const k=w.reduce((I,A,j)=>en(I,A,sa(A,T.offsetTree,C)||j),Io());return{...T,groupIndices:w,groupOffsetTree:k}})),g),we(ne(r,Ne(g),Ce(([w,{lastIndex:T}])=>w<T),pe(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),we(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);we(ne(u,Ce(w=>w!==void 0&&it(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const x=tn(ne(n,Ne(g),On(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:h}),pe(w=>w.changed)));Je(ne(s,On((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:T}=Lt(g);if(w>0)De(t,!0),De(i,w+Nv(w,T));else if(w<0){const C=Lt(m);C.length>0&&(w-=Nv(-w,C)),De(a,w)}}),Je(ne(s,Ne(e)),([w,T])=>{w<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},nn.ERROR)});const b=tn(i);we(ne(i,Ne(g),pe(([w,T])=>{const C=T.groupIndices.length>0,k=[],I=T.lastSize;if(C){const A=ia(T.sizeTree,0);let j=0,D=0;for(;j<w;){const P=T.groupIndices[D],O=T.groupIndices.length===D+1?1/0:T.groupIndices[D+1]-P-1;k.push({endIndex:P,size:A,startIndex:P}),k.push({endIndex:P+1+O-1,size:I,startIndex:P+1}),D++,j+=O+1}const F=Hr(T.sizeTree);return j!==w&&F.shift(),F.reduce((P,{k:O,v:_})=>{let V=P.ranges;return P.prevSize!==0&&(V=[...P.ranges,{endIndex:O+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+w,prevSize:_,ranges:V}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return Hr(T.sizeTree).reduce((A,{k:j,v:D})=>({prevIndex:j+w,prevSize:D,ranges:[...A.ranges,{endIndex:j+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=tn(ne(a,Ne(g,f),pe(([w,{offsetTree:T},C])=>{const k=-w;return sa(k,T,C)})));return we(ne(a,Ne(g,f),pe(([w,T,C])=>{if(T.groupIndices.length>0){if(it(T.sizeTree))return T;let k=Io();const I=Lt(m);let A=0,j=0,D=0;for(;A<-w;){D=I[j];const F=I[j+1]-D-1;j++,A+=F+1}if(k=Hr(T.sizeTree).reduce((F,{k:P,v:O})=>en(F,Math.max(0,P+w),O),k),A!==-w){const F=ia(T.sizeTree,D);k=en(k,0,F);const P=Sn(T.sizeTree,-w+1)[1];k=en(k,1,P)}return{...T,sizeTree:k,...Sd(T.offsetTree,0,k,C)}}else{const k=Hr(T.sizeTree).reduce((I,{k:A,v:j})=>en(I,Math.max(0,A+w),j),Io());return{...T,sizeTree:k,...Sd(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(Ar,vp),{singleton:!0});function mN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const p1=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Be(),a=Be(),s=tn(ne(i,pe(mN)));return we(ne(s,pe(l=>l.totalCount)),n),we(ne(s,pe(l=>l.groupIndices)),e),we(ne(Pt(o,t,r),Ce(([l,c])=>Pl(c)),pe(([l,c,u])=>Sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ct(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Bn,Wt)),Ir=Ke(([{log:e}])=>{const t=ae(!1),n=tn(ne(t,Ce(r=>r),ct()));return Je(t,r=>{r&&Lt(e)("props updated",{},nn.DEBUG)}),{didMount:n,propsReady:t}},dt(Ar),{singleton:!0}),hN=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||!hN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ea=Ke(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Be(),h=Be(),g=ae(0);let m=null,v=null,x=null;function b(){m&&(m(),m=null),x&&(x(),x=null),v&&(clearTimeout(v),v=null),De(l,!1)}return we(ne(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),pe(([[S,w,T,C,k,I,A,j],D,F,P])=>{const O=m1(S),{align:_,behavior:V,offset:N}=O,$=C-1,M=f1(O,w,$);let B=sa(M,w.offsetTree,D)+I;_==="end"?(B+=F+Sn(w.sizeTree,M)[1]-T+P,M===$&&(B+=A)):_==="center"?B+=(F+Sn(w.sizeTree,M)[1]-T+P)/2:B-=k,N&&(B+=N);const X=Q=>{b(),Q?(j("retrying to scroll to",{location:S},nn.DEBUG),De(f,S)):(De(h,!0),j("list did not change, scroll successful",{},nn.DEBUG))};if(b(),V==="smooth"){let Q=!1;x=Je(t,J=>{Q=Q||J}),m=Ln(u,()=>{X(Q)})}else m=Ln(ne(t,gN(150)),X);return v=setTimeout(()=>{b()},1200),De(l,!0),j("scrolling from index to",{behavior:V,index:M,top:B},nn.DEBUG),{behavior:V,top:B}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:g}},dt(Bn,Wt,Ar),{singleton:!0});function gN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function xp(e,t){e==0?t():requestAnimationFrame(()=>{xp(e-1,t)})}function bp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ca=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return we(ne(a,Ne(l),Ce(([u,d])=>!!d),Rn(!1)),s),we(ne(a,Ne(l),Ce(([u,d])=>!!d),Rn(!1)),c),Je(ne(Pt(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,h])=>u&&(!it(p)||pp(f))&&!d&&!h),Ne(l)),([,u])=>{Ln(o,()=>{De(c,!0)}),xp(4,()=>{Ln(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Bn,Wt,Ea,Ir),{singleton:!0});function h1(e,t){return Math.abs(e-t)<1.01}const la="up",zi="down",vN="none",yN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},xN=0,ka=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=Be(),c=Be(),u=ae(4),d=ae(xN),p=Vt(ne(Mv(ne(Pe(o),Ko(1),Rn(!0)),ne(Pe(o),Ko(1),Rn(!1),Ov(100))),ct()),!1),f=Vt(ne(Mv(ne(n,Rn(!0)),ne(n,Rn(!1),Ov(200))),ct()),!1);we(ne(Pt(Pe(o),Pe(d)),pe(([x,b])=>x<=b),ct()),s),we(ne(s,fr(50)),c);const h=tn(ne(Pt(r,Pe(i),Pe(t),Pe(e),Pe(u)),On((x,[{scrollHeight:b,scrollTop:S},w,T,C,k])=>{const I=S+w-b>-k,A={scrollHeight:b,scrollTop:S,viewportHeight:w};if(I){let D,F;return S>x.state.scrollTop?(D="SCROLLED_DOWN",F=x.state.scrollTop-S):(D="SIZE_DECREASED",F=x.state.scrollTop-S||x.scrollTopDelta),{atBottom:!0,atBottomBecause:D,scrollTopDelta:F,state:A}}let j;return A.scrollHeight>x.state.scrollHeight?j="SIZE_INCREASED":w<x.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":S<x.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:A}},yN),ct((x,b)=>x&&x.atBottom===b.atBottom))),g=Vt(ne(r,On((x,{scrollHeight:b,scrollTop:S,viewportHeight:w})=>{if(h1(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const T=b-(S+w)<1;return x.scrollTop!==S&&T?{changed:!0,jump:x.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(x=>x.changed),pe(x=>x.jump)),0);we(ne(h,pe(x=>x.atBottom)),a),we(ne(a,fr(50)),l);const m=ae(zi);we(ne(r,pe(({scrollTop:x})=>x),ct(),On((x,b)=>Lt(f)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?la:zi,prevScrollTop:b},{direction:zi,prevScrollTop:0}),pe(x=>x.direction)),m),we(ne(r,fr(50),Rn(vN)),m);const v=ae(0);return we(ne(p,Ce(x=>!x),Rn(0)),v),we(ne(o,fr(100),Ne(p),Ce(([x,b])=>!!b),On(([x,b],[S])=>[b,S],[0,0]),pe(([x,b])=>b-x)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},dt(Wt)),_s="top",Os="bottom",Fv="none";function Lv(e,t,n){return typeof e=="number"?n===la&&t===_s||n===zi&&t===Os?e:0:n===la?t===_s?e.main:e.reverse:t===Os?e.main:e.reverse}function Vv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const wp=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Be(),a=ae(0),s=ae(0),l=ae(0),c=Vt(ne(Pt(Pe(r),Pe(o),Pe(n),Pe(i,aa),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),pe(([u,d,p,[f,h],g,m,v,x,b])=>{const S=u-x,w=m+v,T=Math.max(p-S,0);let C=Fv;const k=Vv(b,_s),I=Vv(b,Os);return f-=x,f+=p+v,h+=p+v,h-=x,f>u+w-k&&(C=la),h<u-T+d+I&&(C=zi),C!==Fv?[Math.max(S-p-Lv(g,_s,C)-k,0),S-T-v+d+Lv(g,Os,C)+I]:null}),Ce(u=>u!=null),ct(aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Wt),{singleton:!0});function bN(e,t,n){if(Pl(t)){const r=d1(e,t);return[{index:Sn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const cu={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ls(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,h=p-u;return{bottom:u,firstItemIndex:i,items:$v(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:$v(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function g1(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=bp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return ls(c,[],s,o,n,r)}function $v(e,t,n){if(e.length===0)return[];if(!Pl(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=Rl(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const lo=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const g=ae([]),m=ae(0),v=Be();we(i.topItemsIndexes,g);const x=Vt(ne(Pt(f,h,Pe(l,aa),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([T,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return T&&!C&&!A}),pe(([,,[T,C],k,I,A,j,D,F,P,O])=>{const _=I,{offsetTree:V,sizeTree:N}=_,$=Lt(m);if(k===0)return{...cu,totalCount:k};if(T===0&&C===0)return $===0?{...cu,totalCount:k}:g1($,A,I,F,P,O||[]);if(it(N))return $>0?null:ls(bN(bp(A,k),_,O),[],k,P,_,F);const M=[];if(D.length>0){const G=D[0],Y=D[D.length-1];let Z=0;for(const L of Rl(N,G,Y)){const z=L.value,K=Math.max(L.start,G),ie=Math.min(L.end,Y);for(let H=K;H<=ie;H++)M.push({data:O==null?void 0:O[H],index:H,offset:Z,size:z}),Z+=z}}if(!j)return ls([],M,k,P,_,F);const B=D.length>0?D[D.length-1]+1:0,X=lN(V,T,C,B);if(X.length===0)return null;const Q=k-1,J=kl([],G=>{for(const Y of X){const Z=Y.value;let L=Z.offset,z=Y.start;const K=Z.size;if(Z.offset<T){z+=Math.floor((T-Z.offset+P)/(K+P));const H=z-Y.start;L+=H*K+H*P}z<B&&(L+=(B-z)*K,z=B);const ie=Math.min(Y.end,Q);for(let H=z;H<=ie&&!(L>=C);H++)G.push({data:O==null?void 0:O[H],index:H,offset:L,size:K}),L+=K+P}});return ls(J,M,k,P,_,F)}),Ce(T=>T!==null),ct()),cu);we(ne(e,Ce(pp),pe(T=>T==null?void 0:T.length)),o),we(ne(x,pe(T=>T.topListHeight)),d),we(d,s),we(ne(x,pe(T=>[T.top,T.bottom])),a),we(ne(x,pe(T=>T.items)),v);const b=tn(ne(x,Ce(({items:T})=>T.length>0),Ne(o,e),Ce(([{items:T},C])=>T[T.length-1].originalIndex===C-1),pe(([,T,C])=>[T-1,C]),ct(aa),pe(([T])=>T))),S=tn(ne(x,fr(200),Ce(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),pe(({items:T})=>T[0].index),ct())),w=tn(ne(x,Ce(({items:T})=>T.length>0),pe(({items:T})=>{let C=0,k=T.length-1;for(;T[C].type==="group"&&C<k;)C++;for(;T[k].type==="group"&&k>C;)k--;return{endIndex:T[k].index,startIndex:T[C].index}}),ct(c1)));return{endReached:b,initialItemCount:m,itemsRendered:v,listState:x,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},dt(Bn,p1,wp,Ca,Ea,ka,Ir,vp),{singleton:!0}),v1=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Be(),a=Vt(ne(Pt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return we(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Wt,lo),{singleton:!0}),wN=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Vt(ne(Pt(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),fr(0),ct()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Wt,v1),{singleton:!0});function zv(e){return e?e==="smooth"?"smooth":"auto":!1}const SN=(e,t)=>typeof e=="function"?zv(e(t)):t&&zv(e),TN=Ke(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=Be();let p=null;function f(g){De(o,{align:"end",behavior:g,index:"LAST"})}Je(ne(Pt(ne(Pe(t),Ko(1)),a),Ne(Pe(u),r,i,c),pe(([[g,m],v,x,b,S])=>{let w=m&&b,T="auto";return w&&(T=SN(v,x||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:m})=>{p&&(p(),p=null),p=Ln(e,()=>{Lt(l)("following output to ",{totalCount:m},nn.DEBUG),f(g),p=null})});function h(g){const m=Ln(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},nn.DEBUG),f("auto"))});setTimeout(m,100)}return Je(ne(Pt(Pe(u),t,s),Ce(([g,,m])=>g&&m),On(({value:g},[,m])=>({refreshed:g===m,value:m}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Lt(i)&&h(g!==!1)}),Je(d,()=>{h(Lt(u)!==!1)}),Je(Pt(Pe(u),n),([g,m])=>{g&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},dt(Bn,ka,Ea,Ca,Ir,Ar,Wt)),EN=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(we(ne(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>g1(l,c,u,d,p,f))),a),{}),dt(Bn,Ca,lo,Ir),{singleton:!0}),CN=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Je(ne(e,Ne(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Ln(ne(n,Ko(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},dt(Ir,Wt,lo),{singleton:!0}),kN=({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,RN=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Be();return we(ne(u,Ne(t,l,n,i,o,r,s),Ne(e),pe(([[d,p,f,h,g,m,v,x],b])=>{const{align:S,behavior:w,calculateViewLocation:T=kN,done:C,...k}=d,I=f1(d,p,h-1),A=sa(I,p.offsetTree,b)+g+m,j=A+Sn(p.sizeTree,I)[1],D=x+m,F=x+f-v,P=T({itemBottom:j,itemTop:A,locationParams:{align:S,behavior:w,...k},viewportBottom:F,viewportTop:D});return P?C&&Ln(ne(a,Ce(O=>!O),Ko(Lt(a)?1:2)),C):C&&C(),P}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(Bn,Wt,Ea,lo,Ar),{singleton:!0}),y1=Ke(([{scrollVelocity:e}])=>{const t=ae(!1),n=Be(),r=ae(!1);return we(ne(e,Ne(r,t,n),Ce(([o,i])=>!!i),pe(([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}),ct()),t),Je(ne(Pt(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(ka),{singleton:!0}),Sp=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Be(),r=Be(),o=Be(),i=ae(!1),a=ae(void 0);return we(ne(Pt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),we(ne(t,Ne(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Wt)),PN=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Be(),u=ae(void 0),d=ae(null),p=ae(null);return we(s,d),we(l,p),Je(ne(c,Ne(t,r,a,d,p,n)),([f,h,g,m,v,x,b])=>{const S=uN(h.sizeTree);m&&v!==null&&x!==null&&(g=v.scrollTop-x.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),we(ne(u,Ce(pp),pe(AN)),o),we(ne(i,Ne(u),Ce(([,f])=>f!==void 0),ct(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Bn,Wt,Ca,Ir,Sp));function AN(e){return{align:"start",index:0,offset:e.scrollTop}}const IN=Ke(([{topItemsIndexes:e}])=>{const t=ae(0);return we(ne(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(lo));function x1(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const _N=x1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ON=Ke(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const g=tn(ne(l,Ne(a),On(([,v,x,b],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const I=S+T;let A=0;return x===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(A=I-b,A!==0&&(A+=k))),[A,w,C,I]},[0,[],0,0]),Ce(([v])=>v!==0),Ne(r,s,n,o,f,h),Ce(([,v,x,b,,,S])=>!S&&!b&&v!==0&&x===la),pe(([[v],,,,,x])=>(x("Upward scrolling compensation",{amount:v},nn.DEBUG),v))));function m(v){v>0?(De(t,{behavior:"auto",top:-v}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-v}))}return Je(ne(g,Ne(e,i)),([v,x,b])=>{b&&_N()?De(e,x-v):m(-v)}),Je(ne(Pt(Vt(i,!1),e,h),Ce(([v,x,b])=>!v&&!b&&x!==0),pe(([v,x])=>x),fr(1)),m),we(ne(d,pe(v=>({top:-v}))),t),Je(ne(c,Ne(p,u),pe(([v,{groupIndices:x,lastSize:b,sizeTree:S},w])=>{function T(C){return C*(b+w)}if(x.length===0)return T(v);{let C=0;const k=ia(S,0);let I=0,A=0;for(;I<v;){I++,C+=k;let j=x.length===A+1?1/0:x[A+1]-x[A]-1;I+j>v&&(C-=k,j=v-I+1),I+=j,C+=T(j),A++}return C}})),v=>{De(e,v),requestAnimationFrame(()=>{De(t,{top:v}),requestAnimationFrame(()=>{De(e,0),De(h,!1)})})}),{deviation:e}},dt(Wt,ka,lo,Bn,Ar,vp)),MN=Ke(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),dt(wp,EN,Ir,y1,v1,CN,wN,Sp,RN,Ar)),b1=Ke(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},g,m,v,{listState:x,topItemsIndexes:b,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},I])=>(we(S.rangeChanged,I.scrollSeekRangeChanged),we(ne(I.windowViewportRect,pe(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:x,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...m}),dt(Bn,Ca,Wt,PN,TN,lo,Ea,ON,IN,p1,MN));function DN(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 Ka=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Tp(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=E.createContext({});function l(m,v){m.propsReady&&De(m.propsReady,!1);for(const x of r){const b=m[t.required[x]];De(b,v[x])}for(const x of o)if(x in v){const b=m[t.optional[x]];De(b,v[x])}m.propsReady&&De(m.propsReady,!0)}function c(m){return i.reduce((v,x)=>(v[x]=b=>{const S=m[t.methods[x]];De(S,b)},v),{})}function u(m){return a.reduce((v,x)=>(v[x]=Z2(m[t.events[x]]),v),{})}const d=E.forwardRef((m,v)=>{const{children:x,...b}=m,[S]=E.useState(()=>kl(Q2(e),C=>{l(C,b)})),[w]=E.useState(_v(u,S));Ka(()=>{for(const C of a)C in b&&Je(w[C],b[C]);return()=>{Object.values(w).map(mp)}},[b,w,S]),Ka(()=>{l(S,b)}),E.useImperativeHandle(v,Iv(c(S)));const T=n;return y.jsx(s.Provider,{value:S,children:n?y.jsx(T,{...DN([...r,...o,...a],b),children:x}):x})}),p=m=>E.useCallback(t1(De,E.useContext(s)[m]),[m]),f=m=>{const v=E.useContext(s)[m],x=E.useCallback(b=>Je(v,b),[v]);return E.useSyncExternalStore(x,()=>Lt(v),()=>Lt(v))},h=m=>{const v=E.useContext(s)[m],[x,b]=E.useState(_v(Lt,v));return Ka(()=>Je(v,S=>{S!==x&&b(Iv(S))}),[v,x]),x},g=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,v)=>{const x=E.useContext(s)[m];Ka(()=>Je(x,v),[v,x])},useEmitterValue:g,usePublisher:p}}const Al=E.createContext(void 0),w1=E.createContext(void 0),S1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function uu(e){return"self"in e}function jN(e){return"body"in e}function T1(e,t,n,r=gi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,g;const m=p.target;if(jN(m)||uu(m)){const x=uu(m)?m:m.defaultView;g=i?x.scrollX:x.scrollY,f=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,h=i?x.innerWidth:x.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:h})};p.suppressFlushSync?v():pa.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-h)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const h=p.behavior==="smooth";let g,m,v;uu(f)?(m=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],g=Tn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const x=m-g;if(p.top=Math.ceil(Math.max(Math.min(x,p.top),0)),h1(g,m)||p.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:g}),h&&t(!0);return}h?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const du="-webkit-sticky",Bv="sticky",E1=x1(()=>{if(typeof document>"u")return Bv;const e=document.createElement("div");return e.style.position=du,e.style.position===du?du:Bv});function Ep(e){return e}const NN=Ke(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),r=ae({}),o=ae(Ep),i=ae("div"),a=ae(gi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),ct()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),FN=Ke(([e,t])=>({...e,...t}),dt(b1,NN)),LN=({height:e})=>y.jsx("div",{style:{height:e}}),VN={overflowAnchor:"none",position:E1(),zIndex:1},C1={overflowAnchor:"none"},$N={...C1,display:"inline-block",height:"100%"},Hv=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=ln("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=ln("windowScrollContainerState"),a=ln("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),h=ln("gap"),g=Ae("horizontalDirection"),{callbackRef:m}=r1(n,p,d,e?gi:s,f,h,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,x]=E.useState(0);Rp("deviation",P=>{v!==P&&x(P)});const b=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||LN,w=Ae("ListComponent"),T=Ae("ItemComponent"),C=Ae("GroupComponent"),k=Ae("computeItemKey"),I=Ae("isSeeking"),A=Ae("groupIndices").length>0,j=Ae("alignToBottom"),D=Ae("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:j?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:j?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...D?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?y.jsx(b,{...ut(b,c)}):y.jsx(w,{...ut(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:F,children:(e?t.topItems:t.items).map(P=>{const O=P.originalIndex,_=k(O+t.firstItemIndex,P.data,c);return I?E.createElement(S,{...ut(S,c),height:P.size,index:P.index,key:_,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...ut(C,c),"data-index":O,"data-item-index":P.index,"data-known-size":P.size,key:_,style:VN},u(P.index,c)):E.createElement(T,{...ut(T,c),...k1(T,P.data),"data-index":O,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:_,style:g?$N:C1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),zN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},BN={outline:"none",overflowX:"auto",position:"relative"},vi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),HN={position:E1(),top:0,width:"100%",zIndex:1};function ut(e,t){if(typeof e!="string")return{context:t}}function k1(e,t){return{item:typeof e=="string"?void 0:t}}const WN=E.memo(function(){const e=Ae("HeaderComponent"),t=ln("headerHeight"),n=Ae("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null}),qN=E.memo(function(){const e=Ae("FooterComponent"),t=ln("footerHeight"),n=Ae("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null});function Cp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:h}=T1(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),y.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?BN:zN,...o},tabIndex:0,...i,...ut(s,u),children:r})})}function kp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),h=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:v}=T1(a,l,s,h,d);return S1(()=>{var x;return m.current=d||((x=f.current)==null?void 0:x.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",v),e("scrollBy",g),y.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...ut(s,p),children:r})})}const UN=({children:e})=>{const t=E.useContext(Al),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>ra(n,l=>Tn(l,i?"width":"height")),[n,i]),s=Vn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:s,style:vi(o),children:e})},KN=({children:e})=>{const t=E.useContext(Al),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Ae("customScrollParent"),i=gp(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:vi(a),children:e})},YN=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...HN,marginTop:`${n}px`},o=Ae("context");return y.jsx(t,{style:r,...ut(t,o),children:e})},GN=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?QN:XN,a=r||t?KN:UN;return y.jsxs(i,{...e,...ut(i,o),children:[n&&y.jsx(YN,{children:y.jsx(Hv,{showTopList:!0})}),y.jsxs(a,{children:[y.jsx(WN,{}),y.jsx(Hv,{}),y.jsx(qN,{})]})]})}),{Component:ZN,useEmitter:Rp,useEmitterValue:Ae,usePublisher:ln}=Tp(FN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},GN),XN=Cp({useEmitter:Rp,useEmitterValue:Ae,usePublisher:ln}),QN=kp({useEmitter:Rp,useEmitterValue:Ae,usePublisher:ln}),Pp=ZN,JN=Ke(()=>{const e=ae(l=>y.jsxs("td",{children:["Item $",l]})),t=ae(null),n=ae(null),r=ae(null),o=ae({}),i=ae(Ep),a=ae(gi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),ct()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),eF=Ke(([e,t])=>({...e,...t}),dt(b1,JN)),tF=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{height:e}})}),nF=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{border:0,height:e,padding:0}})}),rF={overflowAnchor:"none"},Wv=E.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("isSeeking"),i=je("ScrollSeekPlaceholder")||tF,a=je("context"),s=je("TableRowComponent"),l=je("fixedHeaderHeight"),c=je("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...ut(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...ut(s,a),...k1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:rF},c(p.index,p.data,a))});return y.jsx(y.Fragment,{children:d})}),oF=E.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=bn("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=bn("windowScrollContainerState"),a=bn("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:p}=r1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);Ap("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,h(A))});const g=je("EmptyPlaceholder"),m=je("FillerRow")||nF,v=je("TableBodyComponent"),x=je("paddingTopAddition"),b=je("statefulTotalCount"),S=je("context");if(b===0&&g)return y.jsx(g,{...ut(g,S)});const w=(t?e.topItems:[]).reduce((A,j)=>A+j.size,0),T=e.offsetTop+x+f-w,C=e.offsetBottom,k=T>0?y.jsx(m,{context:S,height:T},"padding-top"):null,I=C>0?y.jsx(m,{context:S,height:C},"padding-bottom"):null;return y.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...ut(v,S),children:[k,t&&y.jsx(Wv,{showTopList:!0}),y.jsx(Wv,{}),I]})}),iF=({children:e})=>{const t=E.useContext(Al),n=bn("viewportHeight"),r=bn("fixedItemHeight"),o=Vn(E.useMemo(()=>ra(n,i=>Tn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:o,style:vi(!1),children:e})},aF=({children:e})=>{const t=E.useContext(Al),n=bn("windowViewportRect"),r=bn("fixedItemHeight"),o=je("customScrollParent"),i=gp(n,o,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:vi(!1),children:e})},sF=E.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=bn("fixedHeaderHeight"),o=bn("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Vn(E.useMemo(()=>ra(r,v=>Tn(v,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Vn(E.useMemo(()=>ra(o,v=>Tn(v,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?uF:cF,d=n||t?aF:iF,p=je("TableComponent"),f=je("TableHeadComponent"),h=je("TableFooterComponent"),g=i?y.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ut(f,s),children:i()},"TableHead"):null,m=a?y.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ut(h,s),children:a()},"TableFoot"):null;return y.jsx(u,{...e,...ut(u,s),children:y.jsx(d,{children:y.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ut(p,s),children:[g,y.jsx(oF,{},"TableBody"),m]})})})}),{Component:lF,useEmitter:Ap,useEmitterValue:je,usePublisher:bn}=Tp(eF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},sF),cF=Cp({useEmitter:Ap,useEmitterValue:je,usePublisher:bn}),uF=kp({useEmitter:Ap,useEmitterValue:je,usePublisher:bn}),dF=lF,qv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},fF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Uv,floor:Ms,max:Bi,min:fu,round:Kv}=Math;function Yv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function pF(e){return{...fF,items:e}}function Ya(e,t){return e&&e.width===t.width&&e.height===t.height}function mF(e,t){return e&&e.column===t.column&&e.row===t.row}const hF=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S},w])=>{const T=ae(0),C=ae(0),k=ae(qv),I=ae({height:0,width:0}),A=ae({height:0,width:0}),j=Be(),D=Be(),F=ae(0),P=ae(null),O=ae({column:0,row:0}),_=Be(),V=Be(),N=ae(!1),$=ae(0),M=ae(!0),B=ae(!1),X=ae(!1);Je(ne(h,Ne($),Ce(([L,z])=>!!z)),()=>{De(M,!1)}),Je(ne(Pt(h,M,A,I,$,B),Ce(([L,z,K,ie,,H])=>L&&!z&&K.height!==0&&ie.height!==0&&!H)),([,,,,L])=>{De(B,!0),xp(1,()=>{De(j,L)}),Ln(ne(c),()=>{De(t,[0,0]),De(M,!0)})}),we(ne(V,Ce(L=>L!=null&&L.scrollTop>0),Rn(0)),C),Je(ne(h,Ne(V),Ce(([,L])=>L!=null)),([,L])=>{L&&(De(I,L.viewport),De(A,L.item),De(O,L.gap),L.scrollTop>0&&(De(N,!0),Ln(ne(c,Ko(1)),z=>{De(N,!1)}),De(l,{top:L.scrollTop})))}),we(ne(I,pe(({height:L})=>L)),d),we(ne(Pt(Pe(I,Ya),Pe(A,Ya),Pe(O,(L,z)=>L&&L.column===z.column&&L.row===z.row),Pe(c)),pe(([L,z,K,ie])=>({gap:K,item:z,scrollTop:ie,viewport:L}))),_),we(ne(Pt(Pe(T),r,Pe(O,mF),Pe(A,Ya),Pe(I,Ya),Pe(P),Pe(C),Pe(N),Pe(M),Pe($)),Ce(([,,,,,,,L])=>!L),pe(([L,[z,K],ie,H,ye,Te,Re,,$e,se])=>{const{column:xe,row:le}=ie,{height:be,width:oe}=H,{width:ue}=ye;if(Re===0&&(L===0||ue===0))return qv;if(oe===0){const pn=bp(se,L),En=pn+Math.max(Re-1,0);return pF(Yv(pn,En,Te))}const ee=R1(ue,oe,xe);let q,te;$e?z===0&&K===0&&Re>0?(q=0,te=Re-1):(q=ee*Ms((z+le)/(be+le)),te=ee*Uv((K+le)/(be+le))-1,te=fu(L-1,Bi(te,ee-1)),q=fu(te,Bi(0,q))):(q=0,te=-1);const me=Yv(q,te,Te),{bottom:Oe,top:He}=Gv(ye,ie,H,me),Ye=Uv(L/ee),Ot=Ye*be+(Ye-1)*le-Oe;return{bottom:Oe,itemHeight:be,items:me,itemWidth:oe,offsetBottom:Ot,offsetTop:He,top:He}})),k),we(ne(P,Ce(L=>L!==null),pe(L=>L.length)),T),we(ne(Pt(I,A,k,O),Ce(([L,z,{items:K}])=>K.length>0&&z.height!==0&&L.height!==0),pe(([L,z,{items:K},ie])=>{const{bottom:H,top:ye}=Gv(L,ie,z,K);return[ye,H]}),ct(aa)),t);const Q=ae(!1);we(ne(c,Ne(Q),pe(([L,z])=>z||L!==0)),Q);const J=tn(ne(Pt(k,T),Ce(([{items:L}])=>L.length>0),Ne(Q),Ce(([[L,z],K])=>{const ie=L.items[L.items.length-1].index===z-1;return(K||L.bottom>0&&L.itemHeight>0&&L.offsetBottom===0&&L.items.length===z)&&ie}),pe(([[,L]])=>L-1),ct())),G=tn(ne(Pe(k),Ce(({items:L})=>L.length>0&&L[0].index===0),Rn(0),ct())),Y=tn(ne(Pe(k),Ne(N),Ce(([{items:L},z])=>L.length>0&&!z),pe(([{items:L}])=>({endIndex:L[L.length-1].index,startIndex:L[0].index})),ct(c1),fr(0)));we(Y,f.scrollSeekRangeChanged),we(ne(j,Ne(I,A,T,O),pe(([L,z,K,ie,H])=>{const ye=m1(L),{align:Te,behavior:Re,offset:$e}=ye;let se=ye.index;se==="LAST"&&(se=ie-1),se=Bi(0,se,fu(ie-1,se));let xe=Td(z,H,K,se);return Te==="end"?xe=Kv(xe-z.height+K.height):Te==="center"&&(xe=Kv(xe-z.height/2+K.height/2)),$e&&(xe+=$e),{behavior:Re,top:xe}})),l);const Z=Vt(ne(k,pe(L=>L.offsetBottom+L.bottom)),0);return we(ne(S,pe(L=>({height:L.visibleHeight,width:L.visibleWidth}))),I),{customScrollParent:m,data:P,deviation:F,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:D,scrollTo:l,scrollToIndex:j,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:X,initialTopMostItemIndex:$,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:_,stateRestoreInProgress:N,...w}},dt(wp,Wt,ka,y1,Ir,Sp,Ar));function R1(e,t,n){return Bi(1,Ms((e+n)/(Ms(t)+n)))}function Gv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Td(e,t,n,r[0].index);return{bottom:Td(e,t,n,r[r.length-1].index)+o,top:i}}function Td(e,t,n,r){const o=R1(e.width,n.width,t.column),i=Ms(r/o),a=i*n.height+Bi(0,i-1)*t.row;return a>0?a+t.row:a}const gF=Ke(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(Ep),a=ae("div"),s=ae(gi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),ct()),p),c=ae(!1),u=ae(!1);return we(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),vF=Ke(([e,t])=>({...e,...t}),dt(hF,gF)),yF=E.memo(function(){const e=ft("gridState"),t=ft("listClassName"),n=ft("itemClassName"),r=ft("itemContent"),o=ft("computeItemKey"),i=ft("isSeeking"),a=cn("scrollHeight"),s=ft("ItemComponent"),l=ft("ListComponent"),c=ft("ScrollSeekPlaceholder"),u=ft("context"),d=cn("itemDimensions"),p=cn("gap"),f=ft("log"),h=ft("stateRestoreInProgress"),g=cn("reportReadyState"),m=Vn(E.useMemo(()=>v=>{const x=v.parentElement.parentElement.scrollHeight;a(x);const b=v.firstChild;if(b){const{height:S,width:w}=b.getBoundingClientRect();d({height:S,width:w})}p({column:Zv("column-gap",getComputedStyle(v).columnGap,f),row:Zv("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return S1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),h?null:y.jsx(l,{className:t,ref:m,...ut(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const x=o(v.index,v.data,u);return i?y.jsx(c,{...ut(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},x):E.createElement(s,{...ut(s,u),className:n,"data-index":v.index,key:x},r(v.index,v.data,u))})})}),xF=E.memo(function(){const e=ft("HeaderComponent"),t=cn("headerHeight"),n=ft("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=ft("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null}),bF=E.memo(function(){const e=ft("FooterComponent"),t=cn("footerHeight"),n=ft("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=ft("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null}),wF=({children:e})=>{const t=E.useContext(w1),n=cn("itemDimensions"),r=cn("viewportDimensions"),o=Vn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),y.jsx("div",{ref:o,style:vi(!1),children:e})},SF=({children:e})=>{const t=E.useContext(w1),n=cn("windowViewportRect"),r=cn("itemDimensions"),o=ft("customScrollParent"),i=gp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),y.jsx("div",{ref:i,style:vi(!1),children:e})},TF=E.memo(function({...e}){const t=ft("useWindowScroll"),n=ft("customScrollParent"),r=n||t?CF:EF,o=n||t?SF:wF,i=ft("context");return y.jsx(r,{...e,...ut(r,i),children:y.jsxs(o,{children:[y.jsx(xF,{}),y.jsx(yF,{}),y.jsx(bF,{})]})})}),{useEmitter:P1,useEmitterValue:ft,usePublisher:cn}=Tp(vF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},TF),EF=Cp({useEmitter:P1,useEmitterValue:ft,usePublisher:cn}),CF=kp({useEmitter:P1,useEmitterValue:ft,usePublisher:cn});function Zv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Ip=()=>{const e=E.useContext(ai);return e?e.tweaks:gl},A1=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>y.jsxs("span",{className:Ie("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:y.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?y.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?y.jsx(fp,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:y.jsx("span",{className:"cursor-help",children:y.jsx(u0,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:y.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?y.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[y.jsx(l0,{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}),y.jsx(WA,{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]}),Ra=E.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:p="",name:f,title:h,componentName:g,placeholder:m,hideLeft:v=!1,required:x,disabled:b,reportStatus:S},w)=>{const T=Ip(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,I=Ct(),A=e??I.inputOptionalLabel;return y.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:Ie("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[y.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:[y.jsx(A1,{info:s,hideLeft:v,reportStatus:C,title:h,placeholder:m,children:A||n?y.jsxs(E.Fragment,{children:[x?null:y.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:A}),n?y.jsx(E.Fragment,{children:n}):null]}):null}),y.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 ${p}`,children:[t?y.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?y.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),y.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}),y.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})]})}),kF=e=>y.jsx(E.Fragment,{children:e.children}),RF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},PF=[],AF=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(wr,{children:t.children})})}),IF=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),_F={List:AF,Item:IF},yo=40,OF=E.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:p=!1,required:f=!1,dynamicOption:h=!1,...g},m)=>{const v=E.useRef(null),x=E.useRef(null),b=E.useRef(null),S=g.value??g.defaultValue??"",w=Ct(),[T,C]=E.useState(()=>Math.min(320,yo*o.length)),[k,I]=E.useState(!1),[A,j]=E.useState(""),[D,F]=E.useState(S),[P,O]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===S))==null?void 0:oe.label)??S}),[_,V]=E.useState(null),N=E.useRef(PF),$=up(k,"block-only"),M=h&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,B=A?lp(M,"value",[{key:"value",value:A},{key:"label",value:A}]):M,X=()=>{I(!1),C(0)},Q=B.filter(oe=>oe.hidden!==!0),J=h?void 0:`^(${o.map(oe=>`${id(oe.value)}${oe.label?"|"+id(oe.label):""}`).join("|")})$`,{x:G,y:Y,strategy:Z,refs:L,context:z}=kr({open:k,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:ui,middleware:[wa(4),_w({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),ee=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=qi(L.reference.current,window.innerHeight),te=Math.min(ee<yo?q:ee,q,oe.availableHeight),me=Q.length===0?yo:Math.min(te,q,ee),Oe=`${x.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Oe,maxWidth:Oe,height:me})}})]}),K=Yw(z,RF),{getReferenceProps:ie,getFloatingProps:H,getItemProps:ye}=Rr([so(z,{role:"listbox"}),ao(z),El(z,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);F((oe==null?void 0:oe.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!k)return C(0);const oe=L.reference;if(oe.current===null)return;const ue=qi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,Q.length*yo)),100)},[A,k,L.reference,Q.length]),E.useEffect(()=>{const oe=L.reference.current;if(oe)return ma(oe)},[]);const Te=(oe,ue)=>{F(oe.value);const ee=L.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",oe.value),ee.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),O(oe.label??""),X(),j(""),V(ue)},Re=oe=>{var ee;const ue=oe.target.value;return j(ue),!k&&ue===""?I(!0):(oe.target.name=g.name||"",ue?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,oe))},$e=()=>{var oe;I(!0),j(""),(oe=L.reference.current)==null||oe.focus()},se=()=>{V(oe=>oe===null?0:oe),I(!0),j("")},xe=()=>{var oe;(oe=L.reference.current)==null||oe.setAttribute("data-value",""),j(""),F(""),O(""),px(L.reference.current),X()},le=g.id||g.name,be=Q.length===0;return y.jsxs(Ra,{...g,left:e,error:t,ref:x,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:$e,children:[y.jsx(If,{size:20}),y.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),D?y.jsx("button",{type:"button",onClick:xe,className:"p-2 transition-colors link:text-danger md:p-1",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsx("input",{"data-shadow":"true",...ie({...g,onChange:Re,onFocus:se,pattern:J,ref:L.setReference,name:`${le}-shadow`,id:`${le}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,ee;if(oe.key==="Escape")return oe.currentTarget.blur(),X();if(k){if(oe.key==="ArrowDown"){let q=Ve.number(_)?_+1:0;return q>Q.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),V(q)}if(oe.key==="ArrowUp"){let q=Ve.number(_)?_-1:Q.length-1;return q<0&&(q=Q.length-1),(ee=b.current)==null||ee.scrollIntoView({index:q}),V(q)}if(oe.key==="Enter"){if(_!==null&&Q[_])return oe.preventDefault(),Te(Q[_],_);if(Q.length===1)return oe.preventDefault(),Te(Q[0],0)}}}}),"data-value":D,"data-error":!!t,"data-name":le,"data-target":le,required:f,value:k?A:P||D,"aria-autocomplete":"list",autoComplete:"off",className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),y.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:m,required:f,defaultValue:g.value||D||void 0}),y.jsx(io,{preserveTabOrder:!0,children:k?y.jsx(pi,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs(pt.div,{...H({ref:Un($,L.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:be?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const ue=L.floating.current.querySelectorAll("li").item(0),ee=(ue?ue.getBoundingClientRect().height:yo)*Q.length;return pa.flushSync(()=>C(ee+2))},children:[be?y.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,y.jsx(Pp,{overscan:40,ref:b,hidden:be,data:Q,style:{height:T},defaultItemHeight:yo,components:_F,scrollerRef:oe=>void(v.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const ee=ue.Render??kF,q=D===ue.value||D===ue.label,te=_===oe,me=ue.label??ue.value;return y.jsx("button",{"data-value":ue.value,...ye({ref:Oe=>void(N.current[oe]=Oe),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Te(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${te?"bg-floating-hover text-floating-foreground":""}`}),children:y.jsx(ee,{...g,label:ue.label,value:ue.value,children:me})})}})]})}):null})]})}),_p=E.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 y.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ie("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[y.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ie("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,y.jsx("span",{"data-name":"checkbox-label",className:Ie("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),I1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:h="text",labelClassName:g,feedback:m=null,hideLeft:v=!1,loading:x,...b},S)=>{const w=e,T=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=ma(C.current),A=r==null?void 0:r(k),j=D=>{const F=D;if(F.key==="Enter"&&k.enterKeyHint==="next"){const P=k.getAttribute("data-next");if(P){const O=document.getElementById(P);if(O)return O.focus(),void F.preventDefault()}}};return k.addEventListener("keydown",j),()=>{A==null||A(),I(),k.removeEventListener("keydown",j)}},[]),y.jsx(Ra,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:m,hideLeft:v,title:b.title,container:Ie(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:y.jsx(w,{...n,...b,id:T,name:T,type:h,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Un(S,C),className:Ie("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)})})}),Pa=I1(_0,"input",{type:"text"}),Xv=new Date(1970,11,31),pu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Qv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},MF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},mu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},DF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=$f(t),l=E.useId(),c=Ct(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),g=mu(u,Xv).flatMap(C=>Ve.keyof(pu,C.type)?pu[C.type](C.value):[]),m=mu(u,Xv).reduce((C,k)=>C+(Ve.keyof(Qv,k.type)?Qv[k.type](k.value):""),""),[v,x]=E.useState(d?mu(u,d).reduce((C,k)=>C+(Ve.keyof(pu,k.type)?MF[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(x(k),g.length===k.length&&g.every((A,j)=>{const D=k.charAt(j);return typeof A=="string"?D===A:A.test(D)})){const A=Vo(AO(k,m,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),x(C?A_(C,m):"")),w=Mf(d),T=w?d.toISOString():void 0;return y.jsx(Pa,{...i,mask:g,value:v,id:void 0,name:void 0,"data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??m,right:y.jsxs(E.Fragment,{children:[y.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),y.jsx(mi,{open:f,onChange:h,trigger:y.jsxs("span",{"aria-labelledby":l,children:[y.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),y.jsx(FA,{})]}),buttonProps:{"aria-describedby":l},children:y.jsx(z0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),jF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],NF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],FF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],LF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Jv=(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};function VF(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?LF:FF:t.binary?NF:jF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Jv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Jv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ga={exports:{}},Za={exports:{}},Ge={};/** @license React v16.13.1
217
+ */var $D=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Es=$D.join(","),ww=typeof Element>"u",Ho=ww?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Cs=!ww&&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==null?void 0:e.ownerDocument},ks=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},zD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},BD=function(t,n,r){if(ks(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Es));return n&&Ho.call(t,Es)&&o.unshift(t),o=o.filter(r),o},HD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ks(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Ho.call(a,Es);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!ks(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},Sw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Tw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zD(t))&&!Sw(t)?0:t.tabIndex},WD=function(t,n){var r=Tw(t);return r<0&&n&&!Sw(t)?0:r},qD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ew=function(t){return t.tagName==="INPUT"},UD=function(t){return Ew(t)&&t.type==="hidden"},KD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},GD=function(t){if(!t.name)return!0;var n=t.form||Cs(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=YD(o,t.form);return!i||i===t},ZD=function(t){return Ew(t)&&t.type==="radio"},XD=function(t){return ZD(t)&&!GD(t)},QD=function(t){var n,r=t&&Cs(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Cs(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Zg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},JD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ho.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ho.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Cs(t);if(l&&!l.shadowRoot&&o(l)===!0)return Zg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(QD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Zg(t);return!1},ej=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},tj=function(t,n){return!(n.disabled||ks(n)||UD(n)||JD(n,t)||KD(n)||ej(n))},vd=function(t,n){return!(XD(n)||Tw(n)<0||!tj(t,n))},nj=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},rj=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=WD(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(qD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ta=function(t,n){n=n||{};var r;return n.getShadowRoot?r=HD([t],n.includeContainer,{filter:vd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:nj}):r=BD(t,n.includeContainer,vd.bind(null,n)),rj(r)},oj=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,Es)===!1?!1:vd(n,t)};function Xg(e,t,n){let{reference:r,floating:o}=e;const i=Zr(t),a=tp(t),s=ep(a),l=yr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ci(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const ij=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}=Xg(c,r,l),p=r,f={},h=0;for(let g=0;g<s.length;g++){const{name:m,fn:v}=s[g],{x,y:b,data:S,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,f={...f,[m]:{...f[m],...S}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Xg(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function np(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:p=!1,padding:f=0}=li(t,e),h=bw(f),m=s[p?d==="floating"?"reference":"floating":d],v=Ts(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)),S=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},w=Ts(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(v.top-w.top+h.top)/S.y,bottom:(w.bottom-v.bottom+h.bottom)/S.y,left:(v.left-w.left+h.left)/S.x,right:(w.right-v.right+h.right)/S.x}}const aj=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}=li(e,t)||{};if(c==null)return{};const d=bw(u),p={x:n,y:r},f=tp(o),h=ep(f),g=await a.getDimensions(c),m=f==="y",v=m?"top":"left",x=m?"bottom":"right",b=m?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[f]-p[f]-i.floating[h],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[b]||i.floating[h]);const k=S/2-w/2,I=C/2-g[h]/2-1,P=_n(d[v],I),N=_n(d[x],I),D=P,L=C-g[h]-N,A=C/2-g[h]/2+k,O=hd(D,A,L),M=!l.arrow&&ci(o)!=null&&A!==O&&i.reference[h]/2-(A<D?P:N)-g[h]/2<0,F=M?A<D?A-D:A-L:0;return{[f]:p[f]+F,data:{[f]:O,centerOffset:A-O-F,...M&&{alignmentOffset:F}},reset:M}}}),sj=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:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=li(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=yr(o),x=Zr(s),b=yr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Ss(s)]:ND(s)),T=h!=="none";!p&&T&&w.push(...LD(s,g,h,S));const C=[s,...w],k=await np(t,m),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const A=jD(o,a,S);I.push(k[A[0]],k[A[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every(A=>A<=0)){var N,D;const A=(((N=i.flip)==null?void 0:N.index)||0)+1,O=C[A];if(O)return{data:{index:A,overflows:P},reset:{placement:O}};let M=(D=P.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:D.placement;if(!M)switch(f){case"bestFit":{var L;const F=(L=P.filter(j=>{if(T){const H=Zr(j.placement);return H===x||H==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(H=>H>0).reduce((H,_)=>H+_,0)]).sort((j,H)=>j[1]-H[1])[0])==null?void 0:L[0];F&&(M=F);break}case"initialPlacement":M=s;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function lj(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=yr(n),s=ci(n),l=Zr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=li(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const cj=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 lj(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}}}}},uj=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:v,y:x}=m;return{x:v,y:x}}},...l}=li(e,t),c={x:n,y:r},u=await np(t,l),d=Zr(yr(o)),p=xw(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",v=p==="y"?"bottom":"right",x=f+u[m],b=f-u[v];f=hd(x,f,b)}if(a){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=h+u[m],b=h-u[v];h=hd(x,h,b)}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},dj=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=li(e,t),l=await np(t,s),c=yr(n),u=ci(n),d=Zr(n)==="y",{width:p,height:f}=r.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,v=p-l.left-l.right,x=_n(f-l[h],m),b=_n(p-l[g],v),S=!t.middlewareData.shift;let w=x,T=b;if(d?T=u||S?_n(b,v):v:w=u||S?_n(x,m):m,S&&!u){const k=Qt(l.left,0),I=Qt(l.right,0),P=Qt(l.top,0),N=Qt(l.bottom,0);d?T=p-2*(k!==0||I!==0?k+I:Qt(l.left,l.right)):w=f-2*(P!==0||N!==0?P+N:Qt(l.top,l.bottom))}await a({...t,availableWidth:T,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Cw(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ws(n)!==i||ws(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function rp(e){return nt(e)?e:e.contextElement}function Ao(e){const t=rp(e);if(!wt(t))return vr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Cw(t);let a=(i?ws(n.width):n.width)/r,s=(i?ws(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const fj=vr(0);function kw(e){const t=Bt(e);return!Gf()||!t.visualViewport?fj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Xr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=rp(e);let a=vr(1);t&&(r?nt(r)&&(a=Ao(r)):a=Ao(e));const s=pj(i,n,r)?kw(i):vr(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 p=Bt(i),f=r&&nt(r)?Bt(r):r;let h=p,g=pd(h);for(;g&&r&&f!==h;){const m=Ao(g),v=g.getBoundingClientRect(),x=rn(g),b=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*m.x,S=v.top+(g.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=S,h=Bt(g),g=pd(h)}}return Ts({width:u,height:d,x:l,y:c})}function mj(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Jn(r),s=t?wl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=vr(1);const u=vr(0),d=wt(r);if((d||!d&&!i)&&((Tr(r)!=="body"||ba(a))&&(l=Sl(r)),wt(r))){const p=Xr(r);c=Ao(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function hj(e){return Array.from(e.getClientRects())}function Rw(e){return Xr(Jn(e)).left+Sl(e).scrollLeft}function gj(e){const t=Jn(e),n=Sl(e),r=e.ownerDocument.body,o=Qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Rw(e);const s=-n.scrollTop;return rn(r).direction==="rtl"&&(a+=Qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function vj(e,t){const n=Bt(e),r=Jn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Gf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function yj(e,t){const n=Xr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wt(e)?Ao(e):vr(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 Qg(e,t,n){let r;if(t==="viewport")r=vj(e,n);else if(t==="document")r=gj(Jn(e));else if(nt(t))r=yj(t,n);else{const o=kw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ts(r)}function Pw(e,t){const n=Zn(e);return n===t||!nt(n)||gr(n)?!1:rn(n).position==="fixed"||Pw(n,t)}function xj(e,t){const n=t.get(e);if(n)return n;let r=pr(e,[],!1).filter(s=>nt(s)&&Tr(s)!=="body"),o=null;const i=rn(e).position==="fixed";let a=i?Zn(e):e;for(;nt(a)&&!gr(a);){const s=rn(a),l=Yf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ba(a)&&!l&&Pw(e,a))?r=r.filter(u=>u!==a):o=s,a=Zn(a)}return t.set(e,r),r}function bj(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?wl(t)?[]:xj(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Qg(t,u,o);return c.top=Qt(d.top,c.top),c.right=_n(d.right,c.right),c.bottom=_n(d.bottom,c.bottom),c.left=Qt(d.left,c.left),c},Qg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wj(e){const{width:t,height:n}=Cw(e);return{width:t,height:n}}function Sj(e,t,n){const r=wt(t),o=Jn(t),i=n==="fixed",a=Xr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=vr(0);if(r||!r&&!i)if((Tr(t)!=="body"||ba(o))&&(s=Sl(t)),r){const d=Xr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Rw(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Qc(e){return rn(e).position==="static"}function Jg(e,t){return!wt(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Aw(e,t){const n=Bt(e);if(wl(e))return n;if(!wt(e)){let o=Zn(e);for(;o&&!gr(o);){if(nt(o)&&!Qc(o))return o;o=Zn(o)}return n}let r=Jg(e,t);for(;r&&RD(r)&&Qc(r);)r=Jg(r,t);return r&&gr(r)&&Qc(r)&&!Yf(r)?n:r||PD(e)||n}const Tj=async function(e){const t=this.getOffsetParent||Aw,n=this.getDimensions,r=await n(e.floating);return{reference:Sj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ej(e){return rn(e).direction==="rtl"}const Cj={convertOffsetParentRelativeRectToViewportRelativeRect:mj,getDocumentElement:Jn,getClippingRect:bj,getOffsetParent:Aw,getElementRects:Tj,getClientRects:hj,getDimensions:wj,getScale:Ao,isElement:nt,isRTL:Ej};function kj(e,t){let n=null,r;const o=Jn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Ro(u),h=Ro(o.clientWidth-(c+d)),g=Ro(o.clientHeight-(u+p)),m=Ro(c),x={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Qt(0,_n(1,l))||1};let b=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!b)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),i}function ui(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=rp(e),u=o||i?[...c?pr(c):[],...pr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?kj(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,g=l?Xr(e):null;l&&m();function m(){const v=Xr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,h=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Rj=cj,Pj=uj,Aj=sj,Ij=dj,ev=aj,_j=(e,t,n)=>{const r=new Map,o={platform:Cj,...n},i={...o.platform,_c:r};return ij(e,t,{...o,platform:i})};var os=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Rs(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(!Rs(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)&&!Rs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tv(e,t){const n=Iw(e);return Math.round(t*n)/n}function Jc(e){const t=R.useRef(e);return os(()=>{t.current=e}),t}function Oj(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]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=R.useState(r);Rs(p,r)||f(r);const[h,g]=R.useState(null),[m,v]=R.useState(null),x=R.useCallback(j=>{j!==T.current&&(T.current=j,g(j))},[]),b=R.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),S=i||h,w=a||m,T=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,P=Jc(l),N=Jc(o),D=Jc(c),L=R.useCallback(()=>{if(!T.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};N.current&&(j.platform=N.current),_j(T.current,C.current,j).then(H=>{const _={...H,isPositioned:D.current!==!1};A.current&&!Rs(k.current,_)&&(k.current=_,Xs.flushSync(()=>{d(_)}))})},[p,t,n,N,D]);os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const A=R.useRef(!1);os(()=>(A.current=!0,()=>{A.current=!1}),[]),os(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(P.current)return P.current(S,w,L);L()}},[S,w,L,P,I]);const O=R.useMemo(()=>({reference:T,floating:C,setReference:x,setFloating:b}),[x,b]),M=R.useMemo(()=>({reference:S,floating:w}),[S,w]),F=R.useMemo(()=>{const j={position:n,left:0,top:0};if(!M.floating)return j;const H=tv(M.floating,u.x),_=tv(M.floating,u.y);return s?{...j,transform:"translate("+H+"px, "+_+"px)",...Iw(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:_}},[n,s,M.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:L,refs:O,elements:M,floatingStyles:F}),[u,L,O,M,F])}const Mj=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?ev({element:r.current,padding:o}).fn(n):{}:r?ev({element:r,padding:o}).fn(n):{}}}},wa=(e,t)=>({...Rj(e),options:[e,t]}),op=(e,t)=>({...Pj(e),options:[e,t]}),ip=(e,t)=>({...Aj(e),options:[e,t]}),_w=(e,t)=>({...Ij(e),options:[e,t]}),Ow=(e,t)=>({...Mj(e),options:[e,t]}),Mw={...R},Dj=Mw.useInsertionEffect,jj=Dj||(e=>e());function Rt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jj(()=>{t.current=e}),R.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)},[])}const ap="ArrowUp",Sa="ArrowDown",Wo="ArrowLeft",di="ArrowRight";function Ba(e,t,n){return Math.floor(e/t)!==n}function Vi(e,t){return t<0||t>=e.current.length}function eu(e,t){return Ft(e,{disabledIndices:t})}function nv(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&is(a,s,o));return s}function Nj(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===ap){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,h=l-(f-p);f===p?d=l:d=f>p?h:h-i}Vi(e,d)&&(d=c)}if(n.key===Sa&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Vi(e,d)&&(d=c)),r==="both"){const p=Ro(c/i);n.key===di&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Ba(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ba(d,i,p)&&(d=c)),n.key===Wo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ba(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ba(d,i,p)&&(d=c));const f=Ro(l/i)===p;Vi(e,d)&&(o&&f?d=n.key===Wo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function Fj(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 p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function Lj(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 Vj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function is(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let rv=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(rv);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():rv=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function $j(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 zj(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const Dw=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Bj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=R.useState(()=>new Map),a=R.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=R.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort($j).forEach((u,d)=>{l.set(u,d)}),zj(o,l)||i(l)},[o]),R.createElement(Dw.Provider,{value:R.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function jw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=R.useContext(Dw),[s,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return We(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qo.apply(this,arguments)}let ov=!1,Hj=0;const iv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Hj++;function Wj(){const[e,t]=R.useState(()=>ov?iv():void 0);return We(()=>{e==null&&t(iv())},[]),R.useEffect(()=>{ov=!0},[]),e}const qj=Mw.useId,fi=qj||Wj;let na;process.env.NODE_ENV!=="production"&&(na=new Set);function as(){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=na)!=null&&e.has(o))){var i;(i=na)==null||i.add(o),console.warn(o)}}function Uj(){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=na)!=null&&e.has(o))){var i;(i=na)==null||i.add(o),console.error(o)}}const Nw=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||as("The `ref` prop is required for `FloatingArrow`."));const m=fi(),[v,x]=R.useState(!1);if(We(()=>{if(!o)return;rn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const b=c*2,S=b/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),I=!!p,P=C==="top"||C==="bottom",N=u&&k==="end"?"bottom":"top";let D=u&&k==="end"?"right":"left";u&&v&&(D=k==="end"?"left":"right");const L=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",O=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",M={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",qo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[D]:L,[N]:A,[C]:P||I?"100%":"calc(100% - "+b/2+"px)",transform:""+M+(f??""),...h}}),b>0&&R.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:O}),R.createElement("path",{stroke:b&&!p?g.fill:"none",d:O}),R.createElement("clipPath",{id:m},R.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+b,height:a})))});function Fw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Lw=R.createContext(null),Vw=R.createContext(null),Er=()=>{var e;return((e=R.useContext(Lw))==null?void 0:e.id)||null},Cr=()=>R.useContext(Vw);function Kj(e){const t=fi(),n=Cr(),o=Er();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function Yj(e){const{children:t,id:n}=e,r=Er();return R.createElement(Lw.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function Gj(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(a=>{n.current=[...n.current,a]},[]),o=R.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=R.useState(()=>Fw())[0];return R.createElement(Vw.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function xr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const av=xr("safe-polygon");function tu(e,t,n){return n&&!Bo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function $w(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:p=!0}=t,f=Cr(),h=Er(),g=jt(c),m=jt(l),v=jt(n),x=R.useRef(),b=R.useRef(-1),S=R.useRef(),w=R.useRef(-1),T=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var O;const M=(O=o.current.openEvent)==null?void 0:O.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);R.useEffect(()=>{if(!s)return;function O(M){let{open:F}=M;F||(clearTimeout(b.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[s,i]),R.useEffect(()=>{if(!s||!g.current||!n)return;function O(F){I()&&r(!1,F,"hover")}const M=_t(a.floating).documentElement;return M.addEventListener("mouseleave",O),()=>{M.removeEventListener("mouseleave",O)}},[a.floating,n,r,s,g,I]);const P=R.useCallback(function(O,M,F){M===void 0&&(M=!0),F===void 0&&(F="hover");const j=tu(m.current,"close",x.current);j&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,O,F),j)):M&&(clearTimeout(b.current),r(!1,O,F))},[m,r]),N=Rt(()=>{k.current(),S.current=void 0}),D=Rt(()=>{if(C.current){const O=_t(a.floating).body;O.style.pointerEvents="",O.removeAttribute(av),C.current=!1}});R.useEffect(()=>{if(!s)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(_){if(clearTimeout(b.current),T.current=!1,u&&!Bo(x.current)||d>0&&!tu(m.current,"open"))return;const z=tu(m.current,"open",x.current);z?b.current=window.setTimeout(()=>{v.current||r(!0,_,"hover")},z):r(!0,_,"hover")}function F(_){if(O())return;k.current();const z=_t(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:_.clientX,y:_.clientY,onClose(){D(),N(),P(_,!0,"safe-polygon")}});const Q=S.current;z.addEventListener("mousemove",Q),k.current=()=>{z.removeEventListener("mousemove",Q)};return}(x.current==="touch"?!yt(a.floating,_.relatedTarget):!0)&&P(_)}function j(_){O()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:_.clientX,y:_.clientY,onClose(){D(),N(),P(_)}})(_))}if(nt(a.domReference)){var H;const _=a.domReference;return n&&_.addEventListener("mouseleave",j),(H=a.floating)==null||H.addEventListener("mouseleave",j),p&&_.addEventListener("mousemove",M,{once:!0}),_.addEventListener("mouseenter",M),_.addEventListener("mouseleave",F),()=>{var z;n&&_.removeEventListener("mouseleave",j),(z=a.floating)==null||z.removeEventListener("mouseleave",j),p&&_.removeEventListener("mousemove",M),_.removeEventListener("mouseenter",M),_.removeEventListener("mouseleave",F)}}},[a,s,e,u,d,p,P,N,D,r,n,v,f,m,g,o]),We(()=>{var O;if(s&&n&&(O=g.current)!=null&&O.__options.blockPointerEvents&&I()){const F=_t(a.floating).body;F.setAttribute(av,""),F.style.pointerEvents="none",C.current=!0;const j=a.floating;if(nt(a.domReference)&&j){var M;const H=a.domReference,_=f==null||(M=f.nodesRef.current.find(z=>z.id===h))==null||(M=M.context)==null?void 0:M.elements.floating;return _&&(_.style.pointerEvents=""),H.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{H.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,h,a,f,g,I]),We(()=>{n||(x.current=void 0,N(),D())},[n,N,D]),R.useEffect(()=>()=>{N(),clearTimeout(b.current),clearTimeout(w.current),D()},[s,a.domReference,N,D]);const L=R.useMemo(()=>{function O(M){x.current=M.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(M){const{nativeEvent:F}=M;function j(){!T.current&&!v.current&&r(!0,F,"hover")}u&&!Bo(x.current)||n||d===0||(clearTimeout(w.current),x.current==="touch"?j():w.current=window.setTimeout(j,d))}}},[u,r,n,v,d]),A=R.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(O){P(O.nativeEvent,!1)}}),[P]);return R.useMemo(()=>s?{reference:L,floating:A}:{},[s,L,A])}function Zj(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==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function qr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function Xj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),qr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let go=new WeakMap,Ha=new WeakSet,Wa={},nu=0;const Qj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,zw=e=>e&&(e.host||zw(e.parentNode)),Jj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function e2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=Jj(t,e),s=new Set,l=new Set(a),c=[];Wa[o]||(Wa[o]=new WeakMap);const u=Wa[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(Tr(h)!=="script")if(s.has(h))p(h);else{const g=i?h.getAttribute(i):null,m=g!==null&&g!=="false",v=(go.get(h)||0)+1,x=(u.get(h)||0)+1;go.set(h,v),u.set(h,x),c.push(h),v===1&&m&&Ha.add(h),x===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return nu++,()=>{c.forEach(f=>{const h=(go.get(f)||0)-1,g=(u.get(f)||0)-1;go.set(f,h),u.set(f,g),h||(!Ha.has(f)&&i&&f.removeAttribute(i),Ha.delete(f)),g||f.removeAttribute(o)}),nu--,nu||(go=new WeakMap,go=new WeakMap,Ha=new WeakSet,Wa={})}}function sv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=_t(e[0]).body;return e2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Uo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Bw(e,t){const n=ta(e,Uo());t==="prev"&&n.reverse();const r=n.indexOf(gn(_t(e)));return n.slice(r+1)[0]}function Hw(){return Bw(document.body,"next")}function Ww(){return Bw(document.body,"prev")}function $i(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function t2(e){ta(e,Uo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function n2(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 r2(e,t,n){const r=e.indexOf(t);function o(a){const s=xr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const sp={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};let o2;function lv(e){e.key==="Tab"&&(e.target,clearTimeout(o2))}const Ps=R.forwardRef(function(t,n){const[r,o]=R.useState();We(()=>(Qf()&&o("button"),document.addEventListener("keydown",lv),()=>{document.removeEventListener("keydown",lv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[xr("focus-guard")]:"",style:sp};return R.createElement("span",qo({},t,i))}),qw=R.createContext(null),cv=xr("portal");function i2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=fi(),o=Uw(),[i,a]=R.useState(null),s=R.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{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(cv,""),l.appendChild(c),s.current=c,a(c)},[t,r]),We(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!nt(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(cv,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function io(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=i2({id:n,root:r}),[a,s]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&$i(h)&&(h.type==="focusin"?n2:t2)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),R.createElement(qw.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&R.createElement(Ps,{"data-type":"outside",ref:l,onFocus:f=>{if($i(f,i)){var h;(h=u.current)==null||h.focus()}else{const g=Ww()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&R.createElement("span",{"aria-owns":i.id,style:sp}),i&&Xs.createPortal(t,i),p&&i&&R.createElement(Ps,{"data-type":"outside",ref:c,onFocus:f=>{if($i(f,i)){var h;(h=d.current)==null||h.focus()}else{const g=Hw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Uw=()=>R.useContext(qw),a2=20;let Lr=[];function ru(e){Lr=Lr.filter(n=>n.isConnected);let t=e;if(!(!t||Tr(t)==="body")){if(!oj(t,Uo())){const n=ta(t,Uo())[0];n&&(t=n)}Lr.push(t),Lr.length>a2&&(Lr=Lr.slice(-20))}}function uv(){return Lr.slice().reverse().find(e=>e.isConnected)}const s2=R.forwardRef(function(t,n){return R.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:sp}))});function pi(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}=e,{open:p,refs:f,nodeId:h,onOpenChange:g,events:m,dataRef:v,floatingId:x,elements:{domReference:b,floating:S}}=t,w=typeof a=="number"&&a<0,T=yw(b)&&w,C=Qj()?i:!0,k=jt(o),I=jt(a),P=jt(s),N=Cr(),D=Uw(),L=R.useRef(null),A=R.useRef(null),O=R.useRef(!1),M=R.useRef(!1),F=R.useRef(-1),j=D!=null,H=S==null?void 0:S.firstElementChild,_=(H==null?void 0:H.id)===x?H:S,z=Rt(function(G){return G===void 0&&(G=_),G?ta(G,Uo()):[]}),X=Rt(G=>{const Y=z(G);return k.current.map(Z=>b&&Z==="reference"?b:_&&Z==="floating"?_:Y).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){yt(_,gn(_t(_)))&&z().length===0&&!T&&Dt(Z);const V=X(),$=In(Z);k.current[0]==="reference"&&$===b&&(Dt(Z),Z.shiftKey?cr(V[V.length-1]):cr(V[1])),k.current[1]==="floating"&&$===_&&Z.shiftKey&&(Dt(Z),cr(V[0]))}}const Y=_t(_);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,b,_,c,k,T,z,X]),R.useEffect(()=>{if(r||!S)return;function G(Y){const Z=In(Y),$=z().indexOf(Z);$!==-1&&(F.current=$)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,z]),R.useEffect(()=>{if(r||!d)return;function G(){M.current=!0,setTimeout(()=>{M.current=!1})}function Y(Z){const V=Z.relatedTarget;queueMicrotask(()=>{const $=!(yt(b,V)||yt(S,V)||yt(V,S)||yt(D==null?void 0:D.portalNode,V)||V!=null&&V.hasAttribute(xr("focus-guard"))||N&&(qr(N.nodesRef.current,h).find(K=>{var ie,B;return yt((ie=K.context)==null?void 0:ie.elements.floating,V)||yt((B=K.context)==null?void 0:B.elements.domReference,V)})||Zj(N.nodesRef.current,h).find(K=>{var ie,B;return((ie=K.context)==null?void 0:ie.elements.floating)===V||((B=K.context)==null?void 0:B.elements.domReference)===V})));if(l&&$&&gn(_t(_))===_t(_).body){wt(_)&&(_==null||_.focus());const K=F.current,ie=z(),B=ie[K]||ie[ie.length-1]||_;wt(B)&&B.focus()}(T||!c)&&V&&$&&!M.current&&V!==uv()&&(O.current=!0,g(!1,Z))})}if(S&&wt(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,b,S,_,c,h,N,D,g,d,l,z,T]),R.useEffect(()=>{var G;if(r)return;const Y=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+xr("portal")+"]"))||[]);if(S){const Z=[S,...Y,L.current,A.current,k.current.includes("reference")||T?b:null].filter($=>$!=null),V=c||T?sv(Z,C,!C):sv(Z);return()=>{V()}}},[r,b,S,c,k,D,T,C]),We(()=>{if(r||!wt(_))return;const G=_t(_),Y=gn(G);queueMicrotask(()=>{const Z=X(_),V=I.current,$=(typeof V=="number"?Z[V]:V.current)||_,K=yt(_,Y);!w&&!K&&p&&cr($,{preventScroll:$===_})})},[r,p,_,w,X,I]),We(()=>{if(r||!_)return;let G=!1;const Y=_t(_),Z=gn(Y);let $=v.current.openEvent;const K=f.domReference.current;ru(Z);function ie(B){let{open:ye,reason:Te,event:Re,nested:$e}=B;ye&&($=Re),Te==="escape-key"&&f.domReference.current&&ru(f.domReference.current),Te==="hover"&&Re.type==="mouseleave"&&(O.current=!0),Te==="outside-press"&&($e?(O.current=!1,G=!0):O.current=!(gw(Re)||Xf(Re)))}return m.on("openchange",ie),()=>{m.off("openchange",ie);const B=gn(Y),ye=yt(S,B)||N&&qr(N.nodesRef.current,h).some(se=>{var xe;return yt((xe=se.context)==null?void 0:xe.elements.floating,B)});(ye||$&&["click","mousedown"].includes($.type))&&f.domReference.current&&ru(f.domReference.current);const Re=K||Z,$e=ta(_t(Re).body,Uo());queueMicrotask(()=>{let se=uv();!se&&wt(Re)&&S&&(se=r2($e,Re,S)),P.current&&!O.current&&wt(se)&&(!(se!==B&&B!==Y.body)||ye)&&se.focus({preventScroll:G})})}},[r,S,_,P,v,f,m,N,h]),We(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{D.setFocusManagerState(null)}},[r,D,c,p,g,f,d]),We(()=>{if(r||!_||typeof MutationObserver!="function"||w)return;const G=()=>{const Z=_.getAttribute("tabindex"),V=z(),$=gn(_t(S)),K=V.indexOf($);K!==-1&&(F.current=K),k.current.includes("floating")||$!==f.domReference.current&&V.length===0?Z!=="0"&&_.setAttribute("tabindex","0"):Z!=="-1"&&_.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,_,f,k,z,w]);function Q(G){return r||!u||!c?null:R.createElement(s2,{ref:G==="start"?L:A,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(j||c);return R.createElement(R.Fragment,null,J&&R.createElement(Ps,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const Z=X();cr(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(O.current=!1,$i(G,D.portalNode)){const Z=Hw()||b;Z==null||Z.focus()}else{var Y;(Y=D.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&Q("start"),n,Q("end"),J&&R.createElement(Ps,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)cr(X()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(O.current=!0),$i(G,D.portalNode)){const Z=Ww()||b;Z==null||Z.focus()}else{var Y;(Y=D.afterOutsideRef.current)==null||Y.focus()}}}))}const ou=new Set,Kw=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=fi();return We(()=>{if(!r)return;ou.add(i);const a=/iP(hone|ad|od)|iOS/.test(Zf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,h;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{ou.delete(i),ou.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),R.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function dv(e){return wt(e.target)&&e.target.tagName==="BUTTON"}function fv(e){return Jf(e)}function Ta(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}=t,d=R.useRef(),p=R.useRef(!1),f=R.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const g=d.current;h.button===0&&s!=="click"&&(Bo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Bo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||dv(h))&&(h.key===" "&&!fv(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||dv(h)||fv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}function l2(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0: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,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function pv(e){return e!=null&&e.clientX!=null}function c2(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=R.useRef(!1),p=R.useRef(null),[f,h]=R.useState(),[g,m]=R.useState([]),v=Rt((T,C)=>{d.current||r.current.openEvent&&!pv(r.current.openEvent)||a.setPositionReference(l2(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),x=Rt(T=>{c!=null||u!=null||(n?p.current||m([]):v(T.clientX,T.clientY))}),b=Bo(f)?o:n,S=R.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const T=Bt(o);function C(k){const I=In(k);yt(o,I)?(T.removeEventListener("mousemove",C),p.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||pv(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,v]);R.useEffect(()=>S(),[S,g]),R.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),R.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=R.useMemo(()=>{function T(C){let{pointerType:k}=C;h(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:x,onMouseEnter:x}},[x]);return R.useMemo(()=>s?{reference:w}:{},[s,w])}const u2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},d2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ao(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:p=!1,bubbles:f,capture:h}=t,g=Cr(),m=Rt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,x=R.useRef(!1),b=R.useRef(!1),{escapeKey:S,outsidePress:w}=mv(f),{escapeKey:T,outsidePress:C}=mv(h),k=Rt(A=>{var O;if(!n||!a||!s||A.key!=="Escape")return;const M=(O=i.current.floatingContext)==null?void 0:O.nodeId,F=g?qr(g.nodesRef.current,M):[];if(!S&&(A.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(H=>{var _;if((_=H.context)!=null&&_.open&&!H.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,ID(A)?A.nativeEvent:A,"escape-key")}),I=Rt(A=>{var O;const M=()=>{var F;k(A),(F=In(A))==null||F.removeEventListener("keydown",M)};(O=In(A))==null||O.addEventListener("keydown",M)}),P=Rt(A=>{var O;const M=x.current;x.current=!1;const F=b.current;if(b.current=!1,c==="click"&&F||M||typeof v=="function"&&!v(A))return;const j=In(A),H="["+xr("inert")+"]",_=_t(o.floating).querySelectorAll(H);let z=nt(j)?j:null;for(;z&&!gr(z);){const G=Zn(z);if(gr(G)||!nt(G))break;z=G}if(_.length&&nt(j)&&!_D(j)&&!yt(j,o.floating)&&Array.from(_).every(G=>!yt(z,G)))return;if(wt(j)&&L){const G=j.clientWidth>0&&j.scrollWidth>j.clientWidth,Y=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let Z=Y&&A.offsetX>j.clientWidth;if(Y&&rn(j).direction==="rtl"&&(Z=A.offsetX<=j.offsetWidth-j.clientWidth),Z||G&&A.offsetY>j.clientHeight)return}const X=(O=i.current.floatingContext)==null?void 0:O.nodeId,Q=g&&qr(g.nodesRef.current,X).some(G=>{var Y;return Xc(A,(Y=G.context)==null?void 0:Y.elements.floating)});if(Xc(A,o.floating)||Xc(A,o.domReference)||Q)return;const J=g?qr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,A,"outside-press")}),N=Rt(A=>{var O;const M=()=>{var F;P(A),(F=In(A))==null||F.removeEventListener(c,M)};(O=In(A))==null||O.addEventListener(c,M)});R.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function A(F){r(!1,F,"ancestor-scroll")}const O=_t(o.floating);s&&O.addEventListener("keydown",T?I:k,T),v&&O.addEventListener(c,C?N:P,C);let M=[];return p&&(nt(o.domReference)&&(M=pr(o.domReference)),nt(o.floating)&&(M=M.concat(pr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(pr(o.reference.contextElement)))),M=M.filter(F=>{var j;return F!==((j=O.defaultView)==null?void 0:j.visualViewport)}),M.forEach(F=>{F.addEventListener("scroll",A,{passive:!0})}),()=>{s&&O.removeEventListener("keydown",T?I:k,T),v&&O.removeEventListener(c,C?N:P,C),M.forEach(F=>{F.removeEventListener("scroll",A)})}},[i,o,s,v,c,n,r,p,a,S,w,k,T,I,P,C,N]),R.useEffect(()=>{x.current=!1},[v,c]);const D=R.useMemo(()=>({onKeyDown:k,[u2[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[k,r,u,d]),L=R.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[d2[c]]:()=>{x.current=!0}}),[k,c]);return R.useMemo(()=>a?{reference:D,floating:L}:{},[a,D,L])}function f2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fi(),i=R.useRef({}),[a]=R.useState(()=>Fw()),s=Er()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&Uj("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]=R.useState(r.reference),u=Rt((f,h,g)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:g,nested:s}),n==null||n(f,h,g)}),d=R.useMemo(()=>({setPositionReference:c}),[]),p=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function kr(e){e===void 0&&(e={});const{nodeId:t}=e,n=f2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=R.useState(null),[s,l]=R.useState(null),u=(o==null?void 0:o.reference)||i,d=R.useRef(null),p=Cr();We(()=>{u&&(d.current=u)},[u]);const f=Oj({...e,elements:{...o,...s&&{reference:s}}}),h=R.useCallback(b=>{const S=nt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=R.useCallback(b=>{(nt(b)||b===null)&&(d.current=b,a(b)),(nt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!nt(b))&&f.refs.setReference(b)},[f.refs]),m=R.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:d}),[f.refs,g,h]),v=R.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),x=R.useMemo(()=>({...f,...r,refs:m,elements:v,nodeId:t}),[f,m,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=x;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=x)}),R.useMemo(()=>({...f,context:x,refs:m,elements:v}),[f,m,v,x])}function p2(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=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function h(){!n&&wt(a.domReference)&&a.domReference===gn(_t(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),R.useEffect(()=>{if(!s)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=R.useMemo(()=>({onPointerDown(f){Xf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=In(f.nativeEvent);if(l&&nt(h))try{if(Qf()&&vw())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Jf(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,g=f.nativeEvent,m=nt(h)&&h.hasAttribute(xr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const x=gn(a.domReference?a.domReference.ownerDocument:document);!h&&x===a.domReference||yt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||yt(a.domReference,x)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return R.useMemo(()=>s?{reference:p}:{},[s,p])}const hv="active",gv="selected";function iu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[hv]:a,[gv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...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&&[hv,gv].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 p,f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Rr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=R.useCallback(s=>iu(s,e,"reference"),t),i=R.useCallback(s=>iu(s,e,"floating"),n),a=R.useCallback(s=>iu(s,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let vv=!1;function Tl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function yv(e,t){return Tl(t,e===ap||e===Sa,e===Wo||e===di)}function au(e,t,n){return Tl(t,e===Sa,n?e===Wo:e===di)||e==="Enter"||e===" "||e===""}function m2(e,t,n){return Tl(t,n?e===Wo:e===di,e===Sa)}function xv(e,t,n){return Tl(t,n?e===di:e===Wo,e===ap)}function El(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:v=!0,disabledIndices:x=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||as("`useListNavigation` looping must be enabled to allow escaping."),h||as("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&as("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=Er(),P=Cr(),N=Rt(s),D=R.useRef(g),L=R.useRef(c??-1),A=R.useRef(null),O=R.useRef(!0),M=R.useRef(N),F=R.useRef(!!o.floating),j=R.useRef(n),H=R.useRef(!1),_=R.useRef(!1),z=jt(x),X=jt(n),Q=jt(w),J=jt(o.floating),G=jt(c),[Y,Z]=R.useState(),[V,$]=R.useState(),K=Rt(function(se,xe,le){le===void 0&&(le=!1);function be(ue){h?(Z(ue.id),P==null||P.events.emit("virtualfocus",ue),T&&(T.current=ue)):cr(ue,{preventScroll:!0,sync:vw()&&Qf()?vv||H.current:!1})}const oe=se.current[xe.current];oe&&be(oe),requestAnimationFrame(()=>{const ue=se.current[xe.current]||oe;if(!ue)return;oe||be(ue);const ee=Q.current;ee&&B&&(le||!O.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return vv=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?D.current&&c!=null&&(_.current=!0,L.current=c,N(c)):F.current&&(L.current=-1,M.current(null)))},[l,n,o.floating,c,N]),We(()=>{if(l&&n&&o.floating)if(a==null){if(H.current=!1,G.current!=null)return;if(F.current&&(L.current=-1,K(i,L)),(!j.current||!F.current)&&D.current&&(A.current!=null||D.current===!0&&A.current==null)){let se=0;const xe=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(xe),se++):(L.current=A.current==null||au(A.current,b,f)||p?eu(i,z.current):nv(i,z.current),A.current=null,N(L.current))};xe()}}else Vi(i,a)||(L.current=a,K(i,L,_.current),_.current=!1)},[l,n,o.floating,a,G,p,i,b,f,N,K,z]),We(()=>{var se;if(!l||o.floating||!P||h||!F.current)return;const xe=P.nodesRef.current,le=(se=xe.find(ue=>ue.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,be=gn(_t(o.floating)),oe=xe.some(ue=>ue.context&&yt(ue.context.elements.floating,be));le&&!oe&&O.current&&le.focus({preventScroll:!0})},[l,o.floating,P,I,h]),We(()=>{if(!l||!P||!h||I)return;function se(xe){$(xe.id),T&&(T.current=xe)}return P.events.on("virtualfocus",se),()=>{P.events.off("virtualfocus",se)}},[l,P,h,I,T]),We(()=>{M.current=N,F.current=!!o.floating}),We(()=>{n||(A.current=null)},[n]),We(()=>{j.current=n},[n]);const ie=a!=null,B=R.useMemo(()=>{function se(le){if(!n)return;const be=i.current.indexOf(le);be!==-1&&N(be)}return{onFocus(le){let{currentTarget:be}=le;se(be)},onClick:le=>{let{currentTarget:be}=le;return be.focus({preventScroll:!0})},...m&&{onMouseMove(le){let{currentTarget:be}=le;se(be)},onPointerLeave(le){let{pointerType:be}=le;!O.current||be==="touch"||(L.current=-1,K(i,L),N(null),h||cr(J.current,{preventScroll:!0}))}}}},[n,J,K,m,i,N,h]),ye=Rt(se=>{if(O.current=!1,H.current=!0,!X.current&&se.currentTarget===J.current)return;if(p&&xv(se.key,b,f)){Dt(se),r(!1,se.nativeEvent,"list-navigation"),wt(o.domReference)&&!h&&o.domReference.focus();return}const xe=L.current,le=eu(i,x),be=nv(i,x);if(se.key==="Home"&&(Dt(se),L.current=le,N(L.current)),se.key==="End"&&(Dt(se),L.current=be,N(L.current)),S>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=Fj(oe,S,k),ee=ue.findIndex(te=>te!=null&&!is(i.current,te,x)),q=ue.reduce((te,me,Oe)=>me!=null&&!is(i.current,me,x)?Oe:te,-1);if(L.current=ue[Nj({current:ue.map(te=>te!=null?i.current[te]:null)},{event:se,orientation:b,loop:d,cols:S,disabledIndices:Vj([...x||i.current.map((te,me)=>is(i.current,me)?me:void 0),void 0],ue),minIndex:ee,maxIndex:q,prevIndex:Lj(L.current>be?le:L.current,oe,ue,S,se.key===Sa?"bl":se.key===di?"tr":"tl"),stopEvent:!0})],N(L.current),b==="both")return}if(yv(se.key,b)){if(Dt(se),n&&!h&&gn(se.currentTarget.ownerDocument)===se.currentTarget){L.current=au(se.key,b,f)?le:be,N(L.current);return}au(se.key,b,f)?d?L.current=xe>=be?u&&xe!==i.current.length?-1:le:Ft(i,{startingIndex:xe,disabledIndices:x}):L.current=Math.min(be,Ft(i,{startingIndex:xe,disabledIndices:x})):d?L.current=xe<=le?u&&xe!==-1?i.current.length:be:Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:x}):L.current=Math.max(le,Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:x})),Vi(i,L.current)?N(null):N(L.current)}}),Te=R.useMemo(()=>h&&n&&ie&&{"aria-activedescendant":V||Y},[h,n,ie,V,Y]),Re=R.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!yw(o.domReference)&&Te,onKeyDown:ye,onPointerMove(){O.current=!0}}),[Te,ye,o.domReference,b]),$e=R.useMemo(()=>{function se(le){g==="auto"&&gw(le.nativeEvent)&&(D.current=!0)}function xe(le){D.current=g,g==="auto"&&Xf(le.nativeEvent)&&(D.current=!0)}return{...Te,onKeyDown(le){O.current=!1;const be=le.key.indexOf("Arrow")===0,oe=m2(le.key,b,f),ue=xv(le.key,b,f),ee=yv(le.key,b),q=(p?oe:ee)||le.key==="Enter"||le.key.trim()==="";if(h&&n){const He=P==null?void 0:P.nodesRef.current.find(Ot=>Ot.parentId==null),Ye=P&&He?Xj(P.nodesRef.current,He.id):null;if(be&&Ye&&T){const Ot=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(oe||ue){var te,me;const pn=((te=Ye.context)==null?void 0:te.elements.domReference)===le.currentTarget,En=ue&&!pn?(me=Ye.context)==null?void 0:me.elements.domReference:oe?i.current.find(er=>(er==null?void 0:er.id)===Y):null;En&&(Dt(le),En.dispatchEvent(Ot),$(void 0))}if(ee&&Ye.context&&Ye.context.open&&Ye.parentId&&le.currentTarget!==Ye.context.elements.domReference){var Oe;Dt(le),(Oe=Ye.context.elements.domReference)==null||Oe.dispatchEvent(Ot);return}}return ye(le)}if(!(!n&&!v&&be)){if(q&&(A.current=p&&ee?null:le.key),p){oe&&(Dt(le),n?(L.current=eu(i,z.current),N(L.current)):r(!0,le.nativeEvent,"list-navigation"));return}ee&&(c!=null&&(L.current=c),Dt(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):ye(le),n&&N(L.current))}},onFocus(){n&&!h&&N(null)},onPointerDown:xe,onMouseDown:se,onClick:se}},[Y,Te,ye,z,g,i,p,N,r,n,v,b,f,c,P,h,T]);return R.useMemo(()=>l?{reference:$e,floating:Re,item:B}:{},[l,$e,Re,B])}const h2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function so(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=h2.get(a))!=null?n:a,l=fi(),u=Er()!=null,d=R.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=R.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=R.useCallback(h=>{let{active:g,selected:m}=h;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&m};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return R.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const bv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function vo(e,t){return typeof e=="function"?e(t):e}function g2(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function v2(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]=R.useState("unmounted"),c=g2(n,a);return!c&&s==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Yw(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=R.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=R.useState(()=>({...vo(i,c),...vo(n,c)})),{isMounted:g,status:m}=v2(e,{duration:a}),v=jt(n),x=jt(r),b=jt(o),S=jt(i);return We(()=>{const w=vo(v.current,c),T=vo(b.current,c),C=vo(S.current,c),k=vo(x.current,c)||Object.keys(w).reduce((I,P)=>(I[P]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...w})),m==="open"&&h({transitionProperty:Object.keys(k).map(bv).join(","),transitionDuration:d+"ms",...C,...k}),m==="close"){const I=T||w;h({transitionProperty:Object.keys(I).map(bv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,v,x,S,d,m,c]),{isMounted:g,styles:f}}function y2(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:p=[],selectedIndex:f=null}=t,h=R.useRef(),g=R.useRef(""),m=R.useRef((n=f??a)!=null?n:-1),v=R.useRef(null),x=Rt(s),b=Rt(l),S=jt(u),w=jt(p);We(()=>{r&&(clearTimeout(h.current),v.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var P;m.current=(P=f??a)!=null?P:-1}},[r,f,a]);const T=Rt(P=>{P?o.current.typing||(o.current.typing=P,b(P)):o.current.typing&&(o.current.typing=P,b(P))}),C=Rt(P=>{function N(M,F,j){const H=S.current?S.current(F,j):F.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return H?M.indexOf(H):-1}const D=i.current;if(g.current.length>0&&g.current[0]!==" "&&(N(D,D,g.current)===-1?T(!1):P.key===" "&&Dt(P)),D==null||w.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(Dt(P),T(!0)),D.every(M=>{var F,j;return M?((F=M[0])==null?void 0:F.toLocaleLowerCase())!==((j=M[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===P.key&&(g.current="",m.current=v.current),g.current+=P.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",m.current=v.current,T(!1)},d);const A=m.current,O=N(D,[...D.slice((A||0)+1),...D.slice(0,(A||0)+1)],g.current);O!==-1?(x(O),v.current=O):P.key!==" "&&(g.current="",T(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(P){P.key===" "&&T(!1)}}),[C,T]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function wv(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 x2(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Gw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),h=f-l;if(a===null||s===null||h===0)return a=d,s=p,l=f,null;const g=d-a,m=p-s,x=Math.sqrt(g*g+m*m)/h;return a=d,s=p,l=f,x}const u=d=>{let{x:p,y:f,placement:h,elements:g,onClose:m,nodeId:v,tree:x}=d;return function(S){function w(){clearTimeout(o),m()}if(clearTimeout(o),!g.domReference||!g.floating||h==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],I=In(S),P=S.type==="mouseleave",N=yt(g.floating,I),D=yt(g.domReference,I),L=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),O=h.split("-")[0],M=p>A.right-A.width/2,F=f>A.bottom-A.height/2,j=x2(k,L),H=A.width>L.width,_=A.height>L.height,z=(H?L:A).left,X=(H?L:A).right,Q=(_?L:A).top,J=(_?L:A).bottom;if(N&&(i=!0,!P))return;if(D&&(i=!1),D&&!P){i=!0;return}if(P&&nt(S.relatedTarget)&&yt(g.floating,S.relatedTarget)||x&&qr(x.nodesRef.current,v).some(Z=>{let{context:V}=Z;return V==null?void 0:V.open}))return;if(O==="top"&&f>=L.bottom-1||O==="bottom"&&f<=L.top+1||O==="left"&&p>=L.right-1||O==="right"&&p<=L.left+1)return w();let G=[];switch(O){case"top":G=[[z,L.top+1],[z,A.bottom-1],[X,A.bottom-1],[X,L.top+1]];break;case"bottom":G=[[z,A.top+1],[z,L.bottom-1],[X,L.bottom-1],[X,A.top+1]];break;case"left":G=[[A.right-1,J],[A.right-1,Q],[L.left+1,Q],[L.left+1,J]];break;case"right":G=[[L.right-1,J],[L.right-1,Q],[A.left+1,Q],[A.left+1,J]];break}function Y(Z){let[V,$]=Z;switch(O){case"top":{const K=[H?V+t/2:M?V+t*4:V-t*4,$+t+1],ie=[H?V-t/2:M?V+t*4:V-t*4,$+t+1],B=[[A.left,M||H?A.bottom-t:A.top],[A.right,M?H?A.bottom-t:A.top:A.bottom-t]];return[K,ie,...B]}case"bottom":{const K=[H?V+t/2:M?V+t*4:V-t*4,$-t],ie=[H?V-t/2:M?V+t*4:V-t*4,$-t],B=[[A.left,M||H?A.top+t:A.bottom],[A.right,M?H?A.top+t:A.bottom:A.top+t]];return[K,ie,...B]}case"left":{const K=[V+t+1,_?$+t/2:F?$+t*4:$-t*4],ie=[V+t+1,_?$-t/2:F?$+t*4:$-t*4];return[...[[F||_?A.right-t:A.left,A.top],[F?_?A.right-t:A.left:A.right-t,A.bottom]],K,ie]}case"right":{const K=[V-t,_?$+t/2:F?$+t*4:$-t*4],ie=[V-t,_?$-t/2:F?$+t*4:$-t*4],B=[[F||_?A.left+t:A.right,A.top],[F?_?A.left+t:A.right:A.left+t,A.bottom]];return[K,ie,...B]}}}if(!wv([T,C],G)){if(i&&!j)return w();if(!P&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return w()}wv([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const b2=/Mac|iPod|iPhone|iPad/,As=()=>b2.test(navigator.userAgent),w2=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?As()?"Meta":"Control":n==="Hyper"?As()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),Sv=e=>e.map(t=>t.trim()).join("+");class S2{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=Sv(w2(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=Sv(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class yn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof yn&&(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 yn(this);return t?t(n):n}static from(t,n){return new yn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(yn.from(t,n).values())}toArray(){return Array.from(this.values())}}const T2=(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]},Tv=(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},Ev={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Cv=(e,t)=>{const n=Tv(t,Ev.basic,e);return n!==void 0&&n!==e?n:Tv(t,Ev.extend,e)},kv=e=>e.replace(/[^0-9]/g,""),qa=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),Rv=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?kv(e).includes(kv(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?T2(e,t)!==null:!1,E2=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>Rv(e,o,n,r)):Rv(e,t,n,r),lp=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Ve.array(i.value)?i.value.map(qa):qa(`${i.value}`)}));return e.forEach(i=>{const a=Cv(i,t);o.forEach(s=>{const l=Cv(i,s.key);if(!l)return;const c=qa(`${s.value}`.toLocaleLowerCase()).trim(),u=qa(`${l}`.toLocaleLowerCase()).trim();if(E2(u,c,s.score,s.match))return void r.set(a,i);Ve.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},C2=e=>(e=e.trim(),e==="Alt"?As()?y.jsx(cI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?As()?y.jsx(UA,{"aria-label":"Command",size:14}):"Ctrl":e),k2=e=>{const t=e.value.trim().split("+");return y.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return y.jsxs(E.Fragment,{children:[y.jsx("kbd",{"aria-label":n,children:C2(n)}),o?null:y.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},cp=y.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),R2=(e,t)=>Yr()?t:window.matchMedia(e).matches,P2=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(R2(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},Pv=()=>window.matchMedia("@media (pointer: coarse)"),A2=()=>{var r;const e=E.useRef(Yr()?null:Pv()),[t,n]=E.useState(Yr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Pv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},up=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=A2(),o=E.useRef(Yr()?"":document.documentElement.style.overflowY);return E.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||L0())return;document.documentElement.style.padding=mx(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.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(vT(c.style.height)):null,p=Ve.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vn="500ms",I2={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},_2={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},su={drawer:e=>e==="left"?I2:_2,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:vn},initial:{opacity:.5,scale:.95,animationDuration:vn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},O2=Jo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Zw={top:0,left:0,right:0,bottom:0},Xw=e=>e*.65,M2=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=Xw(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return y.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:Zw,whileDrag:{cursor:"grabbing"},className:Ie("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?y.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ua={drawer:"right",sheet:"none",dialog:"none"},D2=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ua.drawer:Ua[o]:t?Ua[o]:Ua.sheet},j2=[],dp=E.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:p=!0,forceType:f=!1,layoutId:h=void 0,overlayClassName:g="",type:m="dialog",position:v,overlayClickClose:x=!1,role:b="dialog",interactions:S=j2,...w},T)=>{const C=up(e,"block-only"),k=E.useId(),I=E.useId(),P=P2("(min-width: 64rem)"),N=m!=="dialog",D=D2(P,f,m,v),L=P||f?su[m]:su.sheet,A=typeof L=="function"?L(D):L,O=P||f?m:"sheet",M=kr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),F=Ta(M.context),j=so(M.context,{role:b}),H=ao(M.context,{escapeKey:!0,referencePress:!0,outsidePress:x}),_=Rr([F,j,H].concat(S)),z=o,X=ul(void 0);E.useEffect(()=>{X.set(void 0)},[X,O]);const Q=()=>a(!1);E.useImperativeHandle(T,()=>({context:M.context,floating:C.current}),[M.context,C]);const J=(Z,V)=>{const $=M.refs.floating;if($.current&&O==="sheet"){const ie=$.current.getBoundingClientRect(),B=X.get()||ie.height,ye=Math.abs(B-V.delta.y),Te=Xw(window.outerHeight);return ye<Te?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(ye)}},G={layoutId:h,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:A},Y=d&&O==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:Zw,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:O==="sheet",drag:O==="sheet"?"y":"x"}:G;return y.jsxs(E.Fragment,{children:[o?y.jsx(E.Fragment,{children:r?y.jsx(zo,{ref:M.refs.setReference,..._.getReferenceProps({layoutId:h}),children:z}):y.jsx(pt.button,{ref:M.refs.setReference,..._.getReferenceProps(),layoutId:h,type:"button",children:z})}):null,y.jsx(io,{preserveTabOrder:!0,children:y.jsx(wr,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?y.jsx(Kw,{lockScroll:!0,className:Ie(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${O==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:y.jsx(pi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:M.context,children:y.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":k,"aria-describedby":I}:{"aria-label":s},..._.getFloatingProps({"aria-modal":e,ref:Un(M.refs.setFloating,C),className:Ie(O2({position:D,type:O}),l,"overscroll-contain")}),"data-component":"modal",style:O==="drawer"?{width:X}:{height:X},children:[t?y.jsx("header",{className:"relative w-full",children:t?y.jsx("h2",{id:k,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,y.jsx("section",{className:Ie("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?y.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,p?y.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:y.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:y.jsx(xa,{})})}):null,N&&u?y.jsx(M2,{onChange:a,value:X,sheet:O==="sheet",position:D,parent:M.refs.floating}):null]})})}):null},k)})]})}),N2=e=>y.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Yd(e.item.title)?y.jsx(e.item.title,{text:e.text}):e.item.title}),F2=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?y.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:y.jsx(N2,{text:e.text,item:o})}):o.type!=="shortcut"?y.jsx(E.Fragment,{}):y.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[y.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,y.jsx("span",{children:Yd(o.title)?y.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?y.jsx(k2,{value:o.shortcut}):null]})}),L2=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Ve.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Ve.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=lp(o,"title",n),a=r.filter(s=>Ve.function(s.enabled)?s.enabled({text:t}):!1);return yn.unique(i.concat(a),s=>s.title)},V2=[0,0,0,0,0],$2=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Ct(),[o,i]=E.useState(""),a=Ur(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=kr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:ui}),p=El(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:x=>u(b=>Ve.number(x)?x:e.open?b??0:null)}),{getItemProps:f}=Rr([p]),h=e.commands.flatMap(x=>x.type==="group"?[x,...x.items]:[x]),g=L2(h,o),m=o===""?h:[{type:"group",title:"Results",items:[]},...g.filter(x=>x.type!=="group")];E.useEffect(()=>{const x=new S2;return x.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),h.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&x.add(b.shortcut,S=>b.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),x.register()},[t]);const v=e.Icon??gg;return y.jsx(E.Fragment,{children:y.jsxs(dp,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[y.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[y.jsx("div",{className:"flex size-10 items-center justify-center",children:y.jsx(v,{Default:gg,text:o,size:16})}),y.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:x=>i(x.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:x=>{var b;if((x.key==="ArrowDown"||x.key==="ArrowUp")&&c!==null&&((b=n.current[c])==null||b.scrollIntoView({block:"start",inline:"start"})),x.key==="Enter"){if(c!==null&&m[c]){x.preventDefault();const S=m[c],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}if(m.length===1){x.preventDefault();const S=m[0],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[y.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),V2.map((x,b)=>y.jsx("li",{className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:cp},`${s}-${b}-skeleton-index`))]}):y.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.map((x,b)=>E.createElement(F2,{...f({onMouseEnter:()=>u(b),ref(S){n.current[b]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),x.type==="shortcut"&&x.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:x,text:o,active:c===b,key:`${s}-${x.type}-${b}`})),m.length===1?y.jsx("div",{className:Ie("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Ve.number(c)?y.jsx(e.Preview,{command:m[c],text:o}):null]}),e.footer?y.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},mi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[wa(10),ip({fallbackAxisSideDirection:"end"}),op(),Ow({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=kr({open:n,middleware:i,transform:!0,whileElementsMounted:ui,onOpenChange:(h,g)=>{var v;const m=g==null?void 0:g.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(v=e.onChange)==null||v.call(e,h))}}),c=Ta(l),u=ao(l),d=so(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Rr([c,u,d]);return y.jsxs(E.Fragment,{children:[y.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&y.jsx(io,{preserveTabOrder:!0,id:`${t}-portal`,children:y.jsx(pi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:y.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[y.jsx(Nw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),y.jsx("header",{className:"mb-2",children:y.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},z2=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=kr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ta(s,{enabled:e.disabled??!0}),u=so(s,{role:"tooltip"}),d=ao(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Rr([c,u,d]);return y.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[y.jsx(el,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:y.jsx(pt.span,{layoutId:o,children:e.trigger})}),y.jsx(wr,{children:i?y.jsx(io,{root:t,children:y.jsx(pi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:y.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Qw=200,B2=500,Jw=(e="")=>Ie("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),yd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Av=E.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]=E.useState(r??!1),[p,f]=E.useState(!1),[h,g]=E.useState(null),m=E.useRef([]),v=E.useRef([]),x=E.useContext(yd),b=Er(),S=Cr(),w=Kj(),T=jw(),C=b!==null,{floatingStyles:k,refs:I,context:P}=kr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:ui,placement:C?"right":"bottom-start",middleware:[wa({mainAxis:C?0:4,alignmentAxis:C?-4:0}),ip(),op()]}),N=so(P,{role:"menu"}),D=ao(P,{bubbles:!0}),L=$w(P,{move:!1,enabled:n,delay:{open:Qw},handleClose:Gw({blockPointerEvents:!0})}),A=Ta(P,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),O=El(P,{loop:!0,activeIndex:h,nested:C,listRef:m,onNavigate:g}),M=y2(P,{activeIndex:h,listRef:v,resetMs:B2,onMatch:u?g:void 0}),{getReferenceProps:F,getFloatingProps:j,getItemProps:H}=Rr([L,A,N,D,O,M]);E.useEffect(()=>{if(!S)return;const z=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===b&&d(!1)};return S.events.on("click",z),S.events.on("menuopen",X),()=>{S.events.off("click",z),S.events.off("menuopen",X)}},[S,w,b]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:b,nodeId:w})},[S,u,w,b]);const _=o?l.className:Ie(Jw(l.className));return y.jsxs(Yj,{id:w,children:[y.jsx(E.Fragment,{children:l.asChild?y.jsx(zo,{...F(x.getItemProps({...l,onFocus(z){var X;(X=l.onFocus)==null||X.call(l,z),f(!1),x.setHasFocusInside(!0)}})),children:s,className:_,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Un(I.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0}):y.jsxs("button",{type:"button",className:_,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Un(I.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0,...F(x.getItemProps({...l,onFocus(z){var X;(X=l.onFocus)==null||X.call(l,z),f(!1),x.setHasFocusInside(!0)}})),children:[s,C&&y.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[y.jsx("span",{className:"sr-only",children:"Next menu"}),y.jsx(_f,{size:14})]})]})}),y.jsx(yd.Provider,{value:{activeIndex:h,setActiveIndex:g,getItemProps:H,setHasFocusInside:f,isOpen:u},children:y.jsx(Bj,{elementsRef:m,labelsRef:v,children:u&&y.jsx(io,{preserveTabOrder:!0,children:y.jsx(pi,{context:P,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:y.jsx(t,{...j(),ref:I.setFloating,style:{...l.style,...k},className:Ie("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-xl outline-none",a),children:e})})})})})]})}),H2=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(yd),s=jw({label:n?null:e}),l=Cr(),c=s.index===a.activeIndex;return y.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Un(s.ref,i),className:Jw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?y.jsx(t,{size:16}):null]})}),W2=E.forwardRef((e,t)=>Er()===null?y.jsx(Gj,{children:y.jsx(Av,{...e,isParent:!0,ref:t})}):y.jsx(Av,{...e,isParent:!1,ref:t})),q2=e=>y.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),fp=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=Bf,...p},f){const[h,g]=E.useState(i??!1),m=E.useRef(null),v=t||"span",x=A=>{g(A),d==null||d(A)},{refs:b,floatingStyles:S,context:w}=kr({open:h,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:ui,onOpenChange:i?void 0:x,middleware:[op(),wa(5),ip({fallbackAxisSideDirection:"start"}),Ow({padding:5,element:m})]}),T=$w(w,{move:!0,delay:{open:Qw},enabled:l?s:!1,handleClose:c?Gw():null}),C=p2(w,{enabled:l?a:!1}),k=Ta(w,{enabled:l?c:!1}),I=ao(w,{enabled:l}),P=so(w,{role:"tooltip",enabled:l}),N=c2(w,{enabled:!!l&&!!u}),{getReferenceProps:D,getFloatingProps:L}=Rr([P,I,N,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),y.jsxs(E.Fragment,{children:[y.jsx(v,{...D(p),ref:Un(b.setReference,f),children:n}),h&&y.jsx(io,{preserveTabOrder:!0,children:y.jsxs(un,{...L(),ref:b.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[y.jsx(Nw,{ref:m,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Cl=0,Pr=1,hi=2,e1=4;function Iv(e){return()=>e}function U2(e){e()}function ra(e,t){return n=>e(t(n))}function _v(e,t){return()=>e(t)}function t1(e,t){return n=>e(t,n)}function pp(e){return e!==void 0}function K2(...e){return()=>{e.map(U2)}}function gi(){}function kl(e,t){return t(e),e}function Y2(e,t){return t(e)}function dt(...e){return e}function Je(e,t){return e(Pr,t)}function De(e,t){e(Cl,t)}function mp(e){e(hi)}function Lt(e){return e(e1)}function we(e,t){return Je(e,t1(t,Cl))}function Ln(e,t){const n=e(Pr,r=>{n(),t(r)});return n}function Ov(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function n1(e,t){return e===t}function ct(e=n1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ra(t,e)}function Rn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=G2(...t);return(r,o)=>{switch(r){case hi:mp(e);return;case Pr:return Je(e,n(o))}}}function On(e,t){return n=>r=>{n(t=e(t,r))}}function Ko(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...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);Je(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 G2(...e){return t=>e.reduceRight(Y2,t)}function Z2(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Pr:return i?n===i?void 0:(r(),n=i,t=Je(e,i),t):(r(),gi);case hi:r(),n=null;return}}}function ae(e){let t=e;const n=Be();return(r,o)=>{switch(r){case Cl:t=o;break;case Pr:{o(t);break}case e1:return t}return n(r,o)}}function Vt(e,t){return kl(ae(t),n=>we(e,n))}function Be(){const e=[];return(t,n)=>{switch(t){case Cl:e.slice().forEach(r=>{r(n)});return;case hi:e.splice(0,e.length);return;case Pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function tn(e){return kl(Be(),t=>we(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:X2(),singleton:n}}const X2=()=>Symbol();function Q2(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 Pt(...e){const t=Be(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Je(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case hi:{mp(t);return}case Pr:return r===o&&a(n),Je(t,a)}}}function Pe(e,t=n1){return ne(e,ct(t))}function Mv(...e){return function(t,n){switch(t){case hi:return;case Pr:return K2(...e.map(r=>Je(r,n)))}}}var nn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nn||{});const J2={0:"debug",3:"error",1:"log",2:"warn"},eN=()=>typeof globalThis>"u"?window:globalThis,Ar=Ke(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=eN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[J2[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Vn(e,t,n){return hp(e,t,n).callbackRef}function hp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function r1(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=tN(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let h;f&&(h=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?Dv("column-gap",getComputedStyle(u).columnGap,o):Dv("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return hp(c,n,l)}function tN(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},nn.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 Dv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nn.WARN),t==="normal"?0:parseInt(t??"0",10)}function gp(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),h=c.top-f.top;p=f.height-Math.max(0,h),d=h+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=hp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.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==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ke(()=>{const e=Be(),t=Be(),n=ae(0),r=Be(),o=ae(0),i=Be(),a=Be(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Be(),p=Be(),f=ae(!1),h=ae(!1),g=ae(!1);return we(ne(e,pe(({scrollTop:m})=>m)),t),we(ne(e,pe(({scrollHeight:m})=>m)),a),we(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),oa={lvl:0};function o1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function it(e){return e===oa}function ia(e,t){if(!it(e))return t===e.k?e.v:t<e.k?ia(e.l,t):ia(e.r,t)}function Sn(e,t,n="k"){if(it(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Sn(e.l,t,n)}function en(e,t,n){return it(e)?s1(t,n,1):t===e.k?kt(e,{k:t,v:n}):t<e.k?jv(kt(e,{l:en(e.l,t,n)})):jv(kt(e,{r:en(e.r,t,n)}))}function Io(){return oa}function Rl(e,t,n){if(it(e))return[];const r=Sn(e,t)[0];return nN(bd(e,r,n))}function xd(e,t){if(it(e))return oa;const{k:n,l:r,r:o}=e;if(t===n){if(it(r))return o;if(it(o))return r;{const[i,a]=a1(r);return ss(kt(e,{k:i,l:i1(r),v:a}))}}else return t<n?ss(kt(e,{l:xd(r,t)})):ss(kt(e,{r:xd(o,t)}))}function Hr(e){return it(e)?[]:[...Hr(e.l),{k:e.k,v:e.v},...Hr(e.r)]}function bd(e,t,n){if(it(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(bd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(bd(i,t,n))),s}function ss(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(lu(t))return l1(kt(e,{lvl:n-1}));if(!it(t)&&!it(t.r))return kt(t.r,{l:kt(t,{r:t.r.l}),lvl:n,r:kt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(lu(e))return wd(kt(e,{lvl:n-1}));if(!it(r)&&!it(r.l)){const o=r.l,i=lu(o)?r.lvl-1:r.lvl;return kt(o,{l:kt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:wd(kt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function kt(e,t){return s1(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 i1(e){return it(e.r)?e.l:ss(kt(e,{r:i1(e.r)}))}function lu(e){return it(e)||e.lvl>e.r.lvl}function a1(e){return it(e.r)?[e.k,e.v]:a1(e.r)}function s1(e,t,n,r=oa,o=oa){return{k:e,l:r,lvl:n,r:o,v:t}}function jv(e){return wd(l1(e))}function l1(e){const{l:t}=e;return!it(t)&&t.lvl===e.lvl?kt(t,{r:kt(e,{l:t.r})}):e}function wd(e){const{lvl:t,r:n}=e;return!it(n)&&!it(n.r)&&n.lvl===t&&n.r.lvl===t?kt(n,{l:kt(e,{r:n.l}),lvl:t+1}):e}function nN(e){return o1(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 vp=Ke(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function u1(e,t,n){return e[Is(e,t,n)]}function Is(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 rN(e,t,n,r){const o=Is(e,t,r),i=Is(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Pl(e){return!it(e.groupOffsetTree)}function yp({index:e},t){return t===e?0:t<e?-1:1}function oN(){return{groupIndices:[],groupOffsetTree:Io(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Io()}}function iN(e,t){let n=it(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),it(e)){e=en(e,0,i);continue}const s=Rl(e,a-1,o+1);if(s.some(fN(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=xd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=en(e,o+1,p));c&&(e=en(e,a,i))}return[e,n]}function aN(e){return typeof e.groupIndex<"u"}function sN({offset:e},t){return t===e?0:t<e?-1:1}function sa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=u1(t,e,yp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function d1(e,t){if(!Pl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function f1(e,t,n){if(aN(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 lN(e,t,n,r=0){return r>0&&(t=Math.max(t,u1(e,r,yp).offset)),o1(rN(e,t,n,sN),dN)}function cN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,nn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&it(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,g)=>en(en(h,g,p),g+1,f),a)}else[a,s]=iN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Sd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>en(p,f,sa(f,d,o)),Io()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function uN(e){return Hr(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 Nv(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 Sd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Is(o,t-1,yp),s=o[l].offset;const c=Sn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Rl(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function dN(e){return{index:e.index,value:e}}function fN(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 pN={offsetHeight:"height",offsetWidth:"width"},Bn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Be(),r=Be(),o=Vt(r,0),i=Be(),a=Be(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,T)=>Tn(w,pN[T])),p=ae(void 0),f=ae(0),h=oN(),g=Vt(ne(n,Ne(l,e,f),On(cN,h),ct()),h),m=Vt(ne(l,ct(),On((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);we(ne(l,Ce(w=>w.length>0),Ne(g,f),pe(([w,T,C])=>{const k=w.reduce((I,P,N)=>en(I,P,sa(P,T.offsetTree,C)||N),Io());return{...T,groupIndices:w,groupOffsetTree:k}})),g),we(ne(r,Ne(g),Ce(([w,{lastIndex:T}])=>w<T),pe(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),we(c,u);const v=Vt(ne(c,pe(w=>w===void 0)),!0);we(ne(u,Ce(w=>w!==void 0&&it(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const x=tn(ne(n,Ne(g),On(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:h}),pe(w=>w.changed)));Je(ne(s,On((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:T}=Lt(g);if(w>0)De(t,!0),De(i,w+Nv(w,T));else if(w<0){const C=Lt(m);C.length>0&&(w-=Nv(-w,C)),De(a,w)}}),Je(ne(s,Ne(e)),([w,T])=>{w<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},nn.ERROR)});const b=tn(i);we(ne(i,Ne(g),pe(([w,T])=>{const C=T.groupIndices.length>0,k=[],I=T.lastSize;if(C){const P=ia(T.sizeTree,0);let N=0,D=0;for(;N<w;){const A=T.groupIndices[D],O=T.groupIndices.length===D+1?1/0:T.groupIndices[D+1]-A-1;k.push({endIndex:A,size:P,startIndex:A}),k.push({endIndex:A+1+O-1,size:I,startIndex:A+1}),D++,N+=O+1}const L=Hr(T.sizeTree);return N!==w&&L.shift(),L.reduce((A,{k:O,v:M})=>{let F=A.ranges;return A.prevSize!==0&&(F=[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:O+w,prevSize:M,ranges:F}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return Hr(T.sizeTree).reduce((P,{k:N,v:D})=>({prevIndex:N+w,prevSize:D,ranges:[...P.ranges,{endIndex:N+w-1,size:P.prevSize,startIndex:P.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=tn(ne(a,Ne(g,f),pe(([w,{offsetTree:T},C])=>{const k=-w;return sa(k,T,C)})));return we(ne(a,Ne(g,f),pe(([w,T,C])=>{if(T.groupIndices.length>0){if(it(T.sizeTree))return T;let k=Io();const I=Lt(m);let P=0,N=0,D=0;for(;P<-w;){D=I[N];const L=I[N+1]-D-1;N++,P+=L+1}if(k=Hr(T.sizeTree).reduce((L,{k:A,v:O})=>en(L,Math.max(0,A+w),O),k),P!==-w){const L=ia(T.sizeTree,D);k=en(k,0,L);const A=Sn(T.sizeTree,-w+1)[1];k=en(k,1,A)}return{...T,sizeTree:k,...Sd(T.offsetTree,0,k,C)}}else{const k=Hr(T.sizeTree).reduce((I,{k:P,v:N})=>en(I,Math.max(0,P+w),N),Io());return{...T,sizeTree:k,...Sd(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},dt(Ar,vp),{singleton:!0});function mN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const p1=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Be(),a=Be(),s=tn(ne(i,pe(mN)));return we(ne(s,pe(l=>l.totalCount)),n),we(ne(s,pe(l=>l.groupIndices)),e),we(ne(Pt(o,t,r),Ce(([l,c])=>Pl(c)),pe(([l,c,u])=>Sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ct(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},dt(Bn,Wt)),Ir=Ke(([{log:e}])=>{const t=ae(!1),n=tn(ne(t,Ce(r=>r),ct()));return Je(t,r=>{r&&Lt(e)("props updated",{},nn.DEBUG)}),{didMount:n,propsReady:t}},dt(Ar),{singleton:!0}),hN=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||!hN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ea=Ke(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Be(),h=Be(),g=ae(0);let m=null,v=null,x=null;function b(){m&&(m(),m=null),x&&(x(),x=null),v&&(clearTimeout(v),v=null),De(l,!1)}return we(ne(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),pe(([[S,w,T,C,k,I,P,N],D,L,A])=>{const O=m1(S),{align:M,behavior:F,offset:j}=O,H=C-1,_=f1(O,w,H);let z=sa(_,w.offsetTree,D)+I;M==="end"?(z+=L+Sn(w.sizeTree,_)[1]-T+A,_===H&&(z+=P)):M==="center"?z+=(L+Sn(w.sizeTree,_)[1]-T+A)/2:z-=k,j&&(z+=j);const X=Q=>{b(),Q?(N("retrying to scroll to",{location:S},nn.DEBUG),De(f,S)):(De(h,!0),N("list did not change, scroll successful",{},nn.DEBUG))};if(b(),F==="smooth"){let Q=!1;x=Je(t,J=>{Q=Q||J}),m=Ln(u,()=>{X(Q)})}else m=Ln(ne(t,gN(150)),X);return v=setTimeout(()=>{b()},1200),De(l,!0),N("scrolling from index to",{behavior:F,index:_,top:z},nn.DEBUG),{behavior:F,top:z}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:g}},dt(Bn,Wt,Ar),{singleton:!0});function gN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function xp(e,t){e==0?t():requestAnimationFrame(()=>{xp(e-1,t)})}function bp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ca=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return we(ne(a,Ne(l),Ce(([u,d])=>!!d),Rn(!1)),s),we(ne(a,Ne(l),Ce(([u,d])=>!!d),Rn(!1)),c),Je(ne(Pt(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,h])=>u&&(!it(p)||pp(f))&&!d&&!h),Ne(l)),([,u])=>{Ln(o,()=>{De(c,!0)}),xp(4,()=>{Ln(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},dt(Bn,Wt,Ea,Ir),{singleton:!0});function h1(e,t){return Math.abs(e-t)<1.01}const la="up",zi="down",vN="none",yN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},xN=0,ka=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=Be(),c=Be(),u=ae(4),d=ae(xN),p=Vt(ne(Mv(ne(Pe(o),Ko(1),Rn(!0)),ne(Pe(o),Ko(1),Rn(!1),Ov(100))),ct()),!1),f=Vt(ne(Mv(ne(n,Rn(!0)),ne(n,Rn(!1),Ov(200))),ct()),!1);we(ne(Pt(Pe(o),Pe(d)),pe(([x,b])=>x<=b),ct()),s),we(ne(s,fr(50)),c);const h=tn(ne(Pt(r,Pe(i),Pe(t),Pe(e),Pe(u)),On((x,[{scrollHeight:b,scrollTop:S},w,T,C,k])=>{const I=S+w-b>-k,P={scrollHeight:b,scrollTop:S,viewportHeight:w};if(I){let D,L;return S>x.state.scrollTop?(D="SCROLLED_DOWN",L=x.state.scrollTop-S):(D="SIZE_DECREASED",L=x.state.scrollTop-S||x.scrollTopDelta),{atBottom:!0,atBottomBecause:D,scrollTopDelta:L,state:P}}let N;return P.scrollHeight>x.state.scrollHeight?N="SIZE_INCREASED":w<x.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":S<x.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:P}},yN),ct((x,b)=>x&&x.atBottom===b.atBottom))),g=Vt(ne(r,On((x,{scrollHeight:b,scrollTop:S,viewportHeight:w})=>{if(h1(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const T=b-(S+w)<1;return x.scrollTop!==S&&T?{changed:!0,jump:x.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(x=>x.changed),pe(x=>x.jump)),0);we(ne(h,pe(x=>x.atBottom)),a),we(ne(a,fr(50)),l);const m=ae(zi);we(ne(r,pe(({scrollTop:x})=>x),ct(),On((x,b)=>Lt(f)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?la:zi,prevScrollTop:b},{direction:zi,prevScrollTop:0}),pe(x=>x.direction)),m),we(ne(r,fr(50),Rn(vN)),m);const v=ae(0);return we(ne(p,Ce(x=>!x),Rn(0)),v),we(ne(o,fr(100),Ne(p),Ce(([x,b])=>!!b),On(([x,b],[S])=>[b,S],[0,0]),pe(([x,b])=>b-x)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},dt(Wt)),_s="top",Os="bottom",Fv="none";function Lv(e,t,n){return typeof e=="number"?n===la&&t===_s||n===zi&&t===Os?e:0:n===la?t===_s?e.main:e.reverse:t===Os?e.main:e.reverse}function Vv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const wp=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Be(),a=ae(0),s=ae(0),l=ae(0),c=Vt(ne(Pt(Pe(r),Pe(o),Pe(n),Pe(i,aa),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),pe(([u,d,p,[f,h],g,m,v,x,b])=>{const S=u-x,w=m+v,T=Math.max(p-S,0);let C=Fv;const k=Vv(b,_s),I=Vv(b,Os);return f-=x,f+=p+v,h+=p+v,h-=x,f>u+w-k&&(C=la),h<u-T+d+I&&(C=zi),C!==Fv?[Math.max(S-p-Lv(g,_s,C)-k,0),S-T-v+d+Lv(g,Os,C)+I]:null}),Ce(u=>u!=null),ct(aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},dt(Wt),{singleton:!0});function bN(e,t,n){if(Pl(t)){const r=d1(e,t);return[{index:Sn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const cu={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ls(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,h=p-u;return{bottom:u,firstItemIndex:i,items:$v(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:$v(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function g1(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=bp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return ls(c,[],s,o,n,r)}function $v(e,t,n){if(e.length===0)return[];if(!Pl(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=Rl(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const lo=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const g=ae([]),m=ae(0),v=Be();we(i.topItemsIndexes,g);const x=Vt(ne(Pt(f,h,Pe(l,aa),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([T,C,,k,,,,,,,I])=>{const P=I&&I.length!==k;return T&&!C&&!P}),pe(([,,[T,C],k,I,P,N,D,L,A,O])=>{const M=I,{offsetTree:F,sizeTree:j}=M,H=Lt(m);if(k===0)return{...cu,totalCount:k};if(T===0&&C===0)return H===0?{...cu,totalCount:k}:g1(H,P,I,L,A,O||[]);if(it(j))return H>0?null:ls(bN(bp(P,k),M,O),[],k,A,M,L);const _=[];if(D.length>0){const G=D[0],Y=D[D.length-1];let Z=0;for(const V of Rl(j,G,Y)){const $=V.value,K=Math.max(V.start,G),ie=Math.min(V.end,Y);for(let B=K;B<=ie;B++)_.push({data:O==null?void 0:O[B],index:B,offset:Z,size:$}),Z+=$}}if(!N)return ls([],_,k,A,M,L);const z=D.length>0?D[D.length-1]+1:0,X=lN(F,T,C,z);if(X.length===0)return null;const Q=k-1,J=kl([],G=>{for(const Y of X){const Z=Y.value;let V=Z.offset,$=Y.start;const K=Z.size;if(Z.offset<T){$+=Math.floor((T-Z.offset+A)/(K+A));const B=$-Y.start;V+=B*K+B*A}$<z&&(V+=(z-$)*K,$=z);const ie=Math.min(Y.end,Q);for(let B=$;B<=ie&&!(V>=C);B++)G.push({data:O==null?void 0:O[B],index:B,offset:V,size:K}),V+=K+A}});return ls(J,_,k,A,M,L)}),Ce(T=>T!==null),ct()),cu);we(ne(e,Ce(pp),pe(T=>T==null?void 0:T.length)),o),we(ne(x,pe(T=>T.topListHeight)),d),we(d,s),we(ne(x,pe(T=>[T.top,T.bottom])),a),we(ne(x,pe(T=>T.items)),v);const b=tn(ne(x,Ce(({items:T})=>T.length>0),Ne(o,e),Ce(([{items:T},C])=>T[T.length-1].originalIndex===C-1),pe(([,T,C])=>[T-1,C]),ct(aa),pe(([T])=>T))),S=tn(ne(x,fr(200),Ce(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),pe(({items:T})=>T[0].index),ct())),w=tn(ne(x,Ce(({items:T})=>T.length>0),pe(({items:T})=>{let C=0,k=T.length-1;for(;T[C].type==="group"&&C<k;)C++;for(;T[k].type==="group"&&k>C;)k--;return{endIndex:T[k].index,startIndex:T[C].index}}),ct(c1)));return{endReached:b,initialItemCount:m,itemsRendered:v,listState:x,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},dt(Bn,p1,wp,Ca,Ea,ka,Ir,vp),{singleton:!0}),v1=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Be(),a=Vt(ne(Pt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return we(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},dt(Wt,lo),{singleton:!0}),wN=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Vt(ne(Pt(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),fr(0),ct()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(Wt,v1),{singleton:!0});function zv(e){return e?e==="smooth"?"smooth":"auto":!1}const SN=(e,t)=>typeof e=="function"?zv(e(t)):t&&zv(e),TN=Ke(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=Be();let p=null;function f(g){De(o,{align:"end",behavior:g,index:"LAST"})}Je(ne(Pt(ne(Pe(t),Ko(1)),a),Ne(Pe(u),r,i,c),pe(([[g,m],v,x,b,S])=>{let w=m&&b,T="auto";return w&&(T=SN(v,x||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:m})=>{p&&(p(),p=null),p=Ln(e,()=>{Lt(l)("following output to ",{totalCount:m},nn.DEBUG),f(g),p=null})});function h(g){const m=Ln(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},nn.DEBUG),f("auto"))});setTimeout(m,100)}return Je(ne(Pt(Pe(u),t,s),Ce(([g,,m])=>g&&m),On(({value:g},[,m])=>({refreshed:g===m,value:m}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Lt(i)&&h(g!==!1)}),Je(d,()=>{h(Lt(u)!==!1)}),Je(Pt(Pe(u),n),([g,m])=>{g&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},dt(Bn,ka,Ea,Ca,Ir,Ar,Wt)),EN=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(we(ne(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>g1(l,c,u,d,p,f))),a),{}),dt(Bn,Ca,lo,Ir),{singleton:!0}),CN=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Je(ne(e,Ne(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Ln(ne(n,Ko(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},dt(Ir,Wt,lo),{singleton:!0}),kN=({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,RN=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Be();return we(ne(u,Ne(t,l,n,i,o,r,s),Ne(e),pe(([[d,p,f,h,g,m,v,x],b])=>{const{align:S,behavior:w,calculateViewLocation:T=kN,done:C,...k}=d,I=f1(d,p,h-1),P=sa(I,p.offsetTree,b)+g+m,N=P+Sn(p.sizeTree,I)[1],D=x+m,L=x+f-v,A=T({itemBottom:N,itemTop:P,locationParams:{align:S,behavior:w,...k},viewportBottom:L,viewportTop:D});return A?C&&Ln(ne(a,Ce(O=>!O),Ko(Lt(a)?1:2)),C):C&&C(),A}),Ce(d=>d!==null)),c),{scrollIntoView:u}},dt(Bn,Wt,Ea,lo,Ar),{singleton:!0}),y1=Ke(([{scrollVelocity:e}])=>{const t=ae(!1),n=Be(),r=ae(!1);return we(ne(e,Ne(r,t,n),Ce(([o,i])=>!!i),pe(([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}),ct()),t),Je(ne(Pt(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(ka),{singleton:!0}),Sp=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Be(),r=Be(),o=Be(),i=ae(!1),a=ae(void 0);return we(ne(Pt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),we(ne(t,Ne(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},dt(Wt)),PN=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Be(),u=ae(void 0),d=ae(null),p=ae(null);return we(s,d),we(l,p),Je(ne(c,Ne(t,r,a,d,p,n)),([f,h,g,m,v,x,b])=>{const S=uN(h.sizeTree);m&&v!==null&&x!==null&&(g=v.scrollTop-x.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),we(ne(u,Ce(pp),pe(AN)),o),we(ne(i,Ne(u),Ce(([,f])=>f!==void 0),ct(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},dt(Bn,Wt,Ca,Ir,Sp));function AN(e){return{align:"start",index:0,offset:e.scrollTop}}const IN=Ke(([{topItemsIndexes:e}])=>{const t=ae(0);return we(ne(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},dt(lo));function x1(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const _N=x1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ON=Ke(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const g=tn(ne(l,Ne(a),On(([,v,x,b],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const I=S+T;let P=0;return x===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(P=I-b,P!==0&&(P+=k))),[P,w,C,I]},[0,[],0,0]),Ce(([v])=>v!==0),Ne(r,s,n,o,f,h),Ce(([,v,x,b,,,S])=>!S&&!b&&v!==0&&x===la),pe(([[v],,,,,x])=>(x("Upward scrolling compensation",{amount:v},nn.DEBUG),v))));function m(v){v>0?(De(t,{behavior:"auto",top:-v}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-v}))}return Je(ne(g,Ne(e,i)),([v,x,b])=>{b&&_N()?De(e,x-v):m(-v)}),Je(ne(Pt(Vt(i,!1),e,h),Ce(([v,x,b])=>!v&&!b&&x!==0),pe(([v,x])=>x),fr(1)),m),we(ne(d,pe(v=>({top:-v}))),t),Je(ne(c,Ne(p,u),pe(([v,{groupIndices:x,lastSize:b,sizeTree:S},w])=>{function T(C){return C*(b+w)}if(x.length===0)return T(v);{let C=0;const k=ia(S,0);let I=0,P=0;for(;I<v;){I++,C+=k;let N=x.length===P+1?1/0:x[P+1]-x[P]-1;I+N>v&&(C-=k,N=v-I+1),I+=N,C+=T(N),P++}return C}})),v=>{De(e,v),requestAnimationFrame(()=>{De(t,{top:v}),requestAnimationFrame(()=>{De(e,0),De(h,!1)})})}),{deviation:e}},dt(Wt,ka,lo,Bn,Ar,vp)),MN=Ke(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),dt(wp,EN,Ir,y1,v1,CN,wN,Sp,RN,Ar)),b1=Ke(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},g,m,v,{listState:x,topItemsIndexes:b,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},I])=>(we(S.rangeChanged,I.scrollSeekRangeChanged),we(ne(I.windowViewportRect,pe(P=>P.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...v,groupIndices:i,itemSize:a,listState:x,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...m}),dt(Bn,Ca,Wt,PN,TN,lo,Ea,ON,IN,p1,MN));function DN(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 Ka=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Tp(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=E.createContext({});function l(m,v){m.propsReady&&De(m.propsReady,!1);for(const x of r){const b=m[t.required[x]];De(b,v[x])}for(const x of o)if(x in v){const b=m[t.optional[x]];De(b,v[x])}m.propsReady&&De(m.propsReady,!0)}function c(m){return i.reduce((v,x)=>(v[x]=b=>{const S=m[t.methods[x]];De(S,b)},v),{})}function u(m){return a.reduce((v,x)=>(v[x]=Z2(m[t.events[x]]),v),{})}const d=E.forwardRef((m,v)=>{const{children:x,...b}=m,[S]=E.useState(()=>kl(Q2(e),C=>{l(C,b)})),[w]=E.useState(_v(u,S));Ka(()=>{for(const C of a)C in b&&Je(w[C],b[C]);return()=>{Object.values(w).map(mp)}},[b,w,S]),Ka(()=>{l(S,b)}),E.useImperativeHandle(v,Iv(c(S)));const T=n;return y.jsx(s.Provider,{value:S,children:n?y.jsx(T,{...DN([...r,...o,...a],b),children:x}):x})}),p=m=>E.useCallback(t1(De,E.useContext(s)[m]),[m]),f=m=>{const v=E.useContext(s)[m],x=E.useCallback(b=>Je(v,b),[v]);return E.useSyncExternalStore(x,()=>Lt(v),()=>Lt(v))},h=m=>{const v=E.useContext(s)[m],[x,b]=E.useState(_v(Lt,v));return Ka(()=>Je(v,S=>{S!==x&&b(Iv(S))}),[v,x]),x},g=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,v)=>{const x=E.useContext(s)[m];Ka(()=>Je(x,v),[v,x])},useEmitterValue:g,usePublisher:p}}const Al=E.createContext(void 0),w1=E.createContext(void 0),S1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function uu(e){return"self"in e}function jN(e){return"body"in e}function T1(e,t,n,r=gi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,g;const m=p.target;if(jN(m)||uu(m)){const x=uu(m)?m:m.defaultView;g=i?x.scrollX:x.scrollY,f=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,h=i?x.innerWidth:x.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:h})};p.suppressFlushSync?v():pa.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-h)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const h=p.behavior==="smooth";let g,m,v;uu(f)?(m=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],g=Tn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const x=m-g;if(p.top=Math.ceil(Math.max(Math.min(x,p.top),0)),h1(g,m)||p.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:g}),h&&t(!0);return}h?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const du="-webkit-sticky",Bv="sticky",E1=x1(()=>{if(typeof document>"u")return Bv;const e=document.createElement("div");return e.style.position=du,e.style.position===du?du:Bv});function Ep(e){return e}const NN=Ke(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),r=ae({}),o=ae(Ep),i=ae("div"),a=ae(gi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),ct()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),FN=Ke(([e,t])=>({...e,...t}),dt(b1,NN)),LN=({height:e})=>y.jsx("div",{style:{height:e}}),VN={overflowAnchor:"none",position:E1(),zIndex:1},C1={overflowAnchor:"none"},$N={...C1,display:"inline-block",height:"100%"},Hv=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=ln("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=ln("windowScrollContainerState"),a=ln("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),h=ln("gap"),g=Ae("horizontalDirection"),{callbackRef:m}=r1(n,p,d,e?gi:s,f,h,o,g,Ae("skipAnimationFrameInResizeObserver")),[v,x]=E.useState(0);Rp("deviation",A=>{v!==A&&x(A)});const b=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||LN,w=Ae("ListComponent"),T=Ae("ItemComponent"),C=Ae("GroupComponent"),k=Ae("computeItemKey"),I=Ae("isSeeking"),P=Ae("groupIndices").length>0,N=Ae("alignToBottom"),D=Ae("initialItemFinalLocationReached"),L=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:N?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:N?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...D?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?y.jsx(b,{...ut(b,c)}):y.jsx(w,{...ut(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:L,children:(e?t.topItems:t.items).map(A=>{const O=A.originalIndex,M=k(O+t.firstItemIndex,A.data,c);return I?E.createElement(S,{...ut(S,c),height:A.size,index:A.index,key:M,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?E.createElement(C,{...ut(C,c),"data-index":O,"data-item-index":A.index,"data-known-size":A.size,key:M,style:VN},u(A.index,c)):E.createElement(T,{...ut(T,c),...k1(T,A.data),"data-index":O,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:M,style:g?$N:C1},P?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),zN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},BN={outline:"none",overflowX:"auto",position:"relative"},vi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),HN={position:E1(),top:0,width:"100%",zIndex:1};function ut(e,t){if(typeof e!="string")return{context:t}}function k1(e,t){return{item:typeof e=="string"?void 0:t}}const WN=E.memo(function(){const e=Ae("HeaderComponent"),t=ln("headerHeight"),n=Ae("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null}),qN=E.memo(function(){const e=Ae("FooterComponent"),t=ln("footerHeight"),n=Ae("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null});function Cp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:h}=T1(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),y.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?BN:zN,...o},tabIndex:0,...i,...ut(s,u),children:r})})}function kp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),h=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:v}=T1(a,l,s,h,d);return S1(()=>{var x;return m.current=d||((x=f.current)==null?void 0:x.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",v),e("scrollBy",g),y.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...ut(s,p),children:r})})}const UN=({children:e})=>{const t=E.useContext(Al),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>ra(n,l=>Tn(l,i?"width":"height")),[n,i]),s=Vn(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:s,style:vi(o),children:e})},KN=({children:e})=>{const t=E.useContext(Al),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Ae("customScrollParent"),i=gp(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:vi(a),children:e})},YN=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...HN,marginTop:`${n}px`},o=Ae("context");return y.jsx(t,{style:r,...ut(t,o),children:e})},GN=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?QN:XN,a=r||t?KN:UN;return y.jsxs(i,{...e,...ut(i,o),children:[n&&y.jsx(YN,{children:y.jsx(Hv,{showTopList:!0})}),y.jsxs(a,{children:[y.jsx(WN,{}),y.jsx(Hv,{}),y.jsx(qN,{})]})]})}),{Component:ZN,useEmitter:Rp,useEmitterValue:Ae,usePublisher:ln}=Tp(FN,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},GN),XN=Cp({useEmitter:Rp,useEmitterValue:Ae,usePublisher:ln}),QN=kp({useEmitter:Rp,useEmitterValue:Ae,usePublisher:ln}),Pp=ZN,JN=Ke(()=>{const e=ae(l=>y.jsxs("td",{children:["Item $",l]})),t=ae(null),n=ae(null),r=ae(null),o=ae({}),i=ae(Ep),a=ae(gi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),ct()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),eF=Ke(([e,t])=>({...e,...t}),dt(b1,JN)),tF=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{height:e}})}),nF=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{border:0,height:e,padding:0}})}),rF={overflowAnchor:"none"},Wv=E.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("isSeeking"),i=je("ScrollSeekPlaceholder")||tF,a=je("context"),s=je("TableRowComponent"),l=je("fixedHeaderHeight"),c=je("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...ut(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...ut(s,a),...k1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:rF},c(p.index,p.data,a))});return y.jsx(y.Fragment,{children:d})}),oF=E.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=bn("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=bn("windowScrollContainerState"),a=bn("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:p}=r1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);Ap("deviation",P=>{f!==P&&(p.current.style.marginTop=`${P}px`,h(P))});const g=je("EmptyPlaceholder"),m=je("FillerRow")||nF,v=je("TableBodyComponent"),x=je("paddingTopAddition"),b=je("statefulTotalCount"),S=je("context");if(b===0&&g)return y.jsx(g,{...ut(g,S)});const w=(t?e.topItems:[]).reduce((P,N)=>P+N.size,0),T=e.offsetTop+x+f-w,C=e.offsetBottom,k=T>0?y.jsx(m,{context:S,height:T},"padding-top"):null,I=C>0?y.jsx(m,{context:S,height:C},"padding-bottom"):null;return y.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...ut(v,S),children:[k,t&&y.jsx(Wv,{showTopList:!0}),y.jsx(Wv,{}),I]})}),iF=({children:e})=>{const t=E.useContext(Al),n=bn("viewportHeight"),r=bn("fixedItemHeight"),o=Vn(E.useMemo(()=>ra(n,i=>Tn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:o,style:vi(!1),children:e})},aF=({children:e})=>{const t=E.useContext(Al),n=bn("windowViewportRect"),r=bn("fixedItemHeight"),o=je("customScrollParent"),i=gp(n,o,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:vi(!1),children:e})},sF=E.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=bn("fixedHeaderHeight"),o=bn("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Vn(E.useMemo(()=>ra(r,v=>Tn(v,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Vn(E.useMemo(()=>ra(o,v=>Tn(v,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?uF:cF,d=n||t?aF:iF,p=je("TableComponent"),f=je("TableHeadComponent"),h=je("TableFooterComponent"),g=i?y.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ut(f,s),children:i()},"TableHead"):null,m=a?y.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ut(h,s),children:a()},"TableFoot"):null;return y.jsx(u,{...e,...ut(u,s),children:y.jsx(d,{children:y.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ut(p,s),children:[g,y.jsx(oF,{},"TableBody"),m]})})})}),{Component:lF,useEmitter:Ap,useEmitterValue:je,usePublisher:bn}=Tp(eF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},sF),cF=Cp({useEmitter:Ap,useEmitterValue:je,usePublisher:bn}),uF=kp({useEmitter:Ap,useEmitterValue:je,usePublisher:bn}),dF=lF,qv={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},fF={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Uv,floor:Ms,max:Bi,min:fu,round:Kv}=Math;function Yv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function pF(e){return{...fF,items:e}}function Ya(e,t){return e&&e.width===t.width&&e.height===t.height}function mF(e,t){return e&&e.column===t.column&&e.row===t.row}const hF=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S},w])=>{const T=ae(0),C=ae(0),k=ae(qv),I=ae({height:0,width:0}),P=ae({height:0,width:0}),N=Be(),D=Be(),L=ae(0),A=ae(null),O=ae({column:0,row:0}),M=Be(),F=Be(),j=ae(!1),H=ae(0),_=ae(!0),z=ae(!1),X=ae(!1);Je(ne(h,Ne(H),Ce(([V,$])=>!!$)),()=>{De(_,!1)}),Je(ne(Pt(h,_,P,I,H,z),Ce(([V,$,K,ie,,B])=>V&&!$&&K.height!==0&&ie.height!==0&&!B)),([,,,,V])=>{De(z,!0),xp(1,()=>{De(N,V)}),Ln(ne(c),()=>{De(t,[0,0]),De(_,!0)})}),we(ne(F,Ce(V=>V!=null&&V.scrollTop>0),Rn(0)),C),Je(ne(h,Ne(F),Ce(([,V])=>V!=null)),([,V])=>{V&&(De(I,V.viewport),De(P,V.item),De(O,V.gap),V.scrollTop>0&&(De(j,!0),Ln(ne(c,Ko(1)),$=>{De(j,!1)}),De(l,{top:V.scrollTop})))}),we(ne(I,pe(({height:V})=>V)),d),we(ne(Pt(Pe(I,Ya),Pe(P,Ya),Pe(O,(V,$)=>V&&V.column===$.column&&V.row===$.row),Pe(c)),pe(([V,$,K,ie])=>({gap:K,item:$,scrollTop:ie,viewport:V}))),M),we(ne(Pt(Pe(T),r,Pe(O,mF),Pe(P,Ya),Pe(I,Ya),Pe(A),Pe(C),Pe(j),Pe(_),Pe(H)),Ce(([,,,,,,,V])=>!V),pe(([V,[$,K],ie,B,ye,Te,Re,,$e,se])=>{const{column:xe,row:le}=ie,{height:be,width:oe}=B,{width:ue}=ye;if(Re===0&&(V===0||ue===0))return qv;if(oe===0){const pn=bp(se,V),En=pn+Math.max(Re-1,0);return pF(Yv(pn,En,Te))}const ee=R1(ue,oe,xe);let q,te;$e?$===0&&K===0&&Re>0?(q=0,te=Re-1):(q=ee*Ms(($+le)/(be+le)),te=ee*Uv((K+le)/(be+le))-1,te=fu(V-1,Bi(te,ee-1)),q=fu(te,Bi(0,q))):(q=0,te=-1);const me=Yv(q,te,Te),{bottom:Oe,top:He}=Gv(ye,ie,B,me),Ye=Uv(V/ee),Ot=Ye*be+(Ye-1)*le-Oe;return{bottom:Oe,itemHeight:be,items:me,itemWidth:oe,offsetBottom:Ot,offsetTop:He,top:He}})),k),we(ne(A,Ce(V=>V!==null),pe(V=>V.length)),T),we(ne(Pt(I,P,k,O),Ce(([V,$,{items:K}])=>K.length>0&&$.height!==0&&V.height!==0),pe(([V,$,{items:K},ie])=>{const{bottom:B,top:ye}=Gv(V,ie,$,K);return[ye,B]}),ct(aa)),t);const Q=ae(!1);we(ne(c,Ne(Q),pe(([V,$])=>$||V!==0)),Q);const J=tn(ne(Pt(k,T),Ce(([{items:V}])=>V.length>0),Ne(Q),Ce(([[V,$],K])=>{const ie=V.items[V.items.length-1].index===$-1;return(K||V.bottom>0&&V.itemHeight>0&&V.offsetBottom===0&&V.items.length===$)&&ie}),pe(([[,V]])=>V-1),ct())),G=tn(ne(Pe(k),Ce(({items:V})=>V.length>0&&V[0].index===0),Rn(0),ct())),Y=tn(ne(Pe(k),Ne(j),Ce(([{items:V},$])=>V.length>0&&!$),pe(([{items:V}])=>({endIndex:V[V.length-1].index,startIndex:V[0].index})),ct(c1),fr(0)));we(Y,f.scrollSeekRangeChanged),we(ne(N,Ne(I,P,T,O),pe(([V,$,K,ie,B])=>{const ye=m1(V),{align:Te,behavior:Re,offset:$e}=ye;let se=ye.index;se==="LAST"&&(se=ie-1),se=Bi(0,se,fu(ie-1,se));let xe=Td($,B,K,se);return Te==="end"?xe=Kv(xe-$.height+K.height):Te==="center"&&(xe=Kv(xe-$.height/2+K.height/2)),$e&&(xe+=$e),{behavior:Re,top:xe}})),l);const Z=Vt(ne(k,pe(V=>V.offsetBottom+V.bottom)),0);return we(ne(S,pe(V=>({height:V.visibleHeight,width:V.visibleWidth}))),I),{customScrollParent:m,data:A,deviation:L,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:P,overscan:n,restoreStateFrom:F,scrollBy:a,scrollContainerState:s,scrollHeight:D,scrollTo:l,scrollToIndex:N,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:X,initialTopMostItemIndex:H,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:M,stateRestoreInProgress:j,...w}},dt(wp,Wt,ka,y1,Ir,Sp,Ar));function R1(e,t,n){return Bi(1,Ms((e+n)/(Ms(t)+n)))}function Gv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Td(e,t,n,r[0].index);return{bottom:Td(e,t,n,r[r.length-1].index)+o,top:i}}function Td(e,t,n,r){const o=R1(e.width,n.width,t.column),i=Ms(r/o),a=i*n.height+Bi(0,i-1)*t.row;return a>0?a+t.row:a}const gF=Ke(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(Ep),a=ae("div"),s=ae(gi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),ct()),p),c=ae(!1),u=ae(!1);return we(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),vF=Ke(([e,t])=>({...e,...t}),dt(hF,gF)),yF=E.memo(function(){const e=ft("gridState"),t=ft("listClassName"),n=ft("itemClassName"),r=ft("itemContent"),o=ft("computeItemKey"),i=ft("isSeeking"),a=cn("scrollHeight"),s=ft("ItemComponent"),l=ft("ListComponent"),c=ft("ScrollSeekPlaceholder"),u=ft("context"),d=cn("itemDimensions"),p=cn("gap"),f=ft("log"),h=ft("stateRestoreInProgress"),g=cn("reportReadyState"),m=Vn(E.useMemo(()=>v=>{const x=v.parentElement.parentElement.scrollHeight;a(x);const b=v.firstChild;if(b){const{height:S,width:w}=b.getBoundingClientRect();d({height:S,width:w})}p({column:Zv("column-gap",getComputedStyle(v).columnGap,f),row:Zv("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return S1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),h?null:y.jsx(l,{className:t,ref:m,...ut(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const x=o(v.index,v.data,u);return i?y.jsx(c,{...ut(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},x):E.createElement(s,{...ut(s,u),className:n,"data-index":v.index,key:x},r(v.index,v.data,u))})})}),xF=E.memo(function(){const e=ft("HeaderComponent"),t=cn("headerHeight"),n=ft("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=ft("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null}),bF=E.memo(function(){const e=ft("FooterComponent"),t=cn("footerHeight"),n=ft("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=ft("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...ut(e,o)})}):null}),wF=({children:e})=>{const t=E.useContext(w1),n=cn("itemDimensions"),r=cn("viewportDimensions"),o=Vn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),y.jsx("div",{ref:o,style:vi(!1),children:e})},SF=({children:e})=>{const t=E.useContext(w1),n=cn("windowViewportRect"),r=cn("itemDimensions"),o=ft("customScrollParent"),i=gp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),y.jsx("div",{ref:i,style:vi(!1),children:e})},TF=E.memo(function({...e}){const t=ft("useWindowScroll"),n=ft("customScrollParent"),r=n||t?CF:EF,o=n||t?SF:wF,i=ft("context");return y.jsx(r,{...e,...ut(r,i),children:y.jsxs(o,{children:[y.jsx(xF,{}),y.jsx(yF,{}),y.jsx(bF,{})]})})}),{useEmitter:P1,useEmitterValue:ft,usePublisher:cn}=Tp(vF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},TF),EF=Cp({useEmitter:P1,useEmitterValue:ft,usePublisher:cn}),CF=kp({useEmitter:P1,useEmitterValue:ft,usePublisher:cn});function Zv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,nn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Ip=()=>{const e=E.useContext(ai);return e?e.tweaks:gl},A1=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>y.jsxs("span",{className:Ie("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:y.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?y.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?y.jsx(fp,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:y.jsx("span",{className:"cursor-help",children:y.jsx(u0,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:y.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?y.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[y.jsx(l0,{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}),y.jsx(WA,{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]}),Ra=E.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:p="",name:f,title:h,componentName:g,placeholder:m,hideLeft:v=!1,required:x,disabled:b,reportStatus:S},w)=>{const T=Ip(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,I=Ct(),P=e??I.inputOptionalLabel;return y.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:Ie("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[y.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:[y.jsx(A1,{info:s,hideLeft:v,reportStatus:C,title:h,placeholder:m,children:P||n?y.jsxs(E.Fragment,{children:[x?null:y.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:P}),n?y.jsx(E.Fragment,{children:n}):null]}):null}),y.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 ${p}`,children:[t?y.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?y.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),y.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}),y.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})]})}),kF=e=>y.jsx(E.Fragment,{children:e.children}),RF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},PF=[],AF=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(wr,{children:t.children})})}),IF=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),_F={List:AF,Item:IF},yo=40,OF=E.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:p=!1,required:f=!1,dynamicOption:h=!1,...g},m)=>{const v=E.useRef(null),x=E.useRef(null),b=E.useRef(null),S=g.value??g.defaultValue??"",w=Ct(),[T,C]=E.useState(()=>Math.min(320,yo*o.length)),[k,I]=E.useState(!1),[P,N]=E.useState(""),[D,L]=E.useState(S),[A,O]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===S))==null?void 0:oe.label)??S}),[M,F]=E.useState(null),j=E.useRef(PF),H=up(k,"block-only"),_=h&&P!==""?[{value:P,label:P,"data-dynamic":"true"},...o]:o,z=P?lp(_,"value",[{key:"value",value:P},{key:"label",value:P}]):_,X=()=>{I(!1),C(0)},Q=z.filter(oe=>oe.hidden!==!0),J=h?void 0:`^(${o.map(oe=>`${id(oe.value)}${oe.label?"|"+id(oe.label):""}`).join("|")})$`,{x:G,y:Y,strategy:Z,refs:V,context:$}=kr({open:k,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:ui,middleware:[wa(4),_w({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),ee=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=qi(V.reference.current,window.innerHeight),te=Math.min(ee<yo?q:ee,q,oe.availableHeight),me=Q.length===0?yo:Math.min(te,q,ee),Oe=`${x.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Oe,maxWidth:Oe,height:me})}})]}),K=Yw($,RF),{getReferenceProps:ie,getFloatingProps:B,getItemProps:ye}=Rr([so($,{role:"listbox"}),ao($),El($,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);L((oe==null?void 0:oe.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!k)return C(0);const oe=V.reference;if(oe.current===null)return;const ue=qi(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,Q.length*yo)),100)},[P,k,V.reference,Q.length]),E.useEffect(()=>{const oe=V.reference.current;if(oe)return ma(oe)},[]);const Te=(oe,ue)=>{L(oe.value);const ee=V.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",oe.value),ee.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),O(oe.label??""),X(),N(""),F(ue)},Re=oe=>{var ee;const ue=oe.target.value;return N(ue),!k&&ue===""?I(!0):(oe.target.name=g.name||"",ue?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,oe))},$e=()=>{var oe;I(!0),N(""),(oe=V.reference.current)==null||oe.focus()},se=()=>{F(oe=>oe===null?0:oe),I(!0),N("")},xe=()=>{var oe;(oe=V.reference.current)==null||oe.setAttribute("data-value",""),N(""),L(""),O(""),px(V.reference.current),X()},le=g.id||g.name,be=Q.length===0;return y.jsxs(Ra,{...g,left:e,error:t,ref:x,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:$e,children:[y.jsx(If,{size:20}),y.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),D?y.jsx("button",{type:"button",onClick:xe,className:"p-2 transition-colors link:text-danger md:p-1",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsx("input",{"data-shadow":"true",...ie({...g,onChange:Re,onFocus:se,pattern:J,ref:V.setReference,name:`${le}-shadow`,id:`${le}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,ee;if(oe.key==="Escape")return oe.currentTarget.blur(),X();if(k){if(oe.key==="ArrowDown"){let q=Ve.number(M)?M+1:0;return q>Q.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),F(q)}if(oe.key==="ArrowUp"){let q=Ve.number(M)?M-1:Q.length-1;return q<0&&(q=Q.length-1),(ee=b.current)==null||ee.scrollIntoView({index:q}),F(q)}if(oe.key==="Enter"){if(M!==null&&Q[M])return oe.preventDefault(),Te(Q[M],M);if(Q.length===1)return oe.preventDefault(),Te(Q[0],0)}}}}),"data-value":D,"data-error":!!t,"data-name":le,"data-target":le,required:f,value:k?P:A||D,"aria-autocomplete":"list",autoComplete:"off",className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),y.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:m,required:f,defaultValue:g.value||D||void 0}),y.jsx(io,{preserveTabOrder:!0,children:k?y.jsx(pi,{modal:!0,guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs(pt.div,{...B({ref:Un(H,V.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:be?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const ue=V.floating.current.querySelectorAll("li").item(0),ee=(ue?ue.getBoundingClientRect().height:yo)*Q.length;return pa.flushSync(()=>C(ee+2))},children:[be?y.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,y.jsx(Pp,{overscan:40,ref:b,hidden:be,data:Q,style:{height:T},defaultItemHeight:yo,components:_F,scrollerRef:oe=>void(v.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const ee=ue.Render??kF,q=D===ue.value||D===ue.label,te=M===oe,me=ue.label??ue.value;return y.jsx("button",{"data-value":ue.value,...ye({ref:Oe=>void(j.current[oe]=Oe),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Te(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${te?"bg-floating-hover text-floating-foreground":""}`}),children:y.jsx(ee,{...g,label:ue.label,value:ue.value,children:me})})}})]})}):null})]})}),_p=E.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 y.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ie("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[y.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ie("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,y.jsx("span",{"data-name":"checkbox-label",className:Ie("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),I1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:h="text",labelClassName:g,feedback:m=null,hideLeft:v=!1,loading:x,...b},S)=>{const w=e,T=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=ma(C.current),P=r==null?void 0:r(k),N=D=>{const L=D;if(L.key==="Enter"&&k.enterKeyHint==="next"){const A=k.getAttribute("data-next");if(A){const O=document.getElementById(A);if(O)return O.focus(),void L.preventDefault()}}};return k.addEventListener("keydown",N),()=>{P==null||P(),I(),k.removeEventListener("keydown",N)}},[]),y.jsx(Ra,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:m,hideLeft:v,title:b.title,container:Ie(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:y.jsx(w,{...n,...b,id:T,name:T,type:h,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Un(S,C),className:Ie("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)})})}),Pa=I1(_0,"input",{type:"text"}),Xv=new Date(1970,11,31),pu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Qv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},MF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},mu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},DF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=$f(t),l=E.useId(),c=Ct(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),g=mu(u,Xv).flatMap(C=>Ve.keyof(pu,C.type)?pu[C.type](C.value):[]),m=mu(u,Xv).reduce((C,k)=>C+(Ve.keyof(Qv,k.type)?Qv[k.type](k.value):""),""),[v,x]=E.useState(d?mu(u,d).reduce((C,k)=>C+(Ve.keyof(pu,k.type)?MF[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(x(k),g.length===k.length&&g.every((P,N)=>{const D=k.charAt(N);return typeof P=="string"?D===P:P.test(D)})){const P=Vo(AO(k,m,new Date));return p(P),r==null?void 0:r(P)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),x(C?A_(C,m):"")),w=Mf(d),T=w?d.toISOString():void 0;return y.jsx(Pa,{...i,mask:g,value:v,id:void 0,name:void 0,"data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??m,right:y.jsxs(E.Fragment,{children:[y.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),y.jsx(mi,{open:f,onChange:h,trigger:y.jsxs("span",{"aria-labelledby":l,children:[y.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),y.jsx(FA,{})]}),buttonProps:{"aria-describedby":l},children:y.jsx(z0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),jF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],NF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],FF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],LF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Jv=(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};function VF(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?LF:FF:t.binary?NF:jF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Jv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Jv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Ga={exports:{}},Za={exports:{}},Ge={};/** @license React v16.13.1
218
218
  * react-is.production.min.js
219
219
  *
220
220
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -228,15 +228,15 @@
228
228
  *
229
229
  * This source code is licensed under the MIT license found in the
230
230
  * LICENSE file in the root directory of this source tree.
231
- */var ty;function zF(){return ty||(ty=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=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===p||typeof H=="object"&&H!==null&&(H.$$typeof===h||H.$$typeof===f||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===m||H.$$typeof===v||H.$$typeof===x||H.$$typeof===g)}function S(H){if(typeof H=="object"&&H!==null){var ye=H.$$typeof;switch(ye){case t:var Te=H.type;switch(Te){case l:case c:case r:case i:case o:case d:return Te;default:var Re=Te&&Te.$$typeof;switch(Re){case s:case u:case h:case f:case a:return Re;default:return ye}}case n:return ye}}}var w=l,T=c,C=s,k=a,I=t,A=u,j=r,D=h,F=f,P=n,O=i,_=o,V=d,N=!1;function $(H){return N||(N=!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.")),M(H)||S(H)===l}function M(H){return S(H)===c}function B(H){return S(H)===s}function X(H){return S(H)===a}function Q(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function J(H){return S(H)===u}function G(H){return S(H)===r}function Y(H){return S(H)===h}function Z(H){return S(H)===f}function L(H){return S(H)===n}function z(H){return S(H)===i}function K(H){return S(H)===o}function ie(H){return S(H)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=T,Ze.ContextConsumer=C,Ze.ContextProvider=k,Ze.Element=I,Ze.ForwardRef=A,Ze.Fragment=j,Ze.Lazy=D,Ze.Memo=F,Ze.Portal=P,Ze.Profiler=O,Ze.StrictMode=_,Ze.Suspense=V,Ze.isAsyncMode=$,Ze.isConcurrentMode=M,Ze.isContextConsumer=B,Ze.isContextProvider=X,Ze.isElement=Q,Ze.isForwardRef=J,Ze.isFragment=G,Ze.isLazy=Y,Ze.isMemo=Z,Ze.isPortal=L,Ze.isProfiler=z,Ze.isStrictMode=K,Ze.isSuspense=ie,Ze.isValidElementType=b,Ze.typeOf=S}()),Ze}var ny;function _1(){return ny||(ny=1,process.env.NODE_ENV==="production"?Za.exports=$F():Za.exports=zF()),Za.exports}/*
231
+ */var ty;function zF(){return ty||(ty=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=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===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===m||B.$$typeof===v||B.$$typeof===x||B.$$typeof===g)}function S(B){if(typeof B=="object"&&B!==null){var ye=B.$$typeof;switch(ye){case t:var Te=B.type;switch(Te){case l:case c:case r:case i:case o:case d:return Te;default:var Re=Te&&Te.$$typeof;switch(Re){case s:case u:case h:case f:case a:return Re;default:return ye}}case n:return ye}}}var w=l,T=c,C=s,k=a,I=t,P=u,N=r,D=h,L=f,A=n,O=i,M=o,F=d,j=!1;function H(B){return j||(j=!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.")),_(B)||S(B)===l}function _(B){return S(B)===c}function z(B){return S(B)===s}function X(B){return S(B)===a}function Q(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return S(B)===u}function G(B){return S(B)===r}function Y(B){return S(B)===h}function Z(B){return S(B)===f}function V(B){return S(B)===n}function $(B){return S(B)===i}function K(B){return S(B)===o}function ie(B){return S(B)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=T,Ze.ContextConsumer=C,Ze.ContextProvider=k,Ze.Element=I,Ze.ForwardRef=P,Ze.Fragment=N,Ze.Lazy=D,Ze.Memo=L,Ze.Portal=A,Ze.Profiler=O,Ze.StrictMode=M,Ze.Suspense=F,Ze.isAsyncMode=H,Ze.isConcurrentMode=_,Ze.isContextConsumer=z,Ze.isContextProvider=X,Ze.isElement=Q,Ze.isForwardRef=J,Ze.isFragment=G,Ze.isLazy=Y,Ze.isMemo=Z,Ze.isPortal=V,Ze.isProfiler=$,Ze.isStrictMode=K,Ze.isSuspense=ie,Ze.isValidElementType=b,Ze.typeOf=S}()),Ze}var ny;function _1(){return ny||(ny=1,process.env.NODE_ENV==="production"?Za.exports=$F():Za.exports=zF()),Za.exports}/*
232
232
  object-assign
233
233
  (c) Sindre Sorhus
234
234
  @license MIT
235
- */var hu,ry;function BF(){if(ry)return hu;ry=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 hu=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 p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},hu}var gu,oy;function Op(){if(oy)return gu;oy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gu=e,gu}var vu,iy;function O1(){return iy||(iy=1,vu=Function.call.bind(Object.prototype.hasOwnProperty)),vu}var yu,ay;function HF(){if(ay)return yu;ay=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Op(),n={},r=O1();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 p=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 p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},yu=o,yu}var xu,sy;function WF(){if(sy)return xu;sy=1;var e=_1(),t=BF(),n=Op(),r=O1(),o=HF(),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 xu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var B=M&&(c&&M[c]||M[u]);if(typeof B=="function")return B}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:x(),arrayOf:b,element:S(),elementType:w(),instanceOf:T,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:D,exact:F};function h(M,B){return M===B?M!==0||1/M===1/B:M!==M&&B!==B}function g(M,B){this.message=M,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function m(M){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q(G,Y,Z,L,z,K,ie){if(L=L||p,K=K||Z,ie!==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 ye=L+":"+Z;!B[ye]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+L+"`. 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[ye]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M(Y,Z,L,z,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function v(M){function B(X,Q,J,G,Y,Z){var L=X[Q],z=_(L);if(z!==M){var K=V(L);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return m(B)}function x(){return m(a)}function b(M){function B(X,Q,J,G,Y){if(typeof M!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var L=_(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+L+"` supplied to `"+J+"`, expected an array."))}for(var z=0;z<Z.length;z++){var K=M(Z,z,J,G,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return m(B)}function S(){function M(B,X,Q,J,G){var Y=B[X];if(!s(Y)){var Z=_(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return m(M)}function w(){function M(B,X,Q,J,G){var Y=B[X];if(!e.isValidElementType(Y)){var Z=_(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return m(M)}function T(M){function B(X,Q,J,G,Y){if(!(X[Q]instanceof M)){var Z=M.name||p,L=$(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+L+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return m(B)}function C(M){if(!Array.isArray(M))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(X,Q,J,G,Y){for(var Z=X[Q],L=0;L<M.length;L++)if(h(Z,M[L]))return null;var z=JSON.stringify(M,function(ie,H){var ye=V(H);return ye==="symbol"?String(H):H});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+z+"."))}return m(B)}function k(M){function B(X,Q,J,G,Y){if(typeof M!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],L=_(Z);if(L!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+L+"` supplied to `"+J+"`, expected an object."));for(var z in Z)if(r(Z,z)){var K=M(Z,z,J,G,Y+"."+z,n);if(K instanceof Error)return K}return null}return m(B)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<M.length;B++){var X=M[B];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+N(X)+" at index "+B+"."),a}function Q(J,G,Y,Z,L){for(var z=[],K=0;K<M.length;K++){var ie=M[K],H=ie(J,G,Y,Z,L,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&z.push(H.data.expectedType)}var ye=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+Z+" `"+L+"` supplied to "+("`"+Y+"`"+ye+"."))}return m(Q)}function A(){function M(B,X,Q,J,G){return P(B[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return m(M)}function j(M,B,X,Q,J){return new g((M||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function D(M){function B(X,Q,J,G,Y){var Z=X[Q],L=_(Z);if(L!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+L+"` "+("supplied to `"+J+"`, expected `object`."));for(var z in M){var K=M[z];if(typeof K!="function")return j(J,G,Y,z,V(K));var ie=K(Z,z,J,G,Y+"."+z,n);if(ie)return ie}return null}return m(B)}function F(M){function B(X,Q,J,G,Y){var Z=X[Q],L=_(Z);if(L!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+L+"` "+("supplied to `"+J+"`, expected `object`."));var z=t({},X[Q],M);for(var K in z){var ie=M[K];if(r(M,K)&&typeof ie!="function")return j(J,G,Y,K,V(ie));if(!ie)return new g("Invalid "+G+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
236
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ie(Z,K,J,G,Y+"."+K,n);if(H)return H}return null}return m(B)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var B=d(M);if(B){var X=B.call(M),Q;if(B!==M.entries){for(;!(Q=X.next()).done;)if(!P(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!P(J[1]))return!1}}else return!1;return!0;default:return!1}}function O(M,B){return M==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function _(M){var B=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":O(B,M)?"symbol":B}function V(M){if(typeof M>"u"||M===null)return""+M;var B=_(M);if(B==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return B}function N(M){var B=V(M);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function $(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},xu}var bu,ly;function qF(){if(ly)return bu;ly=1;var e=Op();function t(){}function n(){}return n.resetWarningCache=t,bu=function(){function r(a,s,l,c,u,d){if(d!==e){var p=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 p.name="Invariant Violation",p}}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},bu}var cy;function UF(){if(cy)return Ga.exports;if(cy=1,process.env.NODE_ENV!=="production"){var e=_1(),t=!0;Ga.exports=WF()(e.isElement,t)}else Ga.exports=qF()();return Ga.exports}var KF=UF();const ot=Gy(KF);function co(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())})}const YF=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 Yo(e,t,n){const r=GF(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&uy(r,"path",i),uy(r,"relativePath",i),r}function GF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=YF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function uy(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const ZF=[".DS_Store","Thumbs.db"];function XF(e){return co(this,void 0,void 0,function*(){return Ds(e)&&QF(e.dataTransfer)?nL(e.dataTransfer,e.type):JF(e)?eL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?tL(e):[]})}function QF(e){return Ds(e)}function JF(e){return Ds(e)&&Ds(e.target)}function Ds(e){return typeof e=="object"&&e!==null}function eL(e){return Ed(e.target.files).map(t=>Yo(t))}function tL(e){return co(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Yo(n))})}function nL(e,t){return co(this,void 0,void 0,function*(){if(e.items){const n=Ed(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(rL));return dy(M1(r))}return dy(Ed(e.files).map(n=>Yo(n)))})}function dy(e){return e.filter(t=>ZF.indexOf(t.name)===-1)}function Ed(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 rL(e){if(typeof e.webkitGetAsEntry!="function")return fy(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?D1(t):fy(e,t)}function M1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?M1(n):[n]],[])}function fy(e,t){return co(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,Yo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Yo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function oL(e){return co(this,void 0,void 0,function*(){return e.isDirectory?D1(e):iL(e)})}function D1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>co(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(oL));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function iL(e){return co(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Yo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Xa={},py;function aL(){return py||(py=1,Xa.__esModule=!0,Xa.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}),Xa}var sL=aL();const wu=Gy(sL);function my(e){return uL(e)||cL(e)||N1(e)||lL()}function lL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
235
+ */var hu,ry;function BF(){if(ry)return hu;ry=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 hu=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 p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},hu}var gu,oy;function Op(){if(oy)return gu;oy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gu=e,gu}var vu,iy;function O1(){return iy||(iy=1,vu=Function.call.bind(Object.prototype.hasOwnProperty)),vu}var yu,ay;function HF(){if(ay)return yu;ay=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Op(),n={},r=O1();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 p=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 p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},yu=o,yu}var xu,sy;function WF(){if(sy)return xu;sy=1;var e=_1(),t=BF(),n=Op(),r=O1(),o=HF(),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 xu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var z=_&&(c&&_[c]||_[u]);if(typeof z=="function")return z}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:x(),arrayOf:b,element:S(),elementType:w(),instanceOf:T,node:P(),objectOf:k,oneOf:C,oneOfType:I,shape:D,exact:L};function h(_,z){return _===z?_!==0||1/_===1/z:_!==_&&z!==z}function g(_,z){this.message=_,this.data=z&&typeof z=="object"?z:{},this.stack=""}g.prototype=Error.prototype;function m(_){if(process.env.NODE_ENV!=="production")var z={},X=0;function Q(G,Y,Z,V,$,K,ie){if(V=V||p,K=K||Z,ie!==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 ye=V+":"+Z;!z[ye]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+V+"`. 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."),z[ye]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+$+" `"+K+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new g("The "+$+" `"+K+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:_(Y,Z,V,$,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function v(_){function z(X,Q,J,G,Y,Z){var V=X[Q],$=M(V);if($!==_){var K=F(V);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return m(z)}function x(){return m(a)}function b(_){function z(X,Q,J,G,Y){if(typeof _!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var V=M(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+V+"` supplied to `"+J+"`, expected an array."))}for(var $=0;$<Z.length;$++){var K=_(Z,$,J,G,Y+"["+$+"]",n);if(K instanceof Error)return K}return null}return m(z)}function S(){function _(z,X,Q,J,G){var Y=z[X];if(!s(Y)){var Z=M(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return m(_)}function w(){function _(z,X,Q,J,G){var Y=z[X];if(!e.isValidElementType(Y)){var Z=M(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return m(_)}function T(_){function z(X,Q,J,G,Y){if(!(X[Q]instanceof _)){var Z=_.name||p,V=H(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+V+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return m(z)}function C(_){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 z(X,Q,J,G,Y){for(var Z=X[Q],V=0;V<_.length;V++)if(h(Z,_[V]))return null;var $=JSON.stringify(_,function(ie,B){var ye=F(B);return ye==="symbol"?String(B):B});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+$+"."))}return m(z)}function k(_){function z(X,Q,J,G,Y){if(typeof _!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],V=M(Z);if(V!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+V+"` supplied to `"+J+"`, expected an object."));for(var $ in Z)if(r(Z,$)){var K=_(Z,$,J,G,Y+"."+$,n);if(K instanceof Error)return K}return null}return m(z)}function I(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var z=0;z<_.length;z++){var X=_[z];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(X)+" at index "+z+"."),a}function Q(J,G,Y,Z,V){for(var $=[],K=0;K<_.length;K++){var ie=_[K],B=ie(J,G,Y,Z,V,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&$.push(B.data.expectedType)}var ye=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new g("Invalid "+Z+" `"+V+"` supplied to "+("`"+Y+"`"+ye+"."))}return m(Q)}function P(){function _(z,X,Q,J,G){return A(z[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return m(_)}function N(_,z,X,Q,J){return new g((_||"React class")+": "+z+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function D(_){function z(X,Q,J,G,Y){var Z=X[Q],V=M(Z);if(V!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+V+"` "+("supplied to `"+J+"`, expected `object`."));for(var $ in _){var K=_[$];if(typeof K!="function")return N(J,G,Y,$,F(K));var ie=K(Z,$,J,G,Y+"."+$,n);if(ie)return ie}return null}return m(z)}function L(_){function z(X,Q,J,G,Y){var Z=X[Q],V=M(Z);if(V!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+V+"` "+("supplied to `"+J+"`, expected `object`."));var $=t({},X[Q],_);for(var K in $){var ie=_[K];if(r(_,K)&&typeof ie!="function")return N(J,G,Y,K,F(ie));if(!ie)return new g("Invalid "+G+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
236
+ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var B=ie(Z,K,J,G,Y+"."+K,n);if(B)return B}return null}return m(z)}function A(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(A);if(_===null||s(_))return!0;var z=d(_);if(z){var X=z.call(_),Q;if(z!==_.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!A(J[1]))return!1}}else return!1;return!0;default:return!1}}function O(_,z){return _==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function M(_){var z=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":O(z,_)?"symbol":z}function F(_){if(typeof _>"u"||_===null)return""+_;var z=M(_);if(z==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return z}function j(_){var z=F(_);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function H(_){return!_.constructor||!_.constructor.name?p:_.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},xu}var bu,ly;function qF(){if(ly)return bu;ly=1;var e=Op();function t(){}function n(){}return n.resetWarningCache=t,bu=function(){function r(a,s,l,c,u,d){if(d!==e){var p=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 p.name="Invariant Violation",p}}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},bu}var cy;function UF(){if(cy)return Ga.exports;if(cy=1,process.env.NODE_ENV!=="production"){var e=_1(),t=!0;Ga.exports=WF()(e.isElement,t)}else Ga.exports=qF()();return Ga.exports}var KF=UF();const ot=Gy(KF);function co(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())})}const YF=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 Yo(e,t,n){const r=GF(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&uy(r,"path",i),uy(r,"relativePath",i),r}function GF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=YF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function uy(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const ZF=[".DS_Store","Thumbs.db"];function XF(e){return co(this,void 0,void 0,function*(){return Ds(e)&&QF(e.dataTransfer)?nL(e.dataTransfer,e.type):JF(e)?eL(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?tL(e):[]})}function QF(e){return Ds(e)}function JF(e){return Ds(e)&&Ds(e.target)}function Ds(e){return typeof e=="object"&&e!==null}function eL(e){return Ed(e.target.files).map(t=>Yo(t))}function tL(e){return co(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Yo(n))})}function nL(e,t){return co(this,void 0,void 0,function*(){if(e.items){const n=Ed(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(rL));return dy(M1(r))}return dy(Ed(e.files).map(n=>Yo(n)))})}function dy(e){return e.filter(t=>ZF.indexOf(t.name)===-1)}function Ed(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 rL(e){if(typeof e.webkitGetAsEntry!="function")return fy(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?D1(t):fy(e,t)}function M1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?M1(n):[n]],[])}function fy(e,t){return co(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,Yo(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Yo(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function oL(e){return co(this,void 0,void 0,function*(){return e.isDirectory?D1(e):iL(e)})}function D1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>co(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(oL));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function iL(e){return co(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Yo(r,e.fullPath);t(o)},r=>{n(r)})})})}var Xa={},py;function aL(){return py||(py=1,Xa.__esModule=!0,Xa.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}),Xa}var sL=aL();const wu=Gy(sL);function my(e){return uL(e)||cL(e)||N1(e)||lL()}function lL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
237
237
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uL(e){if(Array.isArray(e))return Cd(e)}function hy(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 gy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hy(Object(n),!0).forEach(function(r){j1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ca(e,t){return pL(e)||fL(e,t)||N1(e,t)||dL()}function dL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
238
238
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N1(e,t){if(e){if(typeof e=="string")return Cd(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 Cd(e,t)}}function Cd(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 fL(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 pL(e){if(Array.isArray(e))return e}var mL=typeof wu=="function"?wu:wu.default,hL="file-invalid-type",gL="file-too-large",vL="file-too-small",yL="too-many-files",xL=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:hL,message:"File type must be ".concat(r)}},vy=function(t){return{code:gL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},yy=function(t){return{code:vL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},bL={code:yL,message:"Too many files"};function F1(e,t){var n=e.type==="application/x-moz-file"||mL(e,t);return[n,n?null:xL(t)]}function L1(e,t,n){if($r(e.size))if($r(t)&&$r(n)){if(e.size>n)return[!1,vy(n)];if(e.size<t)return[!1,yy(t)]}else{if($r(t)&&e.size<t)return[!1,yy(t)];if($r(n)&&e.size>n)return[!1,vy(n)]}return[!0,null]}function $r(e){return e!=null}function wL(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=F1(l,n),u=ca(c,1),d=u[0],p=L1(l,r,o),f=ca(p,1),h=f[0],g=s?s(l):null;return d&&h&&!g})}function js(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Qa(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 xy(e){e.preventDefault()}function SL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function TL(e){return e.indexOf("Edge/")!==-1}function EL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return SL(e)||TL(e)}function kn(){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!js(r)&&s&&s.apply(void 0,[r].concat(i)),js(r)})}}function CL(){return"showOpenFilePicker"in window}function kL(e){if($r(e)){var t=Object.entries(e).filter(function(n){var r=ca(n,2),o=r[0],i=r[1],a=!0;return V1(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($1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=ca(r,2),i=o[0],a=o[1];return gy(gy({},n),{},j1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function RL(e){if($r(e))return Object.entries(e).reduce(function(t,n){var r=ca(n,2),o=r[0],i=r[1];return[].concat(my(t),[o],my(i))},[]).filter(function(t){return V1(t)||$1(t)}).join(",")}function PL(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function AL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function V1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function $1(e){return/^.*\.[\w]+$/.test(e)}var IL=["children"],_L=["open"],OL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ML=["refKey","onChange","onClick"];function DL(e){return FL(e)||NL(e)||z1(e)||jL()}function jL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
239
239
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FL(e){if(Array.isArray(e))return kd(e)}function Su(e,t){return $L(e)||VL(e,t)||z1(e,t)||LL()}function LL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
240
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z1(e,t){if(e){if(typeof e=="string")return kd(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 kd(e,t)}}function kd(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 VL(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 $L(e){if(Array.isArray(e))return e}function by(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 mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?by(Object(n),!0).forEach(function(r){Rd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):by(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t){if(e==null)return{};var n=zL(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 zL(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 Mp=E.forwardRef(function(e,t){var n=e.children,r=Ns(e,IL),o=H1(r),i=o.open,a=Ns(o,_L);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(mt(mt({},a),{},{open:i})))});Mp.displayName="Dropzone";var B1={disabled:!1,getFilesFromEvent:XF,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};Mp.defaultProps=B1;Mp.propTypes={children:ot.func,accept:ot.objectOf(ot.arrayOf(ot.string)),multiple:ot.bool,preventDropOnDocument:ot.bool,noClick:ot.bool,noKeyboard:ot.bool,noDrag:ot.bool,noDragEventsBubbling:ot.bool,minSize:ot.number,maxSize:ot.number,maxFiles:ot.number,disabled:ot.bool,getFilesFromEvent:ot.func,onFileDialogCancel:ot.func,onFileDialogOpen:ot.func,useFsAccessApi:ot.bool,autoFocus:ot.bool,onDragEnter:ot.func,onDragLeave:ot.func,onDragOver:ot.func,onDrop:ot.func,onDropAccepted:ot.func,onDropRejected:ot.func,onError:ot.func,validator:ot.func};var Pd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function H1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=mt(mt({},B1),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,p=t.onDrop,f=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=E.useMemo(function(){return RL(n)},[n]),j=E.useMemo(function(){return kL(n)},[n]),D=E.useMemo(function(){return typeof m=="function"?m:wy},[m]),F=E.useMemo(function(){return typeof g=="function"?g:wy},[g]),P=E.useRef(null),O=E.useRef(null),_=E.useReducer(BL,Pd),V=Su(_,2),N=V[0],$=V[1],M=N.isFocused,B=N.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&CL()),Q=function(){!X.current&&B&&setTimeout(function(){if(O.current){var te=O.current.files;te.length||($({type:"closeDialog"}),F())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[O,B,F,X]);var J=E.useRef([]),G=function(te){P.current&&P.current.contains(te.target)||(te.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",xy,!1),document.addEventListener("drop",G,!1)),function(){b&&(document.removeEventListener("dragover",xy),document.removeEventListener("drop",G))}},[P,b]),E.useEffect(function(){return!r&&x&&P.current&&P.current.focus(),function(){}},[P,x,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),J.current=[].concat(DL(J.current),[q.target]),Qa(q)&&Promise.resolve(o(q)).then(function(te){if(!(js(q)&&!C)){var me=te.length,Oe=me>0&&wL({files:te,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),He=me>0&&!Oe;$({isDragAccept:Oe,isDragReject:He,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(te){return Y(te)})},[o,c,Y,C,A,a,i,s,l,I]),L=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=Qa(q);if(te&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return te&&d&&d(q),!1},[d,C]),z=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=J.current.filter(function(Oe){return P.current&&P.current.contains(Oe)}),me=te.indexOf(q.target);me!==-1&&te.splice(me,1),J.current=te,!(te.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qa(q)&&u&&u(q))},[P,u,C]),K=E.useCallback(function(q,te){var me=[],Oe=[];q.forEach(function(He){var Ye=F1(He,A),Ot=Su(Ye,2),pn=Ot[0],En=Ot[1],er=L1(He,a,i),tr=Su(er,2),nr=tr[0],W=tr[1],U=I?I(He):null;if(pn&&nr&&!U)me.push(He);else{var ze=[En,W];U&&(ze=ze.concat(U)),Oe.push({file:He,errors:ze.filter(function(tt){return tt})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(He){Oe.push({file:He,errors:[bL]})}),me.splice(0)),$({acceptedFiles:me,fileRejections:Oe,isDragReject:Oe.length>0,type:"setFiles"}),p&&p(me,Oe,te),Oe.length>0&&h&&h(Oe,te),me.length>0&&f&&f(me,te)},[$,s,A,a,i,l,p,f,h,I]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),J.current=[],Qa(q)&&Promise.resolve(o(q)).then(function(te){js(q)&&!C||K(te,q)}).catch(function(te){return Y(te)}),$({type:"reset"})},[o,K,Y,C]),H=E.useCallback(function(){if(X.current){$({type:"openDialog"}),D();var q={multiple:s,types:j};window.showOpenFilePicker(q).then(function(te){return o(te)}).then(function(te){K(te,null),$({type:"closeDialog"})}).catch(function(te){PL(te)?(F(te),$({type:"closeDialog"})):AL(te)?(X.current=!1,O.current?(O.current.value=null,O.current.click()):Y(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."))):Y(te)});return}O.current&&($({type:"openDialog"}),D(),O.current.value=null,O.current.click())},[$,D,F,v,K,Y,j,s]),ye=E.useCallback(function(q){!P.current||!P.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[P,H]),Te=E.useCallback(function(){$({type:"focus"})},[]),Re=E.useCallback(function(){$({type:"blur"})},[]),$e=E.useCallback(function(){S||(EL()?setTimeout(H,0):H())},[S,H]),se=function(te){return r?null:te},xe=function(te){return w?null:se(te)},le=function(te){return T?null:se(te)},be=function(te){C&&te.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.role,He=q.onKeyDown,Ye=q.onFocus,Ot=q.onBlur,pn=q.onClick,En=q.onDragEnter,er=q.onDragOver,tr=q.onDragLeave,nr=q.onDrop,W=Ns(q,OL);return mt(mt(Rd({onKeyDown:xe(kn(He,ye)),onFocus:xe(kn(Ye,Te)),onBlur:xe(kn(Ot,Re)),onClick:se(kn(pn,$e)),onDragEnter:le(kn(En,Z)),onDragOver:le(kn(er,L)),onDragLeave:le(kn(tr,z)),onDrop:le(kn(nr,ie)),role:typeof Oe=="string"&&Oe!==""?Oe:"presentation"},me,P),!r&&!w?{tabIndex:0}:{}),W)}},[P,ye,Te,Re,$e,Z,L,z,ie,w,T,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.onChange,He=q.onClick,Ye=Ns(q,ML),Ot=Rd({accept:A,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(kn(Oe,ie)),onClick:se(kn(He,ue)),tabIndex:-1},me,O);return mt(mt({},Ot),Ye)}},[O,n,s,ie,r]);return mt(mt({},N),{},{isFocused:M&&!r,getRootProps:oe,getInputProps:ee,rootRef:P,inputRef:O,open:se(H)})}function BL(e,t){switch(t.type){case"focus":return mt(mt({},e),{},{isFocused:!0});case"blur":return mt(mt({},e),{},{isFocused:!1});case"openDialog":return mt(mt({},Pd),{},{isFileDialogActive:!0});case"closeDialog":return mt(mt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return mt(mt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return mt(mt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return mt({},Pd);default:return e}}function wy(){}const W1=E.createContext([null,()=>{}]),HL=()=>E.useContext(W1),WL=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,qL={csv:Bc,xls:Bc,mov:hg,mp4:hg,xlsx:Bc,pdf:mg,txt:mg,json:YA,mp3:jA},UL=e=>{const[,t]=HL(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:WL(l),size:VF(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{var c;l.preventDefault(),l.stopPropagation(),(c=e.onDeleteFile)==null||c.call(e,e.file)},a=qL[e.file.name.split(".").at(-1)]??c0,s=n.type==="img"?y.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):y.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return y.jsxs("li",{className:"flex flex-row gap-4 justify-between items-center pb-6 w-full border-b border-card-border last:border-b-transparent",children:[y.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[y.jsx("button",{type:"button",onClick:o,className:"flex justify-center items-center size-20",children:s}),y.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[y.jsx("span",{children:e.file.name}),y.jsx("span",{className:"text-sm italic",children:n.size})]})]}),y.jsx("button",{onClick:i,type:"button",className:"p-2 transition-colors duration-300 ease-linear hover:text-danger-hover",children:y.jsx(xa,{size:16})})]})},KL=e=>y.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>y.jsx(UL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),q1=e=>{const t=Ct(),n=e.dragging?JA:tI;return y.jsxs("div",{className:"flex flex-col justify-center items-center",children:[y.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:y.jsx(n,{className:"text-primary",size:80})}),y.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[y.jsx("p",{children:t.uploadIdle}),y.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},YL=e=>e.isDragActive?y.jsx(q1,{files:e.files,dragging:!0}):e.files.length>0?y.jsx(KL,{onDeleteFile:e.onDeleteFile,files:e.files}):y.jsx(E.Fragment,{children:e.idle}),GL=y.jsx(q1,{dragging:!1}),ZL=e=>{const t=e.item.file,n=e.item.type;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),y.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?y.jsx("img",{className:"container block w-80",src:e.item.url,alt:t.name}):n==="video"?y.jsx("video",{className:"container block w-80",src:e.item.url,controls:!0,muted:!0}):n==="audio"?y.jsx("figure",{children:y.jsx("audio",{controls:!0,src:e.item.url})}):null]})},XL=({idle:e=GL,onDeleteFile:t,onDrop:n,...r})=>{const o=Ct(),i=E.useState(null),[a,s]=E.useState([]),l=r.files??a,c=()=>i[1](null),u=h=>{n==null||n(h),s(g=>g.concat(h))},{getRootProps:d,getInputProps:p,isDragActive:f}=H1({onDrop:u});return y.jsxs(W1.Provider,{value:i,children:[y.jsx(dp,{overlayClickClose:!0,title:o.uploadDialogTitle,ariaTitle:o.uploadDialogTitle,open:i[0]!==null,onChange:c,children:i[0]?y.jsx(ZL,{item:i[0]}):null}),y.jsxs("div",{...d(),"data-active":l?l.length>0:!1,className:"flex flex-col border items-center justify-center rounded-lg border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background data-[active=true]:border-transparent",children:[y.jsx("input",{...p(r),name:r.name,id:r.name}),y.jsx(YL,{onDeleteFile:t,isDragActive:f,idle:e,files:l})]})]})},QL=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return y.jsx("form",{...e,onSubmit:t})},Sy=40,JL=e=>y.jsx(E.Fragment,{children:e.children}),eV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Ty=[],tV=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(wr,{children:t.children})})}),nV=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),rV={List:tV,Item:nV},oV=e=>{const t=Ct(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.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]),y.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?y.jsxs(Gd,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},iV=E.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:p=!1,required:f=!1,dynamicOption:h=!1,onChangeOptions:g,...m},v)=>{const x=E.useMemo(()=>new yn(r.map(ee=>[ee.value,ee])),[r]),b=E.useRef(null),S=E.useRef(null),w=m.value??m.defaultValue??Ty,T=Ct(),[C,k]=E.useState(0),[I,A]=E.useState(!1),[j,D]=E.useState(""),[F,P]=E.useState(()=>{const ee=new yn;return w.forEach(q=>{const te=x.get(q);return te?ee.set(q,te):void 0}),ee}),O=E.useMemo(()=>Array.from(F.keys()),[F]),[_,V]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,te)=>ee.has(te.value)?[...q,te.label??te.value]:q,[])??w}),[N,$]=E.useState(null),M=E.useRef(Ty),B=h&&j!==""?[{value:j,label:j,"data-dynamic":"true"},...r]:r,X=j.length===0?B:lp(B,"value",[{key:"value",value:j},{key:"label",value:j}]),Q=up(I,"block-only"),J=X.filter(ee=>ee.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:L,refs:z,context:K}=kr({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:ui,middleware:[wa(4),_w({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),te=(q==null?void 0:q.getBoundingClientRect().height)||0,me=qi(z.reference.current,window.innerHeight),Oe=Math.min(te<Sy?me:te,me,ee.availableHeight),He=J.length===0?Sy:Math.min(Oe,me,te),Ye=`${b.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Ye,maxWidth:Ye,height:He})}})]}),ie=Yw(K,eV),{getReferenceProps:H,getFloatingProps:ye,getItemProps:Te}=Rr([so(K,{role:"listbox"}),ao(K),El(K,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:N,selectedIndex:N,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>$(q=>ee??q)})]);E.useEffect(()=>{if(!I)return k(0);const ee=z.reference;if(ee.current===null)return;const q=qi(ee.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[j,I,z.reference]),E.useEffect(()=>{m.value&&P(new yn(m.value.map(ee=>[ee,x.get(ee)])))},[m.value,x]),E.useEffect(()=>{const ee=z.reference.current;if(ee)return ma(ee)},[]);const Re=(ee,q)=>{const te=F.clone(He=>He.has(ee.value)?He.remove(ee.value):He.set(ee.value,ee));P(te);const me=z.reference.current;if(!me)return;const Oe=te.map(He=>He.value);me==null||me.setAttribute("data-value",JSON.stringify(Oe)),g&&g(Oe),V(He=>He.concat(ee.label??"")),D(""),$(q)},$e=ee=>{const q=ee.target.value;return D(q),!I&&q===""?A(!0):(ee.target.name=m.name||"",q?A(!0):void 0)},se=()=>{var ee;A(!0),D(""),(ee=z.reference.current)==null||ee.focus()},xe=()=>{A(!0),D("")},le=()=>{var ee;(ee=z.reference.current)==null||ee.setAttribute("data-value","[]"),D(""),A(!1),P(new yn),g==null||g([])},be=m.id||m.name,oe=F.map((ee,q)=>y.jsx(Gd,{size:"small",icon:y.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:te=>{te.preventDefault(),te.stopPropagation(),Re(ee,q)},children:y.jsx(xa,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),ue={height:G?"0":F.size===0?C-49:C-86};return y.jsxs(Ra,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:se,children:[y.jsx(If,{size:20}),y.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),F?y.jsx("button",{type:"button",onClick:le,className:"transition-colors link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsxs("ul",{...H({...m,onFocus:xe,id:`${be}-shadow`,name:`${be}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),className:Ie("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[O.length>0?null:y.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),y.jsx(oV,{label:c,children:oe})]}),y.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:v,required:f,defaultValue:m.value||O||void 0}),y.jsx(io,{preserveTabOrder:!0,children:I?y.jsx(Kw,{lockScroll:!0,children:y.jsx(pi,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs("div",{...ye({ref:z.setFloating,style:{...ie.styles,top:Z??0,position:L,left:Y,height:C-(O.length===0?65:30)}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[y.jsx("input",{autoFocus:!0,value:j,onChange:$e,title:m.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:ee=>{var q,te;if(ee.key==="ArrowDown"){let me=N+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),$(me)}if(ee.key==="ArrowUp"){let me=N-1;return me<0&&(me=J.length-1),(te=S.current)==null||te.scrollIntoView({index:me}),$(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),A(!1);if(ee.key==="Enter"){if(N!==null&&J[N])return ee.preventDefault(),Re(J[N],N);if(J.length===1)return ee.preventDefault(),Re(J[0],0)}}}),G?y.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:y.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),te=(q?q.getBoundingClientRect().height:40)*J.length;return pa.flushSync(()=>k(te+2))},children:y.jsx(Pp,{ref:S,hidden:G,data:J,components:rV,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const te=q.Render??JL,me=F.has(q.value)||F.has(q.label??""),Oe=N===ee,He=q.label??q.value;return y.jsxs("button",{"data-value":q.value,...Te({ref:Ye=>void(M.current[ee]=Ye),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>Re(q,ee)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||Oe?"bg-floating-hover text-floating-foreground":""}`,children:[y.jsx(_p,{onChange:Bf,checked:me,"aria-checked":me,onClick:Ye=>{Ye.stopPropagation(),Re(q,ee)}}),y.jsx(te,{...m,label:q.label,value:q.value,children:He})]})}})}),F.size===0?null:y.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:oe})]})})}):null})]})}),aV=({children:e,className:t="",size:n,...r})=>y.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:[y.jsx("input",{...r,type:"radio",className:Ie("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]}),Qr=E.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:p,left:f,error:h,...g},m)=>{const v=Ct(),x=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(m,()=>x.current),E.useEffect(()=>{if(x.current===null)return;const w=new AbortController,T=x.current,C=ma(x.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=x.current)==null?void 0:w.focus()};return y.jsx(Ra,{info:n,left:f,error:h,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:y.jsxs("label",{htmlFor:b,children:[p,y.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[y.jsx(If,{size:20}),y.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:y.jsxs("select",{...g,id:b,name:b,required:e,ref:Un(m,x),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Ie("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[y.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function U1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Po(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ey(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function K1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ey(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():Ey(e[o],null)}}}}function Jr(...e){return R.useCallback(K1(...e),e)}function Y1(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...h}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,m=R.useMemo(()=>h,Object.values(h));return y.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,sV(o,...t)]}function sV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function G1(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=cV({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=G1(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function cV({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=G1(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var uV=R.createContext(void 0);function dV(e){const t=R.useContext(uV);return e||t||"ltr"}function fV(e){const t=R.useRef({value:e,previous:e});return R.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var pV=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{};function mV(e){const[t,n]=R.useState(void 0);return pV(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Ad(e){const t=hV(e),n=R.forwardRef((r,o)=>{const{children:i,...a}=r,s=R.Children.toArray(i),l=s.find(vV);if(l){const c=l.props.children,u=s.map(d=>d===l?R.Children.count(c)>1?R.Children.only(null):R.isValidElement(c)?c.props.children:null:d);return y.jsx(t,{...a,ref:o,children:R.isValidElement(c)?R.cloneElement(c,void 0,u):null})}return y.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hV(e){const t=R.forwardRef((n,r)=>{const{children:o,...i}=n;if(R.isValidElement(o)){const a=xV(o),s=yV(i,o.props);return o.type!==R.Fragment&&(s.ref=r?K1(r,a):a),R.cloneElement(o,s)}return R.Children.count(o)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gV=Symbol("radix.slottable");function vV(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gV}function yV(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function xV(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Il=bV.reduce((e,t)=>{const n=Ad(`Primitive.${t}`),r=R.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wV(e){const t=e+"CollectionProvider",[n,r]=Y1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:m,children:v}=g,x=E.useRef(null),b=E.useRef(new Map).current;return y.jsx(o,{scope:m,itemMap:b,collectionRef:x,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Ad(s),c=E.forwardRef((g,m)=>{const{scope:v,children:x}=g,b=i(s,v),S=Jr(m,b.collectionRef);return y.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Ad(u),f=E.forwardRef((g,m)=>{const{scope:v,children:x,...b}=g,S=E.useRef(null),w=Jr(m,S),T=i(u,v);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),y.jsx(p,{[d]:"",ref:w,children:x})});f.displayName=u;function h(g){const m=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=m.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},h,r]}var Z1=["PageUp","PageDown"],X1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Q1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},yi="Slider",[Id,SV,TV]=wV(yi),[J1,Uz]=Y1(yi,[TV]),[EV,_l]=J1(yi),eS=R.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:h,...g}=e,m=R.useRef(new Set),v=R.useRef(0),b=a==="horizontal"?CV:kV,[S=[],w]=lV({prop:u,defaultProp:c,onChange:j=>{var F;(F=[...m.current][v.current])==null||F.focus(),d(j)}}),T=R.useRef(S);function C(j){const D=_V(S,j);A(j,D)}function k(j){A(j,v.current)}function I(){const j=T.current[v.current];S[v.current]!==j&&p(S)}function A(j,D,{commit:F}={commit:!1}){const P=jV(i),O=NV(Math.round((j-r)/i)*i+r,P),_=U1(O,[r,o]);w((V=[])=>{const N=AV(V,_,D);if(DV(N,l*i)){v.current=N.indexOf(_);const $=String(N)!==String(V);return $&&F&&p(N),$?N:V}else return V})}return y.jsx(EV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:m.current,values:S,orientation:a,form:h,children:y.jsx(Id.Provider,{scope:e.__scopeSlider,children:y.jsx(Id.Slot,{scope:e.__scopeSlider,children:y.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Po(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:D})=>{if(!s){const O=Z1.includes(j.key)||j.shiftKey&&X1.includes(j.key)?10:1,_=v.current,V=S[_],N=i*O*D;A(V+N,_,{commit:!0})}}})})})})});eS.displayName=yi;var[tS,nS]=J1(yi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),CV=R.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=R.useState(null),f=Jr(t,b=>p(b)),h=R.useRef(void 0),g=dV(o),m=g==="ltr",v=m&&!i||!m&&i;function x(b){const S=h.current||d.getBoundingClientRect(),w=[0,S.width],C=Dp(w,v?[n,r]:[r,n]);return h.current=S,C(b-S.left)}return y.jsx(tS,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:y.jsx(rS,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=x(b.clientX);a==null||a(S)},onSlideMove:b=>{const S=x(b.clientX);s==null||s(S)},onSlideEnd:()=>{h.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=Q1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),kV=R.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=R.useRef(null),d=Jr(t,u),p=R.useRef(void 0),f=!o;function h(g){const m=p.current||u.current.getBoundingClientRect(),v=[0,m.height],b=Dp(v,f?[r,n]:[n,r]);return p.current=m,b(g-m.top)}return y.jsx(tS,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:y.jsx(rS,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=h(g.clientY);i==null||i(m)},onSlideMove:g=>{const m=h(g.clientY);a==null||a(m)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=Q1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),rS=R.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=_l(yi,n);return y.jsx(Il.span,{...c,ref:t,onKeyDown:Po(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Z1.concat(X1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Po(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Po(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Po(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),oS="SliderTrack",iS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(oS,n);return y.jsx(Il.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});iS.displayName=oS;var _d="SliderRange",aS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(_d,n),i=nS(_d,n),a=R.useRef(null),s=Jr(t,a),l=o.values.length,c=o.values.map(p=>lS(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return y.jsx(Il.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});aS.displayName=_d;var Od="SliderThumb",sS=R.forwardRef((e,t)=>{const n=SV(e.__scopeSlider),[r,o]=R.useState(null),i=Jr(t,s=>o(s)),a=R.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return y.jsx(RV,{...e,ref:i,index:a})}),RV=R.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=_l(Od,n),s=nS(Od,n),[l,c]=R.useState(null),u=Jr(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,p=mV(l),f=a.values[r],h=f===void 0?0:lS(f,a.min,a.max),g=IV(r,a.values.length),m=p==null?void 0:p[s.size],v=m?OV(m,h,s.direction):0;return R.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),y.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${v}px)`},children:[y.jsx(Id.ItemSlot,{scope:e.__scopeSlider,children:y.jsx(Il.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Po(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&y.jsx(PV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});sS.displayName=Od;var PV=e=>{const{value:t,...n}=e,r=R.useRef(null),o=fV(t);return R.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),y.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function AV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function lS(e,t,n){const i=100/(n-t)*(e-t);return U1(i,[0,100])}function IV(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function _V(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function OV(e,t,n){const r=e/2,i=Dp([0,50],[0,r]);return(r-i(t)*n)*n}function MV(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function DV(e,t){if(t>0){const n=MV(e);return Math.min(...n)>=t}return!0}function Dp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function jV(e){return(String(e).split(".")[1]||"").length}function NV(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var FV=eS,LV=iS,VV=aS,$V=sS;const zV=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Ve.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Ve.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),y.jsx(fp,{title:"",ref:r,as:$V,enabled:e.tooltip,className:"block bg-input-switch size-5 cursor-grab rounded-full border-1 border-input-border shadow active:cursor-grabbing",children:t})},BV=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(si()),s=r||o||[];return y.jsxs(FV,{...i,defaultValue:r,value:o,className:Ie("relative flex h-5 w-full touch-none select-none items-center",n),children:[y.jsx(LV,{className:"relative h-2 grow rounded-full bg-background",children:y.jsx(VV,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>y.jsx(zV,{tooltip:t??!1},`${a.current}-${c}`))]})},HV=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Ur(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},h=u.current;return h.addEventListener("change",f),()=>h==null?void 0:h.removeEventListener("change",f)}},[]);const p=()=>{var h,g;const f=!((h=u.current)!=null&&h.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return y.jsxs("fieldset",{className:Ie("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[y.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[y.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),y.jsx("button",{type:"button",role:"switch",onClick:p,"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:y.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"})}),y.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:y.jsx("span",{className:"font-medium text-foreground",children:e})})]}),y.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),WV=e=>{const[t,n]=mA();return E.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:xA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),y.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},qV=I1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
241
- `);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)}),UV=e=>{const[t,n]=E.useState(0);return E.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},KV={Item:E.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},YV=e=>{const t=E.useRef(null),n=UV(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.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:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(Pa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx(Pp,{height:n,useWindowScroll:!0,data:e.source,components:KV,itemContent:(r,o)=>y.jsx(E.Fragment,{children:y.jsx(_p,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(el,{children:y.jsx(_f,{})})}),y.jsx("div",{})]})};var GV=Object.defineProperty,Cy=Object.getOwnPropertySymbols,ZV=Object.prototype.hasOwnProperty,XV=Object.prototype.propertyIsEnumerable,ky=(e,t,n)=>t in e?GV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QV=(e,t)=>{for(var n in t||(t={}))ZV.call(t,n)&&ky(e,n,t[n]);if(Cy)for(var n of Cy(t))XV.call(t,n)&&ky(e,n,t[n]);return e},jp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},JV=(e,t,n,r)=>Ol(jp,e,t,n,r),Go=e=>typeof e=="object",mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Go(e)&&!Go(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=>mr(e[r],t[r]))},e$=(e,t)=>(Go(e)||Array.isArray(e))&&t?e[t]:e,t$=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Fs=e=>/[0-9.]+/.test(e),Ry=e=>["string","number"].includes(typeof e),Py=e=>e==null||(e==null?void 0:e.length)===0||e==="",Ay={eq:mr,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:Py,notEmpty:e=>!Py(e),in:(e,t)=>jp(t,n=>mr(e,n)),notIn:(e,t)=>cS(t,n=>!mr(e,n))},n$=e=>{if(e in Ay)return Ay[e];throw new Error("Linq - Symbol not found")},_o=(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},Ol=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=n$(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},r$=(e,t,n,r)=>Ol(_o,e,t,n,r),cS=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},o$=(e,t,n,r)=>Ol(cS,e,t,n,r),uS=e=>{if(e===null)return null;const t=QV({},e);return Object.keys(t).forEach(n=>t[n]=Go(e[n])?uS(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Iy=(e,t)=>{if(Go(t)){for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1},i$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},a$=e=>_o(e,(t,n,r)=>Go(t)?n===r.findIndex(o=>mr(o,t)):n===r.indexOf(t)),s$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},dS=(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())},l$=(e,t)=>dS(e,n=>n[t]),_y=(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},c$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},u$=(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 Fs(e)&&Fs(t)?r.map(a=>Number.parseInt(a)):r},Tu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Fs(e)&&Fs(t)){const o=[],[i,a]=c$(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return u$(e,t,r)},d$=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Tu(r,o,1):Tu(r,i,Number.parseInt(o,10))}return Ry(e)&&Ry(t)?Tu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Eu=(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},Oy=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},f$=(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)},p$=(e,t,n,r)=>Ol(f$,e,t,n,r),My=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(t$(t))},fS=(e=>(e.Asc="asc",e.Desc="desc",e))(fS||{}),m$=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),h$=(e,t)=>e.sort(m$(t)),g$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:_o(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},v$=class Md{constructor(t=[]){this.array=t}static Range(...t){return d$(...t)}static New(t){return new Md(t)}Where(t,n,r){return this.array=r$(this.array,t,n,r),this}Some(t,n,r){return JV(this.array,t,n,r)}All(t,n,r){return o$(this.array,t,n,r)}Reverse(){return this.array=Oy(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=p$(this.array,t,n,r),this}Distinct(){return this.array=a$(this.array),this}First(t){return t===void 0?this.array[0]:s$(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?Eu((n,r)=>n+r,0,this.array):Eu((n,r)=>n+e$(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return l$(this.array,t)}GroupWith(t){return dS(this.array,t)}Except(t){return _o(this.array,n=>!Iy(t,n))}Intersect(t){return _o(this.array,n=>Iy(t,n))}OrderBy(t,n){let r;return r=t?My(this.array,t):this.array.toSorted(),this.array=n==="desc"?Oy(r):r,this}Includes(t){return jp(this.array,n=>mr(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 Eu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(_y(this.array,n=>[t,n]))}Zip(t,n){return _y(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:_o(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Md(uS(this.array))}ToObject(t){return i$(this.array,t)}Sort(t){return Array.isArray(t)?h$(this.array,t):My(this.array,t)}Unique(t){return g$(this.array,t)}},pS=v$,Cu={},Dy;function y$(){return Dy||(Dy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(x){window.console.log(x)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const x=v.getItem(m);try{return JSON.parse(x)}catch{return x??null}},i=m=>Object.keys(m).reduce((v,x)=>({...v,[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,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${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 v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=p.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,x={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((w,T)=>{const C=T.parse(x);return C===""?w:w.concat(C)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=S,u()}},f=m=>{const v=new Set,x=b=>{m().removeItem(b);const S=i(m());v.forEach(w=>w(S))};return{delete:x,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const S=m().getItem(b);return!n(S)},deleteAll:()=>{t(m(),x),v.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,S)=>{m().setItem(b,JSON.stringify(S)),v.forEach(w=>w(m()))}}},h=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=h,e.createStorage=f}(Cu)),Cu}var Hi=y$();const Np=e=>e.headerLabel??e.thead??e.id,Fp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Oo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Oo||{});const Lp=e=>e.type==="number"?e.valueAsNumber:e.value,x$=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},b$={},w$=(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})},S$=(e,t,n=b$)=>{const r=Yr()?null:Hi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Lf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:w$(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Yr()||Hi.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},T$=e=>{const t=Ur(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Dd=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Oo.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:si(),operation:l,label:Np(e),name:o,type:i,value:"",...r}},Vp=()=>{const e=Ct(),t=E.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:E.useMemo(()=>({[Oo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Oo.Boolean]:[t.is,t.isNot],[Oo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},E$=e=>{const t=Ct(),n=Vp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Dd(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(h=>u===h.id);return Dd(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},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=Lp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return y.jsx(E.Fragment,{children:y.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(sI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(Qr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(Qr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(Pa,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),y.jsx("div",{className:"mt-5 flex items-center justify-center",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:y.jsx(dl,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[y.jsx(Of,{size:14})," ",t.tableFilterNewFilter]})})]})})})},C$=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=Vp(),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=Lp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[y.jsx(Qr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(Pa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(dl,{className:"text-danger",size:14})})]})},k$=({item:e,onPointerDown:t})=>{const n=ul(0);return y.jsxs(i0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(oI,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},R$=e=>{var l;const t=Ct(),n=Fp(e.cols),r=vA(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var m;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new pS(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(gT(h).map((v,x)=>{const b=h[v];return{...g,groupId:si(),groupKey:d,index:x,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return y.jsx(E.Fragment,{children:y.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(bI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(Qr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),y.jsx(el,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:y.jsx(dl,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(RE,{children:y.jsx(o0,{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(c=>y.jsx(k$,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},P$=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),A$=(e,t)=>e.toSorted(P$(t)),mS=(e,t,n)=>({label:t,id:si(),type:n,value:e.id}),I$=e=>{const t=Ct(),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,mS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return y.jsx(E.Fragment,{children:y.jsx(mi,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(s0,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(Qr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(Qr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:y.jsx(dl,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(Of,{size:14})," ",t.tableSortAddButton]})})]})})})},_$=e=>{const t=Ct(),[n,r]=E.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");E.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=mS(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Np(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?y.jsx(OA,{size:14}):null,n==="desc"?y.jsx(IA,{size:14}):null,n==="undefined"?y.jsx(s0,{size:14}):null]})},O$=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(E$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(I$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(R$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.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=Lp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function M$(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 D$=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>M$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(E.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(un,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(E.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(un,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?y.jsx("li",{children:y.jsx(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},j$=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.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 E.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()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},N$=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=zf(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?y.jsx(j$,{children:y.jsx(p,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),y.jsx("span",{className:"relative",children:o?cp:c?y.jsx(E.Fragment,{children:y.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):y.jsx(E.Fragment,{children:Ve.nil(l)?"":l})}))})})},F$={top:0,left:0,right:0,bottom:-1},L$=e=>{var g;const t=Ip(),n=Ct(),r=e.filters.filter(m=>m.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=Vp(),l=o?fI:mI,c=E.useRef(null),u=m=>{const v=m.currentTarget.dataset.id||"";return e.setFilters(x=>x.filter(b=>b.id!==v))},d=E.useCallback(m=>{if(m===null)return;c.current=m;const v=new AbortController;return m.addEventListener("pointerdown",x=>{if(x.target.dataset.type==="resizer")return x.stopPropagation(),x.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(m=>e.header.id===m.value),f=p!=null&&p.type?p.type===fS.Asc?"ascending":"descending":"none",h=Np(e.header);return y.jsxs(i0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[y.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:y.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?y.jsx(mi,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:h})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(E.Fragment,{children:r.map(m=>y.jsx("li",{className:"my-1",children:y.jsx(C$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Dd(e.header,s.options,s.operations))),children:[y.jsx(Of,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?y.jsx(_$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(pt.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:F$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:m=>void m.currentTarget.focus(),onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const x=c.current.getBoundingClientRect().width,b=v.delta.x;c.current.style.width=`${Math.abs(x+b)}px`}})]})},V$=e=>{const[t,n]=T$(e.setCols);return y.jsx(o0,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:y.jsx(wr,{children:e.headers.map((r,o)=>y.jsx(L$,{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}`))})})},hS=E.createContext({}),$$=()=>E.useContext(hS),z$=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(wr,{children:n.children})})),B$=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),H$=E.forwardRef(({context:e,...t},n)=>{const r=$$(),o={...t==null?void 0:t.style,top:Ve.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs hidden md:table-header-group group:sticky top-0 bg-transparent",ref:n})}),W$=E.forwardRef(({context:e,item:t,...n},r)=>y.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row h-fit flex flex-wrap gap-1 flex-col justify-center md:table-row ${(n==null?void 0:n.className)??""}`})),q$=E.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:y.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),U$={TableHead:H$,Table:B$,TableBody:z$,TableRow:W$,TableFoot:q$},K$=[0,0,0,0,0,0,0,0,0,0],Y$=e=>y.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?cp:y.jsx(B0,{})}),G$=()=>y.jsx(E.Fragment,{}),Z$=()=>y.jsx(E.Fragment,{}),X$=[],jy=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=Ur(a),g=Ur(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return K$;if(c)return u.rows;const b=new pS(u.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:b.Where(S.name,S.operation.symbol,S.value)),r.length===0?b.Select():A$(b.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,S=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=h.current)==null||k.call(h),void f(!0)):f(!1)});return S.observe(b),()=>S.disconnect()},[g,h]);const v=m.length===0,x={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return y.jsxs("div",{className:"min-w-full",children:[y.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[y.jsx(dF,{useWindowScroll:!0,context:x,components:U$,totalCount:m.length,itemContent:v?G$:N$,data:v?X$:m,fixedFooterContent:p?Z$:null,fixedHeaderContent:()=>y.jsx(V$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?y.jsx(Y$,{loading:u.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?y.jsx(D$,{...l}):null]})},Q$=(e,t)=>typeof t=="function"?t(e):t,Ja=(e,t,n)=>e===t||n==null?void 0:n(t),J$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Ip(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Fp(e.cols),[e.cols]),[i,a]=Lf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:Q$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),Ja((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),Ja((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),Ja((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),Ja((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return y.jsx(hS.Provider,{value:t,children:y.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?y.jsx(O$,{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?y.jsx(jy,{...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}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(jy,{...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}`))})]})})},ez=["INPUT","SELECT"],gS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ez.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var ku,Ny;function $p(){if(Ny)return ku;Ny=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return ku={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},ku}var Ru,Fy;function vS(){if(Fy)return Ru;Fy=1;var e=$p(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],v=0;v<256;++v)m.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return m}(),o=function(v){for(;v.length>1;){var x=v.pop(),b=x.obj[x.prop];if(n(b)){for(var S=[],w=0;w<b.length;++w)typeof b[w]<"u"&&S.push(b[w]);x.obj[x.prop]=S}}},i=function(v,x){for(var b=x&&x.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(b[S]=v[S]);return b},a=function m(v,x,b){if(!x)return v;if(typeof x!="object"&&typeof x!="function"){if(n(v))v.push(x);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,x))&&(v[x]=!0);else return[v,x];return v}if(!v||typeof v!="object")return[v].concat(x);var S=v;return n(v)&&!n(x)&&(S=i(v,b)),n(v)&&n(x)?(x.forEach(function(w,T){if(t.call(v,T)){var C=v[T];C&&typeof C=="object"&&w&&typeof w=="object"?v[T]=m(C,w,b):v.push(w)}else v[T]=w}),v):Object.keys(x).reduce(function(w,T){var C=x[T];return t.call(w,T)?w[T]=m(w[T],C,b):w[T]=C,w},S)},s=function(v,x){return Object.keys(x).reduce(function(b,S){return b[S]=x[S],b},v)},l=function(m,v,x){var b=m.replace(/\+/g," ");if(x==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,x,b,S,w){if(v.length===0)return v;var T=v;if(typeof v=="symbol"?T=Symbol.prototype.toString.call(v):typeof v!="string"&&(T=String(v)),b==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(F){return"%26%23"+parseInt(F.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var I=T.length>=c?T.slice(k,k+c):T,A=[],j=0;j<I.length;++j){var D=I.charCodeAt(j);if(D===45||D===46||D===95||D===126||D>=48&&D<=57||D>=65&&D<=90||D>=97&&D<=122||w===e.RFC1738&&(D===40||D===41)){A[A.length]=I.charAt(j);continue}if(D<128){A[A.length]=r[D];continue}if(D<2048){A[A.length]=r[192|D>>6]+r[128|D&63];continue}if(D<55296||D>=57344){A[A.length]=r[224|D>>12]+r[128|D>>6&63]+r[128|D&63];continue}j+=1,D=65536+((D&1023)<<10|I.charCodeAt(j)&1023),A[A.length]=r[240|D>>18]+r[128|D>>12&63]+r[128|D>>6&63]+r[128|D&63]}C+=A.join("")}return C},d=function(v){for(var x=[{obj:{o:v},prop:"o"}],b=[],S=0;S<x.length;++S)for(var w=x[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var I=C[k],A=T[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(x.push({obj:T,prop:I}),b.push(A))}return o(x),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},h=function(v,x){return[].concat(v,x)},g=function(v,x){if(n(v)){for(var b=[],S=0;S<v.length;S+=1)b.push(x(v[S]));return b}return x(v)};return Ru={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},Ru}var Pu,Ly;function tz(){if(Ly)return Pu;Ly=1;var e=dT(),t=vS(),n=$p(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(g,m){a.apply(g,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"},p={},f=function g(m,v,x,b,S,w,T,C,k,I,A,j,D,F,P,O,_,V){for(var N=m,$=V,M=0,B=!1;($=$.get(p))!==void 0&&!B;){var X=$.get(m);if(M+=1,typeof X<"u"){if(X===M)throw new RangeError("Cyclic object value");B=!0}typeof $.get(p)>"u"&&(M=0)}if(typeof I=="function"?N=I(v,N):N instanceof Date?N=D(N):x==="comma"&&i(N)&&(N=t.maybeMap(N,function(Re){return Re instanceof Date?D(Re):Re})),N===null){if(w)return k&&!O?k(v,u.encoder,_,"key",F):v;N=""}if(d(N)||t.isBuffer(N)){if(k){var Q=O?v:k(v,u.encoder,_,"key",F);return[P(Q)+"="+P(k(N,u.encoder,_,"value",F))]}return[P(v)+"="+P(String(N))]}var J=[];if(typeof N>"u")return J;var G;if(x==="comma"&&i(N))O&&k&&(N=t.maybeMap(N,k)),G=[{value:N.length>0?N.join(",")||null:void 0}];else if(i(I))G=I;else{var Y=Object.keys(N);G=A?Y.sort(A):Y}var Z=C?String(v).replace(/\./g,"%2E"):String(v),L=b&&i(N)&&N.length===1?Z+"[]":Z;if(S&&i(N)&&N.length===0)return L+"[]";for(var z=0;z<G.length;++z){var K=G[z],ie=typeof K=="object"&&K&&typeof K.value<"u"?K.value:N[K];if(!(T&&ie===null)){var H=j&&C?String(K).replace(/\./g,"%2E"):String(K),ye=i(N)?typeof x=="function"?x(L,H):L:L+(j?"."+H:"["+H+"]");V.set(m,M);var Te=e();Te.set(p,V),s(J,g(ie,ye,x,b,S,w,T,C,x==="comma"&&O&&i(N)?null:k,I,A,j,D,F,P,O,_,Te))}}return J},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var 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],S=u.filter;(typeof m.filter=="function"||i(m.filter))&&(S=m.filter);var w;if(m.arrayFormat in o?w=m.arrayFormat:"indices"in m?w=m.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:S,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 Pu=function(g,m){var v=g,x=h(m),b,S;typeof x.filter=="function"?(S=x.filter,v=S("",v)):i(x.filter)&&(S=x.filter,b=S);var w=[];if(typeof v!="object"||v===null)return"";var T=o[x.arrayFormat],C=T==="comma"&&x.commaRoundTrip;b||(b=Object.keys(v)),x.sort&&b.sort(x.sort);for(var k=e(),I=0;I<b.length;++I){var A=b[I],j=v[A];x.skipNulls&&j===null||s(w,f(j,A,T,C,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 D=w.join(x.delimiter),F=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?F+="utf8=%26%2310003%3B&":F+="utf8=%E2%9C%93&"),D.length>0?F+D:""},Pu}var Au,Vy;function nz(){if(Vy)return Au;Vy=1;var e=vS(),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(f,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,h){var g={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=h.parameterLimit===1/0?void 0:h.parameterLimit,x=m.split(h.delimiter,h.throwOnLimitExceeded?v+1:v);if(h.throwOnLimitExceeded&&x.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,S,w=h.charset;if(h.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===s?w="utf-8":x[S]===a&&(w="iso-8859-1"),b=S,S=x.length);for(S=0;S<x.length;++S)if(S!==b){var T=x[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,I,A;k===-1?(I=h.decoder(T,r.decoder,w,"key"),A=h.strictNullHandling?null:""):(I=h.decoder(T.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(T.slice(k+1),h,n(g[I])?g[I].length:0),function(D){return h.decoder(D,r.decoder,w,"value")})),A&&h.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),T.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var j=t.call(g,I);j&&h.duplicates==="combine"?g[I]=e.combine(g[I],A):(!j||h.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,h,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");m=Array.isArray(f)&&f[v]?f[v].length:0}for(var x=g?f:i(f,h,m),b=p.length-1;b>=0;--b){var S,w=p[b];if(w==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(x===""||h.strictNullHandling&&x===null)?[]:e.combine([],x);else{S=h.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=h.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!h.parseArrays&&C===""?S={0:x}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(S=[],S[k]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(f,h,g,m){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,x=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&x.exec(v),w=S?v.slice(0,S.index):v,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=b.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+v.slice(S.index)+"]")}return c(T,h,g,m)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return Au=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},v=Object.keys(g),x=0;x<v.length;++x){var b=v[x],S=u(b,g[b],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},Au}var Iu,$y;function rz(){if($y)return Iu;$y=1;var e=tz(),t=nz(),n=$p();return Iu={formats:n,parse:t,stringify:e},Iu}var oz=rz(),qe;(function(e){e.assertEqual=o=>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"&&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})(qe||(qe={}));var zy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(zy||(zy={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ur=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=qe.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 dn 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 dn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.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()}}dn.create=e=>new dn(e);const ua=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:qe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let iz=ua;function jd(){return iz}const Nd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ce(e,t){const n=jd(),r=Nd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ua?void 0:ua].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 ke;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 Ht.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 ke;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 ke=Object.freeze({status:"aborted"}),Pi=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),By=e=>e.status==="aborted",Hy=e=>e.status==="dirty",Zo=e=>e.status==="valid",Ls=e=>typeof Promise<"u"&&e instanceof Promise;function Vs(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function yS(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Ai,Ii;class $n{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wy=(e,t)=>{if(Zo(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 dn(e.common.issues);return this._error=n,this._error}}};function _e(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)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Fe{get description(){return this._def.description}_getType(t){return ur(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ls(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){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ur(t)},i=this._parseSync({data:t,path:o.path,parent:o});return Wy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ur(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Zo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Zo(i)?{value:i.value}:{issues:o.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==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ur(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ls(o)?o:Promise.resolve(o));return Wy(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:re.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 Qn({schema:this,typeName:Ee.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 qn.create(this,this._def)}nullable(){return no.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nn.create(this)}promise(){return fa.create(this,this._def)}or(t){return Bs.create([this,t],this._def)}and(t){return Hs.create(this,t,this._def)}transform(t){return new Qn({..._e(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ys({..._e(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new SS({typeName:Ee.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Gs({..._e(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ml.create(this,t)}readonly(){return Zs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const az=/^c[^\s-]{8,}$/i,sz=/^[0-9a-z]+$/,lz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cz=/^[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,uz=/^[a-z0-9_-]{21}$/i,dz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,fz=/^[-+]?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)?)??$/,pz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _u;const hz=/^(?:(?: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])$/,gz=/^(?:(?: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])$/,vz=/^(([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]))$/,yz=/^(([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])$/,xz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xS="((\\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])))",wz=new RegExp(`^${xS}$`);function bS(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 Sz(e){return new RegExp(`^${bS(e)}$`)}function Tz(e){let t=`${xS}T${bS(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 Ez(e,t){return!!((t==="v4"||!t)&&hz.test(e)||(t==="v6"||!t)&&vz.test(e))}function Cz(e,t){if(!dz.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||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function kz(e,t){return!!((t==="v4"||!t)&&gz.test(e)||(t==="v6"||!t)&&yz.test(e))}class Wn extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")pz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")_u||(_u=new RegExp(mz,"u")),_u.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")uz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")az.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")lz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ce(o,{validation:"url",code:re.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"regex",code:re.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Tz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?wz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Sz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Ez(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Cz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?kz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):qe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Wn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wn({...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}}Wn.create=e=>{var t;return new Wn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function Rz(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class eo extends Fe{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)!==fe.number){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Rz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_finite,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.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"&&qe.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)}}eo.create=e=>new eo({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Xo extends Fe{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)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Xo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.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}}Xo.create=e=>{var t;return new Xo({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class Fd extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Yt(t.data)}}Fd.create=e=>new Fd({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class da extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_date}),ke}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new da({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}da.create=e=>new da({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,..._e(e)});class Ld extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Yt(t.data)}}Ld.create=e=>new Ld({typeName:Ee.ZodSymbol,..._e(e)});class $s extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Yt(t.data)}}$s.create=e=>new $s({typeName:Ee.ZodUndefined,..._e(e)});class zs extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Yt(t.data)}}zs.create=e=>new zs({typeName:Ee.ZodNull,..._e(e)});class Vd extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Vd.create=e=>new Vd({typeName:Ee.ZodAny,..._e(e)});class Mo extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}Mo.create=e=>new Mo({typeName:Ee.ZodUnknown,..._e(e)});class br extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),ke}}br.create=e=>new br({typeName:Ee.ZodNever,..._e(e)});class $d extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Yt(t.data)}}$d.create=e=>new $d({typeName:Ee.ZodVoid,..._e(e)});class Nn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),ke;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(n,{code:a?re.too_big:re.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ce(n,{code:re.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ce(n,{code:re.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 $n(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new $n(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Nn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Nn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Nn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Nn.create=(e,t)=>new Nn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,..._e(t)});function bo(e){if(e instanceof xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qn.create(bo(r))}return new xt({...e._def,shape:()=>t})}else return e instanceof Nn?new Nn({...e._def,type:bo(e.element)}):e instanceof qn?qn.create(bo(e.unwrap())):e instanceof no?no.create(bo(e.unwrap())):e instanceof Xn?Xn.create(e.items.map(t=>bo(t))):e}class xt extends Fe{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=qe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ce(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),ke}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 $n(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&&(ce(o,{code:re.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 $n(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,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new xt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}deepPartial(){return bo(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new xt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof qn;)i=i._def.innerType;n[r]=i}}),new xt({...this._def,shape:()=>n})}keyof(){return wS(qe.objectKeys(this.shape))}}xt.create=(e,t)=>new xt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Ee.ZodObject,..._e(t)});xt.strictCreate=(e,t)=>new xt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Ee.ZodObject,..._e(t)});xt.lazycreate=(e,t)=>new xt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Ee.ZodObject,..._e(t)});class Bs extends Fe{_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 dn(s.ctx.common.issues));return ce(n,{code:re.invalid_union,unionErrors:a}),ke}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 dn(l));return ce(n,{code:re.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}Bs.create=(e,t)=>new Bs({options:e,typeName:Ee.ZodUnion,..._e(t)});const Hn=e=>e instanceof qs?Hn(e.schema):e instanceof Qn?Hn(e.innerType()):e instanceof Us?[e.value]:e instanceof to?e.options:e instanceof Ks?qe.objectValues(e.enum):e instanceof Ys?Hn(e._def.innerType):e instanceof $s?[void 0]:e instanceof zs?[null]:e instanceof qn?[void 0,...Hn(e.unwrap())]:e instanceof no?[null,...Hn(e.unwrap())]:e instanceof SS||e instanceof Zs?Hn(e.unwrap()):e instanceof Gs?Hn(e._def.innerType):[];class zp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ce(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Hn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new zp({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function zd(e,t){const n=ur(e),r=ur(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=zd(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.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=zd(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hs extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(By(i)||By(a))return ke;const s=zd(i.value,a.value);return s.valid?((Hy(i)||Hy(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:re.invalid_intersection_types}),ke)};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}))}}Hs.create=(e,t,n)=>new Hs({left:e,right:t,typeName:Ee.ZodIntersection,..._e(n)});class Xn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return ce(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:re.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 $n(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Xn({...this._def,rest:t})}}Xn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xn({items:e,typeName:Ee.ZodTuple,rest:null,..._e(t)})};class Ws extends Fe{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!==fe.object)return ce(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new $n(r,s,r.path,s)),value:a._parse(new $n(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new Ws({keyType:t,valueType:n,typeName:Ee.ZodRecord,..._e(r)}):new Ws({keyType:Wn.create(),valueType:t,typeName:Ee.ZodRecord,..._e(n)})}}class Bd extends Fe{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!==fe.map)return ce(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new $n(r,s,r.path,[c,"key"])),value:i._parse(new $n(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 ke;(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 ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Bd.create=(e,t,n)=>new Bd({valueType:t,keyType:e,typeName:Ee.ZodMap,..._e(n)});class Qo extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(r,{code:re.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ce(r,{code:re.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 ke;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 $n(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Qo({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new Qo({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qo.create=(e,t)=>new Qo({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,..._e(t)});class Wi extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return Nd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jd(),ua].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return Nd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jd(),ua].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof fa){const s=this;return Yt(async function(...l){const c=new dn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Yt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new dn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new dn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Wi({...this._def,args:Xn.create(t).rest(Mo.create())})}returns(t){return new Wi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Wi({args:t||Xn.create([]).rest(Mo.create()),returns:n||Mo.create(),typeName:Ee.ZodFunction,..._e(r)})}}class qs extends Fe{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})}}qs.create=(e,t)=>new qs({getter:e,typeName:Ee.ZodLazy,..._e(t)});class Us extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Us.create=(e,t)=>new Us({value:e,typeName:Ee.ZodLiteral,..._e(t)});function wS(e,t){return new to({values:e,typeName:Ee.ZodEnum,..._e(t)})}class to extends Fe{constructor(){super(...arguments),Ai.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:qe.joinValues(r),received:n.parsedType,code:re.invalid_type}),ke}if(Vs(this,Ai)||yS(this,Ai,new Set(this._def.values)),!Vs(this,Ai).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:r}),ke}return Yt(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 to.create(t,{...this._def,...n})}exclude(t,n=this._def){return to.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ai=new WeakMap;to.create=wS;class Ks extends Fe{constructor(){super(...arguments),Ii.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ce(r,{expected:qe.joinValues(o),received:r.parsedType,code:re.invalid_type}),ke}if(Vs(this,Ii)||yS(this,Ii,new Set(qe.getValidEnumValues(this._def.values))),!Vs(this,Ii).has(t.data)){const o=qe.objectValues(n);return ce(r,{received:r.data,code:re.invalid_enum_value,options:o}),ke}return Yt(t.data)}get enum(){return this._def.values}}Ii=new WeakMap;Ks.create=(e,t)=>new Ks({values:e,typeName:Ee.ZodNativeEnum,..._e(t)});class fa extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fa.create=(e,t)=>new fa({type:e,typeName:Ee.ZodPromise,..._e(t)});class Qn extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ce(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?Pi(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Pi(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"?ke:(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"?ke:(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(!Zo(a))return a;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=>Zo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Qn.create=(e,t,n)=>new Qn({schema:e,typeName:Ee.ZodEffects,effect:t,..._e(n)});Qn.createWithPreprocess=(e,t,n)=>new Qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,..._e(n)});class qn extends Fe{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qn.create=(e,t)=>new qn({innerType:e,typeName:Ee.ZodOptional,..._e(t)});class no extends Fe{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}no.create=(e,t)=>new no({innerType:e,typeName:Ee.ZodNullable,..._e(t)});class Ys extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ys.create=(e,t)=>new Ys({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class Gs extends Fe{_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 Ls(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class Hd extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}Hd.create=e=>new Hd({typeName:Ee.ZodNaN,..._e(e)});class SS extends Fe{_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 Ml extends Fe{_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"?ke:i.status==="dirty"?(n.dirty(),Pi(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"?ke: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 Ml({in:t,out:n,typeName:Ee.ZodPipeline})}}class Zs extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Zo(o)&&(o.value=Object.freeze(o.value)),o);return Ls(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Ee.ZodReadonly,..._e(t)});xt.lazycreate;var Ee;(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"})(Ee||(Ee={}));Wn.create;eo.create;Hd.create;Xo.create;Fd.create;da.create;Ld.create;$s.create;zs.create;Vd.create;Mo.create;br.create;$d.create;Nn.create;xt.create;xt.strictCreate;Bs.create;zp.create;Hs.create;Xn.create;Ws.create;Bd.create;Qo.create;Wi.create;qs.create;Us.create;to.create;Ks.create;fa.create;Qn.create;qn.create;no.create;Qn.createWithPreprocess;Ml.create;const Pz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Az=(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]}}},TS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),Xt=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):TS(t),o=structuredClone(e);return Az(o,r,n),o},Iz=(e,t)=>e.localeCompare(t),xo={},ES=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return CS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=ES(e._def.innerType);return t==="ZodArray"?n??[]:n}},CS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,ES(n)])),kS=(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]=kS(i,o):n[r]=o||i)}return n},_z={sort:Iz,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},RS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return oz.parse(n.toString(),_z)},lr=(e,t)=>TS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),dr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Ou=e=>{const t=e.dataset.target;if(!t)return dr(e);const n=document.querySelector(`[data-origin="${t}"]`);return dr(n||e)},Oz={state:{},loading:!1,useOnChange:!1},qy=e=>e.dataset.target||e.name,Mz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Hi.LocalStorage.get(t);return Pz(n)?n:{}},clear:()=>void Hi.LocalStorage.delete(t),set:n=>Hi.LocalStorage.set(t,n)}},Dz=(e,t,n=Oz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Ve.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??CS(e)??{}),l=E.useCallback(b=>{var A;const S=b.target,w=b.currentTarget;if(S.dataset.optional==="true")return;const C=qy(S),k=Ou(S)||(w?dr(w):""),I=lr(C,e);if(S.setAttribute("data-initialized","true"),I){const j=I.safeParse(k),D=j.success?void 0:((A=j.error.issues[0])==null?void 0:A.message)??"";o(F=>Xt(F??{},C,D))}},[e]),c=E.useCallback(b=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,I)=>{var P;const A=I.element,j=I.schema.safeParse(dr(A));if(A.dataset.ignore==="ignore"||j.success)return k;const D=(P=j.error.issues[0])==null?void 0:P.message;A.setAttribute("data-initialized","true");const F=A.dataset.name||A.name||"";return Xt(k,F,D)},{}),C=Ve.empty(T)?null:T;o(C),console.error(C),b==null||b({form:w,errors:C||{}})},[]),u=(b,S=xo)=>{const w=lr(b,e),T=C=>{var I;if(!Mf(C))return;s(A=>Xt(A,b,C.toISOString())),o(A=>Xt(A,b,void 0));const k=i.current[b].element;if(k){const A=k.getAttribute("data-origin"),j=document.querySelector(`input[data-target="${A}"]`);j&&j.setCustomValidity("")}(I=S==null?void 0:S.onChange)==null||I.call(S,C)};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,date:Ve.string(a[b])?new Date(a[b]):a[b],required:S.required??!w.isOptional(),error:Cn(r,b),ref:C=>{C!==null&&(i.current[b]={element:C,schema:w})}}},d=(b,S=xo)=>{const w=lr(b,e);return{...S,name:b,id:b,onChange:C=>{var I;const k=C.target.value;s(A=>Xt(A,b,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),value:Cn(a,b,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[b]={element:C,schema:w}:void 0}},p=(b,S=xo)=>{const w=lr(b,e);return{...S,name:b,id:b,onChange:C=>{var I;const k=C.target.checked;s(A=>Xt(A??{},b,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[b]={element:C,schema:w}):void 0}},f=(b,S=xo)=>{const w=lr(b,e),T=C=>{var I,A;(I=C.persist)==null||I.call(C);const k=C.target.value;(A=S==null?void 0:S.onChange)==null||A.call(S,C),s(j=>Xt(j,b,k))};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),value:Cn(a,b,void 0)||(S==null?void 0:S.value)||"",type:Ve.instance(w,eo)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[b]={element:C,schema:w}}},h=(b,S=xo)=>{const w=lr(b,e);return{...S,name:b,id:b,onChangeOptions:C=>{s(k=>Xt(k,b,C))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),value:Cn(a,b,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[b]={element:C,schema:w})}},g=(b,S=xo)=>{const w=lr(b,e),T=w._def.typeName==="ZodNumber";return{...S,name:b,id:b,onChange:k=>{var A,j;(A=k.persist)==null||A.call(k);const I=T?k.target.valueAsNumber:k.target.value;(j=S==null?void 0:S.onChange)==null||j.call(S,k),s(D=>Xt(D,b,I))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Cn(a,b,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:w})}};E.useEffect(()=>{const b=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(dr(T)),k=D=>{var V;const F=qy(D.target);if(!F)return!1;const P=D.target,O=Ou(D.target)||(D.relatedTarget?dr(D.relatedTarget):""),_=w.schema.safeParse(O);if(P.setAttribute("value",O),_.success)return T.setCustomValidity&&T.setCustomValidity(""),o(N=>{if(Ve.null(N))return null;const $=Xt(N,F,void 0);return Ve.empty(N)||Ve.nil(N)||Ve.empty($)?null:$}),!1;if(T.required){const N=((V=_.error.issues[0])==null?void 0:V.message)||"";T.setCustomValidity&&T.setCustomValidity(N),o($=>{if(Ve.null($))return null;const M=Xt($,F,N||void 0);return Ve.empty(M)?null:M})}return!1},I=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,k,{signal:I.signal});const j=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:j,unsubscribe:()=>I.abort()}});return b.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>b.forEach(w=>w.unsubscribe())});const m=b=>S=>{var j;S.preventDefault();const w=S.currentTarget;let T=RS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(D=>{if(D.tagName==="SELECT"){const F=D;T=Xt(T,F.name,F.value)}if(D.tagName==="INPUT"){const F=D,P=Ou(F)||(F?dr(F):"");T=Xt(T,F.dataset.target||F.name,P)}});const k=kS(T,a),I=e.safeParse(k),A=()=>{var D;gS(w),(D=n.interceptor)==null||D.clear()};if(I.success){const D=JSON.stringify(I.data);return w.setAttribute("data-json",D),(j=n.interceptor)==null||j.clear(),b==null?void 0:b(S,{form:w,event:S,reset:A,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),w.reportValidity(),b==null?void 0:b(S,{form:w,json:T,event:S,reset:A,setErrors:o,data:T,success:!1,errors:I.error.issues.map(D=>({message:D.message,path:D.path.map(F=>String(F))}))})},v=b=>zf(a,b)||"",x=b=>({...b,id:t,name:t});return E.useEffect(()=>{var b;n.interceptor&&((b=n.interceptor)==null||b.set(a))},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:m,setState:s,textarea:f,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:h,disabled:r!==null}},jz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Nz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},PS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},AS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},IS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Fz={name:"dark",zIndex:IS,rounded:PS,spacing:AS,shadow:{floating:"0 1px 1px 0 rgb(0 0 0 / 0.02)"},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(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},Lz={rounded:PS,spacing:AS,name:"light",shadow:{floating:"0 1px 1px 0 rgb(0 0 0 / 0.02)"},zIndex:IS,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%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},Vz=Fz,$z=Lz,zz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gl,...e.tweaks},parser:e.parser||ml.hsla,map:{...hl,...e.map}}),[e]);return y.jsx(ai.Provider,{value:t,children:e.children})},Bz=()=>{const e=E.useContext(ai);return e?e.parser:ml.hsla};exports.Alert=CI;exports.Autocomplete=OF;exports.Button=el;exports.Calendar=z0;exports.Card=Hf;exports.Checkbox=_p;exports.ColType=Oo;exports.Collapse=d0;exports.CommandPalette=$2;exports.ComponentsProvider=zz;exports.Context=ai;exports.DatePicker=DF;exports.Dict=yn;exports.Dropdown=mi;exports.Empty=B0;exports.Expand=z2;exports.FileUpload=XL;exports.Form=QL;exports.Input=Pa;exports.InputFeedback=A1;exports.InputField=Ra;exports.Menu=W2;exports.MenuItem=H2;exports.Modal=dp;exports.MultiSelect=iV;exports.Notifications=bD;exports.Polymorph=un;exports.Radiobox=aV;exports.RenderOnView=dE;exports.Select=Qr;exports.Slider=BV;exports.Stats=wD;exports.Switch=HV;exports.Tab=CD;exports.Table=J$;exports.Tabs=TD;exports.Tag=Gd;exports.TaskList=WV;exports.Textarea=qV;exports.Timeline=kD;exports.TimelineItem=xl;exports.Toolbar=q2;exports.Tooltip=fp;exports.TransferList=YV;exports.createColumns=x$;exports.createCssProperties=pM;exports.createDesignTokens=N0;exports.createFormStorage=Mz;exports.createOptionCols=Fp;exports.createStyles=uM;exports.createTheme=fM;exports.createTokenStyles=mM;exports.css=Ie;exports.defaultDarkTheme=Vz;exports.defaultLightTheme=$z;exports.defaultTranslations=hl;exports.defaultTweaks=gl;exports.dispatchInput=px;exports.formReset=gS;exports.formToJson=RS;exports.getCoords=aE;exports.getJsonForm=jz;exports.getRemainingSize=qi;exports.getSchemaShape=lr;exports.hasVerticalScroll=mx;exports.initializeInputDataset=ma;exports.isMobile=L0;exports.isReactComponent=iE;exports.isReactFC=Yd;exports.isSsr=Yr;exports.mergeRefs=Un;exports.negate=gM;exports.noop=Bf;exports.parsers=ml;exports.path=zf;exports.reduceTokens=Vr;exports.safeRegex=id;exports.splitInto=F0;exports.useColorParser=Bz;exports.useForm=Dz;exports.useLocale=$f;exports.useNotification=yD;exports.usePrevious=Nz;exports.useReactive=dw;exports.useTablePreferences=S$;exports.useTranslations=Ct;exports.uuid=si;
240
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z1(e,t){if(e){if(typeof e=="string")return kd(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 kd(e,t)}}function kd(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 VL(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 $L(e){if(Array.isArray(e))return e}function by(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 mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?by(Object(n),!0).forEach(function(r){Rd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):by(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t){if(e==null)return{};var n=zL(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 zL(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 Mp=E.forwardRef(function(e,t){var n=e.children,r=Ns(e,IL),o=H1(r),i=o.open,a=Ns(o,_L);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(mt(mt({},a),{},{open:i})))});Mp.displayName="Dropzone";var B1={disabled:!1,getFilesFromEvent:XF,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};Mp.defaultProps=B1;Mp.propTypes={children:ot.func,accept:ot.objectOf(ot.arrayOf(ot.string)),multiple:ot.bool,preventDropOnDocument:ot.bool,noClick:ot.bool,noKeyboard:ot.bool,noDrag:ot.bool,noDragEventsBubbling:ot.bool,minSize:ot.number,maxSize:ot.number,maxFiles:ot.number,disabled:ot.bool,getFilesFromEvent:ot.func,onFileDialogCancel:ot.func,onFileDialogOpen:ot.func,useFsAccessApi:ot.bool,autoFocus:ot.bool,onDragEnter:ot.func,onDragLeave:ot.func,onDragOver:ot.func,onDrop:ot.func,onDropAccepted:ot.func,onDropRejected:ot.func,onError:ot.func,validator:ot.func};var Pd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function H1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=mt(mt({},B1),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,p=t.onDrop,f=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,P=E.useMemo(function(){return RL(n)},[n]),N=E.useMemo(function(){return kL(n)},[n]),D=E.useMemo(function(){return typeof m=="function"?m:wy},[m]),L=E.useMemo(function(){return typeof g=="function"?g:wy},[g]),A=E.useRef(null),O=E.useRef(null),M=E.useReducer(BL,Pd),F=Su(M,2),j=F[0],H=F[1],_=j.isFocused,z=j.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&CL()),Q=function(){!X.current&&z&&setTimeout(function(){if(O.current){var te=O.current.files;te.length||(H({type:"closeDialog"}),L())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[O,z,L,X]);var J=E.useRef([]),G=function(te){A.current&&A.current.contains(te.target)||(te.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",xy,!1),document.addEventListener("drop",G,!1)),function(){b&&(document.removeEventListener("dragover",xy),document.removeEventListener("drop",G))}},[A,b]),E.useEffect(function(){return!r&&x&&A.current&&A.current.focus(),function(){}},[A,x,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),J.current=[].concat(DL(J.current),[q.target]),Qa(q)&&Promise.resolve(o(q)).then(function(te){if(!(js(q)&&!C)){var me=te.length,Oe=me>0&&wL({files:te,accept:P,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),He=me>0&&!Oe;H({isDragAccept:Oe,isDragReject:He,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(te){return Y(te)})},[o,c,Y,C,P,a,i,s,l,I]),V=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=Qa(q);if(te&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return te&&d&&d(q),!1},[d,C]),$=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=J.current.filter(function(Oe){return A.current&&A.current.contains(Oe)}),me=te.indexOf(q.target);me!==-1&&te.splice(me,1),J.current=te,!(te.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qa(q)&&u&&u(q))},[A,u,C]),K=E.useCallback(function(q,te){var me=[],Oe=[];q.forEach(function(He){var Ye=F1(He,P),Ot=Su(Ye,2),pn=Ot[0],En=Ot[1],er=L1(He,a,i),tr=Su(er,2),nr=tr[0],W=tr[1],U=I?I(He):null;if(pn&&nr&&!U)me.push(He);else{var ze=[En,W];U&&(ze=ze.concat(U)),Oe.push({file:He,errors:ze.filter(function(tt){return tt})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(He){Oe.push({file:He,errors:[bL]})}),me.splice(0)),H({acceptedFiles:me,fileRejections:Oe,isDragReject:Oe.length>0,type:"setFiles"}),p&&p(me,Oe,te),Oe.length>0&&h&&h(Oe,te),me.length>0&&f&&f(me,te)},[H,s,P,a,i,l,p,f,h,I]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),J.current=[],Qa(q)&&Promise.resolve(o(q)).then(function(te){js(q)&&!C||K(te,q)}).catch(function(te){return Y(te)}),H({type:"reset"})},[o,K,Y,C]),B=E.useCallback(function(){if(X.current){H({type:"openDialog"}),D();var q={multiple:s,types:N};window.showOpenFilePicker(q).then(function(te){return o(te)}).then(function(te){K(te,null),H({type:"closeDialog"})}).catch(function(te){PL(te)?(L(te),H({type:"closeDialog"})):AL(te)?(X.current=!1,O.current?(O.current.value=null,O.current.click()):Y(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."))):Y(te)});return}O.current&&(H({type:"openDialog"}),D(),O.current.value=null,O.current.click())},[H,D,L,v,K,Y,N,s]),ye=E.useCallback(function(q){!A.current||!A.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),B())},[A,B]),Te=E.useCallback(function(){H({type:"focus"})},[]),Re=E.useCallback(function(){H({type:"blur"})},[]),$e=E.useCallback(function(){S||(EL()?setTimeout(B,0):B())},[S,B]),se=function(te){return r?null:te},xe=function(te){return w?null:se(te)},le=function(te){return T?null:se(te)},be=function(te){C&&te.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.role,He=q.onKeyDown,Ye=q.onFocus,Ot=q.onBlur,pn=q.onClick,En=q.onDragEnter,er=q.onDragOver,tr=q.onDragLeave,nr=q.onDrop,W=Ns(q,OL);return mt(mt(Rd({onKeyDown:xe(kn(He,ye)),onFocus:xe(kn(Ye,Te)),onBlur:xe(kn(Ot,Re)),onClick:se(kn(pn,$e)),onDragEnter:le(kn(En,Z)),onDragOver:le(kn(er,V)),onDragLeave:le(kn(tr,$)),onDrop:le(kn(nr,ie)),role:typeof Oe=="string"&&Oe!==""?Oe:"presentation"},me,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,ye,Te,Re,$e,Z,V,$,ie,w,T,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.onChange,He=q.onClick,Ye=Ns(q,ML),Ot=Rd({accept:P,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(kn(Oe,ie)),onClick:se(kn(He,ue)),tabIndex:-1},me,O);return mt(mt({},Ot),Ye)}},[O,n,s,ie,r]);return mt(mt({},j),{},{isFocused:_&&!r,getRootProps:oe,getInputProps:ee,rootRef:A,inputRef:O,open:se(B)})}function BL(e,t){switch(t.type){case"focus":return mt(mt({},e),{},{isFocused:!0});case"blur":return mt(mt({},e),{},{isFocused:!1});case"openDialog":return mt(mt({},Pd),{},{isFileDialogActive:!0});case"closeDialog":return mt(mt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return mt(mt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return mt(mt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return mt({},Pd);default:return e}}function wy(){}const W1=E.createContext([null,()=>{}]),HL=()=>E.useContext(W1),WL=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,qL={csv:Bc,xls:Bc,mov:hg,mp4:hg,xlsx:Bc,pdf:mg,txt:mg,json:YA,mp3:jA},UL=e=>{const[,t]=HL(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:WL(l),size:VF(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{var c;l.preventDefault(),l.stopPropagation(),(c=e.onDeleteFile)==null||c.call(e,e.file)},a=qL[e.file.name.split(".").at(-1)]??c0,s=n.type==="img"?y.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):y.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return y.jsxs("li",{className:"flex flex-row gap-4 justify-between items-center pb-6 w-full border-b border-card-border last:border-b-transparent",children:[y.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[y.jsx("button",{type:"button",onClick:o,className:"flex justify-center items-center size-20",children:s}),y.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[y.jsx("span",{children:e.file.name}),y.jsx("span",{className:"text-sm italic",children:n.size})]})]}),y.jsx("button",{onClick:i,type:"button",className:"p-2 transition-colors duration-300 ease-linear hover:text-danger-hover",children:y.jsx(xa,{size:16})})]})},KL=e=>y.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>y.jsx(UL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),q1=e=>{const t=Ct(),n=e.dragging?JA:tI;return y.jsxs("div",{className:"flex flex-col justify-center items-center",children:[y.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:y.jsx(n,{className:"text-primary",size:80})}),y.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[y.jsx("p",{children:t.uploadIdle}),y.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},YL=e=>e.isDragActive?y.jsx(q1,{files:e.files,dragging:!0}):e.files.length>0?y.jsx(KL,{onDeleteFile:e.onDeleteFile,files:e.files}):y.jsx(E.Fragment,{children:e.idle}),GL=y.jsx(q1,{dragging:!1}),ZL=e=>{const t=e.item.file,n=e.item.type;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),y.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?y.jsx("img",{className:"container block w-80",src:e.item.url,alt:t.name}):n==="video"?y.jsx("video",{className:"container block w-80",src:e.item.url,controls:!0,muted:!0}):n==="audio"?y.jsx("figure",{children:y.jsx("audio",{controls:!0,src:e.item.url})}):null]})},XL=({idle:e=GL,onDeleteFile:t,onDrop:n,...r})=>{const o=Ct(),i=E.useState(null),[a,s]=E.useState([]),l=r.files??a,c=()=>i[1](null),u=h=>{n==null||n(h),s(g=>g.concat(h))},{getRootProps:d,getInputProps:p,isDragActive:f}=H1({onDrop:u});return y.jsxs(W1.Provider,{value:i,children:[y.jsx(dp,{overlayClickClose:!0,title:o.uploadDialogTitle,ariaTitle:o.uploadDialogTitle,open:i[0]!==null,onChange:c,children:i[0]?y.jsx(ZL,{item:i[0]}):null}),y.jsxs("div",{...d(),"data-active":l?l.length>0:!1,className:"flex flex-col border items-center justify-center rounded-lg border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background data-[active=true]:border-transparent",children:[y.jsx("input",{...p(r),name:r.name,id:r.name}),y.jsx(YL,{onDeleteFile:t,isDragActive:f,idle:e,files:l})]})]})},QL=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return y.jsx("form",{...e,onSubmit:t})},Sy=40,JL=e=>y.jsx(E.Fragment,{children:e.children}),eV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Ty=[],tV=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(wr,{children:t.children})})}),nV=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),rV={List:tV,Item:nV},oV=e=>{const t=Ct(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.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]),y.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?y.jsxs(Gd,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},iV=E.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:p=!1,required:f=!1,dynamicOption:h=!1,onChangeOptions:g,...m},v)=>{const x=E.useMemo(()=>new yn(r.map(ee=>[ee.value,ee])),[r]),b=E.useRef(null),S=E.useRef(null),w=m.value??m.defaultValue??Ty,T=Ct(),[C,k]=E.useState(0),[I,P]=E.useState(!1),[N,D]=E.useState(""),[L,A]=E.useState(()=>{const ee=new yn;return w.forEach(q=>{const te=x.get(q);return te?ee.set(q,te):void 0}),ee}),O=E.useMemo(()=>Array.from(L.keys()),[L]),[M,F]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,te)=>ee.has(te.value)?[...q,te.label??te.value]:q,[])??w}),[j,H]=E.useState(null),_=E.useRef(Ty),z=h&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,X=N.length===0?z:lp(z,"value",[{key:"value",value:N},{key:"label",value:N}]),Q=up(I,"block-only"),J=X.filter(ee=>ee.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:V,refs:$,context:K}=kr({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:P,whileElementsMounted:ui,middleware:[wa(4),_w({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),te=(q==null?void 0:q.getBoundingClientRect().height)||0,me=qi($.reference.current,window.innerHeight),Oe=Math.min(te<Sy?me:te,me,ee.availableHeight),He=J.length===0?Sy:Math.min(Oe,me,te),Ye=`${b.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Ye,maxWidth:Ye,height:He})}})]}),ie=Yw(K,eV),{getReferenceProps:B,getFloatingProps:ye,getItemProps:Te}=Rr([so(K,{role:"listbox"}),ao(K),El(K,{cols:0,listRef:_,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>H(q=>ee??q)})]);E.useEffect(()=>{if(!I)return k(0);const ee=$.reference;if(ee.current===null)return;const q=qi(ee.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[N,I,$.reference]),E.useEffect(()=>{m.value&&A(new yn(m.value.map(ee=>[ee,x.get(ee)])))},[m.value,x]),E.useEffect(()=>{const ee=$.reference.current;if(ee)return ma(ee)},[]);const Re=(ee,q)=>{const te=L.clone(He=>He.has(ee.value)?He.remove(ee.value):He.set(ee.value,ee));A(te);const me=$.reference.current;if(!me)return;const Oe=te.map(He=>He.value);me==null||me.setAttribute("data-value",JSON.stringify(Oe)),g&&g(Oe),F(He=>He.concat(ee.label??"")),D(""),H(q)},$e=ee=>{const q=ee.target.value;return D(q),!I&&q===""?P(!0):(ee.target.name=m.name||"",q?P(!0):void 0)},se=()=>{var ee;P(!0),D(""),(ee=$.reference.current)==null||ee.focus()},xe=()=>{P(!0),D("")},le=()=>{var ee;(ee=$.reference.current)==null||ee.setAttribute("data-value","[]"),D(""),P(!1),A(new yn),g==null||g([])},be=m.id||m.name,oe=L.map((ee,q)=>y.jsx(Gd,{size:"small",icon:y.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:te=>{te.preventDefault(),te.stopPropagation(),Re(ee,q)},children:y.jsx(xa,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),ue={height:G?"0":L.size===0?C-49:C-86};return y.jsxs(Ra,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:se,children:[y.jsx(If,{size:20}),y.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),L?y.jsx("button",{type:"button",onClick:le,className:"transition-colors link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsxs("ul",{...B({...m,onFocus:xe,id:`${be}-shadow`,name:`${be}-shadow`,ref:$.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":O.join(","),className:Ie("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[O.length>0?null:y.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),y.jsx(oV,{label:c,children:oe})]}),y.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:v,required:f,defaultValue:m.value||O||void 0}),y.jsx(io,{preserveTabOrder:!0,children:I?y.jsx(Kw,{lockScroll:!0,children:y.jsx(pi,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs("div",{...ye({ref:$.setFloating,style:{...ie.styles,top:Z??0,position:V,left:Y,height:C-(O.length===0?65:30)}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[y.jsx("input",{autoFocus:!0,value:N,onChange:$e,title:m.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:ee=>{var q,te;if(ee.key==="ArrowDown"){let me=j+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),H(me)}if(ee.key==="ArrowUp"){let me=j-1;return me<0&&(me=J.length-1),(te=S.current)==null||te.scrollIntoView({index:me}),H(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),P(!1);if(ee.key==="Enter"){if(j!==null&&J[j])return ee.preventDefault(),Re(J[j],j);if(J.length===1)return ee.preventDefault(),Re(J[0],0)}}}),G?y.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:y.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=$.floating.current.querySelectorAll("li").item(0),te=(q?q.getBoundingClientRect().height:40)*J.length;return pa.flushSync(()=>k(te+2))},children:y.jsx(Pp,{ref:S,hidden:G,data:J,components:rV,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const te=q.Render??JL,me=L.has(q.value)||L.has(q.label??""),Oe=j===ee,He=q.label??q.value;return y.jsxs("button",{"data-value":q.value,...Te({ref:Ye=>void(_.current[ee]=Ye),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>Re(q,ee)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||Oe?"bg-floating-hover text-floating-foreground":""}`,children:[y.jsx(_p,{onChange:Bf,checked:me,"aria-checked":me,onClick:Ye=>{Ye.stopPropagation(),Re(q,ee)}}),y.jsx(te,{...m,label:q.label,value:q.value,children:He})]})}})}),L.size===0?null:y.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:oe})]})})}):null})]})}),aV=({children:e,className:t="",size:n,...r})=>y.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:[y.jsx("input",{...r,type:"radio",className:Ie("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]}),Qr=E.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:p,left:f,error:h,...g},m)=>{const v=Ct(),x=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(m,()=>x.current),E.useEffect(()=>{if(x.current===null)return;const w=new AbortController,T=x.current,C=ma(x.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=x.current)==null?void 0:w.focus()};return y.jsx(Ra,{info:n,left:f,error:h,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:y.jsxs("label",{htmlFor:b,children:[p,y.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[y.jsx(If,{size:20}),y.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:y.jsxs("select",{...g,id:b,name:b,required:e,ref:Un(m,x),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Ie("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[y.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function U1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Po(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ey(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function K1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ey(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():Ey(e[o],null)}}}}function Jr(...e){return R.useCallback(K1(...e),e)}function Y1(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...h}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,m=R.useMemo(()=>h,Object.values(h));return y.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,sV(o,...t)]}function sV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function G1(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=cV({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=G1(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function cV({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=G1(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var uV=R.createContext(void 0);function dV(e){const t=R.useContext(uV);return e||t||"ltr"}function fV(e){const t=R.useRef({value:e,previous:e});return R.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var pV=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{};function mV(e){const[t,n]=R.useState(void 0);return pV(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Ad(e){const t=hV(e),n=R.forwardRef((r,o)=>{const{children:i,...a}=r,s=R.Children.toArray(i),l=s.find(vV);if(l){const c=l.props.children,u=s.map(d=>d===l?R.Children.count(c)>1?R.Children.only(null):R.isValidElement(c)?c.props.children:null:d);return y.jsx(t,{...a,ref:o,children:R.isValidElement(c)?R.cloneElement(c,void 0,u):null})}return y.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hV(e){const t=R.forwardRef((n,r)=>{const{children:o,...i}=n;if(R.isValidElement(o)){const a=xV(o),s=yV(i,o.props);return o.type!==R.Fragment&&(s.ref=r?K1(r,a):a),R.cloneElement(o,s)}return R.Children.count(o)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gV=Symbol("radix.slottable");function vV(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gV}function yV(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)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function xV(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Il=bV.reduce((e,t)=>{const n=Ad(`Primitive.${t}`),r=R.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wV(e){const t=e+"CollectionProvider",[n,r]=Y1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:m,children:v}=g,x=E.useRef(null),b=E.useRef(new Map).current;return y.jsx(o,{scope:m,itemMap:b,collectionRef:x,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=Ad(s),c=E.forwardRef((g,m)=>{const{scope:v,children:x}=g,b=i(s,v),S=Jr(m,b.collectionRef);return y.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Ad(u),f=E.forwardRef((g,m)=>{const{scope:v,children:x,...b}=g,S=E.useRef(null),w=Jr(m,S),T=i(u,v);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),y.jsx(p,{[d]:"",ref:w,children:x})});f.displayName=u;function h(g){const m=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=m.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},h,r]}var Z1=["PageUp","PageDown"],X1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Q1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},yi="Slider",[Id,SV,TV]=wV(yi),[J1,Uz]=Y1(yi,[TV]),[EV,_l]=J1(yi),eS=R.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:h,...g}=e,m=R.useRef(new Set),v=R.useRef(0),b=a==="horizontal"?CV:kV,[S=[],w]=lV({prop:u,defaultProp:c,onChange:N=>{var L;(L=[...m.current][v.current])==null||L.focus(),d(N)}}),T=R.useRef(S);function C(N){const D=_V(S,N);P(N,D)}function k(N){P(N,v.current)}function I(){const N=T.current[v.current];S[v.current]!==N&&p(S)}function P(N,D,{commit:L}={commit:!1}){const A=jV(i),O=NV(Math.round((N-r)/i)*i+r,A),M=U1(O,[r,o]);w((F=[])=>{const j=AV(F,M,D);if(DV(j,l*i)){v.current=j.indexOf(M);const H=String(j)!==String(F);return H&&L&&p(j),H?j:F}else return F})}return y.jsx(EV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:m.current,values:S,orientation:a,form:h,children:y.jsx(Id.Provider,{scope:e.__scopeSlider,children:y.jsx(Id.Slot,{scope:e.__scopeSlider,children:y.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Po(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&P(r,0,{commit:!0}),onEndKeyDown:()=>!s&&P(o,S.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:D})=>{if(!s){const O=Z1.includes(N.key)||N.shiftKey&&X1.includes(N.key)?10:1,M=v.current,F=S[M],j=i*O*D;P(F+j,M,{commit:!0})}}})})})})});eS.displayName=yi;var[tS,nS]=J1(yi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),CV=R.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=R.useState(null),f=Jr(t,b=>p(b)),h=R.useRef(void 0),g=dV(o),m=g==="ltr",v=m&&!i||!m&&i;function x(b){const S=h.current||d.getBoundingClientRect(),w=[0,S.width],C=Dp(w,v?[n,r]:[r,n]);return h.current=S,C(b-S.left)}return y.jsx(tS,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:y.jsx(rS,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=x(b.clientX);a==null||a(S)},onSlideMove:b=>{const S=x(b.clientX);s==null||s(S)},onSlideEnd:()=>{h.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=Q1[v?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),kV=R.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=R.useRef(null),d=Jr(t,u),p=R.useRef(void 0),f=!o;function h(g){const m=p.current||u.current.getBoundingClientRect(),v=[0,m.height],b=Dp(v,f?[r,n]:[n,r]);return p.current=m,b(g-m.top)}return y.jsx(tS,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:y.jsx(rS,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=h(g.clientY);i==null||i(m)},onSlideMove:g=>{const m=h(g.clientY);a==null||a(m)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=Q1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),rS=R.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=_l(yi,n);return y.jsx(Il.span,{...c,ref:t,onKeyDown:Po(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Z1.concat(X1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Po(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Po(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Po(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),oS="SliderTrack",iS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(oS,n);return y.jsx(Il.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});iS.displayName=oS;var _d="SliderRange",aS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(_d,n),i=nS(_d,n),a=R.useRef(null),s=Jr(t,a),l=o.values.length,c=o.values.map(p=>lS(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return y.jsx(Il.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});aS.displayName=_d;var Od="SliderThumb",sS=R.forwardRef((e,t)=>{const n=SV(e.__scopeSlider),[r,o]=R.useState(null),i=Jr(t,s=>o(s)),a=R.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return y.jsx(RV,{...e,ref:i,index:a})}),RV=R.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=_l(Od,n),s=nS(Od,n),[l,c]=R.useState(null),u=Jr(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,p=mV(l),f=a.values[r],h=f===void 0?0:lS(f,a.min,a.max),g=IV(r,a.values.length),m=p==null?void 0:p[s.size],v=m?OV(m,h,s.direction):0;return R.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),y.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${v}px)`},children:[y.jsx(Id.ItemSlot,{scope:e.__scopeSlider,children:y.jsx(Il.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Po(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&y.jsx(PV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});sS.displayName=Od;var PV=e=>{const{value:t,...n}=e,r=R.useRef(null),o=fV(t);return R.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),y.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function AV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function lS(e,t,n){const i=100/(n-t)*(e-t);return U1(i,[0,100])}function IV(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function _V(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function OV(e,t,n){const r=e/2,i=Dp([0,50],[0,r]);return(r-i(t)*n)*n}function MV(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function DV(e,t){if(t>0){const n=MV(e);return Math.min(...n)>=t}return!0}function Dp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function jV(e){return(String(e).split(".")[1]||"").length}function NV(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var FV=eS,LV=iS,VV=aS,$V=sS;const zV=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Ve.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Ve.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),y.jsx(fp,{title:"",ref:r,as:$V,enabled:e.tooltip,className:"block bg-input-switch size-5 cursor-grab rounded-full border-1 border-input-border shadow active:cursor-grabbing",children:t})},BV=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(si()),s=r||o||[];return y.jsxs(FV,{...i,defaultValue:r,value:o,className:Ie("relative flex h-5 w-full touch-none select-none items-center",n),children:[y.jsx(LV,{className:"relative h-2 grow rounded-full bg-background",children:y.jsx(VV,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>y.jsx(zV,{tooltip:t??!1},`${a.current}-${c}`))]})},HV=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Ur(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},h=u.current;return h.addEventListener("change",f),()=>h==null?void 0:h.removeEventListener("change",f)}},[]);const p=()=>{var h,g;const f=!((h=u.current)!=null&&h.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return y.jsxs("fieldset",{className:Ie("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[y.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[y.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),y.jsx("button",{type:"button",role:"switch",onClick:p,"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:y.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"})}),y.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:y.jsx("span",{className:"font-medium text-foreground",children:e})})]}),y.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),WV=e=>{const[t,n]=mA();return E.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:xA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),y.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},qV=I1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
241
+ `);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)}),UV=e=>{const[t,n]=E.useState(0);return E.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},KV={Item:E.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},YV=e=>{const t=E.useRef(null),n=UV(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.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:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(Pa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx(Pp,{height:n,useWindowScroll:!0,data:e.source,components:KV,itemContent:(r,o)=>y.jsx(E.Fragment,{children:y.jsx(_p,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(el,{children:y.jsx(_f,{})})}),y.jsx("div",{})]})};var GV=Object.defineProperty,Cy=Object.getOwnPropertySymbols,ZV=Object.prototype.hasOwnProperty,XV=Object.prototype.propertyIsEnumerable,ky=(e,t,n)=>t in e?GV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QV=(e,t)=>{for(var n in t||(t={}))ZV.call(t,n)&&ky(e,n,t[n]);if(Cy)for(var n of Cy(t))XV.call(t,n)&&ky(e,n,t[n]);return e},jp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},JV=(e,t,n,r)=>Ol(jp,e,t,n,r),Go=e=>typeof e=="object",mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Go(e)&&!Go(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=>mr(e[r],t[r]))},e$=(e,t)=>(Go(e)||Array.isArray(e))&&t?e[t]:e,t$=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Fs=e=>/[0-9.]+/.test(e),Ry=e=>["string","number"].includes(typeof e),Py=e=>e==null||(e==null?void 0:e.length)===0||e==="",Ay={eq:mr,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:Py,notEmpty:e=>!Py(e),in:(e,t)=>jp(t,n=>mr(e,n)),notIn:(e,t)=>cS(t,n=>!mr(e,n))},n$=e=>{if(e in Ay)return Ay[e];throw new Error("Linq - Symbol not found")},_o=(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},Ol=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=n$(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},r$=(e,t,n,r)=>Ol(_o,e,t,n,r),cS=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},o$=(e,t,n,r)=>Ol(cS,e,t,n,r),uS=e=>{if(e===null)return null;const t=QV({},e);return Object.keys(t).forEach(n=>t[n]=Go(e[n])?uS(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Iy=(e,t)=>{if(Go(t)){for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1},i$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},a$=e=>_o(e,(t,n,r)=>Go(t)?n===r.findIndex(o=>mr(o,t)):n===r.indexOf(t)),s$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},dS=(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())},l$=(e,t)=>dS(e,n=>n[t]),_y=(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},c$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},u$=(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 Fs(e)&&Fs(t)?r.map(a=>Number.parseInt(a)):r},Tu=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Fs(e)&&Fs(t)){const o=[],[i,a]=c$(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return u$(e,t,r)},d$=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Tu(r,o,1):Tu(r,i,Number.parseInt(o,10))}return Ry(e)&&Ry(t)?Tu(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Eu=(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},Oy=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},f$=(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)},p$=(e,t,n,r)=>Ol(f$,e,t,n,r),My=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(t$(t))},fS=(e=>(e.Asc="asc",e.Desc="desc",e))(fS||{}),m$=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),h$=(e,t)=>e.sort(m$(t)),g$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:_o(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},v$=class Md{constructor(t=[]){this.array=t}static Range(...t){return d$(...t)}static New(t){return new Md(t)}Where(t,n,r){return this.array=r$(this.array,t,n,r),this}Some(t,n,r){return JV(this.array,t,n,r)}All(t,n,r){return o$(this.array,t,n,r)}Reverse(){return this.array=Oy(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=p$(this.array,t,n,r),this}Distinct(){return this.array=a$(this.array),this}First(t){return t===void 0?this.array[0]:s$(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?Eu((n,r)=>n+r,0,this.array):Eu((n,r)=>n+e$(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return l$(this.array,t)}GroupWith(t){return dS(this.array,t)}Except(t){return _o(this.array,n=>!Iy(t,n))}Intersect(t){return _o(this.array,n=>Iy(t,n))}OrderBy(t,n){let r;return r=t?My(this.array,t):this.array.toSorted(),this.array=n==="desc"?Oy(r):r,this}Includes(t){return jp(this.array,n=>mr(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 Eu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(_y(this.array,n=>[t,n]))}Zip(t,n){return _y(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:_o(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Md(uS(this.array))}ToObject(t){return i$(this.array,t)}Sort(t){return Array.isArray(t)?h$(this.array,t):My(this.array,t)}Unique(t){return g$(this.array,t)}},pS=v$,Cu={},Dy;function y$(){return Dy||(Dy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(x){window.console.log(x)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const x=v.getItem(m);try{return JSON.parse(x)}catch{return x??null}},i=m=>Object.keys(m).reduce((v,x)=>({...v,[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,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${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 v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=p.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,x={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((w,T)=>{const C=T.parse(x);return C===""?w:w.concat(C)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=S,u()}},f=m=>{const v=new Set,x=b=>{m().removeItem(b);const S=i(m());v.forEach(w=>w(S))};return{delete:x,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const S=m().getItem(b);return!n(S)},deleteAll:()=>{t(m(),x),v.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,S)=>{m().setItem(b,JSON.stringify(S)),v.forEach(w=>w(m()))}}},h=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=h,e.createStorage=f}(Cu)),Cu}var Hi=y$();const Np=e=>e.headerLabel??e.thead??e.id,Fp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Oo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Oo||{});const Lp=e=>e.type==="number"?e.valueAsNumber:e.value,x$=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},b$={},w$=(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})},S$=(e,t,n=b$)=>{const r=Yr()?null:Hi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Lf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:w$(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Yr()||Hi.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},T$=e=>{const t=Ur(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Dd=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??Oo.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:si(),operation:l,label:Np(e),name:o,type:i,value:"",...r}},Vp=()=>{const e=Ct(),t=E.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:E.useMemo(()=>({[Oo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Oo.Boolean]:[t.is,t.isNot],[Oo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},E$=e=>{const t=Ct(),n=Vp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Dd(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(h=>u===h.id);return Dd(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},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=Lp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return y.jsx(E.Fragment,{children:y.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(sI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(Qr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(Qr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(Pa,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),y.jsx("div",{className:"mt-5 flex items-center justify-center",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:y.jsx(dl,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[y.jsx(Of,{size:14})," ",t.tableFilterNewFilter]})})]})})})},C$=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=Vp(),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=Lp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[y.jsx(Qr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(Pa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(dl,{className:"text-danger",size:14})})]})},k$=({item:e,onPointerDown:t})=>{const n=ul(0);return y.jsxs(i0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(oI,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},R$=e=>{var l;const t=Ct(),n=Fp(e.cols),r=vA(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var m;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new pS(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(gT(h).map((v,x)=>{const b=h[v];return{...g,groupId:si(),groupKey:d,index:x,rows:b,groupName:v}}))},s=()=>e.setGroups([]);return y.jsx(E.Fragment,{children:y.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(bI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(Qr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),y.jsx(el,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:y.jsx(dl,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(RE,{children:y.jsx(o0,{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(c=>y.jsx(k$,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},P$=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),A$=(e,t)=>e.toSorted(P$(t)),mS=(e,t,n)=>({label:t,id:si(),type:n,value:e.id}),I$=e=>{const t=Ct(),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,mS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return y.jsx(E.Fragment,{children:y.jsx(mi,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(s0,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(Qr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(Qr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:y.jsx(dl,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(Of,{size:14})," ",t.tableSortAddButton]})})]})})})},_$=e=>{const t=Ct(),[n,r]=E.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");E.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=mS(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Np(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?y.jsx(OA,{size:14}):null,n==="desc"?y.jsx(IA,{size:14}):null,n==="undefined"?y.jsx(s0,{size:14}):null]})},O$=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(E$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(I$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(R$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.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=Lp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function M$(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 D$=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>M$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(E.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(un,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(E.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(un,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?y.jsx("li",{children:y.jsx(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},j$=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.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 E.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()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},N$=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=zf(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?y.jsx(j$,{children:y.jsx(p,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),y.jsx("span",{className:"relative",children:o?cp:c?y.jsx(E.Fragment,{children:y.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):y.jsx(E.Fragment,{children:Ve.nil(l)?"":l})}))})})},F$={top:0,left:0,right:0,bottom:-1},L$=e=>{var g;const t=Ip(),n=Ct(),r=e.filters.filter(m=>m.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=Vp(),l=o?fI:mI,c=E.useRef(null),u=m=>{const v=m.currentTarget.dataset.id||"";return e.setFilters(x=>x.filter(b=>b.id!==v))},d=E.useCallback(m=>{if(m===null)return;c.current=m;const v=new AbortController;return m.addEventListener("pointerdown",x=>{if(x.target.dataset.type==="resizer")return x.stopPropagation(),x.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(m=>e.header.id===m.value),f=p!=null&&p.type?p.type===fS.Asc?"ascending":"descending":"none",h=Np(e.header);return y.jsxs(i0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[y.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:y.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?y.jsx(mi,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:h})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(E.Fragment,{children:r.map(m=>y.jsx("li",{className:"my-1",children:y.jsx(C$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Dd(e.header,s.options,s.operations))),children:[y.jsx(Of,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?y.jsx(_$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(pt.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:F$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:m=>void m.currentTarget.focus(),onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const x=c.current.getBoundingClientRect().width,b=v.delta.x;c.current.style.width=`${Math.abs(x+b)}px`}})]})},V$=e=>{const[t,n]=T$(e.setCols);return y.jsx(o0,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:y.jsx(wr,{children:e.headers.map((r,o)=>y.jsx(L$,{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}`))})})},hS=E.createContext({}),$$=()=>E.useContext(hS),z$=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(wr,{children:n.children})})),B$=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),H$=E.forwardRef(({context:e,...t},n)=>{const r=$$(),o={...t==null?void 0:t.style,top:Ve.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 hidden bg-transparent md:table-header-group",ref:n})}),W$=E.forwardRef(({context:e,item:t,...n},r)=>y.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),q$=E.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:y.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),U$={TableHead:H$,Table:B$,TableBody:z$,TableRow:W$,TableFoot:q$},K$=[0,0,0,0,0,0,0,0,0,0],Y$=e=>y.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?cp:y.jsx(B0,{})}),G$=()=>y.jsx(E.Fragment,{}),Z$=()=>y.jsx(E.Fragment,{}),X$=[],jy=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=Ur(a),g=Ur(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return K$;if(c)return u.rows;const b=new pS(u.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:b.Where(S.name,S.operation.symbol,S.value)),r.length===0?b.Select():A$(b.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,S=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=h.current)==null||k.call(h),void f(!0)):f(!1)});return S.observe(b),()=>S.disconnect()},[g,h]);const v=m.length===0,x={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return y.jsxs("div",{className:"min-w-full",children:[y.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[y.jsx(dF,{useWindowScroll:!0,context:x,components:U$,totalCount:m.length,itemContent:v?G$:N$,data:v?X$:m,fixedFooterContent:p?Z$:null,fixedHeaderContent:()=>y.jsx(V$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?y.jsx(Y$,{loading:u.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?y.jsx(D$,{...l}):null]})},Q$=(e,t)=>typeof t=="function"?t(e):t,Ja=(e,t,n)=>e===t||n==null?void 0:n(t),J$=e=>{const t=Ip(),n=E.useMemo(()=>({sticky:e.sticky||t.table.sticky}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>Fp(e.cols),[e.cols]),[i,a]=Lf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:Q$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),Ja((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),Ja((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),Ja((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),Ja((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return y.jsx(hS.Provider,{value:n,children:y.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?y.jsx(O$,{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?y.jsx(jy,{...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}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(jy,{...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}`))})]})})},ez=["INPUT","SELECT"],gS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ez.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var ku,Ny;function $p(){if(Ny)return ku;Ny=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return ku={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},ku}var Ru,Fy;function vS(){if(Fy)return Ru;Fy=1;var e=$p(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],v=0;v<256;++v)m.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return m}(),o=function(v){for(;v.length>1;){var x=v.pop(),b=x.obj[x.prop];if(n(b)){for(var S=[],w=0;w<b.length;++w)typeof b[w]<"u"&&S.push(b[w]);x.obj[x.prop]=S}}},i=function(v,x){for(var b=x&&x.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(b[S]=v[S]);return b},a=function m(v,x,b){if(!x)return v;if(typeof x!="object"&&typeof x!="function"){if(n(v))v.push(x);else if(v&&typeof v=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,x))&&(v[x]=!0);else return[v,x];return v}if(!v||typeof v!="object")return[v].concat(x);var S=v;return n(v)&&!n(x)&&(S=i(v,b)),n(v)&&n(x)?(x.forEach(function(w,T){if(t.call(v,T)){var C=v[T];C&&typeof C=="object"&&w&&typeof w=="object"?v[T]=m(C,w,b):v.push(w)}else v[T]=w}),v):Object.keys(x).reduce(function(w,T){var C=x[T];return t.call(w,T)?w[T]=m(w[T],C,b):w[T]=C,w},S)},s=function(v,x){return Object.keys(x).reduce(function(b,S){return b[S]=x[S],b},v)},l=function(m,v,x){var b=m.replace(/\+/g," ");if(x==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(v,x,b,S,w){if(v.length===0)return v;var T=v;if(typeof v=="symbol"?T=Symbol.prototype.toString.call(v):typeof v!="string"&&(T=String(v)),b==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(L){return"%26%23"+parseInt(L.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var I=T.length>=c?T.slice(k,k+c):T,P=[],N=0;N<I.length;++N){var D=I.charCodeAt(N);if(D===45||D===46||D===95||D===126||D>=48&&D<=57||D>=65&&D<=90||D>=97&&D<=122||w===e.RFC1738&&(D===40||D===41)){P[P.length]=I.charAt(N);continue}if(D<128){P[P.length]=r[D];continue}if(D<2048){P[P.length]=r[192|D>>6]+r[128|D&63];continue}if(D<55296||D>=57344){P[P.length]=r[224|D>>12]+r[128|D>>6&63]+r[128|D&63];continue}N+=1,D=65536+((D&1023)<<10|I.charCodeAt(N)&1023),P[P.length]=r[240|D>>18]+r[128|D>>12&63]+r[128|D>>6&63]+r[128|D&63]}C+=P.join("")}return C},d=function(v){for(var x=[{obj:{o:v},prop:"o"}],b=[],S=0;S<x.length;++S)for(var w=x[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var I=C[k],P=T[I];typeof P=="object"&&P!==null&&b.indexOf(P)===-1&&(x.push({obj:T,prop:I}),b.push(P))}return o(x),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},h=function(v,x){return[].concat(v,x)},g=function(v,x){if(n(v)){for(var b=[],S=0;S<v.length;S+=1)b.push(x(v[S]));return b}return x(v)};return Ru={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},Ru}var Pu,Ly;function tz(){if(Ly)return Pu;Ly=1;var e=dT(),t=vS(),n=$p(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(g,m){a.apply(g,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"},p={},f=function g(m,v,x,b,S,w,T,C,k,I,P,N,D,L,A,O,M,F){for(var j=m,H=F,_=0,z=!1;(H=H.get(p))!==void 0&&!z;){var X=H.get(m);if(_+=1,typeof X<"u"){if(X===_)throw new RangeError("Cyclic object value");z=!0}typeof H.get(p)>"u"&&(_=0)}if(typeof I=="function"?j=I(v,j):j instanceof Date?j=D(j):x==="comma"&&i(j)&&(j=t.maybeMap(j,function(Re){return Re instanceof Date?D(Re):Re})),j===null){if(w)return k&&!O?k(v,u.encoder,M,"key",L):v;j=""}if(d(j)||t.isBuffer(j)){if(k){var Q=O?v:k(v,u.encoder,M,"key",L);return[A(Q)+"="+A(k(j,u.encoder,M,"value",L))]}return[A(v)+"="+A(String(j))]}var J=[];if(typeof j>"u")return J;var G;if(x==="comma"&&i(j))O&&k&&(j=t.maybeMap(j,k)),G=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))G=I;else{var Y=Object.keys(j);G=P?Y.sort(P):Y}var Z=C?String(v).replace(/\./g,"%2E"):String(v),V=b&&i(j)&&j.length===1?Z+"[]":Z;if(S&&i(j)&&j.length===0)return V+"[]";for(var $=0;$<G.length;++$){var K=G[$],ie=typeof K=="object"&&K&&typeof K.value<"u"?K.value:j[K];if(!(T&&ie===null)){var B=N&&C?String(K).replace(/\./g,"%2E"):String(K),ye=i(j)?typeof x=="function"?x(V,B):V:V+(N?"."+B:"["+B+"]");F.set(m,_);var Te=e();Te.set(p,F),s(J,g(ie,ye,x,b,S,w,T,C,x==="comma"&&O&&i(j)?null:k,I,P,N,D,L,A,O,M,Te))}}return J},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var 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],S=u.filter;(typeof m.filter=="function"||i(m.filter))&&(S=m.filter);var w;if(m.arrayFormat in o?w=m.arrayFormat:"indices"in m?w=m.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:S,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 Pu=function(g,m){var v=g,x=h(m),b,S;typeof x.filter=="function"?(S=x.filter,v=S("",v)):i(x.filter)&&(S=x.filter,b=S);var w=[];if(typeof v!="object"||v===null)return"";var T=o[x.arrayFormat],C=T==="comma"&&x.commaRoundTrip;b||(b=Object.keys(v)),x.sort&&b.sort(x.sort);for(var k=e(),I=0;I<b.length;++I){var P=b[I],N=v[P];x.skipNulls&&N===null||s(w,f(N,P,T,C,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 D=w.join(x.delimiter),L=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?L+="utf8=%26%2310003%3B&":L+="utf8=%E2%9C%93&"),D.length>0?L+D:""},Pu}var Au,Vy;function nz(){if(Vy)return Au;Vy=1;var e=vS(),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(f,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,h){var g={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=h.parameterLimit===1/0?void 0:h.parameterLimit,x=m.split(h.delimiter,h.throwOnLimitExceeded?v+1:v);if(h.throwOnLimitExceeded&&x.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,S,w=h.charset;if(h.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===s?w="utf-8":x[S]===a&&(w="iso-8859-1"),b=S,S=x.length);for(S=0;S<x.length;++S)if(S!==b){var T=x[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,I,P;k===-1?(I=h.decoder(T,r.decoder,w,"key"),P=h.strictNullHandling?null:""):(I=h.decoder(T.slice(0,k),r.decoder,w,"key"),P=e.maybeMap(i(T.slice(k+1),h,n(g[I])?g[I].length:0),function(D){return h.decoder(D,r.decoder,w,"value")})),P&&h.interpretNumericEntities&&w==="iso-8859-1"&&(P=o(String(P))),T.indexOf("[]=")>-1&&(P=n(P)?[P]:P);var N=t.call(g,I);N&&h.duplicates==="combine"?g[I]=e.combine(g[I],P):(!N||h.duplicates==="last")&&(g[I]=P)}return g},c=function(p,f,h,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");m=Array.isArray(f)&&f[v]?f[v].length:0}for(var x=g?f:i(f,h,m),b=p.length-1;b>=0;--b){var S,w=p[b];if(w==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(x===""||h.strictNullHandling&&x===null)?[]:e.combine([],x);else{S=h.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=h.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!h.parseArrays&&C===""?S={0:x}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(S=[],S[k]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(f,h,g,m){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,x=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&x.exec(v),w=S?v.slice(0,S.index):v,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=b.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+v.slice(S.index)+"]")}return c(T,h,g,m)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return Au=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},v=Object.keys(g),x=0;x<v.length;++x){var b=v[x],S=u(b,g[b],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},Au}var Iu,$y;function rz(){if($y)return Iu;$y=1;var e=tz(),t=nz(),n=$p();return Iu={formats:n,parse:t,stringify:e},Iu}var oz=rz(),qe;(function(e){e.assertEqual=o=>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"&&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})(qe||(qe={}));var zy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(zy||(zy={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ur=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=qe.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 dn 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 dn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.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()}}dn.create=e=>new dn(e);const ua=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.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}"`:qe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let iz=ua;function jd(){return iz}const Nd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ce(e,t){const n=jd(),r=Nd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ua?void 0:ua].filter(o=>!!o)});e.common.issues.push(r)}class Ht{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 ke;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 Ht.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 ke;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 ke=Object.freeze({status:"aborted"}),Pi=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),By=e=>e.status==="aborted",Hy=e=>e.status==="dirty",Zo=e=>e.status==="valid",Ls=e=>typeof Promise<"u"&&e instanceof Promise;function Vs(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function yS(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var Ai,Ii;class $n{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wy=(e,t)=>{if(Zo(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 dn(e.common.issues);return this._error=n,this._error}}};function _e(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)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Fe{get description(){return this._def.description}_getType(t){return ur(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ls(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){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ur(t)},i=this._parseSync({data:t,path:o.path,parent:o});return Wy(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ur(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Zo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Zo(i)?{value:i.value}:{issues:o.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==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ur(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ls(o)?o:Promise.resolve(o));return Wy(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:re.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 Qn({schema:this,typeName:Ee.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 qn.create(this,this._def)}nullable(){return no.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nn.create(this)}promise(){return fa.create(this,this._def)}or(t){return Bs.create([this,t],this._def)}and(t){return Hs.create(this,t,this._def)}transform(t){return new Qn({..._e(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ys({..._e(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new SS({typeName:Ee.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Gs({..._e(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ml.create(this,t)}readonly(){return Zs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const az=/^c[^\s-]{8,}$/i,sz=/^[0-9a-z]+$/,lz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cz=/^[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,uz=/^[a-z0-9_-]{21}$/i,dz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,fz=/^[-+]?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)?)??$/,pz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _u;const hz=/^(?:(?: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])$/,gz=/^(?:(?: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])$/,vz=/^(([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]))$/,yz=/^(([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])$/,xz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xS="((\\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])))",wz=new RegExp(`^${xS}$`);function bS(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 Sz(e){return new RegExp(`^${bS(e)}$`)}function Tz(e){let t=`${xS}T${bS(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 Ez(e,t){return!!((t==="v4"||!t)&&hz.test(e)||(t==="v6"||!t)&&vz.test(e))}function Cz(e,t){if(!dz.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||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function kz(e,t){return!!((t==="v4"||!t)&&gz.test(e)||(t==="v6"||!t)&&yz.test(e))}class Wn extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")pz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")_u||(_u=new RegExp(mz,"u")),_u.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")uz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")az.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")lz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ce(o,{validation:"url",code:re.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"regex",code:re.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Tz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?wz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Sz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Ez(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Cz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?kz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):qe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Wn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.errToObj(t==null?void 0: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==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wn({...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}}Wn.create=e=>{var t;return new Wn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function Rz(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class eo extends Fe{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)!==fe.number){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Rz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_finite,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.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"&&qe.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)}}eo.create=e=>new eo({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Xo extends Fe{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)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Xo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.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}}Xo.create=e=>{var t;return new Xo({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class Fd extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Yt(t.data)}}Fd.create=e=>new Fd({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class da extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_date}),ke}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new da({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.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}}da.create=e=>new da({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,..._e(e)});class Ld extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Yt(t.data)}}Ld.create=e=>new Ld({typeName:Ee.ZodSymbol,..._e(e)});class $s extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Yt(t.data)}}$s.create=e=>new $s({typeName:Ee.ZodUndefined,..._e(e)});class zs extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Yt(t.data)}}zs.create=e=>new zs({typeName:Ee.ZodNull,..._e(e)});class Vd extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Vd.create=e=>new Vd({typeName:Ee.ZodAny,..._e(e)});class Mo extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}Mo.create=e=>new Mo({typeName:Ee.ZodUnknown,..._e(e)});class br extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),ke}}br.create=e=>new br({typeName:Ee.ZodNever,..._e(e)});class $d extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Yt(t.data)}}$d.create=e=>new $d({typeName:Ee.ZodVoid,..._e(e)});class Nn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),ke;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(n,{code:a?re.too_big:re.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ce(n,{code:re.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ce(n,{code:re.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 $n(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new $n(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Nn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new Nn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new Nn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}Nn.create=(e,t)=>new Nn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,..._e(t)});function bo(e){if(e instanceof xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qn.create(bo(r))}return new xt({...e._def,shape:()=>t})}else return e instanceof Nn?new Nn({...e._def,type:bo(e.element)}):e instanceof qn?qn.create(bo(e.unwrap())):e instanceof no?no.create(bo(e.unwrap())):e instanceof Xn?Xn.create(e.items.map(t=>bo(t))):e}class xt extends Fe{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=qe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ce(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),ke}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 $n(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&&(ce(o,{code:re.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 $n(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,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new xt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}deepPartial(){return bo(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new xt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof qn;)i=i._def.innerType;n[r]=i}}),new xt({...this._def,shape:()=>n})}keyof(){return wS(qe.objectKeys(this.shape))}}xt.create=(e,t)=>new xt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Ee.ZodObject,..._e(t)});xt.strictCreate=(e,t)=>new xt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Ee.ZodObject,..._e(t)});xt.lazycreate=(e,t)=>new xt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Ee.ZodObject,..._e(t)});class Bs extends Fe{_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 dn(s.ctx.common.issues));return ce(n,{code:re.invalid_union,unionErrors:a}),ke}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 dn(l));return ce(n,{code:re.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}Bs.create=(e,t)=>new Bs({options:e,typeName:Ee.ZodUnion,..._e(t)});const Hn=e=>e instanceof qs?Hn(e.schema):e instanceof Qn?Hn(e.innerType()):e instanceof Us?[e.value]:e instanceof to?e.options:e instanceof Ks?qe.objectValues(e.enum):e instanceof Ys?Hn(e._def.innerType):e instanceof $s?[void 0]:e instanceof zs?[null]:e instanceof qn?[void 0,...Hn(e.unwrap())]:e instanceof no?[null,...Hn(e.unwrap())]:e instanceof SS||e instanceof Zs?Hn(e.unwrap()):e instanceof Gs?Hn(e._def.innerType):[];class zp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ce(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Hn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new zp({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function zd(e,t){const n=ur(e),r=ur(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=zd(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.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=zd(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hs extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(By(i)||By(a))return ke;const s=zd(i.value,a.value);return s.valid?((Hy(i)||Hy(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:re.invalid_intersection_types}),ke)};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}))}}Hs.create=(e,t,n)=>new Hs({left:e,right:t,typeName:Ee.ZodIntersection,..._e(n)});class Xn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return ce(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:re.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 $n(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Xn({...this._def,rest:t})}}Xn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xn({items:e,typeName:Ee.ZodTuple,rest:null,..._e(t)})};class Ws extends Fe{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!==fe.object)return ce(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new $n(r,s,r.path,s)),value:a._parse(new $n(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new Ws({keyType:t,valueType:n,typeName:Ee.ZodRecord,..._e(r)}):new Ws({keyType:Wn.create(),valueType:t,typeName:Ee.ZodRecord,..._e(n)})}}class Bd extends Fe{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!==fe.map)return ce(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new $n(r,s,r.path,[c,"key"])),value:i._parse(new $n(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 ke;(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 ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Bd.create=(e,t,n)=>new Bd({valueType:t,keyType:e,typeName:Ee.ZodMap,..._e(n)});class Qo extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(r,{code:re.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ce(r,{code:re.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 ke;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 $n(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Qo({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new Qo({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qo.create=(e,t)=>new Qo({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,..._e(t)});class Wi extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return Nd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jd(),ua].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return Nd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jd(),ua].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof fa){const s=this;return Yt(async function(...l){const c=new dn([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Yt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new dn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new dn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Wi({...this._def,args:Xn.create(t).rest(Mo.create())})}returns(t){return new Wi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Wi({args:t||Xn.create([]).rest(Mo.create()),returns:n||Mo.create(),typeName:Ee.ZodFunction,..._e(r)})}}class qs extends Fe{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})}}qs.create=(e,t)=>new qs({getter:e,typeName:Ee.ZodLazy,..._e(t)});class Us extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Us.create=(e,t)=>new Us({value:e,typeName:Ee.ZodLiteral,..._e(t)});function wS(e,t){return new to({values:e,typeName:Ee.ZodEnum,..._e(t)})}class to extends Fe{constructor(){super(...arguments),Ai.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:qe.joinValues(r),received:n.parsedType,code:re.invalid_type}),ke}if(Vs(this,Ai)||yS(this,Ai,new Set(this._def.values)),!Vs(this,Ai).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:r}),ke}return Yt(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 to.create(t,{...this._def,...n})}exclude(t,n=this._def){return to.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ai=new WeakMap;to.create=wS;class Ks extends Fe{constructor(){super(...arguments),Ii.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ce(r,{expected:qe.joinValues(o),received:r.parsedType,code:re.invalid_type}),ke}if(Vs(this,Ii)||yS(this,Ii,new Set(qe.getValidEnumValues(this._def.values))),!Vs(this,Ii).has(t.data)){const o=qe.objectValues(n);return ce(r,{received:r.data,code:re.invalid_enum_value,options:o}),ke}return Yt(t.data)}get enum(){return this._def.values}}Ii=new WeakMap;Ks.create=(e,t)=>new Ks({values:e,typeName:Ee.ZodNativeEnum,..._e(t)});class fa extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fa.create=(e,t)=>new fa({type:e,typeName:Ee.ZodPromise,..._e(t)});class Qn extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ce(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?Pi(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Pi(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"?ke:(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"?ke:(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(!Zo(a))return a;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=>Zo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Qn.create=(e,t,n)=>new Qn({schema:e,typeName:Ee.ZodEffects,effect:t,..._e(n)});Qn.createWithPreprocess=(e,t,n)=>new Qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,..._e(n)});class qn extends Fe{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qn.create=(e,t)=>new qn({innerType:e,typeName:Ee.ZodOptional,..._e(t)});class no extends Fe{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}no.create=(e,t)=>new no({innerType:e,typeName:Ee.ZodNullable,..._e(t)});class Ys extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ys.create=(e,t)=>new Ys({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class Gs extends Fe{_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 Ls(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class Hd extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}Hd.create=e=>new Hd({typeName:Ee.ZodNaN,..._e(e)});class SS extends Fe{_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 Ml extends Fe{_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"?ke:i.status==="dirty"?(n.dirty(),Pi(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"?ke: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 Ml({in:t,out:n,typeName:Ee.ZodPipeline})}}class Zs extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Zo(o)&&(o.value=Object.freeze(o.value)),o);return Ls(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Ee.ZodReadonly,..._e(t)});xt.lazycreate;var Ee;(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"})(Ee||(Ee={}));Wn.create;eo.create;Hd.create;Xo.create;Fd.create;da.create;Ld.create;$s.create;zs.create;Vd.create;Mo.create;br.create;$d.create;Nn.create;xt.create;xt.strictCreate;Bs.create;zp.create;Hs.create;Xn.create;Ws.create;Bd.create;Qo.create;Wi.create;qs.create;Us.create;to.create;Ks.create;fa.create;Qn.create;qn.create;no.create;Qn.createWithPreprocess;Ml.create;const Pz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Az=(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]}}},TS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),Xt=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):TS(t),o=structuredClone(e);return Az(o,r,n),o},Iz=(e,t)=>e.localeCompare(t),xo={},ES=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return CS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=ES(e._def.innerType);return t==="ZodArray"?n??[]:n}},CS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,ES(n)])),kS=(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]=kS(i,o):n[r]=o||i)}return n},_z={sort:Iz,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},RS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return oz.parse(n.toString(),_z)},lr=(e,t)=>TS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),dr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Ou=e=>{const t=e.dataset.target;if(!t)return dr(e);const n=document.querySelector(`[data-origin="${t}"]`);return dr(n||e)},Oz={state:{},loading:!1,useOnChange:!1},qy=e=>e.dataset.target||e.name,Mz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Hi.LocalStorage.get(t);return Pz(n)?n:{}},clear:()=>void Hi.LocalStorage.delete(t),set:n=>Hi.LocalStorage.set(t,n)}},Dz=(e,t,n=Oz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Ve.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??CS(e)??{}),l=E.useCallback(b=>{var P;const S=b.target,w=b.currentTarget;if(S.dataset.optional==="true")return;const C=qy(S),k=Ou(S)||(w?dr(w):""),I=lr(C,e);if(S.setAttribute("data-initialized","true"),I){const N=I.safeParse(k),D=N.success?void 0:((P=N.error.issues[0])==null?void 0:P.message)??"";o(L=>Xt(L??{},C,D))}},[e]),c=E.useCallback(b=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,I)=>{var A;const P=I.element,N=I.schema.safeParse(dr(P));if(P.dataset.ignore==="ignore"||N.success)return k;const D=(A=N.error.issues[0])==null?void 0:A.message;P.setAttribute("data-initialized","true");const L=P.dataset.name||P.name||"";return Xt(k,L,D)},{}),C=Ve.empty(T)?null:T;o(C),console.error(C),b==null||b({form:w,errors:C||{}})},[]),u=(b,S=xo)=>{const w=lr(b,e),T=C=>{var I;if(!Mf(C))return;s(P=>Xt(P,b,C.toISOString())),o(P=>Xt(P,b,void 0));const k=i.current[b].element;if(k){const P=k.getAttribute("data-origin"),N=document.querySelector(`input[data-target="${P}"]`);N&&N.setCustomValidity("")}(I=S==null?void 0:S.onChange)==null||I.call(S,C)};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,date:Ve.string(a[b])?new Date(a[b]):a[b],required:S.required??!w.isOptional(),error:Cn(r,b),ref:C=>{C!==null&&(i.current[b]={element:C,schema:w})}}},d=(b,S=xo)=>{const w=lr(b,e);return{...S,name:b,id:b,onChange:C=>{var I;const k=C.target.value;s(P=>Xt(P,b,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),value:Cn(a,b,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[b]={element:C,schema:w}:void 0}},p=(b,S=xo)=>{const w=lr(b,e);return{...S,name:b,id:b,onChange:C=>{var I;const k=C.target.checked;s(P=>Xt(P??{},b,k)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[b]={element:C,schema:w}):void 0}},f=(b,S=xo)=>{const w=lr(b,e),T=C=>{var I,P;(I=C.persist)==null||I.call(C);const k=C.target.value;(P=S==null?void 0:S.onChange)==null||P.call(S,C),s(N=>Xt(N,b,k))};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),value:Cn(a,b,void 0)||(S==null?void 0:S.value)||"",type:Ve.instance(w,eo)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[b]={element:C,schema:w}}},h=(b,S=xo)=>{const w=lr(b,e);return{...S,name:b,id:b,onChangeOptions:C=>{s(k=>Xt(k,b,C))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),value:Cn(a,b,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[b]={element:C,schema:w})}},g=(b,S=xo)=>{const w=lr(b,e),T=w._def.typeName==="ZodNumber";return{...S,name:b,id:b,onChange:k=>{var P,N;(P=k.persist)==null||P.call(k);const I=T?k.target.valueAsNumber:k.target.value;(N=S==null?void 0:S.onChange)==null||N.call(S,k),s(D=>Xt(D,b,I))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,b,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Cn(a,b,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:w})}};E.useEffect(()=>{const b=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(dr(T)),k=D=>{var F;const L=qy(D.target);if(!L)return!1;const A=D.target,O=Ou(D.target)||(D.relatedTarget?dr(D.relatedTarget):""),M=w.schema.safeParse(O);if(A.setAttribute("value",O),M.success)return T.setCustomValidity&&T.setCustomValidity(""),o(j=>{if(Ve.null(j))return null;const H=Xt(j,L,void 0);return Ve.empty(j)||Ve.nil(j)||Ve.empty(H)?null:H}),!1;if(T.required){const j=((F=M.error.issues[0])==null?void 0:F.message)||"";T.setCustomValidity&&T.setCustomValidity(j),o(H=>{if(Ve.null(H))return null;const _=Xt(H,L,j||void 0);return Ve.empty(_)?null:_})}return!1},I=new AbortController,P=T.getAttribute("data-trigger")||"blur";T.addEventListener(P,k,{signal:I.signal});const N=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:N,unsubscribe:()=>I.abort()}});return b.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>b.forEach(w=>w.unsubscribe())});const m=b=>S=>{var N;S.preventDefault();const w=S.currentTarget;let T=RS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(D=>{if(D.tagName==="SELECT"){const L=D;T=Xt(T,L.name,L.value)}if(D.tagName==="INPUT"){const L=D,A=Ou(L)||(L?dr(L):"");T=Xt(T,L.dataset.target||L.name,A)}});const k=kS(T,a),I=e.safeParse(k),P=()=>{var D;gS(w),(D=n.interceptor)==null||D.clear()};if(I.success){const D=JSON.stringify(I.data);return w.setAttribute("data-json",D),(N=n.interceptor)==null||N.clear(),b==null?void 0:b(S,{form:w,event:S,reset:P,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),w.reportValidity(),b==null?void 0:b(S,{form:w,json:T,event:S,reset:P,setErrors:o,data:T,success:!1,errors:I.error.issues.map(D=>({message:D.message,path:D.path.map(L=>String(L))}))})},v=b=>zf(a,b)||"",x=b=>({...b,id:t,name:t});return E.useEffect(()=>{var b;n.interceptor&&((b=n.interceptor)==null||b.set(a))},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:m,setState:s,textarea:f,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:h,disabled:r!==null}},jz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Nz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},PS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},AS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},IS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Fz={name:"dark",zIndex:IS,rounded:PS,spacing:AS,shadow:{floating:"0 1px 1px 0 rgb(0 0 0 / 0.02)"},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(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},Lz={rounded:PS,spacing:AS,name:"light",shadow:{floating:"0 1px 1px 0 rgb(0 0 0 / 0.02)"},zIndex:IS,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%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},Vz=Fz,$z=Lz,zz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gl,...e.tweaks},parser:e.parser||ml.hsla,map:{...hl,...e.map}}),[e]);return y.jsx(ai.Provider,{value:t,children:e.children})},Bz=()=>{const e=E.useContext(ai);return e?e.parser:ml.hsla};exports.Alert=CI;exports.Autocomplete=OF;exports.Button=el;exports.Calendar=z0;exports.Card=Hf;exports.Checkbox=_p;exports.ColType=Oo;exports.Collapse=d0;exports.CommandPalette=$2;exports.ComponentsProvider=zz;exports.Context=ai;exports.DatePicker=DF;exports.Dict=yn;exports.Dropdown=mi;exports.Empty=B0;exports.Expand=z2;exports.FileUpload=XL;exports.Form=QL;exports.Input=Pa;exports.InputFeedback=A1;exports.InputField=Ra;exports.Menu=W2;exports.MenuItem=H2;exports.Modal=dp;exports.MultiSelect=iV;exports.Notifications=bD;exports.Polymorph=un;exports.Radiobox=aV;exports.RenderOnView=dE;exports.Select=Qr;exports.Slider=BV;exports.Stats=wD;exports.Switch=HV;exports.Tab=CD;exports.Table=J$;exports.Tabs=TD;exports.Tag=Gd;exports.TaskList=WV;exports.Textarea=qV;exports.Timeline=kD;exports.TimelineItem=xl;exports.Toolbar=q2;exports.Tooltip=fp;exports.TransferList=YV;exports.createColumns=x$;exports.createCssProperties=pM;exports.createDesignTokens=N0;exports.createFormStorage=Mz;exports.createOptionCols=Fp;exports.createStyles=uM;exports.createTheme=fM;exports.createTokenStyles=mM;exports.css=Ie;exports.defaultDarkTheme=Vz;exports.defaultLightTheme=$z;exports.defaultTranslations=hl;exports.defaultTweaks=gl;exports.dispatchInput=px;exports.formReset=gS;exports.formToJson=RS;exports.getCoords=aE;exports.getJsonForm=jz;exports.getRemainingSize=qi;exports.getSchemaShape=lr;exports.hasVerticalScroll=mx;exports.initializeInputDataset=ma;exports.isMobile=L0;exports.isReactComponent=iE;exports.isReactFC=Yd;exports.isSsr=Yr;exports.mergeRefs=Un;exports.negate=gM;exports.noop=Bf;exports.parsers=ml;exports.path=zf;exports.reduceTokens=Vr;exports.safeRegex=id;exports.splitInto=F0;exports.useColorParser=Bz;exports.useForm=Dz;exports.useLocale=$f;exports.useNotification=yD;exports.usePrevious=Nz;exports.useReactive=dw;exports.useTablePreferences=S$;exports.useTranslations=Ct;exports.uuid=si;
242
242
  //# sourceMappingURL=index.js.map