@g4rcez/components 1.0.1 → 1.0.2
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 +19 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2681 -2681
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +19 -19
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/floating/menu.d.ts +5 -2
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/menu.js +2 -2
- package/dist/src/components/floating/modal.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(te=typeof globalThis<"u"?globalThis:te||self,E(te.components={},te.React,te["react/jsx-runtime"],te.ReactDOM))})(this,function(te,E,b,wi){"use strict";var Wz=Object.defineProperty;var qz=(te,E,b)=>E in te?Wz(te,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):te[E]=b;var pe=(te,E,b)=>qz(te,typeof E!="symbol"?E+"":E,b);function zp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=zp(E),Oa=zp(wi);function Rp(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=Rp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Rp(e))&&(r&&(r+=" "),r+=t);return r}const Hp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wp=Bp,fo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],d=i==null?void 0:i[l];if(u===null)return null;const p=Hp(u)||Hp(d);return o[l][p]}),s=n&&Object.entries(n).reduce((l,u)=>{let[d,p]=u;return p===void 0||(l[d]=p),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...l,d,p]:l},[]);return Wp(e,a,c,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 Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PS(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 Fl,Kp;function po(){return Kp||(Kp=1,Fl=TypeError),Fl}const AS=PS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ll,Yp;function Ma(){if(Yp)return Ll;Yp=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,c=typeof WeakMap=="function"&&WeakMap.prototype,l=c?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,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function F(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||S.call(/e/,U))return U;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var rt=W<0?-_(-W):_(W);if(rt!==W){var dt=String(rt),Fe=v.call(U,dt.length+1);return x.call(dt,Be,"$&_")+"."+x.call(x.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(U,Be,"$&_")}var B=AS,D=B.custom,z=Ce(D)?D:null,J={__proto__:null,double:'"',single:"'"},X={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ll=function W(U,Be,rt,dt){var Fe=Be||{};if(le(Fe,"quoteStyle")&&!le(J,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(le(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ar=le(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Ar!="boolean"&&Ar!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(le(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(le(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var uo=Fe.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 De(U,Fe);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var rn=String(U);return uo?F(U,rn):rn}if(typeof U=="bigint"){var _r=String(U)+"n";return uo?F(U,_r):_r}var Mp=typeof Fe.depth>"u"?5:Fe.depth;if(typeof rt>"u"&&(rt=0),rt>=Mp&&Mp>0&&typeof U=="object")return G(U)?"[Array]":"[Object]";var bi=Cr(Fe,rt);if(typeof dt>"u")dt=[];else if(Se(dt,U)>=0)return"[Circular]";function En(xi,Nl,Hz){if(Nl&&(dt=I.call(dt),dt.push(Nl)),Hz){var kS={depth:Fe.depth};return le(Fe,"quoteStyle")&&(kS.quoteStyle=Fe.quoteStyle),W(xi,kS,rt+1,dt)}return W(xi,Fe,rt+1,dt)}if(typeof U=="function"&&!R(U)){var bS=ce(U),xS=Pr(U,En);return"[Function"+(bS?": "+bS:" (anonymous)")+"]"+(xS.length>0?" { "+k.call(xS,", ")+" }":"")}if(Ce(U)){var wS=A?x.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(U);return typeof U=="object"&&!A?Xe(wS):wS}if(me(U)){for(var Ia="<"+w.call(String(U.nodeName)),Dp=U.attributes||[],Dl=0;Dl<Dp.length;Dl++)Ia+=" "+Dp[Dl].name+"="+Q(Z(Dp[Dl].value),"double",Fe);return Ia+=">",U.childNodes&&U.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(U.nodeName))+">",Ia}if(G(U)){if(U.length===0)return"[]";var Np=Pr(U,En);return bi&&!Bn(Np)?"["+kr(Np,bi)+"]":"[ "+k.call(Np,", ")+" ]"}if(K(U)){var Fp=Pr(U,En);return!("cause"in Error.prototype)&&"cause"in U&&!O.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+En(U.cause),Fp),", ")+" }":Fp.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(Fp,", ")+" }"}if(typeof U=="object"&&Ar){if(z&&typeof U[z]=="function"&&B)return B(U,{depth:Mp-rt});if(Ar!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(ie(U)){var SS=[];return r&&r.call(U,function(xi,Nl){SS.push(En(Nl,U,!0)+" => "+En(xi,U))}),Tn("Map",n.call(U),SS,bi)}if(q(U)){var TS=[];return s&&s.call(U,function(xi){TS.push(En(xi,U))}),Tn("Set",a.call(U),TS,bi)}if(de(U))return Lt("WeakMap");if(ne(U))return Lt("WeakSet");if(ee(U))return Lt("WeakRef");if(H(U))return Xe(En(Number(U)));if(_e(U))return Xe(En(M.call(U)));if(be(U))return Xe(m.call(U));if(ae(U))return Xe(En(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(!j(U)&&!R(U)){var Lp=Pr(U,En),ES=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,Vp=U instanceof Object?"":"null prototype",CS=!ES&&N&&Object(U)===U&&N in U?v.call(we(U),8,-1):Vp?"Object":"",Bz=ES||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",jp=Bz+(CS||Vp?"["+k.call(C.call([],CS||[],Vp||[]),": ")+"] ":"");return Lp.length===0?jp+"{}":bi?jp+"{"+kr(Lp,bi)+"}":jp+"{ "+k.call(Lp,", ")+" }"}return String(U)};function Q(W,U,Be){var rt=Be.quoteStyle||U,dt=J[rt];return dt+W+dt}function Z(W){return x.call(String(W),/"/g,""")}function Y(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function G(W){return we(W)==="[object Array]"&&Y(W)}function j(W){return we(W)==="[object Date]"&&Y(W)}function R(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ae(W){return we(W)==="[object String]"&&Y(W)}function H(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ce(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function _e(W){if(!W||typeof W!="object"||!M)return!1;try{return M.call(W),!0}catch{}return!1}var Re=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return Re.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=y.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Be=0,rt=W.length;Be<rt;Be++)if(W[Be]===U)return Be;return-1}function ie(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(W){if(!l||!W||typeof W!="object")return!1;try{l.call(W,l);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 ne(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{l.call(W,l)}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 De(W,U){if(W.length>U.maxStringLength){var Be=W.length-U.maxStringLength,rt="... "+Be+" more character"+(Be>1?"s":"");return De(v.call(W,0,U.maxStringLength),U)+rt}var dt=X[U.quoteStyle||"single"];dt.lastIndex=0;var Fe=x.call(x.call(W,dt,"\\$1"),/[\x00-\x1f]/g,Ue);return Q(Fe,"single",U)}function Ue(W){var U=W.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Be?"\\"+Be:"\\x"+(U<16?"0":"")+T.call(U.toString(16))}function Xe(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function Tn(W,U,Be,rt){var dt=rt?kr(Be,rt):k.call(Be,", ");return W+" ("+U+") {"+dt+"}"}function Bn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
|
|
1
|
+
(function(te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(te=typeof globalThis<"u"?globalThis:te||self,E(te.components={},te.React,te["react/jsx-runtime"],te.ReactDOM))})(this,function(te,E,b,wi){"use strict";var Wz=Object.defineProperty;var qz=(te,E,b)=>E in te?Wz(te,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):te[E]=b;var pe=(te,E,b)=>qz(te,typeof E!="symbol"?E+"":E,b);function zp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=zp(E),Oa=zp(wi);function Rp(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=Rp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Rp(e))&&(r&&(r+=" "),r+=t);return r}const Hp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wp=Bp,fo=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wp(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=Hp(u)||Hp(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(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Wp(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 Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PS(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 Fl,Kp;function po(){return Kp||(Kp=1,Fl=TypeError),Fl}const AS=PS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ll,Yp;function Ma(){if(Yp)return Ll;Yp=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,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,x=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,_=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function F(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var rt=W<0?-_(-W):_(W);if(rt!==W){var dt=String(rt),Fe=v.call(U,dt.length+1);return x.call(dt,Be,"$&_")+"."+x.call(x.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(U,Be,"$&_")}var B=AS,D=B.custom,R=Ce(D)?D:null,Q={__proto__:null,double:'"',single:"'"},X={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ll=function W(U,Be,rt,dt){var Fe=Be||{};if(le(Fe,"quoteStyle")&&!le(Q,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(le(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ar=le(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Ar!="boolean"&&Ar!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(le(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(le(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var uo=Fe.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 De(U,Fe);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var rn=String(U);return uo?F(U,rn):rn}if(typeof U=="bigint"){var _r=String(U)+"n";return uo?F(U,_r):_r}var Mp=typeof Fe.depth>"u"?5:Fe.depth;if(typeof rt>"u"&&(rt=0),rt>=Mp&&Mp>0&&typeof U=="object")return G(U)?"[Array]":"[Object]";var bi=Cr(Fe,rt);if(typeof dt>"u")dt=[];else if(Se(dt,U)>=0)return"[Circular]";function En(xi,Nl,Hz){if(Nl&&(dt=I.call(dt),dt.push(Nl)),Hz){var kS={depth:Fe.depth};return le(Fe,"quoteStyle")&&(kS.quoteStyle=Fe.quoteStyle),W(xi,kS,rt+1,dt)}return W(xi,Fe,rt+1,dt)}if(typeof U=="function"&&!z(U)){var bS=ce(U),xS=Pr(U,En);return"[Function"+(bS?": "+bS:" (anonymous)")+"]"+(xS.length>0?" { "+k.call(xS,", ")+" }":"")}if(Ce(U)){var wS=A?x.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(U);return typeof U=="object"&&!A?Xe(wS):wS}if(me(U)){for(var Ia="<"+w.call(String(U.nodeName)),Dp=U.attributes||[],Dl=0;Dl<Dp.length;Dl++)Ia+=" "+Dp[Dl].name+"="+J(Z(Dp[Dl].value),"double",Fe);return Ia+=">",U.childNodes&&U.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(U.nodeName))+">",Ia}if(G(U)){if(U.length===0)return"[]";var Np=Pr(U,En);return bi&&!Bn(Np)?"["+kr(Np,bi)+"]":"[ "+k.call(Np,", ")+" ]"}if(K(U)){var Fp=Pr(U,En);return!("cause"in Error.prototype)&&"cause"in U&&!O.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+En(U.cause),Fp),", ")+" }":Fp.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(Fp,", ")+" }"}if(typeof U=="object"&&Ar){if(R&&typeof U[R]=="function"&&B)return B(U,{depth:Mp-rt});if(Ar!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(ie(U)){var SS=[];return r&&r.call(U,function(xi,Nl){SS.push(En(Nl,U,!0)+" => "+En(xi,U))}),Tn("Map",n.call(U),SS,bi)}if(q(U)){var TS=[];return s&&s.call(U,function(xi){TS.push(En(xi,U))}),Tn("Set",a.call(U),TS,bi)}if(de(U))return Lt("WeakMap");if(ne(U))return Lt("WeakSet");if(ee(U))return Lt("WeakRef");if(H(U))return Xe(En(Number(U)));if(_e(U))return Xe(En(M.call(U)));if(be(U))return Xe(m.call(U));if(ae(U))return Xe(En(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(!j(U)&&!z(U)){var Lp=Pr(U,En),ES=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,Vp=U instanceof Object?"":"null prototype",CS=!ES&&N&&Object(U)===U&&N in U?v.call(we(U),8,-1):Vp?"Object":"",Bz=ES||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",jp=Bz+(CS||Vp?"["+k.call(C.call([],CS||[],Vp||[]),": ")+"] ":"");return Lp.length===0?jp+"{}":bi?jp+"{"+kr(Lp,bi)+"}":jp+"{ "+k.call(Lp,", ")+" }"}return String(U)};function J(W,U,Be){var rt=Be.quoteStyle||U,dt=Q[rt];return dt+W+dt}function Z(W){return x.call(String(W),/"/g,""")}function Y(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function G(W){return we(W)==="[object Array]"&&Y(W)}function j(W){return we(W)==="[object Date]"&&Y(W)}function z(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ae(W){return we(W)==="[object String]"&&Y(W)}function H(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ce(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function _e(W){if(!W||typeof W!="object"||!M)return!1;try{return M.call(W),!0}catch{}return!1}var Re=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return Re.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=y.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Be=0,rt=W.length;Be<rt;Be++)if(W[Be]===U)return Be;return-1}function ie(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function 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 ne(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 De(W,U){if(W.length>U.maxStringLength){var Be=W.length-U.maxStringLength,rt="... "+Be+" more character"+(Be>1?"s":"");return De(v.call(W,0,U.maxStringLength),U)+rt}var dt=X[U.quoteStyle||"single"];dt.lastIndex=0;var Fe=x.call(x.call(W,dt,"\\$1"),/[\x00-\x1f]/g,Ue);return J(Fe,"single",U)}function Ue(W){var U=W.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Be?"\\"+Be:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Xe(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function Tn(W,U,Be,rt){var dt=rt?kr(Be,rt):k.call(Be,", ");return W+" ("+U+") {"+dt+"}"}function Bn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
|
|
2
2
|
`)>=0)return!1;return!0}function Cr(W,U){var Be;if(W.indent===" ")Be=" ";else if(typeof W.indent=="number"&&W.indent>0)Be=k.call(Array(W.indent+1)," ");else return null;return{base:Be,prev:k.call(Array(U+1),Be)}}function kr(W,U){if(W.length===0)return"";var Be=`
|
|
3
3
|
`+U.prev+U.base;return Be+k.call(W,","+Be)+`
|
|
4
|
-
`+U.prev}function Pr(W,U){var Be=G(W),rt=[];if(Be){rt.length=W.length;for(var dt=0;dt<W.length;dt++)rt[dt]=le(W,dt)?U(W[dt],W):""}var Fe=typeof L=="function"?L(W):[],Ar;if(A){Ar={};for(var uo=0;uo<Fe.length;uo++)Ar["$"+Fe[uo]]=Fe[uo]}for(var rn in W)le(W,rn)&&(Be&&String(Number(rn))===rn&&rn<W.length||A&&Ar["$"+rn]instanceof Symbol||(S.call(/[^\w$]/,rn)?rt.push(U(rn,W)+": "+U(W[rn],W)):rt.push(rn+": "+U(W[rn],W))));if(typeof L=="function")for(var _r=0;_r<Fe.length;_r++)O.call(W,Fe[_r])&&rt.push("["+U(Fe[_r])+"]: "+U(W[Fe[_r]],W));return rt}return Ll}var Vl,Gp;function _S(){if(Gp)return Vl;Gp=1;var e=Ma(),t=po(),n=function(s,c,l){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===c)return u.next=d.next,l||(d.next=s.next,s.next=d),d},r=function(s,c){if(s){var l=n(s,c);return l&&l.value}},o=function(s,c,l){var u=n(s,c);u?u.value=l:s.next={key:c,next:s.next,value:l}},i=function(s,c){return s?!!n(s,c):!1},a=function(s,c){if(s)return n(s,c,!0)};return Vl=function(){var c,l={assert:function(u){if(!l.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=c&&c.next,p=a(c,u);return p&&d&&d===p&&(c=void 0),!!p},get:function(u){return r(c,u)},has:function(u){return i(c,u)},set:function(u,d){c||(c={next:void 0}),o(c,u,d)}};return l},Vl}var jl,Zp;function Xp(){return Zp||(Zp=1,jl=Object),jl}var $l,Qp;function IS(){return Qp||(Qp=1,$l=Error),$l}var zl,Jp;function OS(){return Jp||(Jp=1,zl=EvalError),zl}var Rl,eh;function MS(){return eh||(eh=1,Rl=RangeError),Rl}var Bl,th;function DS(){return th||(th=1,Bl=ReferenceError),Bl}var Hl,nh;function NS(){return nh||(nh=1,Hl=SyntaxError),Hl}var Wl,rh;function FS(){return rh||(rh=1,Wl=URIError),Wl}var ql,oh;function LS(){return oh||(oh=1,ql=Math.abs),ql}var Ul,ih;function VS(){return ih||(ih=1,Ul=Math.floor),Ul}var Kl,ah;function jS(){return ah||(ah=1,Kl=Math.max),Kl}var Yl,sh;function $S(){return sh||(sh=1,Yl=Math.min),Yl}var Gl,lh;function zS(){return lh||(lh=1,Gl=Math.pow),Gl}var Zl,ch;function RS(){return ch||(ch=1,Zl=Math.round),Zl}var Xl,uh;function BS(){return uh||(uh=1,Xl=Number.isNaN||function(t){return t!==t}),Xl}var Ql,dh;function HS(){if(dh)return Ql;dh=1;var e=BS();return Ql=function(n){return e(n)||n===0?n:n<0?-1:1},Ql}var Jl,fh;function WS(){return fh||(fh=1,Jl=Object.getOwnPropertyDescriptor),Jl}var ec,ph;function hh(){if(ph)return ec;ph=1;var e=WS();if(e)try{e([],"length")}catch{e=null}return ec=e,ec}var tc,mh;function qS(){if(mh)return tc;mh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return tc=e,tc}var nc,gh;function US(){return gh||(gh=1,nc=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}),nc}var rc,vh;function KS(){if(vh)return rc;vh=1;var e=typeof Symbol<"u"&&Symbol,t=US();return rc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},rc}var oc,yh;function bh(){return yh||(yh=1,oc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),oc}var ic,xh;function wh(){if(xh)return ic;xh=1;var e=Xp();return ic=e.getPrototypeOf||null,ic}var ac,Sh;function YS(){if(Sh)return ac;Sh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(c,l){for(var u=[],d=0;d<c.length;d+=1)u[d]=c[d];for(var p=0;p<l.length;p+=1)u[p+c.length]=l[p];return u},i=function(c,l){for(var u=[],d=l,p=0;d<c.length;d+=1,p+=1)u[p]=c[d];return u},a=function(s,c){for(var l="",u=0;u<s.length;u+=1)l+=s[u],u+1<s.length&&(l+=c);return l};return ac=function(c){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var y=l.apply(this,o(u,arguments));return Object(y)===y?y:this}return l.apply(c,o(u,arguments))},f=n(0,l.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),l.prototype){var h=function(){};h.prototype=l.prototype,d.prototype=new h,h.prototype=null}return d},ac}var sc,Th;function Da(){if(Th)return sc;Th=1;var e=YS();return sc=Function.prototype.bind||e,sc}var lc,Eh;function cc(){return Eh||(Eh=1,lc=Function.prototype.call),lc}var uc,Ch;function kh(){return Ch||(Ch=1,uc=Function.prototype.apply),uc}var dc,Ph;function GS(){return Ph||(Ph=1,dc=typeof Reflect<"u"&&Reflect&&Reflect.apply),dc}var fc,Ah;function ZS(){if(Ah)return fc;Ah=1;var e=Da(),t=kh(),n=cc(),r=GS();return fc=r||e.call(n,t),fc}var pc,_h;function Ih(){if(_h)return pc;_h=1;var e=Da(),t=po(),n=cc(),r=ZS();return pc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},pc}var hc,Oh;function XS(){if(Oh)return hc;Oh=1;var e=Ih(),t=hh(),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 hc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,hc}var mc,Mh;function QS(){if(Mh)return mc;Mh=1;var e=bh(),t=wh(),n=XS();return mc=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,mc}var gc,Dh;function JS(){if(Dh)return gc;Dh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Da();return gc=n.call(e,t),gc}var vc,Nh;function yc(){if(Nh)return vc;Nh=1;var e,t=Xp(),n=IS(),r=OS(),o=MS(),i=DS(),a=NS(),s=po(),c=FS(),l=LS(),u=VS(),d=jS(),p=$S(),f=zS(),m=RS(),g=HS(),h=Function,y=function(R){try{return h('"use strict"; return ('+R+").constructor;")()}catch{}},v=hh(),x=qS(),T=function(){throw new s},w=v?function(){try{return arguments.callee,T}catch{try{return v(arguments,"callee").get}catch{return T}}}():T,S=KS()(),C=QS(),k=wh(),I=bh(),_=kh(),M=cc(),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%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%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"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%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%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":l,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(R){var N=C(C(R));A["%Error.prototype%"]=N}var O=function R(K){var ae;if(K==="%AsyncFunction%")ae=y("async function () {}");else if(K==="%GeneratorFunction%")ae=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ae=y("async function* () {}");else if(K==="%AsyncGenerator%"){var H=R("%AsyncGeneratorFunction%");H&&(ae=H.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=R("%AsyncGenerator%");be&&C&&(ae=C(be.prototype))}return A[K]=ae,ae},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"]},F=Da(),B=JS(),D=F.call(M,Array.prototype.concat),z=F.call(_,Array.prototype.splice),J=F.call(M,String.prototype.replace),X=F.call(M,String.prototype.slice),Q=F.call(M,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,G=function(K){var ae=X(K,0,1),H=X(K,-1);if(ae==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return J(K,Z,function(Ce,_e,Re,le){be[be.length]=Re?J(le,Y,"$1"):_e||Ce}),be},j=function(K,ae){var H=K,be;if(B(V,H)&&(be=V[H],H="%"+be[0]+"%"),B(A,H)){var Ce=A[H];if(Ce===L&&(Ce=O(H)),typeof Ce>"u"&&!ae)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:H,value:Ce}}throw new a("intrinsic "+K+" does not exist!")};return vc=function(K,ae){if(typeof K!="string"||K.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new s('"allowMissing" argument must be a boolean');if(Q(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=G(K),be=H.length>0?H[0]:"",Ce=j("%"+be+"%",ae),_e=Ce.name,Re=Ce.value,le=!1,we=Ce.alias;we&&(be=we[0],z(H,D([0,1],we)));for(var ce=1,Se=!0;ce<H.length;ce+=1){var ie=H[ce],de=X(ie,0,1),ee=X(ie,-1);if((de==='"'||de==="'"||de==="`"||ee==='"'||ee==="'"||ee==="`")&&de!==ee)throw new a("property names with quotes must have matching quotes");if((ie==="constructor"||!Se)&&(le=!0),be+="."+ie,_e="%"+be+"%",B(A,_e))Re=A[_e];else if(Re!=null){if(!(ie in Re)){if(!ae)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(v&&ce+1>=H.length){var q=v(Re,ie);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?Re=q.get:Re=Re[ie]}else Se=B(Re,ie),Re=Re[ie];Se&&!le&&(A[_e]=Re)}}return Re},vc}var bc,Fh;function Lh(){if(Fh)return bc;Fh=1;var e=yc(),t=Ih(),n=t([e("%String.prototype.indexOf%")]);return bc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},bc}var xc,Vh;function jh(){if(Vh)return xc;Vh=1;var e=yc(),t=Lh(),n=Ma(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),l=t("Map.prototype.size",!0);return xc=!!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 m=c(d,f);return l(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},xc}var wc,$h;function eT(){if($h)return wc;$h=1;var e=yc(),t=Lh(),n=Ma(),r=jh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),l=t("WeakMap.prototype.delete",!0);return wc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return l(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?c(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,wc}var Sc,zh;function tT(){if(zh)return Sc;zh=1;var e=po(),t=Ma(),n=_S(),r=jh(),o=eT(),i=o||r||n;return Sc=function(){var s,c={assert:function(l){if(!c.has(l))throw new e("Side channel does not contain "+t(l))},delete:function(l){return!!s&&s.delete(l)},get:function(l){return s&&s.get(l)},has:function(l){return!!s&&s.has(l)},set:function(l,u){s||(s=i()),s.set(l,u)}};return c},Sc}var Rh=e=>Array.isArray(e),Tc=e=>e===void 0,Ec=e=>e===null,nT=Function.bind.call(Function.call,Object.prototype.toString),rT=e=>!!e&&nT(e)==="[object Error]"||e instanceof Error,Bh=(e,t)=>e instanceof t,oT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},iT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Bh(e,Date),$e={array:Rh,date:iT,empty:e=>Ec(e)||Tc(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:Bh,isError:rT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Ec(e)||Tc(e),null:Ec,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Rh(e)&&typeof e=="object",primitive:oT,string:e=>typeof e=="string",undefined:Tc},aT=e=>Object.keys(e),Ir=(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},sT=e=>e.replace(/[^0-9]/g,"");const Cc="-",lT=e=>{const t=uT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Cc);return s[0]===""&&s.length!==1&&s.shift(),Hh(s,t)||cT(a)},getConflictingClassGroupIds:(a,s)=>{const c=n[a]||[];return s&&r[a]?[...c,...r[a]]:c}}},Hh=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Cc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Wh=/^\[(.+)\]$/,cT=e=>{if(Wh.test(e)){const t=Wh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},uT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)kc(n[o],r,o,t);return r},kc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:qh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(dT(o)){kc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{kc(a,qh(t,i),n,r)})})},qh=(e,t)=>{let n=e;return t.split(Cc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dT=e=>e.isThemeGetter,fT=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)}}},Pc="!",Ac=":",pT=Ac.length,hT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,c=0,l;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===Ac){i.push(o.slice(c,m)),c=m+pT;continue}if(g==="/"){l=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(c),d=mT(u),p=d!==u,f=l&&l>c?l-c:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Ac,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},mT=e=>e.endsWith(Pc)?e.substring(0,e.length-1):e.startsWith(Pc)?e.substring(1):e,gT=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}},vT=e=>({cache:fT(e.cacheSize),parseClassName:hT(e),sortModifiers:gT(e),...lT(e)}),yT=/\s+/,bT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(yT);let c="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let h=!!g,y=r(h?m.substring(0,g):m);if(!y){if(!h){c=u+(c.length>0?" "+c:c);continue}if(y=r(m),!y){c=u+(c.length>0?" "+c:c);continue}h=!1}const v=i(p).join(":"),x=f?v+Pc:v,T=x+y;if(a.includes(T))continue;a.push(T);const w=o(y,h);for(let S=0;S<w.length;++S){const C=w[S];a.push(x+C)}c=u+(c.length>0?" "+c:c)}return c};function xT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Uh(t))&&(r&&(r+=" "),r+=n);return r}const Uh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Uh(e[r]))&&(n&&(n+=" "),n+=t);return n};function wT(e,...t){let n,r,o,i=a;function a(c){const l=t.reduce((u,d)=>d(u),e());return n=vT(l),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const l=r(c);if(l)return l;const u=bT(c,n);return o(c,u),u}return function(){return i(xT.apply(null,arguments))}}const Ot=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Kh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ST=/^\d+\/\d+$/,TT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ET=/\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$/,CT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>ST.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Or=e=>!!e&&Number.isInteger(Number(e)),Gh=e=>e.endsWith("%")&&ze(e.slice(0,-1)),er=e=>TT.test(e),AT=()=>!0,_T=e=>ET.test(e)&&!CT.test(e),_c=()=>!1,IT=e=>kT.test(e),OT=e=>PT.test(e),MT=e=>!ge(e)&&!ve(e),DT=e=>mo(e,Qh,_c),ge=e=>Kh.test(e),Mr=e=>mo(e,Jh,_T),Ic=e=>mo(e,WT,ze),NT=e=>mo(e,Zh,_c),FT=e=>mo(e,Xh,OT),LT=e=>mo(e,_c,IT),ve=e=>Yh.test(e),Na=e=>go(e,Jh),VT=e=>go(e,qT),jT=e=>go(e,Zh),$T=e=>go(e,Qh),zT=e=>go(e,Xh),RT=e=>go(e,UT,!0),mo=(e,t,n)=>{const r=Kh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Yh.exec(e);return r?r[1]?t(r[1]):n:!1},Zh=e=>e==="position",BT=new Set(["image","url"]),Xh=e=>BT.has(e),HT=new Set(["length","size","percentage"]),Qh=e=>HT.has(e),Jh=e=>e==="length",WT=e=>e==="number",qT=e=>e==="family-name",UT=e=>e==="shadow",KT=wT(()=>{const e=Ot("color"),t=Ot("font"),n=Ot("text"),r=Ot("font-weight"),o=Ot("tracking"),i=Ot("leading"),a=Ot("breakpoint"),s=Ot("container"),c=Ot("spacing"),l=Ot("radius"),u=Ot("shadow"),d=Ot("inset-shadow"),p=Ot("drop-shadow"),f=Ot("blur"),m=Ot("perspective"),g=Ot("aspect"),h=Ot("ease"),y=Ot("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[ve,ge,c],C=()=>[ho,"full","auto",...S()],k=()=>[Or,"none","subgrid",ve,ge],I=()=>["auto",{span:["full",Or,ve,ge]},ve,ge],_=()=>[Or,"auto",ve,ge],M=()=>["auto","min","max","fr",ve,ge],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],A=()=>["auto",...S()],N=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],O=()=>[e,ve,ge],V=()=>[Gh,Mr],F=()=>["","none","full",l,ve,ge],B=()=>["",ze,Na,Mr],D=()=>["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"],J=()=>["","none",f,ve,ge],X=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve,ge],Q=()=>["none",ze,ve,ge],Z=()=>["none",ze,ve,ge],Y=()=>[ze,ve,ge],G=()=>[ho,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[er],breakpoint:[er],color:[AT],container:[er],"drop-shadow":[er],ease:["in","out","in-out"],font:[MT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[er],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[er],shadow:[er],spacing:["px",ze],text:[er],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ge,ve,g]}],container:["container"],columns:[{columns:[ze,ge,ve,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:[...x(),ge,ve]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],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",ve,ge]}],basis:[{basis:[ho,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,ho,"auto","initial","none",ge]}],grow:[{grow:["",ze,ve,ge]}],shrink:[{shrink:["",ze,ve,ge]}],order:[{order:[Or,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],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":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...N()]}],h:[{h:["screen",...N()]}],"min-h":[{"min-h":["screen","none",...N()]}],"max-h":[{"max-h":["screen",...N()]}],"font-size":[{text:["base",n,Na,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ve,Ic]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gh,ge]}],"font-family":[{font:[VT,ge,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,ve,ge]}],"line-clamp":[{"line-clamp":[ze,"none",ve,Ic]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",ve,Mr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ze,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],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",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),jT,NT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",$T,DT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Or,ve,ge],radial:["",ve,ge],conic:[Or,ve,ge]},zT,FT]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,ve,ge]}],"outline-w":[{outline:["",ze,Na,Mr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,RT,LT]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",ve,ge,d]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ze,Mr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[ze,ve,ge]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:J()}],brightness:[{brightness:[ze,ve,ge]}],contrast:[{contrast:[ze,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",p,ve,ge]}],grayscale:[{grayscale:["",ze,ve,ge]}],"hue-rotate":[{"hue-rotate":[ze,ve,ge]}],invert:[{invert:["",ze,ve,ge]}],saturate:[{saturate:[ze,ve,ge]}],sepia:[{sepia:["",ze,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[ze,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[ze,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",ze,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[ze,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[ze,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",ve,ge]}],ease:[{ease:["linear","initial",h,ve,ge]}],delay:[{delay:[ze,ve,ge]}],animate:[{animate:["none",y,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ve,ge]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",ve,ge]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",ve,ge]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ze,Na,Mr,Ic]}],stroke:[{stroke:["none",...O()]}],"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","*","**"]}}),Hn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},YT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Oc=e=>$e.function(e),Oe=(...e)=>KT(Bp(e)),em=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Si=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},tm=e=>e.scrollHeight>e.clientHeight,Ti=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},GT=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},ZT="span",on=E.forwardRef(function(t,n){const r=t.as||ZT;return b.jsx(r,{ref:n,...t,as:void 0})}),XT=fo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},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"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),vo=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...c},l){const u=r||c.disabled;return b.jsxs(on,{...c,ref:l,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:c.as??"button","aria-busy":u||r,onClick:u?void 0:c.onClick,className:Oe(XT({size:a,rounded:s,theme:o}),t),children:[n,c.children]})}),Dr=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function QT(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 JT=({children:e,...t})=>{const n=Dr(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:QT(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(c=>{var u;const l=c[0];return l.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>l.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},eE={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"}},tE=fo("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"}}}),nE=fo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:eE,defaultVariants:{theme:"primary",size:"default"}}),Mc=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},c){return b.jsxs(on,{...s,ref:c,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(nE({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:tE({theme:n})}):null,r,s.children]})}),Ei=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dc=typeof window<"u",Fa=Dc?E.useLayoutEffect:E.useEffect,La=E.createContext(null),yo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class rE extends P.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 oE({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(yo);return E.useInsertionEffect(()=>{const{width:s,height:c,top:l,left:u,right:d}=i.current;if(t||!o.current||!s||!c)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 Pr(W,U){var Be=G(W),rt=[];if(Be){rt.length=W.length;for(var dt=0;dt<W.length;dt++)rt[dt]=le(W,dt)?U(W[dt],W):""}var Fe=typeof L=="function"?L(W):[],Ar;if(A){Ar={};for(var uo=0;uo<Fe.length;uo++)Ar["$"+Fe[uo]]=Fe[uo]}for(var rn in W)le(W,rn)&&(Be&&String(Number(rn))===rn&&rn<W.length||A&&Ar["$"+rn]instanceof Symbol||(T.call(/[^\w$]/,rn)?rt.push(U(rn,W)+": "+U(W[rn],W)):rt.push(rn+": "+U(W[rn],W))));if(typeof L=="function")for(var _r=0;_r<Fe.length;_r++)O.call(W,Fe[_r])&&rt.push("["+U(Fe[_r])+"]: "+U(W[Fe[_r]],W));return rt}return Ll}var Vl,Gp;function _S(){if(Gp)return Vl;Gp=1;var e=Ma(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Vl=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},Vl}var jl,Zp;function Xp(){return Zp||(Zp=1,jl=Object),jl}var $l,Qp;function IS(){return Qp||(Qp=1,$l=Error),$l}var zl,Jp;function OS(){return Jp||(Jp=1,zl=EvalError),zl}var Rl,eh;function MS(){return eh||(eh=1,Rl=RangeError),Rl}var Bl,th;function DS(){return th||(th=1,Bl=ReferenceError),Bl}var Hl,nh;function NS(){return nh||(nh=1,Hl=SyntaxError),Hl}var Wl,rh;function FS(){return rh||(rh=1,Wl=URIError),Wl}var ql,oh;function LS(){return oh||(oh=1,ql=Math.abs),ql}var Ul,ih;function VS(){return ih||(ih=1,Ul=Math.floor),Ul}var Kl,ah;function jS(){return ah||(ah=1,Kl=Math.max),Kl}var Yl,sh;function $S(){return sh||(sh=1,Yl=Math.min),Yl}var Gl,lh;function zS(){return lh||(lh=1,Gl=Math.pow),Gl}var Zl,ch;function RS(){return ch||(ch=1,Zl=Math.round),Zl}var Xl,uh;function BS(){return uh||(uh=1,Xl=Number.isNaN||function(t){return t!==t}),Xl}var Ql,dh;function HS(){if(dh)return Ql;dh=1;var e=BS();return Ql=function(n){return e(n)||n===0?n:n<0?-1:1},Ql}var Jl,fh;function WS(){return fh||(fh=1,Jl=Object.getOwnPropertyDescriptor),Jl}var ec,ph;function hh(){if(ph)return ec;ph=1;var e=WS();if(e)try{e([],"length")}catch{e=null}return ec=e,ec}var tc,mh;function qS(){if(mh)return tc;mh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return tc=e,tc}var nc,gh;function US(){return gh||(gh=1,nc=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}),nc}var rc,vh;function KS(){if(vh)return rc;vh=1;var e=typeof Symbol<"u"&&Symbol,t=US();return rc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},rc}var oc,yh;function bh(){return yh||(yh=1,oc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),oc}var ic,xh;function wh(){if(xh)return ic;xh=1;var e=Xp();return ic=e.getPrototypeOf||null,ic}var ac,Sh;function YS(){if(Sh)return ac;Sh=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 ac=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 y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},ac}var sc,Th;function Da(){if(Th)return sc;Th=1;var e=YS();return sc=Function.prototype.bind||e,sc}var lc,Eh;function cc(){return Eh||(Eh=1,lc=Function.prototype.call),lc}var uc,Ch;function kh(){return Ch||(Ch=1,uc=Function.prototype.apply),uc}var dc,Ph;function GS(){return Ph||(Ph=1,dc=typeof Reflect<"u"&&Reflect&&Reflect.apply),dc}var fc,Ah;function ZS(){if(Ah)return fc;Ah=1;var e=Da(),t=kh(),n=cc(),r=GS();return fc=r||e.call(n,t),fc}var pc,_h;function Ih(){if(_h)return pc;_h=1;var e=Da(),t=po(),n=cc(),r=ZS();return pc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},pc}var hc,Oh;function XS(){if(Oh)return hc;Oh=1;var e=Ih(),t=hh(),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 hc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,hc}var mc,Mh;function QS(){if(Mh)return mc;Mh=1;var e=bh(),t=wh(),n=XS();return mc=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,mc}var gc,Dh;function JS(){if(Dh)return gc;Dh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Da();return gc=n.call(e,t),gc}var vc,Nh;function yc(){if(Nh)return vc;Nh=1;var e,t=Xp(),n=IS(),r=OS(),o=MS(),i=DS(),a=NS(),s=po(),l=FS(),c=LS(),u=VS(),d=jS(),p=$S(),f=zS(),m=RS(),g=HS(),h=Function,y=function(z){try{return h('"use strict"; return ('+z+").constructor;")()}catch{}},v=hh(),x=qS(),S=function(){throw new s},w=v?function(){try{return arguments.callee,S}catch{try{return v(arguments,"callee").get}catch{return S}}}():S,T=KS()(),C=QS(),k=wh(),I=bh(),_=kh(),M=cc(),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%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&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%":v,"%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%":$,"%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%":M,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(z){var N=C(C(z));A["%Error.prototype%"]=N}var O=function z(K){var ae;if(K==="%AsyncFunction%")ae=y("async function () {}");else if(K==="%GeneratorFunction%")ae=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ae=y("async function* () {}");else if(K==="%AsyncGenerator%"){var H=z("%AsyncGeneratorFunction%");H&&(ae=H.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=z("%AsyncGenerator%");be&&C&&(ae=C(be.prototype))}return A[K]=ae,ae},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"]},F=Da(),B=JS(),D=F.call(M,Array.prototype.concat),R=F.call(_,Array.prototype.splice),Q=F.call(M,String.prototype.replace),X=F.call(M,String.prototype.slice),J=F.call(M,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,G=function(K){var ae=X(K,0,1),H=X(K,-1);if(ae==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return Q(K,Z,function(Ce,_e,Re,le){be[be.length]=Re?Q(le,Y,"$1"):_e||Ce}),be},j=function(K,ae){var H=K,be;if(B(V,H)&&(be=V[H],H="%"+be[0]+"%"),B(A,H)){var Ce=A[H];if(Ce===L&&(Ce=O(H)),typeof Ce>"u"&&!ae)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:H,value:Ce}}throw new a("intrinsic "+K+" does not exist!")};return vc=function(K,ae){if(typeof K!="string"||K.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="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=G(K),be=H.length>0?H[0]:"",Ce=j("%"+be+"%",ae),_e=Ce.name,Re=Ce.value,le=!1,we=Ce.alias;we&&(be=we[0],R(H,D([0,1],we)));for(var ce=1,Se=!0;ce<H.length;ce+=1){var ie=H[ce],de=X(ie,0,1),ee=X(ie,-1);if((de==='"'||de==="'"||de==="`"||ee==='"'||ee==="'"||ee==="`")&&de!==ee)throw new a("property names with quotes must have matching quotes");if((ie==="constructor"||!Se)&&(le=!0),be+="."+ie,_e="%"+be+"%",B(A,_e))Re=A[_e];else if(Re!=null){if(!(ie in Re)){if(!ae)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(v&&ce+1>=H.length){var q=v(Re,ie);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?Re=q.get:Re=Re[ie]}else Se=B(Re,ie),Re=Re[ie];Se&&!le&&(A[_e]=Re)}}return Re},vc}var bc,Fh;function Lh(){if(Fh)return bc;Fh=1;var e=yc(),t=Ih(),n=t([e("%String.prototype.indexOf%")]);return bc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},bc}var xc,Vh;function jh(){if(Vh)return xc;Vh=1;var e=yc(),t=Lh(),n=Ma(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return xc=!!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 m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},xc}var wc,$h;function eT(){if($h)return wc;$h=1;var e=yc(),t=Lh(),n=Ma(),r=jh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return wc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,wc}var Sc,zh;function tT(){if(zh)return Sc;zh=1;var e=po(),t=Ma(),n=_S(),r=jh(),o=eT(),i=o||r||n;return Sc=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},Sc}var Rh=e=>Array.isArray(e),Tc=e=>e===void 0,Ec=e=>e===null,nT=Function.bind.call(Function.call,Object.prototype.toString),rT=e=>!!e&&nT(e)==="[object Error]"||e instanceof Error,Bh=(e,t)=>e instanceof t,oT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},iT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Bh(e,Date),$e={array:Rh,date:iT,empty:e=>Ec(e)||Tc(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:Bh,isError:rT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Ec(e)||Tc(e),null:Ec,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Rh(e)&&typeof e=="object",primitive:oT,string:e=>typeof e=="string",undefined:Tc},aT=e=>Object.keys(e),Ir=(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},sT=e=>e.replace(/[^0-9]/g,"");const Cc="-",lT=e=>{const t=uT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Cc);return s[0]===""&&s.length!==1&&s.shift(),Hh(s,t)||cT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Hh=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Cc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Wh=/^\[(.+)\]$/,cT=e=>{if(Wh.test(e)){const t=Wh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},uT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)kc(n[o],r,o,t);return r},kc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:qh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(dT(o)){kc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{kc(a,qh(t,i),n,r)})})},qh=(e,t)=>{let n=e;return t.split(Cc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dT=e=>e.isThemeGetter,fT=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)}}},Pc="!",Ac=":",pT=Ac.length,hT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===Ac){i.push(o.slice(l,m)),l=m+pT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=mT(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+Ac,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},mT=e=>e.endsWith(Pc)?e.substring(0,e.length-1):e.startsWith(Pc)?e.substring(1):e,gT=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}},vT=e=>({cache:fT(e.cacheSize),parseClassName:hT(e),sortModifiers:gT(e),...lT(e)}),yT=/\s+/,bT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(yT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?m.substring(0,g):m);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const v=i(p).join(":"),x=f?v+Pc:v,S=x+y;if(a.includes(S))continue;a.push(S);const w=o(y,h);for(let T=0;T<w.length;++T){const C=w[T];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function xT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Uh(t))&&(r&&(r+=" "),r+=n);return r}const Uh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Uh(e[r]))&&(n&&(n+=" "),n+=t);return n};function wT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=vT(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=bT(l,n);return o(l,u),u}return function(){return i(xT.apply(null,arguments))}}const Ot=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Kh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ST=/^\d+\/\d+$/,TT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ET=/\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$/,CT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>ST.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Or=e=>!!e&&Number.isInteger(Number(e)),Gh=e=>e.endsWith("%")&&ze(e.slice(0,-1)),er=e=>TT.test(e),AT=()=>!0,_T=e=>ET.test(e)&&!CT.test(e),_c=()=>!1,IT=e=>kT.test(e),OT=e=>PT.test(e),MT=e=>!ge(e)&&!ve(e),DT=e=>mo(e,Qh,_c),ge=e=>Kh.test(e),Mr=e=>mo(e,Jh,_T),Ic=e=>mo(e,WT,ze),NT=e=>mo(e,Zh,_c),FT=e=>mo(e,Xh,OT),LT=e=>mo(e,_c,IT),ve=e=>Yh.test(e),Na=e=>go(e,Jh),VT=e=>go(e,qT),jT=e=>go(e,Zh),$T=e=>go(e,Qh),zT=e=>go(e,Xh),RT=e=>go(e,UT,!0),mo=(e,t,n)=>{const r=Kh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Yh.exec(e);return r?r[1]?t(r[1]):n:!1},Zh=e=>e==="position",BT=new Set(["image","url"]),Xh=e=>BT.has(e),HT=new Set(["length","size","percentage"]),Qh=e=>HT.has(e),Jh=e=>e==="length",WT=e=>e==="number",qT=e=>e==="family-name",UT=e=>e==="shadow",KT=wT(()=>{const e=Ot("color"),t=Ot("font"),n=Ot("text"),r=Ot("font-weight"),o=Ot("tracking"),i=Ot("leading"),a=Ot("breakpoint"),s=Ot("container"),l=Ot("spacing"),c=Ot("radius"),u=Ot("shadow"),d=Ot("inset-shadow"),p=Ot("drop-shadow"),f=Ot("blur"),m=Ot("perspective"),g=Ot("aspect"),h=Ot("ease"),y=Ot("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ve,ge,l],C=()=>[ho,"full","auto",...T()],k=()=>[Or,"none","subgrid",ve,ge],I=()=>["auto",{span:["full",Or,ve,ge]},ve,ge],_=()=>[Or,"auto",ve,ge],M=()=>["auto","min","max","fr",ve,ge],L=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],A=()=>["auto",...T()],N=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],O=()=>[e,ve,ge],V=()=>[Gh,Mr],F=()=>["","none","full",c,ve,ge],B=()=>["",ze,Na,Mr],D=()=>["solid","dashed","dotted","double"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,ve,ge],X=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve,ge],J=()=>["none",ze,ve,ge],Z=()=>["none",ze,ve,ge],Y=()=>[ze,ve,ge],G=()=>[ho,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[er],breakpoint:[er],color:[AT],container:[er],"drop-shadow":[er],ease:["in","out","in-out"],font:[MT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[er],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[er],shadow:[er],spacing:["px",ze],text:[er],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ge,ve,g]}],container:["container"],columns:[{columns:[ze,ge,ve,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:[...x(),ge,ve]}],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",ve,ge]}],basis:[{basis:[ho,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,ho,"auto","initial","none",ge]}],grow:[{grow:["",ze,ve,ge]}],shrink:[{shrink:["",ze,ve,ge]}],order:[{order:[Or,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],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:N()}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...N()]}],h:[{h:["screen",...N()]}],"min-h":[{"min-h":["screen","none",...N()]}],"max-h":[{"max-h":["screen",...N()]}],"font-size":[{text:["base",n,Na,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ve,Ic]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gh,ge]}],"font-family":[{font:[VT,ge,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,ve,ge]}],"line-clamp":[{"line-clamp":[ze,"none",ve,Ic]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",ve,Mr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ze,"auto",ve,ge]}],"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",ve,ge]}],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",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),jT,NT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",$T,DT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Or,ve,ge],radial:["",ve,ge],conic:[Or,ve,ge]},zT,FT]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,ve,ge]}],"outline-w":[{outline:["",ze,Na,Mr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,RT,LT]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",ve,ge,d]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ze,Mr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[ze,ve,ge]}],"mix-blend":[{"mix-blend":[...R(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:Q()}],brightness:[{brightness:[ze,ve,ge]}],contrast:[{contrast:[ze,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",p,ve,ge]}],grayscale:[{grayscale:["",ze,ve,ge]}],"hue-rotate":[{"hue-rotate":[ze,ve,ge]}],invert:[{invert:["",ze,ve,ge]}],saturate:[{saturate:[ze,ve,ge]}],sepia:[{sepia:["",ze,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ze,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[ze,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",ze,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[ze,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[ze,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,ve,ge]}],"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",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",ve,ge]}],ease:[{ease:["linear","initial",h,ve,ge]}],delay:[{delay:[ze,ve,ge]}],animate:[{animate:["none",y,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ve,ge]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",ve,ge]}],"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",ve,ge]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ze,Na,Mr,Ic]}],stroke:[{stroke:["none",...O()]}],"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","*","**"]}}),Hn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},YT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Oc=e=>$e.function(e),Oe=(...e)=>KT(Bp(e)),em=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Si=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},tm=e=>e.scrollHeight>e.clientHeight,Ti=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},GT=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},ZT="span",on=E.forwardRef(function(t,n){const r=t.as||ZT;return b.jsx(r,{ref:n,...t,as:void 0})}),XT=fo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},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"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),vo=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 b.jsxs(on,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Oe(XT({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Dr=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function QT(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 JT=({children:e,...t})=>{const n=Dr(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:QT(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()},[]),b.jsx("div",{...t,ref:r,children:o?e:null})},eE={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"}},tE=fo("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"}}}),nE=fo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:eE,defaultVariants:{theme:"primary",size:"default"}}),Mc=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return b.jsxs(on,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(nE({size:a,theme:i}),t),children:[n?b.jsx("span",{"aria-hidden":"true",className:tE({theme:n})}):null,r,s.children]})}),Ei=E.createContext({});function pn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dc=typeof window<"u",Fa=Dc?E.useLayoutEffect:E.useEffect,La=E.createContext(null),yo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class rE extends P.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 oE({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(yo);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;
|
|
8
|
-
height: ${
|
|
8
|
+
height: ${l}px !important;
|
|
9
9
|
${p}px !important;
|
|
10
|
-
top: ${
|
|
10
|
+
top: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(f)}},[t]),b.jsx(rE,{isPresent:t,childRef:o,sizeRef:i,children:P.cloneElement(e,{ref:o})})}const iE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const c=pn(aE),l=E.useId(),u=E.useCallback(p=>{c.set(p,!0);for(const f of c.values())if(!f)return;r&&r()},[c,r]),d=E.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{c.forEach((p,f)=>c.set(f,!1))},[n]),P.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=b.jsx(oE,{isPresent:n,anchorX:s,children:e})),b.jsx(La.Provider,{value:d,children:e})};function aE(){return new Map}function nm(e=!0){const t=E.useContext(La);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 Va=e=>e.key||"";function rm(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const tr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[c,l]=nm(a),u=E.useMemo(()=>rm(e),[e]),d=a&&!c?[]:u.map(Va),p=E.useRef(!0),f=E.useRef(u),m=pn(()=>new Map),[g,h]=E.useState(u),[y,v]=E.useState(u);Fa(()=>{p.current=!1,f.current=u;for(let w=0;w<y.length;w++){const S=Va(y[w]);d.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[y,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let S=0;S<y.length;S++){const C=y[S],k=Va(C);d.includes(k)||(w.splice(S,0,C),x.push(C))}return i==="wait"&&x.length&&(w=x),v(rm(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=E.useContext(Ei);return b.jsx(b.Fragment,{children:y.map(w=>{const S=Va(w),C=a&&!c?!1:u===y||d.includes(S),k=()=>{if(m.has(S))m.set(S,!0);else return;let I=!0;m.forEach(_=>{_||(I=!1)}),I&&(T==null||T(),v(f.current),a&&(l==null||l()),r&&r())};return b.jsx(iE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},S)})})},sE=E.createContext(null),Ut=e=>e;let bo=Ut,an=Ut;process.env.NODE_ENV!=="production"&&(bo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});const lE={useManualTiming:!1},ja=["read","resolveKeyframes","update","preRender","render","postRender"];function cE(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 c(u){a.has(u)&&(l.schedule(u),e()),u(s)}const l={schedule:(u,d=!1,p=!1)=>{const m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.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(c),n.clear(),o=!1,i&&(i=!1,l.process(u))}};return l}const uE=40;function om(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ja.reduce((y,v)=>(y[v]=cE(i),y),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:p}=a,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,uE),1),o.timestamp=y,o.isProcessing=!0,s.process(o),c.process(o),l.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:ja.reduce((y,v)=>{const x=a[v];return y[v]=(T,w=!1,S=!1)=>(n||m(),x.schedule(T,w,S)),y},{}),cancel:y=>{for(let v=0;v<ja.length;v++)a[ja[v]].cancel(y)},state:o,steps:a}}const{schedule:tt,cancel:Wn,state:Dt,steps:Nc}=om(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function dE(){const e=E.useRef(!1);return Fa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fE(){const e=dE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>tt.postRender(r),[r]),t]}const pE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function im(){const e=new Set,t=new WeakMap,n=()=>e.forEach(pE);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 am=e=>e===!0,hE=e=>am(e===!0)||e==="id",mE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ei),o=E.useContext(sE),[i,a]=fE(),s=E.useRef(null),c=r.id||o;s.current===null&&(hE(n)&&c&&(t=t?c+"-"+t:c),s.current={id:t,group:am(n)&&r.group||im()});const l=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return b.jsx(Ei.Provider,{value:l,children:e})},sm=E.createContext({strict:!1}),lm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xo={};for(const e in lm)xo[e]={isEnabled:t=>lm[e].some(n=>!!t[n])};function gE(e){for(const t in e)xo[t]={...xo[t],...e[t]}}const vE=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 $a(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vE.has(e)}let cm=e=>!$a(e);function um(e){e&&(cm=t=>t.startsWith("on")?!$a(t):e(t))}try{um(require("@emotion/is-prop-valid").default)}catch{}function yE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(cm(o)||n===!0&&$a(o)||!t&&!$a(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function bE({children:e,isValidProp:t,...n}){t&&um(t),n={...E.useContext(yo),...n},n.isStatic=pn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return b.jsx(yo.Provider,{value:r,children:e})}const dm=new Set;function za(e,t,n){e||dm.has(t)||(console.warn(t),dm.add(t))}function xE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&za(!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 Ra=E.createContext({});function Ba(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ci(e){return typeof e=="string"||Array.isArray(e)}const Fc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Fc];function Ha(e){return Ba(e.animate)||Lc.some(t=>Ci(e[t]))}function fm(e){return!!(Ha(e)||e.variants)}function wE(e,t){if(Ha(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ci(n)?n:void 0,animate:Ci(r)?r:void 0}}return e.inherit!==!1?t:{}}function SE(e){const{initial:t,animate:n}=wE(e,E.useContext(Ra));return E.useMemo(()=>({initial:t,animate:n}),[pm(t),pm(n)])}function pm(e){return Array.isArray(e)?e.join(" "):e}const TE=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EE(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:Vc}=om(queueMicrotask,!1),jc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hm="data-"+jc("framerAppearId"),mm=E.createContext({});function CE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Ra),c=E.useContext(sm),l=E.useContext(La),u=E.useContext(yo).reducedMotion,d=E.useRef(null);r=r||c.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(mm);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&kE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,l)});const g=n[hm],h=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 Fa(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Vc.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),h.current=!1))}),p}function kE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gm(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:c,layoutRoot:l})}function gm(e){if(e)return e.options.allowProjection!==!1?e.projection:gm(e.parent)}function PE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&gE(e);function s(l,u){let d;const p={...E.useContext(yo),...l,layoutId:AE(l)},{isStatic:f}=p,m=SE(l),g=r(l,f);if(!f&&Dc){_E(p,e);const h=IE(p);d=h.MeasureLayout,m.visualElement=CE(o,g,p,t,h.ProjectionNode)}return b.jsxs(Ra.Provider,{value:m,children:[d&&m.visualElement?b.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,l,EE(g,m.visualElement,u),g,f,m.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 c=E.forwardRef(s);return c[TE]=o,c}function AE({layoutId:e}){const t=E.useContext(Ei).id;return t&&e!==void 0?t+"-"+e:e}function _E(e,t){const n=E.useContext(sm).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?bo(!1,r):an(!1,r)}}function IE(e){const{drag:t,layout:n}=xo;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 vm=e=>t=>typeof t=="string"&&t.startsWith(e),$c=vm("--"),OE=vm("var(--"),zc=e=>OE(e)?ME.test(e.split("/*")[0].trim()):!1,ME=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ki={};function DE(e){for(const t in e)ki[t]=e[t],$c(t)&&(ki[t].isCSSVariable=!0)}const So=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nr=new Set(So);function ym(e,{layout:t,layoutId:n}){return Nr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ki[e]||e==="opacity")}const kt=e=>!!(e&&e.getVelocity),bm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pi={...To,transform:e=>qn(0,1,e)},Wa={...To,default:1},Ai=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),nr=Ai("deg"),Cn=Ai("%"),Te=Ai("px"),NE=Ai("vh"),FE=Ai("vw"),xm={...Cn,parse:e=>Cn.parse(e)/100,transform:e=>Cn.transform(e*100)},LE={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,backgroundPositionX:Te,backgroundPositionY:Te},VE={rotate:nr,rotateX:nr,rotateY:nr,rotateZ:nr,scale:Wa,scaleX:Wa,scaleY:Wa,scaleZ:Wa,skew:nr,skewX:nr,skewY:nr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Pi,originX:xm,originY:xm,originZ:Te},wm={...To,transform:Math.round},Rc={...LE,...VE,zIndex:wm,size:Te,fillOpacity:Pi,strokeOpacity:Pi,numOctaves:wm},jE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$E=So.length;function zE(e,t,n){let r="",o=!0;for(let i=0;i<$E;i++){const a=So[i],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=bm(s,Rc[a]);if(!c){o=!1;const u=jE[a]||a;r+=`${u}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Bc(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(Nr.has(c)){a=!0;continue}else if($c(c)){o[c]=l;continue}else{const u=bm(l,Rc[c]);c.startsWith("origin")?(s=!0,i[c]=u):r[c]=u}}if(t.transform||(a||n?r.transform=zE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:u=0}=i;r.transformOrigin=`${c} ${l} ${u}`}}const Hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sm(e,t,n){for(const r in t)!kt(t[r])&&!ym(r,n)&&(e[r]=t[r])}function RE({transformTemplate:e},t){return E.useMemo(()=>{const n=Hc();return Bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BE(e,t){const n=e.style||{},r={};return Sm(r,n,e),Object.assign(r,RE(e,t)),r}function HE(e,t){const n={},r=BE(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 WE=["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 Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(WE.indexOf(e)>-1||/[A-Z]/u.test(e))}const qE={offset:"stroke-dashoffset",array:"stroke-dasharray"},UE={offset:"strokeDashoffset",array:"strokeDasharray"};function KE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?qE:UE;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function Tm(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function YE(e,t,n){const r=Tm(t,e.x,e.width),o=Tm(n,e.y,e.height);return`${r} ${o}`}function qc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(Bc(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=YE(m,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&&KE(p,a,s,c,!1)}const Em=()=>({...Hc(),attrs:{}}),Uc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GE(e,t,n,r){const o=E.useMemo(()=>{const i=Em();return qc(i,t,Uc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Sm(i,e.style,e),o.style={...i,...o.style}}return o}function ZE(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Wc(n)?GE:HE)(r,i,a,n),l=yE(r,typeof n=="string",e),u=n!==E.Fragment?{...l,...c,ref:o}:{},{children:d}=r,p=E.useMemo(()=>kt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Cm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kc(e,t,n,r){if(typeof t=="function"){const[o,i]=Cm(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]=Cm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Yc=e=>Array.isArray(e),XE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),QE=e=>Yc(e)?e[e.length-1]||0:e;function qa(e){const t=kt(e)?e.get():e;return XE(t)?t.toValue():t}function JE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:eC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const km=e=>(t,n)=>{const r=E.useContext(Ra),o=E.useContext(La),i=()=>JE(e,t,r,o);return n?i():pn(i)};function eC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=qa(i[p]);let{initial:a,animate:s}=e;const c=Ha(e),l=fm(e);t&&l&&!c&&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"&&!Ba(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=Kc(e,p[f]);if(m){const{transitionEnd:g,transition:h,...y}=m;for(const v in y){let x=y[v];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[v]=x)}for(const v in g)o[v]=g[v]}}}return o}function Gc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(kt(o[a])||t.style&&kt(t.style[a])||ym(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 tC={useVisualState:km({scrapeMotionValuesFromProps:Gc,createRenderState:Hc})};function Pm(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 Am(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 _m=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 Im(e,t,n,r){Am(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(_m.has(o)?o:jc(o),t.attrs[o])}function Om(e,t,n){const r=Gc(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const i=So.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Mm=["x","y","width","height","cx","cy","r"],nC={useVisualState:km({scrapeMotionValuesFromProps:Om,createRenderState:Em,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(Nr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Mm.length;s++){const c=Mm[s];e[c]!==t[c]&&(a=!0)}a&&tt.read(()=>{Pm(n,r),tt.render(()=>{qc(r,o,Uc(n.tagName),e.transformTemplate),Im(n,r)})})}})};function rC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Wc(r)?nC:tC,preloadedFeatures:e,useRender:ZE(o),createVisualElement:t,Component:r};return PE(a)}}function _i(e,t,n){const r=e.getProps();return Kc(r,t,n!==void 0?n:r.custom,e)}function Zc(e,t){return e?e[t]||e.default||e:void 0}const Dm=new Set(["width","height","top","left","right","bottom",...So]);function Xc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ua(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function oC([...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 Qc{constructor(){this.subscriptions=[]}add(t){return Xc(this.subscriptions,t),()=>Ua(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 Nm(e,t){return t?e*(1e3/t):0}let Ka;function iC(){Ka=void 0}const kn={now:()=>(Ka===void 0&&kn.set(Dt.isProcessing||lE.useManualTiming?Dt.timestamp:performance.now()),Ka),set:e=>{Ka=e,queueMicrotask(iC)}},Fm=30,aC=e=>!isNaN(parseFloat(e)),Ii={current:void 0};class sC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=kn.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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&za(!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 Qc);const r=this.events[t].add(n);return t==="change"?()=>{r(),tt.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 Ii.current&&Ii.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fm);return Nm(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 Eo(e,t){return new sC(e,t)}function lC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Eo(n))}function cC(e,t){const n=_i(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=QE(i[a]);lC(e,a,s)}}function uC(e){return!!(kt(e)&&e.add)}function Jc(e,t){const n=e.getValue("willChange");if(uC(n))return n.add(t)}function Lm(e){return e.props[hm]}function eu(e){let t;return()=>(t===void 0&&(t=e()),t)}const dC=eu(()=>window.ScrollTimeline!==void 0);class fC{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(dC()&&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 Vm extends fC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const hn=e=>e*1e3,Pn=e=>e/1e3;function Ya(e){return typeof e=="function"}function jm(e,t){e.timeline=t,e.onfinish=null}const tu=e=>Array.isArray(e)&&typeof e[0]=="number",pC={linearEasing:void 0};function hC(e,t){const n=eu(e);return()=>{var r;return(r=pC[t])!==null&&r!==void 0?r:n()}}const Ga=hC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$m=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Fr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function zm(e){return!!(typeof e=="function"&&Ga()||!e||typeof e=="string"&&(e in nu||Ga())||tu(e)||Array.isArray(e)&&e.every(zm))}const Oi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oi([0,.65,.55,1]),circOut:Oi([.55,0,1,.45]),backIn:Oi([.31,.01,.66,-.59]),backOut:Oi([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e=="function"&&Ga()?$m(e,t):tu(e)?Oi(e):Array.isArray(e)?e.map(n=>Rm(n,t)||nu.easeOut):nu[e]}const Bm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mC=1e-7,gC=12;function vC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Bm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>mC&&++s<gC);return a}function Mi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>vC(i,0,1,e,n);return i=>i===0||i===1?i:Bm(o(i),t,r)}const Hm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wm=e=>t=>1-e(1-t),qm=Mi(.33,1.53,.69,.99),ru=Wm(qm),Um=Hm(ru),Km=e=>(e*=2)<1?.5*ru(e):.5*(2-Math.pow(2,-10*(e-1))),ou=e=>1-Math.sin(Math.acos(e)),Ym=Wm(ou),Gm=Hm(ou),Zm=e=>/^0[^.\s]+$/u.test(e);function yC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zm(e):!0}const Di=e=>Math.round(e*1e5)/1e5,iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bC(e){return e==null}const xC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,au=(e,t)=>n=>!!(typeof n=="string"&&xC.test(n)&&n.startsWith(e)||t&&!bC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(iu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},wC=e=>qn(0,255,e),su={...To,transform:e=>Math.round(wC(e))},Lr={test:au("rgb","red"),parse:Xm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+su.transform(e)+", "+su.transform(t)+", "+su.transform(n)+", "+Di(Pi.transform(r))+")"};function SC(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 lu={test:au("#"),parse:SC,transform:Lr.transform},Co={test:au("hsl","hue"),parse:Xm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cn.transform(Di(t))+", "+Cn.transform(Di(n))+", "+Di(Pi.transform(r))+")"},Vt={test:e=>Lr.test(e)||lu.test(e)||Co.test(e),parse:e=>Lr.test(e)?Lr.parse(e):Co.test(e)?Co.parse(e):lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lr.transform(e):Co.transform(e)},TC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(TC))===null||n===void 0?void 0:n.length)||0)>0}const Qm="number",Jm="color",CC="var",kC="var(",eg="${}",PC=/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 Ni(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(PC,c=>(Vt.test(c)?(r.color.push(i),o.push(Jm),n.push(Vt.parse(c))):c.startsWith(kC)?(r.var.push(i),o.push(CC),n.push(c)):(r.number.push(i),o.push(Qm),n.push(parseFloat(c))),++i,eg)).split(eg);return{values:n,split:s,indexes:r,types:o}}function tg(e){return Ni(e).values}function ng(e){const{split:t,types:n}=Ni(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===Qm?i+=Di(o[a]):s===Jm?i+=Vt.transform(o[a]):i+=o[a]}return i}}const AC=e=>typeof e=="number"?0:e;function _C(e){const t=tg(e);return ng(e)(t.map(AC))}const rr={test:EC,parse:tg,createTransformer:ng,getAnimatableNone:_C},IC=new Set(["brightness","contrast","saturate","opacity"]);function OC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iu)||[];if(!r)return e;const o=n.replace(r,"");let i=IC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const MC=/\b([a-z-]*)\(.*?\)/gu,cu={...rr,getAnimatableNone:e=>{const t=e.match(MC);return t?t.map(OC).join(" "):e}},DC={...Rc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:cu,WebkitFilter:cu},rg=e=>DC[e];function og(e,t){let n=rg(e);return n!==cu&&(n=rr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const NC=new Set(["auto","none","0"]);function FC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!NC.has(i)&&Ni(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=og(n,o)}const Vr=e=>e*180/Math.PI,uu=e=>{const t=Vr(Math.atan2(e[1],e[0]));return du(t)},LC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:uu,rotateZ:uu,skewX:e=>Vr(Math.atan(e[1])),skewY:e=>Vr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},du=e=>(e=e%360,e<0&&(e+=360),e),ig=uu,ag=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),sg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ag,scaleY:sg,scale:e=>(ag(e)+sg(e))/2,rotateX:e=>du(Vr(Math.atan2(e[6],e[5]))),rotateY:e=>du(Vr(Math.atan2(-e[2],e[0]))),rotateZ:ig,rotate:ig,skewX:e=>Vr(Math.atan(e[4])),skewY:e=>Vr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function lg(e){return e.includes("scale")?1:0}function fu(e,t){if(!e||e==="none")return lg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=VC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=LC,o=s}if(!o)return lg(t);const i=r[t],a=o[1].split(",").map($C);return typeof i=="function"?i(a):a[i]}const jC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fu(n,t)};function $C(e){return parseFloat(e.trim())}const cg=e=>e===To||e===Te,zC=new Set(["x","y","z"]),RC=So.filter(e=>!zC.has(e));function BC(e){const t=[];return RC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ko={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})=>fu(t,"x"),y:(e,{transform:t})=>fu(t,"y")};ko.translateX=ko.x,ko.translateY=ko.y;const jr=new Set;let pu=!1,hu=!1;function ug(){if(hu){const e=Array.from(jr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=BC(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)})}hu=!1,pu=!1,jr.forEach(e=>e.complete()),jr.clear()}function dg(){jr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function HC(){dg(),ug()}class mu{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?(jr.add(this),pu||(pu=!0,tt.read(dg),tt.resolveKeyframes(ug))):(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 c=r.readValue(n,s);c!=null&&(t[0]=c)}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),jr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,jr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const fg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),WC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qC(e){const t=WC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const UC=4;function pg(e,t,n=1){an(n<=UC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=qC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return fg(a)?parseFloat(a):a}return zc(o)?pg(o,t,n+1):o}const hg=e=>t=>t.test(e),mg=[To,Te,Cn,nr,FE,NE,{test:e=>e==="auto",parse:e=>e}],gg=e=>mg.find(hg(e));class vg extends mu{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 c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),zc(l))){const u=pg(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Dm.has(r)||t.length!==2)return;const[o,i]=t,a=gg(o),s=gg(i);if(a!==s)if(cg(a)&&cg(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)yC(t[o])&&r.push(o);r.length&&FC(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=ko[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]=ko[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(([c,l])=>{n.getValue(c).set(l)}),this.resolveNoneKeyframes()}}const yg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(rr.test(e)||e==="0")&&!e.startsWith("url("));function KC(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 YC(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=yg(o,t),s=yg(i,t);return bo(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:KC(e)||(n==="spring"||Ya(n))&&r}const GC=e=>e!==null;function Za(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(GC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const ZC=40;class bg{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=kn.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>ZC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&HC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:c,isGenerator:l}=this.options;if(!l&&!YC(t,r,o,i))if(a)this.options.duration=0;else{c&&c(Za(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 Xa=2e4;function gu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Xa;)t+=n,r=e.next(t);return t>=Xa?1/0:t}const st=(e,t,n)=>e+(t-e)*n;function vu(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 XC({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,c=2*n-s;o=vu(c,s,e+1/3),i=vu(c,s,e),a=vu(c,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Qa(e,t){return n=>n>0?t:e}const yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},QC=[lu,Lr,Co],JC=e=>QC.find(t=>t.test(e));function xg(e){const t=JC(e);if(bo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Co&&(n=XC(n)),n}const wg=(e,t)=>{const n=xg(e),r=xg(t);if(!n||!r)return Qa(e,t);const o={...n};return i=>(o.red=yu(n.red,r.red,i),o.green=yu(n.green,r.green,i),o.blue=yu(n.blue,r.blue,i),o.alpha=st(n.alpha,r.alpha,i),Lr.transform(o))},ek=(e,t)=>n=>t(e(n)),Fi=(...e)=>e.reduce(ek),bu=new Set(["none","hidden"]);function tk(e,t){return bu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nk(e,t){return n=>st(e,t,n)}function xu(e){return typeof e=="number"?nk:typeof e=="string"?zc(e)?Qa:Vt.test(e)?wg:ik:Array.isArray(e)?Sg:typeof e=="object"?Vt.test(e)?wg:rk:Qa}function Sg(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function rk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function ok(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]],c=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=c,o[a]++}return r}const ik=(e,t)=>{const n=rr.createTransformer(t),r=Ni(e),o=Ni(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?bu.has(e)&&!o.values.length||bu.has(t)&&!r.values.length?tk(e,t):Fi(Sg(ok(r,o),o.values),n):(bo(!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.`),Qa(e,t))};function Tg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):xu(e)(e,t)}const ak=5;function Eg(e,t,n){const r=Math.max(t-ak,0);return Nm(n-e(r),t-r)}const mt={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},Cg=.001;function sk({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;bo(e<=hn(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(mt.minDamping,mt.maxDamping,a),e=qn(mt.minDuration,mt.maxDuration,Pn(e)),a<1?(o=l=>{const u=l*a,d=u*e,p=u-n,f=wu(l,a),m=Math.exp(-d);return Cg-p/f*m},i=l=>{const d=l*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(l,2)*e,m=Math.exp(-d),g=wu(Math.pow(l,2),a);return(-o(l)+Cg>0?-1:1)*((p-f)*m)/g}):(o=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-.001+u*d},i=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const s=5/e,c=ck(o,i,s);if(e=hn(e),isNaN(c))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const lk=12;function ck(e,t,n){let r=n;for(let o=1;o<lk;o++)r=r-e(r)/t(r);return r}function wu(e,t){return e*Math.sqrt(1-t*t)}const uk=["duration","bounce"],dk=["stiffness","damping","mass"];function kg(e,t){return t.some(n=>e[n]!==void 0)}function fk(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!kg(e,dk)&&kg(e,uk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=sk(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Su(e=mt.visualDuration,t=mt.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:c,damping:l,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=fk({...n,velocity:-Pn(n.velocity||0)}),m=p||0,g=l/(2*Math.sqrt(c*u)),h=a-i,y=Pn(Math.sqrt(c/u)),v=Math.abs(h)<5;r||(r=v?mt.restSpeed.granular:mt.restSpeed.default),o||(o=v?mt.restDelta.granular:mt.restDelta.default);let x;if(g<1){const w=wu(y,g);x=S=>{const C=Math.exp(-g*y*S);return a-C*((m+g*y*h)/w*Math.sin(w*S)+h*Math.cos(w*S))}}else if(g===1)x=w=>a-Math.exp(-y*w)*(h+(m+y*h)*w);else{const w=y*Math.sqrt(g*g-1);x=S=>{const C=Math.exp(-g*y*S),k=Math.min(w*S,300);return a-C*((m+g*y*h)*Math.sinh(k)+w*h*Math.cosh(k))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const S=x(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?hn(m):Eg(x,w,S));const k=Math.abs(C)<=r,I=Math.abs(a-S)<=o;s.done=k&&I}return s.value=s.done?a:S,s},toString:()=>{const w=Math.min(gu(T),Xa),S=$m(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function Pg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=k=>s!==void 0&&k<s||c!==void 0&&k>c,m=k=>s===void 0?c:c===void 0||Math.abs(s-k)<Math.abs(c-k)?s:c;let g=n*t;const h=d+g,y=a===void 0?h:a(h);y!==h&&(g=y-d);const v=k=>-g*Math.exp(-k/r),x=k=>y+v(k),T=k=>{const I=v(k),_=x(k);p.done=Math.abs(I)<=l,p.value=p.done?y:_};let w,S;const C=k=>{f(p.value)&&(w=k,S=Su({keyframes:[p.value,m(p.value)],velocity:Eg(x,k,p.value),damping:o,stiffness:i,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!S&&w===void 0&&(I=!0,T(k),C(k)),w!==void 0&&k>=w?S.next(k-w):(!I&&T(k),p)}}}const pk=Mi(.42,0,1,1),hk=Mi(0,0,.58,1),Ag=Mi(.42,0,.58,1),_g=e=>Array.isArray(e)&&typeof e[0]!="number",Ig={linear:Ut,easeIn:pk,easeInOut:Ag,easeOut:hk,circIn:ou,circInOut:Gm,circOut:Ym,backIn:ru,backInOut:Um,backOut:qm,anticipate:Km},Tu=e=>{if(tu(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Mi(t,n,r,o)}else if(typeof e=="string")return an(Ig[e]!==void 0,`Invalid easing type '${e}'`),Ig[e];return e};function mk(e,t,n){const r=[],o=n||Tg,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Ut:t;s=Fi(c,s)}r.push(s)}return r}function Og(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(an(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=mk(t,r,o),c=s.length,l=u=>{if(a&&u<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Fr(e[d],e[d+1],u);return s[d](p)};return n?u=>l(qn(e[0],e[i-1],u)):l}function Mg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Fr(0,t,r);e.push(st(n,1,o))}}function Dg(e){const t=[0];return Mg(t,e.length-1),t}function gk(e,t){return e.map(n=>n*t)}function vk(e,t){return e.map(()=>t||Ag).splice(0,e.length-1)}function Li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=_g(r)?r.map(Tu):Tu(r),i={done:!1,value:t[0]},a=gk(n&&n.length===t.length?n:Dg(t),e),s=Og(a,t,{ease:Array.isArray(o)?o:vk(t,o)});return{calculatedDuration:e,next:c=>(i.value=s(c),i.done=c>=e,i)}}const yk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>tt.update(t,!0),stop:()=>Wn(t),now:()=>Dt.isProcessing?Dt.timestamp:kn.now()}},bk={decay:Pg,inertia:Pg,tween:Li,keyframes:Li,spring:Su},xk=e=>e/100;class Eu extends bg{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:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||mu,s=(c,l)=>this.onKeyframesResolved(c,l);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=Ya(n)?n:bk[n]||Li;let c,l;process.env.NODE_ENV!=="production"&&s!==Li&&an(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Li&&typeof t[0]!="number"&&(c=Fi(xk,Tg(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=gu(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:c,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:c,calculatedDuration:l,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=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 y=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,T=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(_=1-_,g&&(_-=g/d)):m==="mirror"&&(T=a)),x=qn(0,1,_)*d}const w=v?{done:!1,value:c[0]}:T.next(x);s&&(w.value=s(w.value));let{done:S}=w;!v&&l!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&o!==void 0&&(w.value=Za(c,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Pn(t.calculatedDuration):0}get time(){return Pn(this.currentTime)}set time(t){t=hn(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=Pn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=yk,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 wk=new Set(["opacity","clipPath","filter","transform"]);function Sk(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Rm(s,o);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const Tk=eu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ja=10,Ek=2e4;function Ck(e){return Ya(e.type)||e.type==="spring"||!zm(e.ease)}function kk(e,t){const n=new Eu({...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<Ek;)r=n.sample(i),o.push(r.value),i+=Ja;return{times:void 0,keyframes:o,duration:i-Ja,ease:"linear"}}const Ng={anticipate:Km,backInOut:Um,circInOut:Gm};function Pk(e){return e in Ng}class Fg extends bg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new vg(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:c,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&Ga()&&Pk(i)&&(i=Ng[i]),Ck(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=kk(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=Sk(s.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=l??this.calcStartTime(),this.pendingTimeline?(jm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Za(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 Pn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Pn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=hn(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 Ut;const{animation:r}=n;jm(r,t)}return Ut}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:l,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new Eu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=hn(this.time);l.setWithVelocity(m.sample(g-Ja).value,m.sample(g).value,Ja)}const{onStop:c}=this.options;c&&c(),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:c,transformTemplate:l}=n.owner.getProps();return Tk()&&r&&wk.has(r)&&(r!=="transform"||!l)&&!c&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Ak={type:"spring",stiffness:500,damping:25,restSpeed:10},_k=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ik={type:"keyframes",duration:.8},Ok={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mk=(e,{keyframes:t})=>t.length>2?Ik:Nr.has(e)?e.startsWith("scale")?_k(t[1]):Ak:Ok;function Dk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const Cu=(e,t,n,r={},o,i)=>a=>{const s=Zc(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-hn(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,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};Dk(s)||(u={...u,...Mk(e,u)}),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=Za(u.keyframes,s);if(p!==void 0)return tt.update(()=>{u.onUpdate(p),u.onComplete()}),new Vm([])}return!i&&Fg.supports(u)?new Fg(u):new Eu(u)};function Nk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ku(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...c}=t;r&&(a=r);const l=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in c){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=c[d];if(f===void 0||u&&Nk(u,d))continue;const m={delay:n,...Zc(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Lm(e);if(y){const v=window.MotionHandoffAnimation(y,d,tt);v!==null&&(m.startTime=v,g=!0)}}Jc(e,d),p.start(Cu(d,p,f,e.shouldReduceMotion&&Dm.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&l.push(h)}return s&&Promise.all(l).then(()=>{tt.update(()=>{s&&cC(e,s)})}),l}function Pu(e,t,n={}){var r;const o=_i(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(ku(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Fk(e,t,u+l,d,p,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,u]=c==="beforeChildren"?[a,s]:[s,a];return l().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Fk(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,c=o===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(Lk).forEach((l,u)=>{l.notify("AnimationStart",t),a.push(Pu(l,t,{...i,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function Lk(e,t){return e.sortNodePosition(t)}function Vk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Pu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Pu(e,t,n);else{const o=typeof t=="function"?_i(e,t,n.custom):t;r=Promise.all(ku(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Lg(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 jk=Lc.length;function Vg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<jk;n++){const r=Lc[n],o=e.props[r];(Ci(o)||o===!1)&&(t[r]=o)}return t}const $k=[...Fc].reverse(),zk=Fc.length;function Rk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Vk(e,n,r)))}function Bk(e){let t=Rk(e),n=jg(),r=!0;const o=c=>(l,u)=>{var d;const p=_i(e,u,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;l={...l,...g,...m}}return l};function i(c){t=c(e)}function a(c){const{props:l}=e,u=Vg(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<zk;h++){const y=$k[h],v=n[y],x=l[y]!==void 0?l[y]:u[y],T=Ci(x),w=y===c?v.isActive:null;w===!1&&(m=h);let S=x===u[y]&&x!==l[y]&&T;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...f},!v.isActive&&w===null||!x&&!v.prevProp||Ba(x)||typeof x=="boolean")continue;const C=Hk(v.prevProp,x);let k=C||y===c&&v.isActive&&!S&&T||h>m&&T,I=!1;const _=Array.isArray(x)?x:[x];let M=_.reduce(o(y),{});w===!1&&(M={});const{prevResolvedValues:L={}}=v,$={...L,...M},A=V=>{k=!0,p.has(V)&&(I=!0,p.delete(V)),v.needsAnimating[V]=!0;const F=e.getValue(V);F&&(F.liveStyle=!1)};for(const V in $){const F=M[V],B=L[V];if(f.hasOwnProperty(V))continue;let D=!1;Yc(F)&&Yc(B)?D=!Lg(F,B):D=F!==B,D?F!=null?A(V):p.add(V):F!==void 0&&p.has(V)?A(V):v.protectedKeys[V]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(f={...f,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(S&&C)||I)&&d.push(..._.map(V=>({animation:V,options:{type:y}})))}if(p.size){const h={};if(typeof l.initial!="boolean"){const y=_i(e,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(h.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),h[y]=v??null}),d.push({animation:h})}let g=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(c,l){var u;if(n[c].isActive===l)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(c,l)}),n[c].isActive=l;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=jg(),r=!0}}}function Hk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Lg(t,e):!1}function $r(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jg(){return{animate:$r(!0),whileInView:$r(),whileHover:$r(),whileTap:$r(),whileDrag:$r(),whileFocus:$r(),exit:$r()}}class or{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Wk extends or{constructor(t){super(t),t.animationState||(t.animationState=Bk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ba(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 qk=0;class Uk extends or{constructor(){super(...arguments),this.id=qk++}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 Kk={animation:{Feature:Wk},exit:{Feature:Uk}},mn={x:!1,y:!1};function $g(){return mn.x||mn.y}function Yk(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Vi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ji(e){return{point:{x:e.pageX,y:e.pageY}}}const Gk=e=>t=>Au(t)&&e(t,ji(t));function $i(e,t,n,r){return Vi(e,t,Gk(n),r)}function zg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xk(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 Rg=1e-4,Qk=1-Rg,Jk=1+Rg,Bg=.01,eP=0-Bg,tP=0+Bg;function Bt(e){return e.max-e.min}function nP(e,t,n){return Math.abs(e-t)<=n}function Hg(e,t,n,r=.5){e.origin=r,e.originPoint=st(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qk&&e.scale<=Jk||isNaN(e.scale))&&(e.scale=1),(e.translate>=eP&&e.translate<=tP||isNaN(e.translate))&&(e.translate=0)}function zi(e,t,n,r){Hg(e.x,t.x,n.x,r?r.originX:void 0),Hg(e.y,t.y,n.y,r?r.originY:void 0)}function Wg(e,t,n){e.min=n.min+t.min,e.max=e.min+Bt(t)}function rP(e,t,n){Wg(e.x,t.x,n.x),Wg(e.y,t.y,n.y)}function qg(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Ri(e,t,n){qg(e.x,t.x,n.x),qg(e.y,t.y,n.y)}const Ug=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:Ug(),y:Ug()}),Kg=()=>({min:0,max:0}),yt=()=>({x:Kg(),y:Kg()});function sn(e){return[e("x"),e("y")]}function _u(e){return e===void 0||e===1}function Iu({scale:e,scaleX:t,scaleY:n}){return!_u(e)||!_u(t)||!_u(n)}function zr(e){return Iu(e)||Yg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yg(e){return Gg(e.x)||Gg(e.y)}function Gg(e){return e&&e!=="0%"}function es(e,t,n){const r=e-n,o=t*r;return n+o}function Zg(e,t,n,r,o){return o!==void 0&&(e=es(e,o,r)),es(e,n,r)+t}function Ou(e,t=0,n=1,r,o){e.min=Zg(e.min,t,n,r,o),e.max=Zg(e.max,t,n,r,o)}function Xg(e,{x:t,y:n}){Ou(e.x,t.translate,t.scale,t.originPoint),Ou(e.y,n.translate,n.scale,n.originPoint)}const Qg=.999999999999,Jg=1.0000000000001;function oP(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:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&_o(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Xg(e,a)),r&&zr(i.latestValues)&&_o(e,i.latestValues))}t.x<Jg&&t.x>Qg&&(t.x=1),t.y<Jg&&t.y>Qg&&(t.y=1)}function Ao(e,t){e.min=e.min+t,e.max=e.max+t}function ev(e,t,n,r,o=.5){const i=st(e.min,e.max,o);Ou(e,t,n,i,r)}function _o(e,t){ev(e.x,t.x,t.scaleX,t.scale,t.originX),ev(e.y,t.y,t.scaleY,t.scale,t.originY)}function tv(e,t){return zg(Xk(e.getBoundingClientRect(),t))}function iP(e,t,n){const r=tv(e,n),{scroll:o}=t;return o&&(Ao(r.x,o.offset.x),Ao(r.y,o.offset.y)),r}const nv=({current:e})=>e?e.ownerDocument.defaultView:null,rv=(e,t)=>Math.abs(e-t);function aP(e,t){const n=rv(e.x,t.x),r=rv(e.y,t.y);return Math.sqrt(n**2+r**2)}class ov{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=Du(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=aP(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Dt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:y}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mu(p,this.transformPagePoint),tt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Du(d.type==="pointercancel"?this.lastMoveEventInfo:Mu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ji(t),s=Mu(a,this.transformPagePoint),{point:c}=s,{timestamp:l}=Dt;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Du(s,this.history)),this.removeListeners=Fi($i(this.contextWindow,"pointermove",this.handlePointerMove),$i(this.contextWindow,"pointerup",this.handlePointerUp),$i(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Mu(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Du({point:e},t){return{point:e,delta:iv(e,av(t)),offset:iv(e,sP(t)),velocity:lP(t,.1)}}function sP(e){return e[0]}function av(e){return e[e.length-1]}function lP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=av(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};const i=Pn(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 cP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?st(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?st(n,e,r.max):Math.min(e,n)),e}function sv(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 uP(e,{top:t,left:n,bottom:r,right:o}){return{x:sv(e.x,n,o),y:sv(e.y,t,r)}}function lv(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 dP(e,t){return{x:lv(e.x,t.x),y:lv(e.y,t.y)}}function fP(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=Fr(t.min,t.max-r,e.min):r>o&&(n=Fr(e.min,e.max-o,t.min)),qn(0,1,n)}function pP(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 Nu=.35;function hP(e=Nu){return e===!1?e=0:e===!0&&(e=Nu),{x:cv(e,"left","right"),y:cv(e,"top","bottom")}}function cv(e,t,n){return{min:uv(e,t),max:uv(e,n)}}function uv(e,t){return typeof e=="number"?e:e[t]||0}const mP=new WeakMap;class gP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ji(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Yk(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(h=>{let y=this.getAxisMotionValue(h).get()||0;if(Cn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[h];x&&(y=Bt(x)*(parseFloat(y)/100))}}this.originPoint[h]=y}),m&&tt.postRender(()=>m(u,d)),Jc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=vP(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),c=()=>sn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new ov(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:nv(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&&tt.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||!ts(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=cP(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=uP(o.layoutBox,n):this.constraints=!1,this.elastic=hP(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=pP(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;an(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=iP(r,o.root,this.visualElement.getTransformPagePoint());let a=dP(o.layout.layoutBox,i);if(n){const s=n(Zk(a));this.hasMutatedConstraints=!!s,s&&(a=zg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=sn(u=>{if(!ts(u,n,this.currentDirection))return;let d=c&&c[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jc(this.visualElement,t),r.start(Cu(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(!ts(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]-st(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 c=s.get();o[a]=fP({min:c,max:c},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(!ts(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(st(c,l,o[a]))})}addListeners(){if(!this.visualElement.current)return;mP.set(this.visualElement,this);const t=this.visualElement.current,n=$i(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();wo(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),tt.read(r);const a=Vi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(sn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[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=Nu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ts(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class yP extends or{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new gP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const dv=e=>(t,n)=>{e&&tt.postRender(()=>e(t,n))};class bP extends or{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new ov(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dv(t),onStart:dv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&tt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=$i(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 fv(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(Te.test(e))e=parseFloat(e);else return e;const n=fv(e,t.target.x),r=fv(e,t.target.y);return`${n}% ${r}%`}},xP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=rr.parse(e);if(o.length>5)return r;const i=rr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=c;const l=st(s,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=l),typeof o[3+a]=="number"&&(o[3+a]/=l),i(o)}};class wP extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;DE(SP),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()||tt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vc.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 pv(e){const[t,n]=nm(),r=E.useContext(Ei);return b.jsx(wP,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(mm),isPresent:t,safeToRemove:n})}const SP={borderRadius:{...Bi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bi,borderTopRightRadius:Bi,borderBottomLeftRadius:Bi,borderBottomRightRadius:Bi,boxShadow:xP};function hv(e,t,n){const r=kt(e)?e:Eo(e);return r.start(Cu("",r,t,n)),r.animation}function mv(e){return e instanceof SVGElement&&e.tagName!=="svg"}const TP=(e,t)=>e.depth-t.depth;class EP{constructor(){this.children=[],this.isDirty=!1}add(t){Xc(this.children,t),this.isDirty=!0}remove(t){Ua(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(TP),this.isDirty=!1,this.children.forEach(t)}}function CP(e,t){const n=kn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return tt.read(r,!0),()=>Wn(r)}const gv=["TopLeft","TopRight","BottomLeft","BottomRight"],kP=gv.length,vv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||Te.test(e);function PP(e,t,n,r,o,i){o?(e.opacity=st(0,n.opacity!==void 0?n.opacity:1,AP(r)),e.opacityExit=st(t.opacity!==void 0?t.opacity:1,0,_P(r))):i&&(e.opacity=st(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<kP;a++){const s=`border${gv[a]}Radius`;let c=bv(t,s),l=bv(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||yv(c)===yv(l)?(e[s]=Math.max(st(vv(c),vv(l),r),0),(Cn.test(l)||Cn.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,r))}function bv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const AP=xv(0,.5,Ym),_P=xv(.5,.95,Ut);function xv(e,t,n){return r=>r<e?0:r>t?1:n(Fr(e,t,r))}function wv(e,t){e.min=t.min,e.max=t.max}function ln(e,t){wv(e.x,t.x),wv(e.y,t.y)}function Sv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Tv(e,t,n,r,o){return e-=t,e=es(e,1/n,r),o!==void 0&&(e=es(e,1/o,r)),e}function IP(e,t=0,n=1,r=.5,o,i=e,a=e){if(Cn.test(t)&&(t=parseFloat(t),t=st(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=st(i.min,i.max,r);e===i&&(s-=t),e.min=Tv(e.min,t,n,s,o),e.max=Tv(e.max,t,n,s,o)}function Ev(e,t,[n,r,o],i,a){IP(e,t[n],t[r],t[o],t.scale,i,a)}const OP=["x","scaleX","originX"],MP=["y","scaleY","originY"];function Cv(e,t,n,r){Ev(e.x,t,OP,n?n.x:void 0,r?r.x:void 0),Ev(e.y,t,MP,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Pv(e){return kv(e.x)&&kv(e.y)}function Av(e,t){return e.min===t.min&&e.max===t.max}function DP(e,t){return Av(e.x,t.x)&&Av(e.y,t.y)}function _v(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Iv(e,t){return _v(e.x,t.x)&&_v(e.y,t.y)}function Ov(e){return Bt(e.x)/Bt(e.y)}function Mv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NP{constructor(){this.members=[]}add(t){Xc(this.members,t),t.scheduleRender()}remove(t){if(Ua(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 FP(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:l,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Fu=["","X","Y","Z"],LP={visibility:"hidden"},Dv=1e3;let VP=0;function Lu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Lm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Nv(r)}function Fv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=VP++,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(zP),this.nodes.forEach(qP),this.nodes.forEach(UP),this.nodes.forEach(RP)},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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new EP)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Qc),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=mv(a),this.instance=a;const{layoutId:c,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||c)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=CP(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Vv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||XP,{onLayoutAnimationStart:h,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Iv(this.targetLayout,m),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={...Zc(g,"layout"),onPlay:h,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else p||Vv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Wn(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(KP),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&&Nv(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:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Lv);return}this.isUpdating||this.nodes.forEach(HP),this.isUpdating=!1,this.nodes.forEach(WP),this.nodes.forEach(jP),this.nodes.forEach($P),this.clearAllSnapshots();const s=kn.now();Dt.delta=qn(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Nc.update.process(Dt),Nc.preRender.process(Dt),Nc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BP),this.sharedNodes.forEach(YP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!Pv(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;a&&(s||zr(this.latestValues)||u)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),QP(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return yt();const c=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(JP))){const{scroll:u}=this.root;u&&(Ao(c.x,u.offset.x),Ao(c.y,u.offset.y))}return c}removeElementScroll(a){var s;const c=yt();if(ln(c,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return c;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&ln(c,a),Ao(c.x,d.offset.x),Ao(c.y,d.offset.y))}return c}applyTransform(a,s=!1){const c=yt();ln(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&_o(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),zr(u.latestValues)&&_o(c,u.latestValues)}return zr(this.latestValues)&&_o(c,this.latestValues),c}removeTransform(a){const s=yt();ln(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!zr(l.latestValues))continue;Iu(l.latestValues)&&l.updateSnapshot();const u=yt(),d=l.measurePageBox();ln(u,d),Cv(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return zr(this.latestValues)&&Cv(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!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(a||l&&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=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Ri(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Xg(this.target,this.targetDelta)):ln(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=yt(),this.relativeTargetOrigin=yt(),Ri(this.relativeTargetOrigin,this.target,f.target),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Iu(this.parent.latestValues)||Yg(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(),c=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(l=!1),l)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;ln(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;oP(this.layoutCorrected,this.treeScale,this.path,c),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=yt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sv(this.prevProjectionDelta.x,this.projectionDelta.x),Sv(this.prevProjectionDelta.y,this.projectionDelta.y)),zi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Mv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}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 c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},d=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=yt(),f=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),y=!h||h.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(ZP));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const w=T/1e3;jv(d.x,a.x,w),jv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ri(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GP(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&DP(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),ln(x,this.relativeTarget)),g&&(this.animationValues=u,PP(u,l,this.latestValues,w,v,y)),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&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tt.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=hv(0,Dv,{...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(Dv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:u}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Hv(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||yt();const d=Bt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+d;const p=Bt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}ln(s,c),_o(s,u),zi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new NP),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.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:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Lu("z",a,l,this.animationValues);for(let u=0;u<Fu.length;u++)Lu(`rotate${Fu[u]}`,a,l,this.animationValues),Lu(`skew${Fu[u]}`,a,l,this.animationValues);a.render();for(const u in l)a.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);a.scheduleRender()}getProjectionStyles(a){var s,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return LP;const l={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=qa(a==null?void 0:a.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none",l;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=qa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!zr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=FP(this.projectionDeltaWithTransform,this.treeScale,p),u&&(l.transform=u(p,l.transform));const{x:f,y:m}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(c=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:l.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in ki){if(p[g]===void 0)continue;const{correct:h,applyTo:y,isCSSVariable:v}=ki[g],x=l.transform==="none"?p[g]:h(p[g],d);if(y){const T=y.length;for(let w=0;w<T;w++)l[y[w]]=x}else v?this.options.visualElement.renderState.vars[g]=x:l[g]=x}return this.options.layoutId&&(l.pointerEvents=d===this?qa(a==null?void 0:a.pointerEvents)||"":"none"),l}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(Lv),this.root.sharedNodes.clear()}}}function jP(e){e.updateLayout()}function $P(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=Bt(p);p.min=r[d].min,p.max=p.min+f}):Hv(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(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=Po();zi(s,r,n.layoutBox);const c=Po();a?zi(c,e.applyTransform(o,!0),n.measuredBox):zi(c,r,n.layoutBox);const l=!Pv(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 m=yt();Ri(m,n.layoutBox,p.layoutBox);const g=yt();Ri(g,r,f.layoutBox),Iv(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function zP(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 RP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BP(e){e.clearSnapshot()}function Lv(e){e.clearMeasurements()}function HP(e){e.isLayoutDirty=!1}function WP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qP(e){e.resolveTargetDelta()}function UP(e){e.calcProjection()}function KP(e){e.resetSkewAndRotation()}function YP(e){e.removeLeadSnapshot()}function jv(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $v(e,t,n,r){e.min=st(t.min,n.min,r),e.max=st(t.max,n.max,r)}function GP(e,t,n,r){$v(e.x,t.x,n.x,r),$v(e.y,t.y,n.y,r)}function ZP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const XP={duration:.45,ease:[.4,0,.1,1]},zv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rv=zv("applewebkit/")&&!zv("chrome/")?Math.round:Ut;function Bv(e){e.min=Rv(e.min),e.max=Rv(e.max)}function QP(e){Bv(e.x),Bv(e.y)}function Hv(e,t,n){return e==="position"||e==="preserve-aspect"&&!nP(Ov(t),Ov(n),.2)}function JP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const eA=Fv({attachResizeListener:(e,t)=>Vi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vu={current:void 0},Wv=Fv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vu.current){const e=new eA({});e.mount(window),e.setOptions({layoutScroll:!0}),Vu.current=e}return Vu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),tA={pan:{Feature:bP},drag:{Feature:yP,ProjectionNode:Wv,MeasureLayout:pv}};function qv(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 Uv(e,t){const n=qv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Kv(e){return!(e.pointerType==="touch"||$g())}function nA(e,t,n={}){const[r,o,i]=Uv(e,n),a=s=>{if(!Kv(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const u=d=>{Kv(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Yv(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&&tt.postRender(()=>i(t,ji(t)))}class rA extends or{mount(){const{current:t}=this.node;t&&(this.unmount=nA(t,(n,r)=>(Yv(this.node,r,"Start"),o=>Yv(this.node,o,"End"))))}unmount(){}}class oA extends or{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=Fi(Vi(this.node.current,"focus",()=>this.onFocus()),Vi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Gv=(e,t)=>t?e===t?!0:Gv(e,t.parentElement):!1,iA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aA(e){return iA.has(e.tagName)||e.tabIndex!==-1}const Hi=new WeakSet;function Zv(e){return t=>{t.key==="Enter"&&e(t)}}function ju(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sA=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Zv(()=>{if(Hi.has(n))return;ju(n,"down");const o=Zv(()=>{ju(n,"up")}),i=()=>ju(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 Xv(e){return Au(e)&&!$g()}function lA(e,t,n={}){const[r,o,i]=Uv(e,n),a=s=>{const c=s.currentTarget;if(!Xv(s)||Hi.has(c))return;Hi.add(c);const l=t(c,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Xv(f)||!Hi.has(c))&&(Hi.delete(c),typeof l=="function"&&l(f,{success:m}))},d=f=>{u(f,c===window||c===document||n.useGlobalTarget||Gv(c,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",l=>sA(l,o)),!aA(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Qv(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&&tt.postRender(()=>i(t,ji(t)))}class cA extends or{mount(){const{current:t}=this.node;t&&(this.unmount=lA(t,(n,r)=>(Qv(this.node,r,"Start"),(o,{success:i})=>Qv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $u=new WeakMap,zu=new WeakMap,uA=e=>{const t=$u.get(e.target);t&&t(e)},dA=e=>{e.forEach(uA)};function fA({root:e,...t}){const n=e||document;zu.has(n)||zu.set(n,{});const r=zu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(dA,{root:e,...t})),r[o]}function pA(e,t,n){const r=fA(t);return $u.set(e,n),r.observe(e),()=>{$u.delete(e),r.unobserve(e)}}const hA={some:0,all:1};class mA extends or{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:hA[o]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=l?u:d;p&&p(c)};return pA(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(gA(t,n))&&this.startObserver()}unmount(){}}function gA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const vA={inView:{Feature:mA},tap:{Feature:cA},focus:{Feature:oA},hover:{Feature:rA}},yA={layout:{ProjectionNode:Wv,MeasureLayout:pv}},Ru={current:null},Jv={current:!1};function bA(){if(Jv.current=!0,!!Dc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ru.current=e.matches;e.addListener(t),t()}else Ru.current=!1}const xA=[...mg,Vt,rr],wA=e=>xA.find(hg(e)),Wi=new WeakMap;function SA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(kt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&za(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(kt(i))e.addValue(r,Eo(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,Eo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ey=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ty{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=mu,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=kn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,tt.render(this.render,!1,!0))};const{latestValues:c,renderState:l,onUpdate:u}=a;this.onUpdate=u,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,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=Ha(n),this.isVariantNode=fm(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 m=p[f];c[f]!==void 0&&kt(m)&&m.set(c[f],!1)}}mount(t){this.current=t,Wi.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)),Jv.current||bA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ru.current,process.env.NODE_ENV!=="production"&&za(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(),Wn(this.notifyUpdate),Wn(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=Nr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&tt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xo){const n=xo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ey.length;r++){const o=ey[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=SA(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=Eo(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"&&(fg(o)||Zm(o))?o=parseFloat(o):!wA(o)&&rr.test(n)&&(o=og(t,n)),this.setBaseTarget(t,kt(o)?o.get():o)),kt(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=Kc(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&&!kt(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 Qc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ny extends ty{constructor(){super(...arguments),this.KeyframeResolver=vg}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;kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function TA(e){return window.getComputedStyle(e)}class ry extends ny{constructor(){super(...arguments),this.type="html",this.renderInstance=Am}readValueFromInstance(t,n){if(Nr.has(n))return jC(t,n);{const r=TA(t),o=($c(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tv(t,n)}build(t,n,r){Bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gc(t,n,r)}}class oy extends ny{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Pm(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nr.has(n)){const r=rg(n);return r&&r.default||0}return n=_m.has(n)?n:jc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Om(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&tt.postRender(this.updateDimensions)}build(t,n,r){qc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Im(t,n,r,o)}mount(t){this.isSVGTag=Uc(t.tagName),super.mount(t)}}const EA=(e,t)=>Wc(e)?new oy(t):new ry(t,{allowProjection:e!==E.Fragment}),CA=rC({...Kk,...vA,...tA,...yA},EA),ft=xE(CA);function kA(e){return E.useEffect(()=>()=>e(),[])}function rs(e){const t=pn(()=>Eo(e)),{isStatic:n}=E.useContext(yo);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function iy(e,t){const n=rs(t()),r=()=>n.set(t());return r(),Fa(()=>{const o=()=>tt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const PA=e=>e&&typeof e=="object"&&e.mix,AA=e=>PA(e)?e.mix:void 0;function _A(...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=Og(o,i,{mixer:AA(i[0]),...a});return t?s(r):s}function IA(e){Ii.current=[],e();const t=iy(Ii.current,e);return Ii.current=void 0,t}function OA(e,t,n,r){if(typeof e=="function")return IA(e);const o=typeof t=="function"?t:_A(t,n,r);return Array.isArray(e)?ay(e,o):ay([e],([i])=>o(i))}function ay(e,t){const n=pn(()=>[]);return iy(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function MA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(gu(r),Xa);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Pn(o)}}const DA=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function sy(e,t){return _g(e)?e[DA(0,e.length,t)]:e}function Bu(e){return typeof e=="object"&&!Array.isArray(e)}function ly(e,t,n,r){return typeof e=="string"&&Bu(t)?qv(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function NA(e,t,n){return e*(t+1)}function cy(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 FA(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ua(e,o),r--)}}function LA(e,t,n,r,o,i){FA(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:st(o,i,r[a]),easing:sy(n,a)})}function VA(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function jA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const $A="easeInOut",zA=20;function RA(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,c={},l=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const m=e[f];if(typeof m=="string"){l.set(m,d);continue}else if(!Array.isArray(m)){l.set(m.name,cy(d,m.at,u,l));continue}let[g,h,y={}]=m;y.at!==void 0&&(d=cy(d,y.at,u,l));let v=0;const x=(T,w,S,C=0,k=0)=>{const I=BA(T),{delay:_=0,times:M=Dg(I),type:L="keyframes",repeat:$,repeatType:A,repeatDelay:N=0,...O}=w;let{ease:V=t.ease||"easeOut",duration:F}=w;const B=typeof _=="function"?_(C,k):_,D=I.length,z=Ya(L)?L:o==null?void 0:o[L];if(D<=2&&z){let Z=100;if(D===2&&qA(I)){const j=I[1]-I[0];Z=Math.abs(j)}const Y={...O};F!==void 0&&(Y.duration=hn(F));const G=MA(Y,Z,z);V=G.ease,F=G.duration}F??(F=i);const J=d+B;M.length===1&&M[0]===0&&(M[1]=1);const X=M.length-I.length;if(X>0&&Mg(M,X),I.length===1&&I.unshift(null),$){an($<zA,"Repeat count too high, must be less than 20"),F=NA(F,$);const Z=[...I],Y=[...M];V=Array.isArray(V)?[...V]:[V];const G=[...V];for(let j=0;j<$;j++){I.push(...Z);for(let R=0;R<Z.length;R++)M.push(Y[R]+(j+1)),V.push(R===0?"linear":sy(G,R-1))}VA(M,$)}const Q=J+F;LA(S,I,V,M,J,Q),v=Math.max(B+F,v),p=Math.max(Q,p)};if(kt(g)){const T=uy(g,s);x(h,y,dy("default",T))}else{const T=ly(g,h,r,c),w=T.length;for(let S=0;S<w;S++){h=h,y=y;const C=T[S],k=uy(C,s);for(const I in h)x(h[I],HA(y,I),dy(I,k),S,w)}}u=d,d+=v}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(jA);const y=[],v=[],x=[];for(let w=0;w<h.length;w++){const{at:S,value:C,easing:k}=h[w];y.push(C),v.push(Fr(0,p,S)),x.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),x.unshift($A)),v[v.length-1]!==1&&(v.push(1),y.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const T=a.get(m);T.keyframes[g]=y,T.transition[g]={...t,duration:p,ease:x,times:v,...n}}}),a}function uy(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function dy(e,t){return t[e]||(t[e]=[]),t[e]}function BA(e){return Array.isArray(e)?e:[e]}function HA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const WA=e=>typeof e=="number",qA=e=>e.every(WA);function UA(e,t){return e in t}class KA extends ty{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(UA(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function YA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=mv(e)?new oy(t):new ry(t);n.mount(e),Wi.set(e,n)}function GA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new KA(t);n.mount(e),Wi.set(e,n)}function ZA(e,t){return kt(e)||typeof e=="number"||typeof e=="string"&&!Bu(t)}function fy(e,t,n,r){const o=[];if(ZA(e,t))o.push(hv(e,Bu(t)&&t.default||t,n&&(n.default||n)));else{const i=ly(e,t,r),a=i.length;an(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const c=i[s],l=c instanceof Element?YA:GA;Wi.has(c)||l(c);const u=Wi.get(c),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...ku(u,{...t,transition:d},{}))}}return o}function XA(e,t,n){const r=[];return RA(e,t,n,{spring:Su}).forEach(({keyframes:i,transition:a},s)=>{r.push(...fy(s,i,a))}),r}function QA(e){return Array.isArray(e)&&e.some(Array.isArray)}function JA(e){function t(n,r,o){let i=[];QA(n)?i=XA(n,r,e):i=fy(n,r,o,e);const a=new Vm(i);return e&&e.animations.push(a),a}return t}function e_(){const e=pn(()=>({current:null,animations:[]})),t=pn(()=>JA(e));return kA(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class t_{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 n_=()=>new t_;function r_(){return pn(n_)}function o_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function i_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:o_(n,i),s=Math.abs(a-o);let c=e*s;if(r){const l=i*e;c=Tu(r)(c/l)*l}return t+c}}const py=E.createContext(null);function a_(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],c=a.layout,l=st(c.min,c.max,.5);return i===1&&s.layout.max+n>l||i===-1&&s.layout.min+n<l?oC(e,o,o+i):e}function s_({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=pn(()=>ft[t]),c=[],l=E.useRef(!1);an(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=c.findIndex(m=>d===m.value);f!==-1?c[f].layout=p[n]:c.push({value:d,layout:p[n]}),c.sort(c_)},updateOrder:(d,p,f)=>{if(l.current)return;const m=a_(c,d,p,f);c!==m&&(l.current=!0,r(m.map(l_).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{l.current=!1}),b.jsx(s,{...i,ref:a,ignoreStrict:!0,children:b.jsx(py.Provider,{value:u,children:e})})}const hy=E.forwardRef(s_);function l_(e){return e.value}function c_(e,t){return e.layout.min-t.layout.min}function my(e,t=0){return kt(e)?e:rs(t)}function u_({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const c=pn(()=>ft[r]),l=E.useContext(py),u={x:my(t.x),y:my(t.y)},d=OA([u.x,u.y],([g,h])=>g||h?1:"unset");an(!!l,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=l;return b.jsx(c,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:y}=h;y[p]&&m(n,u[p].get(),y[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const gy=E.forwardRef(u_);/**
|
|
12
|
+
`),()=>{document.head.removeChild(f)}},[t]),b.jsx(rE,{isPresent:t,childRef:o,sizeRef:i,children:P.cloneElement(e,{ref:o})})}const iE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=pn(aE),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]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=b.jsx(oE,{isPresent:n,anchorX:s,children:e})),b.jsx(La.Provider,{value:d,children:e})};function aE(){return new Map}function nm(e=!0){const t=E.useContext(La);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 Va=e=>e.key||"";function rm(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const tr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=nm(a),u=E.useMemo(()=>rm(e),[e]),d=a&&!l?[]:u.map(Va),p=E.useRef(!0),f=E.useRef(u),m=pn(()=>new Map),[g,h]=E.useState(u),[y,v]=E.useState(u);Fa(()=>{p.current=!1,f.current=u;for(let w=0;w<y.length;w++){const T=Va(y[w]);d.includes(T)?m.delete(T):m.get(T)!==!0&&m.set(T,!1)}},[y,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let T=0;T<y.length;T++){const C=y[T],k=Va(C);d.includes(k)||(w.splice(T,0,C),x.push(C))}return i==="wait"&&x.length&&(w=x),v(rm(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.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(Ei);return b.jsx(b.Fragment,{children:y.map(w=>{const T=Va(w),C=a&&!l?!1:u===y||d.includes(T),k=()=>{if(m.has(T))m.set(T,!0);else return;let I=!0;m.forEach(_=>{_||(I=!1)}),I&&(S==null||S(),v(f.current),a&&(c==null||c()),r&&r())};return b.jsx(iE,{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)})})},sE=E.createContext(null),Ut=e=>e;let bo=Ut,an=Ut;process.env.NODE_ENV!=="production"&&(bo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});const lE={useManualTiming:!1},ja=["read","resolveKeyframes","update","preRender","render","postRender"];function cE(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 m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.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 uE=40;function om(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ja.reduce((y,v)=>(y[v]=cE(i),y),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,uE),1),o.timestamp=y,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))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:ja.reduce((y,v)=>{const x=a[v];return y[v]=(S,w=!1,T=!1)=>(n||m(),x.schedule(S,w,T)),y},{}),cancel:y=>{for(let v=0;v<ja.length;v++)a[ja[v]].cancel(y)},state:o,steps:a}}const{schedule:tt,cancel:Wn,state:Dt,steps:Nc}=om(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function dE(){const e=E.useRef(!1);return Fa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fE(){const e=dE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>tt.postRender(r),[r]),t]}const pE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function im(){const e=new Set,t=new WeakMap,n=()=>e.forEach(pE);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 am=e=>e===!0,hE=e=>am(e===!0)||e==="id",mE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ei),o=E.useContext(sE),[i,a]=fE(),s=E.useRef(null),l=r.id||o;s.current===null&&(hE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:am(n)&&r.group||im()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return b.jsx(Ei.Provider,{value:c,children:e})},sm=E.createContext({strict:!1}),lm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xo={};for(const e in lm)xo[e]={isEnabled:t=>lm[e].some(n=>!!t[n])};function gE(e){for(const t in e)xo[t]={...xo[t],...e[t]}}const vE=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 $a(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vE.has(e)}let cm=e=>!$a(e);function um(e){e&&(cm=t=>t.startsWith("on")?!$a(t):e(t))}try{um(require("@emotion/is-prop-valid").default)}catch{}function yE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(cm(o)||n===!0&&$a(o)||!t&&!$a(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function bE({children:e,isValidProp:t,...n}){t&&um(t),n={...E.useContext(yo),...n},n.isStatic=pn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return b.jsx(yo.Provider,{value:r,children:e})}const dm=new Set;function za(e,t,n){e||dm.has(t)||(console.warn(t),dm.add(t))}function xE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&za(!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 Ra=E.createContext({});function Ba(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ci(e){return typeof e=="string"||Array.isArray(e)}const Fc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Fc];function Ha(e){return Ba(e.animate)||Lc.some(t=>Ci(e[t]))}function fm(e){return!!(Ha(e)||e.variants)}function wE(e,t){if(Ha(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ci(n)?n:void 0,animate:Ci(r)?r:void 0}}return e.inherit!==!1?t:{}}function SE(e){const{initial:t,animate:n}=wE(e,E.useContext(Ra));return E.useMemo(()=>({initial:t,animate:n}),[pm(t),pm(n)])}function pm(e){return Array.isArray(e)?e.join(" "):e}const TE=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EE(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:Vc}=om(queueMicrotask,!1),jc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hm="data-"+jc("framerAppearId"),mm=E.createContext({});function CE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Ra),l=E.useContext(sm),c=E.useContext(La),u=E.useContext(yo).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(mm);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&kE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[hm],h=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 Fa(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Vc.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),h.current=!1))}),p}function kE(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:gm(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 gm(e){if(e)return e.options.allowProjection!==!1?e.projection:gm(e.parent)}function PE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&gE(e);function s(c,u){let d;const p={...E.useContext(yo),...c,layoutId:AE(c)},{isStatic:f}=p,m=SE(c),g=r(c,f);if(!f&&Dc){_E(p,e);const h=IE(p);d=h.MeasureLayout,m.visualElement=CE(o,g,p,t,h.ProjectionNode)}return b.jsxs(Ra.Provider,{value:m,children:[d&&m.visualElement?b.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,EE(g,m.visualElement,u),g,f,m.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[TE]=o,l}function AE({layoutId:e}){const t=E.useContext(Ei).id;return t&&e!==void 0?t+"-"+e:e}function _E(e,t){const n=E.useContext(sm).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?bo(!1,r):an(!1,r)}}function IE(e){const{drag:t,layout:n}=xo;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 vm=e=>t=>typeof t=="string"&&t.startsWith(e),$c=vm("--"),OE=vm("var(--"),zc=e=>OE(e)?ME.test(e.split("/*")[0].trim()):!1,ME=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ki={};function DE(e){for(const t in e)ki[t]=e[t],$c(t)&&(ki[t].isCSSVariable=!0)}const So=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nr=new Set(So);function ym(e,{layout:t,layoutId:n}){return Nr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ki[e]||e==="opacity")}const kt=e=>!!(e&&e.getVelocity),bm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pi={...To,transform:e=>qn(0,1,e)},Wa={...To,default:1},Ai=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),nr=Ai("deg"),Cn=Ai("%"),Te=Ai("px"),NE=Ai("vh"),FE=Ai("vw"),xm={...Cn,parse:e=>Cn.parse(e)/100,transform:e=>Cn.transform(e*100)},LE={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,backgroundPositionX:Te,backgroundPositionY:Te},VE={rotate:nr,rotateX:nr,rotateY:nr,rotateZ:nr,scale:Wa,scaleX:Wa,scaleY:Wa,scaleZ:Wa,skew:nr,skewX:nr,skewY:nr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Pi,originX:xm,originY:xm,originZ:Te},wm={...To,transform:Math.round},Rc={...LE,...VE,zIndex:wm,size:Te,fillOpacity:Pi,strokeOpacity:Pi,numOctaves:wm},jE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$E=So.length;function zE(e,t,n){let r="",o=!0;for(let i=0;i<$E;i++){const a=So[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=bm(s,Rc[a]);if(!l){o=!1;const u=jE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Bc(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(Nr.has(l)){a=!0;continue}else if($c(l)){o[l]=c;continue}else{const u=bm(c,Rc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=zE(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 Hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sm(e,t,n){for(const r in t)!kt(t[r])&&!ym(r,n)&&(e[r]=t[r])}function RE({transformTemplate:e},t){return E.useMemo(()=>{const n=Hc();return Bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BE(e,t){const n=e.style||{},r={};return Sm(r,n,e),Object.assign(r,RE(e,t)),r}function HE(e,t){const n={},r=BE(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 WE=["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 Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(WE.indexOf(e)>-1||/[A-Z]/u.test(e))}const qE={offset:"stroke-dashoffset",array:"stroke-dasharray"},UE={offset:"strokeDashoffset",array:"strokeDasharray"};function KE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?qE:UE;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function Tm(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function YE(e,t,n){const r=Tm(t,e.x,e.width),o=Tm(n,e.y,e.height);return`${r} ${o}`}function qc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Bc(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:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=YE(m,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&&KE(p,a,s,l,!1)}const Em=()=>({...Hc(),attrs:{}}),Uc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GE(e,t,n,r){const o=E.useMemo(()=>{const i=Em();return qc(i,t,Uc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Sm(i,e.style,e),o.style={...i,...o.style}}return o}function ZE(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Wc(n)?GE:HE)(r,i,a,n),c=yE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>kt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Cm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kc(e,t,n,r){if(typeof t=="function"){const[o,i]=Cm(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]=Cm(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Yc=e=>Array.isArray(e),XE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),QE=e=>Yc(e)?e[e.length-1]||0:e;function qa(e){const t=kt(e)?e.get():e;return XE(t)?t.toValue():t}function JE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:eC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const km=e=>(t,n)=>{const r=E.useContext(Ra),o=E.useContext(La),i=()=>JE(e,t,r,o);return n?i():pn(i)};function eC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=qa(i[p]);let{initial:a,animate:s}=e;const l=Ha(e),c=fm(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"&&!Ba(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=Kc(e,p[f]);if(m){const{transitionEnd:g,transition:h,...y}=m;for(const v in y){let x=y[v];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[v]=x)}for(const v in g)o[v]=g[v]}}}return o}function Gc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(kt(o[a])||t.style&&kt(t.style[a])||ym(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 tC={useVisualState:km({scrapeMotionValuesFromProps:Gc,createRenderState:Hc})};function Pm(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 Am(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 _m=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 Im(e,t,n,r){Am(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(_m.has(o)?o:jc(o),t.attrs[o])}function Om(e,t,n){const r=Gc(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const i=So.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Mm=["x","y","width","height","cx","cy","r"],nC={useVisualState:km({scrapeMotionValuesFromProps:Om,createRenderState:Em,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(Nr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Mm.length;s++){const l=Mm[s];e[l]!==t[l]&&(a=!0)}a&&tt.read(()=>{Pm(n,r),tt.render(()=>{qc(r,o,Uc(n.tagName),e.transformTemplate),Im(n,r)})})}})};function rC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Wc(r)?nC:tC,preloadedFeatures:e,useRender:ZE(o),createVisualElement:t,Component:r};return PE(a)}}function _i(e,t,n){const r=e.getProps();return Kc(r,t,n!==void 0?n:r.custom,e)}function Zc(e,t){return e?e[t]||e.default||e:void 0}const Dm=new Set(["width","height","top","left","right","bottom",...So]);function Xc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ua(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function oC([...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 Qc{constructor(){this.subscriptions=[]}add(t){return Xc(this.subscriptions,t),()=>Ua(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 Nm(e,t){return t?e*(1e3/t):0}let Ka;function iC(){Ka=void 0}const kn={now:()=>(Ka===void 0&&kn.set(Dt.isProcessing||lE.useManualTiming?Dt.timestamp:performance.now()),Ka),set:e=>{Ka=e,queueMicrotask(iC)}},Fm=30,aC=e=>!isNaN(parseFloat(e)),Ii={current:void 0};class sC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=kn.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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&za(!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 Qc);const r=this.events[t].add(n);return t==="change"?()=>{r(),tt.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 Ii.current&&Ii.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fm);return Nm(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 Eo(e,t){return new sC(e,t)}function lC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Eo(n))}function cC(e,t){const n=_i(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=QE(i[a]);lC(e,a,s)}}function uC(e){return!!(kt(e)&&e.add)}function Jc(e,t){const n=e.getValue("willChange");if(uC(n))return n.add(t)}function Lm(e){return e.props[hm]}function eu(e){let t;return()=>(t===void 0&&(t=e()),t)}const dC=eu(()=>window.ScrollTimeline!==void 0);class fC{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(dC()&&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 Vm extends fC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const hn=e=>e*1e3,Pn=e=>e/1e3;function Ya(e){return typeof e=="function"}function jm(e,t){e.timeline=t,e.onfinish=null}const tu=e=>Array.isArray(e)&&typeof e[0]=="number",pC={linearEasing:void 0};function hC(e,t){const n=eu(e);return()=>{var r;return(r=pC[t])!==null&&r!==void 0?r:n()}}const Ga=hC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$m=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Fr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function zm(e){return!!(typeof e=="function"&&Ga()||!e||typeof e=="string"&&(e in nu||Ga())||tu(e)||Array.isArray(e)&&e.every(zm))}const Oi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oi([0,.65,.55,1]),circOut:Oi([.55,0,1,.45]),backIn:Oi([.31,.01,.66,-.59]),backOut:Oi([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e=="function"&&Ga()?$m(e,t):tu(e)?Oi(e):Array.isArray(e)?e.map(n=>Rm(n,t)||nu.easeOut):nu[e]}const Bm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mC=1e-7,gC=12;function vC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Bm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>mC&&++s<gC);return a}function Mi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>vC(i,0,1,e,n);return i=>i===0||i===1?i:Bm(o(i),t,r)}const Hm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wm=e=>t=>1-e(1-t),qm=Mi(.33,1.53,.69,.99),ru=Wm(qm),Um=Hm(ru),Km=e=>(e*=2)<1?.5*ru(e):.5*(2-Math.pow(2,-10*(e-1))),ou=e=>1-Math.sin(Math.acos(e)),Ym=Wm(ou),Gm=Hm(ou),Zm=e=>/^0[^.\s]+$/u.test(e);function yC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zm(e):!0}const Di=e=>Math.round(e*1e5)/1e5,iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bC(e){return e==null}const xC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,au=(e,t)=>n=>!!(typeof n=="string"&&xC.test(n)&&n.startsWith(e)||t&&!bC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(iu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},wC=e=>qn(0,255,e),su={...To,transform:e=>Math.round(wC(e))},Lr={test:au("rgb","red"),parse:Xm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+su.transform(e)+", "+su.transform(t)+", "+su.transform(n)+", "+Di(Pi.transform(r))+")"};function SC(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 lu={test:au("#"),parse:SC,transform:Lr.transform},Co={test:au("hsl","hue"),parse:Xm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cn.transform(Di(t))+", "+Cn.transform(Di(n))+", "+Di(Pi.transform(r))+")"},Vt={test:e=>Lr.test(e)||lu.test(e)||Co.test(e),parse:e=>Lr.test(e)?Lr.parse(e):Co.test(e)?Co.parse(e):lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lr.transform(e):Co.transform(e)},TC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(TC))===null||n===void 0?void 0:n.length)||0)>0}const Qm="number",Jm="color",CC="var",kC="var(",eg="${}",PC=/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 Ni(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(PC,l=>(Vt.test(l)?(r.color.push(i),o.push(Jm),n.push(Vt.parse(l))):l.startsWith(kC)?(r.var.push(i),o.push(CC),n.push(l)):(r.number.push(i),o.push(Qm),n.push(parseFloat(l))),++i,eg)).split(eg);return{values:n,split:s,indexes:r,types:o}}function tg(e){return Ni(e).values}function ng(e){const{split:t,types:n}=Ni(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===Qm?i+=Di(o[a]):s===Jm?i+=Vt.transform(o[a]):i+=o[a]}return i}}const AC=e=>typeof e=="number"?0:e;function _C(e){const t=tg(e);return ng(e)(t.map(AC))}const rr={test:EC,parse:tg,createTransformer:ng,getAnimatableNone:_C},IC=new Set(["brightness","contrast","saturate","opacity"]);function OC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iu)||[];if(!r)return e;const o=n.replace(r,"");let i=IC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const MC=/\b([a-z-]*)\(.*?\)/gu,cu={...rr,getAnimatableNone:e=>{const t=e.match(MC);return t?t.map(OC).join(" "):e}},DC={...Rc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:cu,WebkitFilter:cu},rg=e=>DC[e];function og(e,t){let n=rg(e);return n!==cu&&(n=rr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const NC=new Set(["auto","none","0"]);function FC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!NC.has(i)&&Ni(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=og(n,o)}const Vr=e=>e*180/Math.PI,uu=e=>{const t=Vr(Math.atan2(e[1],e[0]));return du(t)},LC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:uu,rotateZ:uu,skewX:e=>Vr(Math.atan(e[1])),skewY:e=>Vr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},du=e=>(e=e%360,e<0&&(e+=360),e),ig=uu,ag=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),sg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ag,scaleY:sg,scale:e=>(ag(e)+sg(e))/2,rotateX:e=>du(Vr(Math.atan2(e[6],e[5]))),rotateY:e=>du(Vr(Math.atan2(-e[2],e[0]))),rotateZ:ig,rotate:ig,skewX:e=>Vr(Math.atan(e[4])),skewY:e=>Vr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function lg(e){return e.includes("scale")?1:0}function fu(e,t){if(!e||e==="none")return lg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=VC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=LC,o=s}if(!o)return lg(t);const i=r[t],a=o[1].split(",").map($C);return typeof i=="function"?i(a):a[i]}const jC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fu(n,t)};function $C(e){return parseFloat(e.trim())}const cg=e=>e===To||e===Te,zC=new Set(["x","y","z"]),RC=So.filter(e=>!zC.has(e));function BC(e){const t=[];return RC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ko={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})=>fu(t,"x"),y:(e,{transform:t})=>fu(t,"y")};ko.translateX=ko.x,ko.translateY=ko.y;const jr=new Set;let pu=!1,hu=!1;function ug(){if(hu){const e=Array.from(jr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=BC(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)})}hu=!1,pu=!1,jr.forEach(e=>e.complete()),jr.clear()}function dg(){jr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function HC(){dg(),ug()}class mu{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?(jr.add(this),pu||(pu=!0,tt.read(dg),tt.resolveKeyframes(ug))):(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),jr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,jr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const fg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),WC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qC(e){const t=WC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const UC=4;function pg(e,t,n=1){an(n<=UC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=qC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return fg(a)?parseFloat(a):a}return zc(o)?pg(o,t,n+1):o}const hg=e=>t=>t.test(e),mg=[To,Te,Cn,nr,FE,NE,{test:e=>e==="auto",parse:e=>e}],gg=e=>mg.find(hg(e));class vg extends mu{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(),zc(c))){const u=pg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Dm.has(r)||t.length!==2)return;const[o,i]=t,a=gg(o),s=gg(i);if(a!==s)if(cg(a)&&cg(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++)yC(t[o])&&r.push(o);r.length&&FC(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=ko[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]=ko[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 yg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(rr.test(e)||e==="0")&&!e.startsWith("url("));function KC(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 YC(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=yg(o,t),s=yg(i,t);return bo(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:KC(e)||(n==="spring"||Ya(n))&&r}const GC=e=>e!==null;function Za(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(GC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const ZC=40;class bg{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=kn.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>ZC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&HC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!YC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(Za(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 Xa=2e4;function gu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Xa;)t+=n,r=e.next(t);return t>=Xa?1/0:t}const st=(e,t,n)=>e+(t-e)*n;function vu(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 XC({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=vu(l,s,e+1/3),i=vu(l,s,e),a=vu(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Qa(e,t){return n=>n>0?t:e}const yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},QC=[lu,Lr,Co],JC=e=>QC.find(t=>t.test(e));function xg(e){const t=JC(e);if(bo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Co&&(n=XC(n)),n}const wg=(e,t)=>{const n=xg(e),r=xg(t);if(!n||!r)return Qa(e,t);const o={...n};return i=>(o.red=yu(n.red,r.red,i),o.green=yu(n.green,r.green,i),o.blue=yu(n.blue,r.blue,i),o.alpha=st(n.alpha,r.alpha,i),Lr.transform(o))},ek=(e,t)=>n=>t(e(n)),Fi=(...e)=>e.reduce(ek),bu=new Set(["none","hidden"]);function tk(e,t){return bu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nk(e,t){return n=>st(e,t,n)}function xu(e){return typeof e=="number"?nk:typeof e=="string"?zc(e)?Qa:Vt.test(e)?wg:ik:Array.isArray(e)?Sg:typeof e=="object"?Vt.test(e)?wg:rk:Qa}function Sg(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function rk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function ok(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 ik=(e,t)=>{const n=rr.createTransformer(t),r=Ni(e),o=Ni(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?bu.has(e)&&!o.values.length||bu.has(t)&&!r.values.length?tk(e,t):Fi(Sg(ok(r,o),o.values),n):(bo(!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.`),Qa(e,t))};function Tg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):xu(e)(e,t)}const ak=5;function Eg(e,t,n){const r=Math.max(t-ak,0);return Nm(n-e(r),t-r)}const mt={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},Cg=.001;function sk({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;bo(e<=hn(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=qn(mt.minDamping,mt.maxDamping,a),e=qn(mt.minDuration,mt.maxDuration,Pn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=wu(c,a),m=Math.exp(-d);return Cg-p/f*m},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=wu(Math.pow(c,2),a);return(-o(c)+Cg>0?-1:1)*((p-f)*m)/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=ck(o,i,s);if(e=hn(e),isNaN(l))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const lk=12;function ck(e,t,n){let r=n;for(let o=1;o<lk;o++)r=r-e(r)/t(r);return r}function wu(e,t){return e*Math.sqrt(1-t*t)}const uk=["duration","bounce"],dk=["stiffness","damping","mass"];function kg(e,t){return t.some(n=>e[n]!==void 0)}function fk(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!kg(e,dk)&&kg(e,uk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=sk(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Su(e=mt.visualDuration,t=mt.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}=fk({...n,velocity:-Pn(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,y=Pn(Math.sqrt(l/u)),v=Math.abs(h)<5;r||(r=v?mt.restSpeed.granular:mt.restSpeed.default),o||(o=v?mt.restDelta.granular:mt.restDelta.default);let x;if(g<1){const w=wu(y,g);x=T=>{const C=Math.exp(-g*y*T);return a-C*((m+g*y*h)/w*Math.sin(w*T)+h*Math.cos(w*T))}}else if(g===1)x=w=>a-Math.exp(-y*w)*(h+(m+y*h)*w);else{const w=y*Math.sqrt(g*g-1);x=T=>{const C=Math.exp(-g*y*T),k=Math.min(w*T,300);return a-C*((m+g*y*h)*Math.sinh(k)+w*h*Math.cosh(k))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const T=x(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?hn(m):Eg(x,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(gu(S),Xa),T=$m(C=>S.next(w*C).value,w,30);return w+"ms "+T}};return S}function Pg({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,m=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const h=d+g,y=a===void 0?h:a(h);y!==h&&(g=y-d);const v=k=>-g*Math.exp(-k/r),x=k=>y+v(k),S=k=>{const I=v(k),_=x(k);p.done=Math.abs(I)<=c,p.value=p.done?y:_};let w,T;const C=k=>{f(p.value)&&(w=k,T=Su({keyframes:[p.value,m(p.value)],velocity:Eg(x,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 pk=Mi(.42,0,1,1),hk=Mi(0,0,.58,1),Ag=Mi(.42,0,.58,1),_g=e=>Array.isArray(e)&&typeof e[0]!="number",Ig={linear:Ut,easeIn:pk,easeInOut:Ag,easeOut:hk,circIn:ou,circInOut:Gm,circOut:Ym,backIn:ru,backInOut:Um,backOut:qm,anticipate:Km},Tu=e=>{if(tu(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Mi(t,n,r,o)}else if(typeof e=="string")return an(Ig[e]!==void 0,`Invalid easing type '${e}'`),Ig[e];return e};function mk(e,t,n){const r=[],o=n||Tg,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]||Ut:t;s=Fi(l,s)}r.push(s)}return r}function Og(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(an(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=mk(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=Fr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(qn(e[0],e[i-1],u)):c}function Mg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Fr(0,t,r);e.push(st(n,1,o))}}function Dg(e){const t=[0];return Mg(t,e.length-1),t}function gk(e,t){return e.map(n=>n*t)}function vk(e,t){return e.map(()=>t||Ag).splice(0,e.length-1)}function Li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=_g(r)?r.map(Tu):Tu(r),i={done:!1,value:t[0]},a=gk(n&&n.length===t.length?n:Dg(t),e),s=Og(a,t,{ease:Array.isArray(o)?o:vk(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const yk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>tt.update(t,!0),stop:()=>Wn(t),now:()=>Dt.isProcessing?Dt.timestamp:kn.now()}},bk={decay:Pg,inertia:Pg,tween:Li,keyframes:Li,spring:Su},xk=e=>e/100;class Eu extends bg{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)||mu,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=Ya(n)?n:bk[n]||Li;let l,c;process.env.NODE_ENV!=="production"&&s!==Li&&an(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Li&&typeof t[0]!="number"&&(l=Fi(xk,Tg(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=gu(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:m,repeatDelay:g,onUpdate:h}=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 y=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,S=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(_=1-_,g&&(_-=g/d)):m==="mirror"&&(S=a)),x=qn(0,1,_)*d}const w=v?{done:!1,value:l[0]}:S.next(x);s&&(w.value=s(w.value));let{done:T}=w;!v&&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=Za(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Pn(t.calculatedDuration):0}get time(){return Pn(this.currentTime)}set time(t){t=hn(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=Pn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=yk,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 wk=new Set(["opacity","clipPath","filter","transform"]);function Sk(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=Rm(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 Tk=eu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ja=10,Ek=2e4;function Ck(e){return Ya(e.type)||e.type==="spring"||!zm(e.ease)}function kk(e,t){const n=new Eu({...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<Ek;)r=n.sample(i),o.push(r.value),i+=Ja;return{times:void 0,keyframes:o,duration:i-Ja,ease:"linear"}}const Ng={anticipate:Km,backInOut:Um,circInOut:Gm};function Pk(e){return e in Ng}class Fg extends bg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new vg(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"&&Ga()&&Pk(i)&&(i=Ng[i]),Ck(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=kk(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=Sk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(jm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Za(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 Pn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Pn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=hn(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 Ut;const{animation:r}=n;jm(r,t)}return Ut}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,m=new Eu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=hn(this.time);c.setWithVelocity(m.sample(g-Ja).value,m.sample(g).value,Ja)}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 Tk()&&r&&wk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Ak={type:"spring",stiffness:500,damping:25,restSpeed:10},_k=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ik={type:"keyframes",duration:.8},Ok={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mk=(e,{keyframes:t})=>t.length>2?Ik:Nr.has(e)?e.startsWith("scale")?_k(t[1]):Ak:Ok;function Dk({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 Cu=(e,t,n,r={},o,i)=>a=>{const s=Zc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(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};Dk(s)||(u={...u,...Mk(e,u)}),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=Za(u.keyframes,s);if(p!==void 0)return tt.update(()=>{u.onUpdate(p),u.onComplete()}),new Vm([])}return!i&&Fg.supports(u)?new Fg(u):new Eu(u)};function Nk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ku(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&&Nk(u,d))continue;const m={delay:n,...Zc(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Lm(e);if(y){const v=window.MotionHandoffAnimation(y,d,tt);v!==null&&(m.startTime=v,g=!0)}}Jc(e,d),p.start(Cu(d,p,f,e.shouldReduceMotion&&Dm.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{tt.update(()=>{s&&cC(e,s)})}),c}function Pu(e,t,n={}){var r;const o=_i(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(ku(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Fk(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 Fk(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(Lk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Pu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Lk(e,t){return e.sortNodePosition(t)}function Vk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Pu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Pu(e,t,n);else{const o=typeof t=="function"?_i(e,t,n.custom):t;r=Promise.all(ku(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Lg(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 jk=Lc.length;function Vg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Vg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<jk;n++){const r=Lc[n],o=e.props[r];(Ci(o)||o===!1)&&(t[r]=o)}return t}const $k=[...Fc].reverse(),zk=Fc.length;function Rk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Vk(e,n,r)))}function Bk(e){let t=Rk(e),n=jg(),r=!0;const o=l=>(c,u)=>{var d;const p=_i(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Vg(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<zk;h++){const y=$k[h],v=n[y],x=c[y]!==void 0?c[y]:u[y],S=Ci(x),w=y===l?v.isActive:null;w===!1&&(m=h);let T=x===u[y]&&x!==c[y]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),v.protectedKeys={...f},!v.isActive&&w===null||!x&&!v.prevProp||Ba(x)||typeof x=="boolean")continue;const C=Hk(v.prevProp,x);let k=C||y===l&&v.isActive&&!T&&S||h>m&&S,I=!1;const _=Array.isArray(x)?x:[x];let M=_.reduce(o(y),{});w===!1&&(M={});const{prevResolvedValues:L={}}=v,$={...L,...M},A=V=>{k=!0,p.has(V)&&(I=!0,p.delete(V)),v.needsAnimating[V]=!0;const F=e.getValue(V);F&&(F.liveStyle=!1)};for(const V in $){const F=M[V],B=L[V];if(f.hasOwnProperty(V))continue;let D=!1;Yc(F)&&Yc(B)?D=!Lg(F,B):D=F!==B,D?F!=null?A(V):p.add(V):F!==void 0&&p.has(V)?A(V):v.protectedKeys[V]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(f={...f,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(T&&C)||I)&&d.push(..._.map(V=>({animation:V,options:{type:y}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const y=_i(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(h.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),h[y]=v??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){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=jg(),r=!0}}}function Hk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Lg(t,e):!1}function $r(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jg(){return{animate:$r(!0),whileInView:$r(),whileHover:$r(),whileTap:$r(),whileDrag:$r(),whileFocus:$r(),exit:$r()}}class or{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Wk extends or{constructor(t){super(t),t.animationState||(t.animationState=Bk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ba(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 qk=0;class Uk extends or{constructor(){super(...arguments),this.id=qk++}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 Kk={animation:{Feature:Wk},exit:{Feature:Uk}},mn={x:!1,y:!1};function $g(){return mn.x||mn.y}function Yk(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function Vi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ji(e){return{point:{x:e.pageX,y:e.pageY}}}const Gk=e=>t=>Au(t)&&e(t,ji(t));function $i(e,t,n,r){return Vi(e,t,Gk(n),r)}function zg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xk(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 Rg=1e-4,Qk=1-Rg,Jk=1+Rg,Bg=.01,eP=0-Bg,tP=0+Bg;function Bt(e){return e.max-e.min}function nP(e,t,n){return Math.abs(e-t)<=n}function Hg(e,t,n,r=.5){e.origin=r,e.originPoint=st(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qk&&e.scale<=Jk||isNaN(e.scale))&&(e.scale=1),(e.translate>=eP&&e.translate<=tP||isNaN(e.translate))&&(e.translate=0)}function zi(e,t,n,r){Hg(e.x,t.x,n.x,r?r.originX:void 0),Hg(e.y,t.y,n.y,r?r.originY:void 0)}function Wg(e,t,n){e.min=n.min+t.min,e.max=e.min+Bt(t)}function rP(e,t,n){Wg(e.x,t.x,n.x),Wg(e.y,t.y,n.y)}function qg(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Ri(e,t,n){qg(e.x,t.x,n.x),qg(e.y,t.y,n.y)}const Ug=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:Ug(),y:Ug()}),Kg=()=>({min:0,max:0}),yt=()=>({x:Kg(),y:Kg()});function sn(e){return[e("x"),e("y")]}function _u(e){return e===void 0||e===1}function Iu({scale:e,scaleX:t,scaleY:n}){return!_u(e)||!_u(t)||!_u(n)}function zr(e){return Iu(e)||Yg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yg(e){return Gg(e.x)||Gg(e.y)}function Gg(e){return e&&e!=="0%"}function es(e,t,n){const r=e-n,o=t*r;return n+o}function Zg(e,t,n,r,o){return o!==void 0&&(e=es(e,o,r)),es(e,n,r)+t}function Ou(e,t=0,n=1,r,o){e.min=Zg(e.min,t,n,r,o),e.max=Zg(e.max,t,n,r,o)}function Xg(e,{x:t,y:n}){Ou(e.x,t.translate,t.scale,t.originPoint),Ou(e.y,n.translate,n.scale,n.originPoint)}const Qg=.999999999999,Jg=1.0000000000001;function oP(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&&_o(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Xg(e,a)),r&&zr(i.latestValues)&&_o(e,i.latestValues))}t.x<Jg&&t.x>Qg&&(t.x=1),t.y<Jg&&t.y>Qg&&(t.y=1)}function Ao(e,t){e.min=e.min+t,e.max=e.max+t}function ev(e,t,n,r,o=.5){const i=st(e.min,e.max,o);Ou(e,t,n,i,r)}function _o(e,t){ev(e.x,t.x,t.scaleX,t.scale,t.originX),ev(e.y,t.y,t.scaleY,t.scale,t.originY)}function tv(e,t){return zg(Xk(e.getBoundingClientRect(),t))}function iP(e,t,n){const r=tv(e,n),{scroll:o}=t;return o&&(Ao(r.x,o.offset.x),Ao(r.y,o.offset.y)),r}const nv=({current:e})=>e?e.ownerDocument.defaultView:null,rv=(e,t)=>Math.abs(e-t);function aP(e,t){const n=rv(e.x,t.x),r=rv(e.y,t.y);return Math.sqrt(n**2+r**2)}class ov{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=Du(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=aP(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Dt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:y}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mu(p,this.transformPagePoint),tt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Du(d.type==="pointercancel"?this.lastMoveEventInfo:Mu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ji(t),s=Mu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Du(s,this.history)),this.removeListeners=Fi($i(this.contextWindow,"pointermove",this.handlePointerMove),$i(this.contextWindow,"pointerup",this.handlePointerUp),$i(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wn(this.updatePoint)}}function Mu(e,t){return t?{point:t(e.point)}:e}function iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Du({point:e},t){return{point:e,delta:iv(e,av(t)),offset:iv(e,sP(t)),velocity:lP(t,.1)}}function sP(e){return e[0]}function av(e){return e[e.length-1]}function lP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=av(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};const i=Pn(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 cP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?st(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?st(n,e,r.max):Math.min(e,n)),e}function sv(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 uP(e,{top:t,left:n,bottom:r,right:o}){return{x:sv(e.x,n,o),y:sv(e.y,t,r)}}function lv(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 dP(e,t){return{x:lv(e.x,t.x),y:lv(e.y,t.y)}}function fP(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=Fr(t.min,t.max-r,e.min):r>o&&(n=Fr(e.min,e.max-o,t.min)),qn(0,1,n)}function pP(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 Nu=.35;function hP(e=Nu){return e===!1?e=0:e===!0&&(e=Nu),{x:cv(e,"left","right"),y:cv(e,"top","bottom")}}function cv(e,t,n){return{min:uv(e,t),max:uv(e,n)}}function uv(e,t){return typeof e=="number"?e:e[t]||0}const mP=new WeakMap;class gP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ji(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Yk(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(h=>{let y=this.getAxisMotionValue(h).get()||0;if(Cn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[h];x&&(y=Bt(x)*(parseFloat(y)/100))}}this.originPoint[h]=y}),m&&tt.postRender(()=>m(u,d)),Jc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=vP(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),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 ov(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:nv(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&&tt.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||!ts(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=cP(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=uP(o.layoutBox,n):this.constraints=!1,this.elastic=hP(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=pP(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;an(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=iP(r,o.root,this.visualElement.getTransformPagePoint());let a=dP(o.layout.layoutBox,i);if(n){const s=n(Zk(a));this.hasMutatedConstraints=!!s,s&&(a=zg(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(!ts(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,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jc(this.visualElement,t),r.start(Cu(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(!ts(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]-st(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]=fP({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(!ts(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(st(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;mP.set(this.visualElement,this);const t=this.visualElement.current,n=$i(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()),tt.read(r);const a=Vi(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=Nu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ts(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class yP extends or{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new gP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const dv=e=>(t,n)=>{e&&tt.postRender(()=>e(t,n))};class bP extends or{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new ov(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dv(t),onStart:dv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&tt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=$i(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 fv(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(Te.test(e))e=parseFloat(e);else return e;const n=fv(e,t.target.x),r=fv(e,t.target.y);return`${n}% ${r}%`}},xP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=rr.parse(e);if(o.length>5)return r;const i=rr.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=st(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 wP extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;DE(SP),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()||tt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vc.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 pv(e){const[t,n]=nm(),r=E.useContext(Ei);return b.jsx(wP,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(mm),isPresent:t,safeToRemove:n})}const SP={borderRadius:{...Bi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bi,borderTopRightRadius:Bi,borderBottomLeftRadius:Bi,borderBottomRightRadius:Bi,boxShadow:xP};function hv(e,t,n){const r=kt(e)?e:Eo(e);return r.start(Cu("",r,t,n)),r.animation}function mv(e){return e instanceof SVGElement&&e.tagName!=="svg"}const TP=(e,t)=>e.depth-t.depth;class EP{constructor(){this.children=[],this.isDirty=!1}add(t){Xc(this.children,t),this.isDirty=!0}remove(t){Ua(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(TP),this.isDirty=!1,this.children.forEach(t)}}function CP(e,t){const n=kn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wn(r),e(i-t))};return tt.read(r,!0),()=>Wn(r)}const gv=["TopLeft","TopRight","BottomLeft","BottomRight"],kP=gv.length,vv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||Te.test(e);function PP(e,t,n,r,o,i){o?(e.opacity=st(0,n.opacity!==void 0?n.opacity:1,AP(r)),e.opacityExit=st(t.opacity!==void 0?t.opacity:1,0,_P(r))):i&&(e.opacity=st(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<kP;a++){const s=`border${gv[a]}Radius`;let l=bv(t,s),c=bv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||yv(l)===yv(c)?(e[s]=Math.max(st(vv(l),vv(c),r),0),(Cn.test(c)||Cn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,r))}function bv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const AP=xv(0,.5,Ym),_P=xv(.5,.95,Ut);function xv(e,t,n){return r=>r<e?0:r>t?1:n(Fr(e,t,r))}function wv(e,t){e.min=t.min,e.max=t.max}function ln(e,t){wv(e.x,t.x),wv(e.y,t.y)}function Sv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Tv(e,t,n,r,o){return e-=t,e=es(e,1/n,r),o!==void 0&&(e=es(e,1/o,r)),e}function IP(e,t=0,n=1,r=.5,o,i=e,a=e){if(Cn.test(t)&&(t=parseFloat(t),t=st(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=st(i.min,i.max,r);e===i&&(s-=t),e.min=Tv(e.min,t,n,s,o),e.max=Tv(e.max,t,n,s,o)}function Ev(e,t,[n,r,o],i,a){IP(e,t[n],t[r],t[o],t.scale,i,a)}const OP=["x","scaleX","originX"],MP=["y","scaleY","originY"];function Cv(e,t,n,r){Ev(e.x,t,OP,n?n.x:void 0,r?r.x:void 0),Ev(e.y,t,MP,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Pv(e){return kv(e.x)&&kv(e.y)}function Av(e,t){return e.min===t.min&&e.max===t.max}function DP(e,t){return Av(e.x,t.x)&&Av(e.y,t.y)}function _v(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Iv(e,t){return _v(e.x,t.x)&&_v(e.y,t.y)}function Ov(e){return Bt(e.x)/Bt(e.y)}function Mv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NP{constructor(){this.members=[]}add(t){Xc(this.members,t),t.scheduleRender()}remove(t){if(Ua(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 FP(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:m}=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) `),m&&(r+=`skewY(${m}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 Fu=["","X","Y","Z"],LP={visibility:"hidden"},Dv=1e3;let VP=0;function Lu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Lm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Nv(r)}function Fv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=VP++,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(zP),this.nodes.forEach(qP),this.nodes.forEach(UP),this.nodes.forEach(RP)},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 EP)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Qc),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=mv(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=CP(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Vv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||XP,{onLayoutAnimationStart:h,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Iv(this.targetLayout,m),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...Zc(g,"layout"),onPlay:h,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Vv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Wn(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(KP),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&&Nv(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(Lv);return}this.isUpdating||this.nodes.forEach(HP),this.isUpdating=!1,this.nodes.forEach(WP),this.nodes.forEach(jP),this.nodes.forEach($P),this.clearAllSnapshots();const s=kn.now();Dt.delta=qn(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Nc.update.process(Dt),Nc.preRender.process(Dt),Nc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BP),this.sharedNodes.forEach(YP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){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&&!Pv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||zr(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)),QP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return yt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(JP))){const{scroll:u}=this.root;u&&(Ao(l.x,u.offset.x),Ao(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=yt();if(ln(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&&ln(l,a),Ao(l.x,d.offset.x),Ao(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=yt();ln(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&&_o(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),zr(u.latestValues)&&_o(l,u.latestValues)}return zr(this.latestValues)&&_o(l,this.latestValues),l}removeTransform(a){const s=yt();ln(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!zr(c.latestValues))continue;Iu(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();ln(u,d),Cv(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return zr(this.latestValues)&&Cv(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!==Dt.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=Dt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Ri(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Xg(this.target,this.targetDelta)):ln(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=yt(),this.relativeTargetOrigin=yt(),Ri(this.relativeTargetOrigin,this.target,f.target),ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Iu(this.parent.latestValues)||Yg(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===Dt.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;ln(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;oP(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=yt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sv(this.prevProjectionDelta.x,this.projectionDelta.x),Sv(this.prevProjectionDelta.y,this.projectionDelta.y)),zi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Mv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}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=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=yt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),y=!h||h.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(ZP));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const w=S/1e3;jv(d.x,a.x,w),jv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ri(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GP(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&DP(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),ln(x,this.relativeTarget)),g&&(this.animationValues=u,PP(u,c,this.latestValues,w,v,y)),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&&(Wn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tt.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=hv(0,Dv,{...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(Dv),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&&Hv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();const d=Bt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Bt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}ln(s,l),_o(s,u),zi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new NP),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&&Lu("z",a,c,this.animationValues);for(let u=0;u<Fu.length;u++)Lu(`rotate${Fu[u]}`,a,c,this.animationValues),Lu(`skew${Fu[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 LP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=qa(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=qa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!zr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=FP(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.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 ki){if(p[g]===void 0)continue;const{correct:h,applyTo:y,isCSSVariable:v}=ki[g],x=c.transform==="none"?p[g]:h(p[g],d);if(y){const S=y.length;for(let w=0;w<S;w++)c[y[w]]=x}else v?this.options.visualElement.renderState.vars[g]=x:c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?qa(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(Lv),this.root.sharedNodes.clear()}}}function jP(e){e.updateLayout()}function $P(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=Bt(p);p.min=r[d].min,p.max=p.min+f}):Hv(i,n.layoutBox,r)&&sn(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(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=Po();zi(s,r,n.layoutBox);const l=Po();a?zi(l,e.applyTransform(o,!0),n.measuredBox):zi(l,r,n.layoutBox);const c=!Pv(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 m=yt();Ri(m,n.layoutBox,p.layoutBox);const g=yt();Ri(g,r,f.layoutBox),Iv(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,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 zP(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 RP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BP(e){e.clearSnapshot()}function Lv(e){e.clearMeasurements()}function HP(e){e.isLayoutDirty=!1}function WP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qP(e){e.resolveTargetDelta()}function UP(e){e.calcProjection()}function KP(e){e.resetSkewAndRotation()}function YP(e){e.removeLeadSnapshot()}function jv(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $v(e,t,n,r){e.min=st(t.min,n.min,r),e.max=st(t.max,n.max,r)}function GP(e,t,n,r){$v(e.x,t.x,n.x,r),$v(e.y,t.y,n.y,r)}function ZP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const XP={duration:.45,ease:[.4,0,.1,1]},zv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rv=zv("applewebkit/")&&!zv("chrome/")?Math.round:Ut;function Bv(e){e.min=Rv(e.min),e.max=Rv(e.max)}function QP(e){Bv(e.x),Bv(e.y)}function Hv(e,t,n){return e==="position"||e==="preserve-aspect"&&!nP(Ov(t),Ov(n),.2)}function JP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const eA=Fv({attachResizeListener:(e,t)=>Vi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vu={current:void 0},Wv=Fv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vu.current){const e=new eA({});e.mount(window),e.setOptions({layoutScroll:!0}),Vu.current=e}return Vu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),tA={pan:{Feature:bP},drag:{Feature:yP,ProjectionNode:Wv,MeasureLayout:pv}};function qv(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 Uv(e,t){const n=qv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Kv(e){return!(e.pointerType==="touch"||$g())}function nA(e,t,n={}){const[r,o,i]=Uv(e,n),a=s=>{if(!Kv(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Kv(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Yv(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&&tt.postRender(()=>i(t,ji(t)))}class rA extends or{mount(){const{current:t}=this.node;t&&(this.unmount=nA(t,(n,r)=>(Yv(this.node,r,"Start"),o=>Yv(this.node,o,"End"))))}unmount(){}}class oA extends or{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=Fi(Vi(this.node.current,"focus",()=>this.onFocus()),Vi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Gv=(e,t)=>t?e===t?!0:Gv(e,t.parentElement):!1,iA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aA(e){return iA.has(e.tagName)||e.tabIndex!==-1}const Hi=new WeakSet;function Zv(e){return t=>{t.key==="Enter"&&e(t)}}function ju(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sA=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Zv(()=>{if(Hi.has(n))return;ju(n,"down");const o=Zv(()=>{ju(n,"up")}),i=()=>ju(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 Xv(e){return Au(e)&&!$g()}function lA(e,t,n={}){const[r,o,i]=Uv(e,n),a=s=>{const l=s.currentTarget;if(!Xv(s)||Hi.has(l))return;Hi.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!Xv(f)||!Hi.has(l))&&(Hi.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Gv(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=>sA(c,o)),!aA(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function Qv(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&&tt.postRender(()=>i(t,ji(t)))}class cA extends or{mount(){const{current:t}=this.node;t&&(this.unmount=lA(t,(n,r)=>(Qv(this.node,r,"Start"),(o,{success:i})=>Qv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $u=new WeakMap,zu=new WeakMap,uA=e=>{const t=$u.get(e.target);t&&t(e)},dA=e=>{e.forEach(uA)};function fA({root:e,...t}){const n=e||document;zu.has(n)||zu.set(n,{});const r=zu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(dA,{root:e,...t})),r[o]}function pA(e,t,n){const r=fA(t);return $u.set(e,n),r.observe(e),()=>{$u.delete(e),r.unobserve(e)}}const hA={some:0,all:1};class mA extends or{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:hA[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 pA(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(gA(t,n))&&this.startObserver()}unmount(){}}function gA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const vA={inView:{Feature:mA},tap:{Feature:cA},focus:{Feature:oA},hover:{Feature:rA}},yA={layout:{ProjectionNode:Wv,MeasureLayout:pv}},Ru={current:null},Jv={current:!1};function bA(){if(Jv.current=!0,!!Dc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ru.current=e.matches;e.addListener(t),t()}else Ru.current=!1}const xA=[...mg,Vt,rr],wA=e=>xA.find(hg(e)),Wi=new WeakMap;function SA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(kt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&za(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(kt(i))e.addValue(r,Eo(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,Eo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ey=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ty{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=mu,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=kn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,tt.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=Ha(n),this.isVariantNode=fm(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 m=p[f];l[f]!==void 0&&kt(m)&&m.set(l[f],!1)}}mount(t){this.current=t,Wi.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)),Jv.current||bA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ru.current,process.env.NODE_ENV!=="production"&&za(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(),Wn(this.notifyUpdate),Wn(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=Nr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&tt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xo){const n=xo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ey.length;r++){const o=ey[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=SA(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=Eo(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"&&(fg(o)||Zm(o))?o=parseFloat(o):!wA(o)&&rr.test(n)&&(o=og(t,n)),this.setBaseTarget(t,kt(o)?o.get():o)),kt(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=Kc(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&&!kt(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 Qc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ny extends ty{constructor(){super(...arguments),this.KeyframeResolver=vg}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;kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function TA(e){return window.getComputedStyle(e)}class ry extends ny{constructor(){super(...arguments),this.type="html",this.renderInstance=Am}readValueFromInstance(t,n){if(Nr.has(n))return jC(t,n);{const r=TA(t),o=($c(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tv(t,n)}build(t,n,r){Bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gc(t,n,r)}}class oy extends ny{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Pm(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nr.has(n)){const r=rg(n);return r&&r.default||0}return n=_m.has(n)?n:jc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Om(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&tt.postRender(this.updateDimensions)}build(t,n,r){qc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Im(t,n,r,o)}mount(t){this.isSVGTag=Uc(t.tagName),super.mount(t)}}const EA=(e,t)=>Wc(e)?new oy(t):new ry(t,{allowProjection:e!==E.Fragment}),CA=rC({...Kk,...vA,...tA,...yA},EA),ft=xE(CA);function kA(e){return E.useEffect(()=>()=>e(),[])}function rs(e){const t=pn(()=>Eo(e)),{isStatic:n}=E.useContext(yo);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function iy(e,t){const n=rs(t()),r=()=>n.set(t());return r(),Fa(()=>{const o=()=>tt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Wn(r)}}),n}const PA=e=>e&&typeof e=="object"&&e.mix,AA=e=>PA(e)?e.mix:void 0;function _A(...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=Og(o,i,{mixer:AA(i[0]),...a});return t?s(r):s}function IA(e){Ii.current=[],e();const t=iy(Ii.current,e);return Ii.current=void 0,t}function OA(e,t,n,r){if(typeof e=="function")return IA(e);const o=typeof t=="function"?t:_A(t,n,r);return Array.isArray(e)?ay(e,o):ay([e],([i])=>o(i))}function ay(e,t){const n=pn(()=>[]);return iy(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function MA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(gu(r),Xa);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Pn(o)}}const DA=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function sy(e,t){return _g(e)?e[DA(0,e.length,t)]:e}function Bu(e){return typeof e=="object"&&!Array.isArray(e)}function ly(e,t,n,r){return typeof e=="string"&&Bu(t)?qv(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function NA(e,t,n){return e*(t+1)}function cy(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 FA(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ua(e,o),r--)}}function LA(e,t,n,r,o,i){FA(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:st(o,i,r[a]),easing:sy(n,a)})}function VA(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function jA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const $A="easeInOut",zA=20;function RA(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 m=e[f];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,cy(d,m.at,u,c));continue}let[g,h,y={}]=m;y.at!==void 0&&(d=cy(d,y.at,u,c));let v=0;const x=(S,w,T,C=0,k=0)=>{const I=BA(S),{delay:_=0,times:M=Dg(I),type:L="keyframes",repeat:$,repeatType:A,repeatDelay:N=0,...O}=w;let{ease:V=t.ease||"easeOut",duration:F}=w;const B=typeof _=="function"?_(C,k):_,D=I.length,R=Ya(L)?L:o==null?void 0:o[L];if(D<=2&&R){let Z=100;if(D===2&&qA(I)){const j=I[1]-I[0];Z=Math.abs(j)}const Y={...O};F!==void 0&&(Y.duration=hn(F));const G=MA(Y,Z,R);V=G.ease,F=G.duration}F??(F=i);const Q=d+B;M.length===1&&M[0]===0&&(M[1]=1);const X=M.length-I.length;if(X>0&&Mg(M,X),I.length===1&&I.unshift(null),$){an($<zA,"Repeat count too high, must be less than 20"),F=NA(F,$);const Z=[...I],Y=[...M];V=Array.isArray(V)?[...V]:[V];const G=[...V];for(let j=0;j<$;j++){I.push(...Z);for(let z=0;z<Z.length;z++)M.push(Y[z]+(j+1)),V.push(z===0?"linear":sy(G,z-1))}VA(M,$)}const J=Q+F;LA(T,I,V,M,Q,J),v=Math.max(B+F,v),p=Math.max(J,p)};if(kt(g)){const S=uy(g,s);x(h,y,dy("default",S))}else{const S=ly(g,h,r,l),w=S.length;for(let T=0;T<w;T++){h=h,y=y;const C=S[T],k=uy(C,s);for(const I in h)x(h[I],HA(y,I),dy(I,k),T,w)}}u=d,d+=v}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(jA);const y=[],v=[],x=[];for(let w=0;w<h.length;w++){const{at:T,value:C,easing:k}=h[w];y.push(C),v.push(Fr(0,p,T)),x.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),x.unshift($A)),v[v.length-1]!==1&&(v.push(1),y.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const S=a.get(m);S.keyframes[g]=y,S.transition[g]={...t,duration:p,ease:x,times:v,...n}}}),a}function uy(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function dy(e,t){return t[e]||(t[e]=[]),t[e]}function BA(e){return Array.isArray(e)?e:[e]}function HA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const WA=e=>typeof e=="number",qA=e=>e.every(WA);function UA(e,t){return e in t}class KA extends ty{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(UA(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function YA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=mv(e)?new oy(t):new ry(t);n.mount(e),Wi.set(e,n)}function GA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new KA(t);n.mount(e),Wi.set(e,n)}function ZA(e,t){return kt(e)||typeof e=="number"||typeof e=="string"&&!Bu(t)}function fy(e,t,n,r){const o=[];if(ZA(e,t))o.push(hv(e,Bu(t)&&t.default||t,n&&(n.default||n)));else{const i=ly(e,t,r),a=i.length;an(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?YA:GA;Wi.has(l)||c(l);const u=Wi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...ku(u,{...t,transition:d},{}))}}return o}function XA(e,t,n){const r=[];return RA(e,t,n,{spring:Su}).forEach(({keyframes:i,transition:a},s)=>{r.push(...fy(s,i,a))}),r}function QA(e){return Array.isArray(e)&&e.some(Array.isArray)}function JA(e){function t(n,r,o){let i=[];QA(n)?i=XA(n,r,e):i=fy(n,r,o,e);const a=new Vm(i);return e&&e.animations.push(a),a}return t}function e_(){const e=pn(()=>({current:null,animations:[]})),t=pn(()=>JA(e));return kA(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class t_{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 n_=()=>new t_;function r_(){return pn(n_)}function o_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function i_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:o_(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Tu(r)(l/c)*c}return t+l}}const py=E.createContext(null);function a_(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=st(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?oC(e,o,o+i):e}function s_({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=pn(()=>ft[t]),l=[],c=E.useRef(!1);an(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(m=>d===m.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(c_)},updateOrder:(d,p,f)=>{if(c.current)return;const m=a_(l,d,p,f);l!==m&&(c.current=!0,r(m.map(l_).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),b.jsx(s,{...i,ref:a,ignoreStrict:!0,children:b.jsx(py.Provider,{value:u,children:e})})}const hy=E.forwardRef(s_);function l_(e){return e.value}function c_(e,t){return e.layout.min-t.layout.min}function my(e,t=0){return kt(e)?e:rs(t)}function u_({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=pn(()=>ft[r]),c=E.useContext(py),u={x:my(t.x),y:my(t.y)},d=OA([u.x,u.y],([g,h])=>g||h?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return b.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:y}=h;y[p]&&m(n,u[p].get(),y[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const gy=E.forwardRef(u_);/**
|
|
13
13
|
* @license lucide-react v0.485.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const h_=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},
|
|
27
|
+
*/const h_=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...p_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:yy("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
28
28
|
* @license lucide-react v0.485.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const os=pt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ey={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},__={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Cy=e=>b.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Ey,exit:Ey.false,transition:__,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),I_=fo("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),O_=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const c=()=>o==null?void 0:o(!1);return b.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:b.jsx(Cy,{"data-open":!!i,open:!!i,children:b.jsxs(on,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe(I_({theme:n}),t),children:[b.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?b.jsx(xy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?b.jsx(Ty,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?b.jsx(k_,{"aria-hidden":"true",size:20}):null,r,b.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?b.jsx("button",{type:"button",onClick:c,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:b.jsx(os,{size:20})}):null]})})})}),ky=6048e5,M_=864e5,D_=6e4,N_=36e5,F_=1e3,Py=Symbol.for("constructDateFrom");function at(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Py in e?e[Py](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return at(t||e,e)}function is(e,t,n){const r=Qe(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 Ay(e,t,n){const r=Qe(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 Oo(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:c=0,seconds:l=0}=t,u=Qe(e,n==null?void 0:n.in),d=o||r?Ay(u,o+r*12):u,p=a||i?is(d,a+i*7):d,f=c+s*60,g=(l+f*60)*1e3;return at(e,+p+g)}let L_={};function Rr(){return L_}function An(e,t){var s,c,l,u;const n=Rr(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=Qe(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 Mo(e,t){return An(e,{...t,weekStartsOn:1})}function _y(e,t){const n=Qe(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=Mo(o),a=at(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Mo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function as(e){const t=Qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ss(e,...t){const n=at.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Do(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function V_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t),i=Do(r),a=Do(o),s=+i-as(i),c=+a-as(a);return Math.round((s-c)/M_)}function j_(e,t){const n=_y(e,t),r=at(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Mo(r)}function $_(e){return at(e,Date.now())}function z_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return+Do(r)==+Do(o)}function R_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Iy(e){return!(!R_(e)&&typeof e!="number"||isNaN(+Qe(e)))}function B_(e,t){const[n,r]=ss(e,t.start,t.end);return{start:n,end:r}}function Oy(e,t){const{start:n,end:r}=B_(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 c=[];for(;+a<=i;)c.push(at(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?c.reverse():c}function My(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function H_(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function W_(e,t){var s,c;const n=Rr(),r=n.weekStartsOn??((c=(s=n.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??0,o=Qe(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 q_={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"}},U_=(e,t,n)=>{let r;const o=q_[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 Uu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const K_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},G_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Z_={date:Uu({formats:K_,defaultWidth:"full"}),time:Uu({formats:Y_,defaultWidth:"full"}),dateTime:Uu({formats:G_,defaultWidth:"full"})},X_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Q_=(e,t,n,r)=>X_[e];function qi(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 J_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tI={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"]},nI={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"]},rI={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"}},oI={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"}},iI={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:qi({values:J_,defaultWidth:"wide"}),quarter:qi({values:eI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qi({values:tI,defaultWidth:"wide"}),day:qi({values:nI,defaultWidth:"wide"}),dayPeriod:qi({values:rI,defaultWidth:"wide",formattingValues:oI,defaultFormattingWidth:"wide"})};function Ui(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],c=Array.isArray(s)?sI(s,d=>d.test(a)):aI(s,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}function aI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function sI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function lI(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 cI=/^(\d+)(th|st|nd|rd)?/i,uI=/\d+/i,dI={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},fI={any:[/^b/i,/^(a|c)/i]},pI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hI={any:[/1/i,/2/i,/3/i,/4/i]},mI={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},gI={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]},vI={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},yI={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]},bI={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},xI={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}},wI={ordinalNumber:lI({matchPattern:cI,parsePattern:uI,valueCallback:e=>parseInt(e,10)}),era:Ui({matchPatterns:dI,defaultMatchWidth:"wide",parsePatterns:fI,defaultParseWidth:"any"}),quarter:Ui({matchPatterns:pI,defaultMatchWidth:"wide",parsePatterns:hI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ui({matchPatterns:mI,defaultMatchWidth:"wide",parsePatterns:gI,defaultParseWidth:"any"}),day:Ui({matchPatterns:vI,defaultMatchWidth:"wide",parsePatterns:yI,defaultParseWidth:"any"}),dayPeriod:Ui({matchPatterns:bI,defaultMatchWidth:"any",parsePatterns:xI,defaultParseWidth:"any"})},Dy={code:"en-US",formatDistance:U_,formatLong:Z_,formatRelative:Q_,localize:iI,match:wI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function SI(e,t){const n=Qe(e,t==null?void 0:t.in);return V_(n,H_(n))+1}function Ny(e,t){const n=Qe(e,t==null?void 0:t.in),r=+Mo(n)-+j_(n);return Math.round(r/ky)+1}function Ku(e,t){var u,d,p,f;const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),o=Rr(),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=An(a,t),c=at((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const l=An(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function TI(e,t){var s,c,l,u;const n=Rr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??1,o=Ku(e,t),i=at((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),An(i,t)}function Fy(e,t){const n=Qe(e,t==null?void 0:t.in),r=+An(n,t)-+TI(n,t);return Math.round(r/ky)+1}function Je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Je(n+1,2)},d(e,t){return Je(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 Je(e.getHours()%12||12,t.length)},H(e,t){return Je(e.getHours(),t.length)},m(e,t){return Je(e.getMinutes(),t.length)},s(e,t){return Je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Je(o,t.length)}},No={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ly={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 ir.y(e,t)},Y:function(e,t,n,r){const o=Ku(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Je(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Je(i,t.length)},R:function(e,t){const n=_y(e);return Je(n,t.length)},u:function(e,t){const n=e.getFullYear();return Je(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 Je(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 Je(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 ir.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 Je(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=Fy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Je(o,t.length)},I:function(e,t,n){const r=Ny(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ir.d(e,t)},D:function(e,t,n){const r=SI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Je(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 Je(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 Je(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 Je(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=No.noon:r===0?o=No.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=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.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 ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ir.s(e,t)},S:function(e,t){return ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return jy(r);case"XXXX":case"XX":return Br(r);case"XXXXX":case"XXX":default:return Br(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return jy(r);case"xxxx":case"xx":return Br(r);case"xxxxx":case"xxx":default:return Br(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Vy(r,":");case"OOOO":default:return"GMT"+Br(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Vy(r,":");case"zzzz":default:return"GMT"+Br(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Je(r,t.length)},T:function(e,t,n){return Je(+e,t.length)}};function Vy(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+Je(i,2)}function jy(e,t){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):Br(e,t)}function Br(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Je(Math.trunc(r/60),2),i=Je(r%60,2);return n+o+t+i}const $y=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},zy=(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"})}},Yu={p:zy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $y(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",$y(r,t)).replace("{{time}}",zy(o,t))}},EI=/^D+$/,CI=/^Y+$/,kI=["D","DD","YY","YYYY"];function Ry(e){return EI.test(e)}function By(e){return CI.test(e)}function Gu(e,t,n){const r=PI(e,t,n);if(console.warn(r),kI.includes(e))throw new RangeError(r)}function PI(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 AI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_I=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,II=/^'([^]*?)'?$/,OI=/''/g,MI=/[a-zA-Z]/;function DI(e,t,n){var u,d,p,f;const r=Rr(),o=r.locale??Dy,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=Qe(e,n==null?void 0:n.in);if(!Iy(s))throw new RangeError("Invalid time value");let c=t.match(_I).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Yu[g];return h(m,o.formatLong)}return m}).join("").match(AI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:NI(m)};if(Ly[g])return{isToken:!0,value:m};if(g.match(MI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const l={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(m=>{if(!m.isToken)return m.value;const g=m.value;(By(g)||Ry(g))&&Gu(g,t,String(e));const h=Ly[g[0]];return h(s,g,o.localize,l)}).join("")}function NI(e){const t=e.match(II);return t?t[1].replace(OI,"'"):e}function FI(){return Object.assign({},Rr())}function LI(e,t){const n=Qe(e,t==null?void 0:t.in).getDay();return n===0?7:n}function VI(e,t){return+Qe(e)>+Qe(t)}function jI(e,t){return+Qe(e)<+Qe(t)}function $I(e,t){const n=zI(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 zI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const RI=10;class Hy{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class BI extends Hy{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 HI extends Hy{constructor(n,r){super();pe(this,"priority",RI);pe(this,"subPriority",-1);this.context=n||(o=>at(r,o))}set(n,r){return r.timestampIsSet?n:at(n,$I(n,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new BI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class WI extends Ke{constructor(){super(...arguments);pe(this,"priority",140);pe(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}/},_n={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 In(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*N_+i*D_+a*F_),rest:t.slice(n[0].length)}}function Wy(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 ls(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 Zu(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 qy(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 Uy(e){return e%400===0||e%4===0&&e%100!==0}class qI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(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=qy(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 UI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(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=Ku(n,i);if(o.isTwoDigitYear){const c=qy(o.year,a);return n.setFullYear(c,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),An(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),An(n,i)}}class KI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ls(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),Mo(i)}}class YI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ls(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class GI extends Ke{constructor(){super(...arguments);pe(this,"priority",120);pe(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 ZI extends Ke{constructor(){super(...arguments);pe(this,"priority",120);pe(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 XI extends Ke{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(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 QI extends Ke{constructor(){super(...arguments);pe(this,"priority",110);pe(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 JI(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=Fy(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n==null?void 0:n.in)}class eO extends Ke{constructor(){super(...arguments);pe(this,"priority",100);pe(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 An(JI(n,o,i),i)}}function tO(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=Ny(r,n)-t;return r.setDate(r.getDate()-o*7),r}class nO extends Ke{constructor(){super(...arguments);pe(this,"priority",100);pe(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 Mo(tO(n,o))}}const rO=[31,28,31,30,31,30,31,31,30,31,30,31],oO=[31,29,31,30,31,30,31,31,30,31,30,31];class iO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(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=Uy(o),a=n.getMonth();return i?r>=1&&r<=oO[a]:r>=1&&r<=rO[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(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 Uy(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 Xu(e,t,n){var d,p,f,m;const r=Rr(),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??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Qe(e,n==null?void 0:n.in),a=i.getDay(),c=(t%7+7)%7,l=7-o,u=t<0||t>6?t-(a+l)%7:(c+l)%7-(a+l)%7;return is(i,u,n)}class sO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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=Xu(n,o,i),n.setHours(0,0,0,0),n}}class lO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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 c=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+c};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=Xu(n,o,i),n.setHours(0,0,0,0),n}}class cO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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 c=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+c};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=Xu(n,o,i),n.setHours(0,0,0,0),n}}function uO(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=LI(r,n),i=t-o;return is(r,i,n)}class dO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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=uO(n,o),n.setHours(0,0,0,0),n}}class fO extends Ke{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Zu(o),0,0,0),n}}class pO extends Ke{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Zu(o),0,0,0),n}}class hO extends Ke{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Zu(o),0,0,0),n}}class mO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 gO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 vO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 yO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 bO extends Ke{constructor(){super(...arguments);pe(this,"priority",60);pe(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 xO extends Ke{constructor(){super(...arguments);pe(this,"priority",50);pe(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 wO extends Ke{constructor(){super(...arguments);pe(this,"priority",30);pe(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 SO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return In(_n.basicOptionalMinutes,n);case"XX":return In(_n.basic,n);case"XXXX":return In(_n.basicOptionalSeconds,n);case"XXXXX":return In(_n.extendedOptionalSeconds,n);case"XXX":default:return In(_n.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-as(n)-o)}}class TO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return In(_n.basicOptionalMinutes,n);case"xx":return In(_n.basic,n);case"xxxx":return In(_n.basicOptionalSeconds,n);case"xxxxx":return In(_n.extendedOptionalSeconds,n);case"xxx":default:return In(_n.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-as(n)-o)}}class EO extends Ke{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Wy(n)}set(n,r,o){return[at(n,o*1e3),{timestampIsSet:!0}]}}class CO extends Ke{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Wy(n)}set(n,r,o){return[at(n,o),{timestampIsSet:!0}]}}const kO={G:new WI,y:new qI,Y:new UI,R:new KI,u:new YI,Q:new GI,q:new ZI,M:new XI,L:new QI,w:new eO,I:new nO,d:new iO,D:new aO,E:new sO,e:new lO,c:new cO,i:new dO,a:new fO,b:new pO,B:new hO,h:new mO,H:new gO,K:new vO,k:new yO,m:new bO,s:new xO,S:new wO,X:new SO,x:new TO,t:new EO,T:new CO},PO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_O=/^'([^]*?)'?$/,IO=/''/g,OO=/\S/,MO=/[a-zA-Z]/;function DO(e,t,n,r){var h,y,v,x;const o=()=>at(n,NaN),i=FI(),a=i.locale??Dy,s=i.firstWeekContainsDate??((y=(h=i.locale)==null?void 0:h.options)==null?void 0:y.firstWeekContainsDate)??1,c=i.weekStartsOn??((x=(v=i.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Qe(n,r==null?void 0:r.in);const l={firstWeekContainsDate:s,weekStartsOn:c,locale:a},u=[new HI(r==null?void 0:r.in,n)],d=t.match(AO).map(T=>{const w=T[0];if(w in Yu){const S=Yu[w];return S(T,a.formatLong)}return T}).join("").match(PO),p=[];for(let T of d){By(T)&&Gu(T,t,e),Ry(T)&&Gu(T,t,e);const w=T[0],S=kO[w];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const I=p.find(_=>C.includes(_.token)||_.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);p.push({token:w,fullToken:T});const k=S.run(e,T,a.match,l);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match(MO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=NO(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&OO.test(e))return o();const f=u.map(T=>T.priority).sort((T,w)=>w-T).filter((T,w,S)=>S.indexOf(T)===w).map(T=>u.filter(w=>w.priority===T).sort((w,S)=>S.subPriority-w.subPriority)).map(T=>T[0]);let m=Qe(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const T of f){if(!T.validate(m,l))return o();const w=T.set(m,g,l);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function NO(e){return e.match(_O)[1].replace(IO,"'")}function FO(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function LO(e,t){return z_(at(e,e),$_(e))}function VO(e,t,n){return is(e,-t,n)}function jO(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(+r)?at(e,NaN):(r.setFullYear(t),r)}function $O(e,t,n){return Ay(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:c=0,seconds:l=0}=t,u=$O(e,o+r*12,n),d=VO(u,a+i*7,n),p=c+s*60,m=(l+p*60)*1e3;return at(e,+d-m)}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 Qu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ju(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Yi=function(e){return e.replace(new RegExp(" ","g")," ")},Ky=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)},zO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Yy=function(e,t,n){var r=e.length-2,o=zO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Gy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},cs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},RO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ed=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},BO=function(e){return e==="money"||e==="currency"},HO=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:""})},us=function(e,t){var n=Ky(Gy(e),t.fraction.length),r="".concat(t.currency).concat(Yy(n,t.group,t.decimal));return Yi(r)},WO=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 c=e.onChange,l=Qu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=HO(r,i,s);return m.currency=Yi("".concat(m.currency.trim()," ")),m.literal=Yi(m.literal.trim()),m},[r,i]),p=function(m){var g=us(m.target.value,d),h=cs(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),c==null||c(m),h!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=us(m,d),h=cs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});c==null||c(Et(Et({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=l.defaultValue?us(l.defaultValue,d):void 0;return E.createElement("input",Et({},l,{value:typeof l.value=="string"?us(l.value,d):l.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),qO=1,UO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},KO=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:""})},ds=function(e,t){var n=Ky(Gy(e),t.fraction.length),r="".concat(Yy(n,t.group,t.decimal)," ").concat(t.percentSign);return Yi(r)},YO=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=Qu(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),c=Ju(E.useState(function(){var y,v;return(v=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&v!==void 0?v:""}),2),l=c[0],u=c[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,v=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(ds(v,d))},[a.value]);var d=E.useMemo(function(){var y=KO(r);return y.percentSign=Yi("".concat(y.percentSign)),y},[r]),p=l.length-d.percentSign.length-qO,f=function(y){var v,x=s.current;x&&(x.setSelectionRange(p,p),y&&((v=a.onFocus)===null||v===void 0||v.call(a,y)))},m=function(y){var v=y.currentTarget;if(v.selectionStart!==null){var x=v.selectionStart,T=v.selectionEnd,w=x!==T,S=p<x;!w&&S&&f()}i==null||i(y)},g=function(y){var v=ds(y.target.value,d),x=cs(v);u(v),y.target.value=v,y.target.setAttribute("data-number",x.toString()),o==null||o(y)};E.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var v=ds(y,d),x=cs(v);u(v),s.current.value=v,s.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o==null||o(Et(Et({},T),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[l]);var h=a.defaultValue?ds(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Gi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},GO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=fs[i];a===void 0?r.push(i.replace(Gi.dots,"\\.").replace(Gi.openParenthesis,"\\(").replace(Gi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Gi.leadingBars,"\\")},Zi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return td(o,n);var i=GO(o);return n?"^".concat(i,"$"):i},ZO=function(e){return e.replace(Gi.escape,"\\$&")},td=function(e,t){var n=e.map(function(r){return typeof r=="string"?ZO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fs={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]/}},XO=/\d/,Zy="(dd) 9dddd-dddd",Xy="(dd) dddd-dddd",Qy="ddd.ddd.ddd-dd",Jy="dd.ddd.ddd/dddd-dd",ps=function(e){return e.replace(/\D/g,"")},QO=["2",/[0-3]/,":",/[0-5]/,/\d/],JO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Kt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Qy,isoDate:"dddd-dd-dd",cnpj:Jy,telephone:Xy,cellphone:Zy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ps(e).length<=11?Qy:Jy},int:function(e){return e===void 0&&(e=""),XO.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=ps(e);return t.length<11?Xy:Zy},time:function(e){var t=ps(e),n=t[0];return n==="2"?QO:JO}},Yt=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:Zi(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:Yt(Kt.cellTelephone,"tel"),cellphone:Yt(Kt.cellphone,"tel"),cep:Yt(Kt.cep,"decimal"),cnpj:Yt(Kt.cnpj,"decimal"),color:Yt(Kt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Yt(Kt.cpf,"decimal"),cpfCnpj:Yt(Kt.cpfCnpj,"decimal",{transform:ps}),creditCard:Yt(Kt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Yt(Kt.date,"decimal"),int:Yt(Kt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Yt(Kt.isoDate,"decimal"),telephone:Yt(Kt.telephone,"tel"),time:Yt(Kt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Yt(Kt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function eb(e,t,n,r){var o,i;r===void 0&&(r=fs);for(var a=n(e),s="",c=0,l=0;c<t.length&&l<a.length;){var u=t[c],d=u instanceof RegExp?u:r[u],p=a[l];if(d===void 0){s+=u,p===u&&(l+=1),c+=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),l+=1,c+=1}return s}var tb=function(e){return e},eM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Zi(e,n,t));return r.test(n)};function tM(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var nM=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,c=e.pattern,l=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=Qu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=ed(s),h=ed(d),y=ed(u),v=E.useRef(eM(u,i,f.value||f.defaultValue)),x=p??"input",T=Ju(E.useState(""),2),w=T[0],S=T[1],C=tM(w),k=E.useCallback(function(N,O){var V,F,B=(V=N??O)!==null&&V!==void 0?V:"";if(u===void 0)return B;var D=(F=B==null?void 0:B.toString())!==null&&F!==void 0?F:"";return eb(D,typeof u=="function"?u(D):u,a??tb,l??fs)},[a,u,l]),I=Ju(E.useState(function(){return k(f.value,f.defaultValue)}),2),_=I[0],M=I[1],L=k(f.defaultValue,f.defaultValue),$=E.useMemo(function(){if(c||u===void 0)return c;if(typeof u=="function"){var N=u(_);return Array.isArray(N)?td(N,i):Zi(u,_,i)}return typeof u=="string"?Zi(u,_,i):td(u,i)},[c,_,i,u]);E.useEffect(function(){if(f.value!==void 0){var N=k(f.value,f.defaultValue);M(N),m.current!==null&&(m.current.value=N)}},[f.value,u,a,f.defaultValue]);var A=function(N){var O,V,F,B,D,z=N.currentTarget,J=N.target.value;if(y.current===void 0)return M(J),(O=h.current)===null||O===void 0||O.call(h,J),(V=g.current)===null||V===void 0||V.call(g,N),d==null?void 0:d(J);var X=new RegExp(Zi(y.current,J,i)),Q=(F=z.selectionEnd)!==null&&F!==void 0?F:0,Z=function(K,ae,H){if(K.type!=="number")return K.setSelectionRange(ae,H)};if(r&&v.current&&J.length>=_.length)return z.value=_,Z(z,Q-1,Q-1);var Y=!1;J.length<C.length&&(v.current=!1,Y=!0),X.test(J)&&(v.current=!0);var G=Q,j=J[G-1],R=eb(J,typeof y.current=="function"?y.current(J):y.current,a??tb,l??fs);for(z.value=R,M(R);G<R.length&&R.charAt(G-1)!==j;)G+=1;Y?Z(z,Q,Q):Z(z,G,G),N.target.value=R,S(R),(B=h.current)===null||B===void 0||B.call(h,R),(D=g.current)===null||D===void 0||D.call(g,N)};return E.createElement(x,Et({},f,{ref:m,pattern:$,onChange:A,defaultValue:nb(f.defaultValue)?L:void 0,value:nb(f.value)?k(f.value,f.value):f.value}))}),nb=function(e){return typeof e=="string"},rb=E.forwardRef(function(e,t){return BO(e.mask)?E.createElement(WO,Et({},e,{mask:void 0,ref:t})):UO(e.mask)?E.createElement(YO,Et({},e,{mask:void 0,ref:t})):E.createElement(nM,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(rb,Et({},e,t))}};Gt(jt.cellTelephone),Gt(jt.cellphone),Gt(jt.cep),Gt(jt.cnpj),Gt(jt.color),Gt(jt.cpf),Gt(jt.cpfCnpj),Gt(jt.creditCard),Gt(jt.date),Gt(jt.int),Gt(jt.isoDate),Gt(jt.telephone),Gt(jt.time),Gt(jt.uuid);var ob=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&RO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(rb,Et({},o,{ref:n}))}),hs={exports:{}},nd={},ms={exports:{}},rd={};/**
|
|
152
|
+
*/const os=pt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ey={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},__={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Cy=e=>b.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Ey,exit:Ey.false,transition:__,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),I_=fo("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),O_=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 b.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:b.jsx(Cy,{"data-open":!!i,open:!!i,children:b.jsxs(on,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe(I_({theme:n}),t),children:[b.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?b.jsx(xy,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?b.jsx(Ty,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?b.jsx(k_,{"aria-hidden":"true",size:20}):null,r,b.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?b.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:b.jsx(os,{size:20})}):null]})})})}),ky=6048e5,M_=864e5,D_=6e4,N_=36e5,F_=1e3,Py=Symbol.for("constructDateFrom");function at(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Py in e?e[Py](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return at(t||e,e)}function is(e,t,n){const r=Qe(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 Ay(e,t,n){const r=Qe(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 Oo(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=Qe(e,n==null?void 0:n.in),d=o||r?Ay(u,o+r*12):u,p=a||i?is(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return at(e,+p+g)}let L_={};function Rr(){return L_}function An(e,t){var s,l,c,u;const n=Rr(),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=Qe(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 Mo(e,t){return An(e,{...t,weekStartsOn:1})}function _y(e,t){const n=Qe(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=Mo(o),a=at(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Mo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function as(e){const t=Qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ss(e,...t){const n=at.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Do(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function V_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t),i=Do(r),a=Do(o),s=+i-as(i),l=+a-as(a);return Math.round((s-l)/M_)}function j_(e,t){const n=_y(e,t),r=at(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Mo(r)}function $_(e){return at(e,Date.now())}function z_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return+Do(r)==+Do(o)}function R_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Iy(e){return!(!R_(e)&&typeof e!="number"||isNaN(+Qe(e)))}function B_(e,t){const[n,r]=ss(e,t.start,t.end);return{start:n,end:r}}function Oy(e,t){const{start:n,end:r}=B_(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 My(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function H_(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function W_(e,t){var s,l;const n=Rr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Qe(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 q_={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"}},U_=(e,t,n)=>{let r;const o=q_[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 Uu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const K_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},G_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Z_={date:Uu({formats:K_,defaultWidth:"full"}),time:Uu({formats:Y_,defaultWidth:"full"}),dateTime:Uu({formats:G_,defaultWidth:"full"})},X_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Q_=(e,t,n,r)=>X_[e];function qi(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 J_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tI={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"]},nI={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"]},rI={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"}},oI={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"}},iI={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:qi({values:J_,defaultWidth:"wide"}),quarter:qi({values:eI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qi({values:tI,defaultWidth:"wide"}),day:qi({values:nI,defaultWidth:"wide"}),dayPeriod:qi({values:rI,defaultWidth:"wide",formattingValues:oI,defaultFormattingWidth:"wide"})};function Ui(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)?sI(s,d=>d.test(a)):aI(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 aI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function sI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function lI(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 cI=/^(\d+)(th|st|nd|rd)?/i,uI=/\d+/i,dI={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},fI={any:[/^b/i,/^(a|c)/i]},pI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hI={any:[/1/i,/2/i,/3/i,/4/i]},mI={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},gI={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]},vI={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},yI={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]},bI={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},xI={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}},wI={ordinalNumber:lI({matchPattern:cI,parsePattern:uI,valueCallback:e=>parseInt(e,10)}),era:Ui({matchPatterns:dI,defaultMatchWidth:"wide",parsePatterns:fI,defaultParseWidth:"any"}),quarter:Ui({matchPatterns:pI,defaultMatchWidth:"wide",parsePatterns:hI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ui({matchPatterns:mI,defaultMatchWidth:"wide",parsePatterns:gI,defaultParseWidth:"any"}),day:Ui({matchPatterns:vI,defaultMatchWidth:"wide",parsePatterns:yI,defaultParseWidth:"any"}),dayPeriod:Ui({matchPatterns:bI,defaultMatchWidth:"any",parsePatterns:xI,defaultParseWidth:"any"})},Dy={code:"en-US",formatDistance:U_,formatLong:Z_,formatRelative:Q_,localize:iI,match:wI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function SI(e,t){const n=Qe(e,t==null?void 0:t.in);return V_(n,H_(n))+1}function Ny(e,t){const n=Qe(e,t==null?void 0:t.in),r=+Mo(n)-+j_(n);return Math.round(r/ky)+1}function Ku(e,t){var u,d,p,f;const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),o=Rr(),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=An(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=An(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function TI(e,t){var s,l,c,u;const n=Rr(),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=Ku(e,t),i=at((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),An(i,t)}function Fy(e,t){const n=Qe(e,t==null?void 0:t.in),r=+An(n,t)-+TI(n,t);return Math.round(r/ky)+1}function Je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Je(n+1,2)},d(e,t){return Je(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 Je(e.getHours()%12||12,t.length)},H(e,t){return Je(e.getHours(),t.length)},m(e,t){return Je(e.getMinutes(),t.length)},s(e,t){return Je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Je(o,t.length)}},No={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ly={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 ir.y(e,t)},Y:function(e,t,n,r){const o=Ku(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Je(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Je(i,t.length)},R:function(e,t){const n=_y(e);return Je(n,t.length)},u:function(e,t){const n=e.getFullYear();return Je(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 Je(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 Je(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 ir.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 Je(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=Fy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Je(o,t.length)},I:function(e,t,n){const r=Ny(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ir.d(e,t)},D:function(e,t,n){const r=SI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Je(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 Je(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 Je(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 Je(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=No.noon:r===0?o=No.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=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.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 ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ir.s(e,t)},S:function(e,t){return ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return jy(r);case"XXXX":case"XX":return Br(r);case"XXXXX":case"XXX":default:return Br(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return jy(r);case"xxxx":case"xx":return Br(r);case"xxxxx":case"xxx":default:return Br(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Vy(r,":");case"OOOO":default:return"GMT"+Br(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Vy(r,":");case"zzzz":default:return"GMT"+Br(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Je(r,t.length)},T:function(e,t,n){return Je(+e,t.length)}};function Vy(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+Je(i,2)}function jy(e,t){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):Br(e,t)}function Br(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Je(Math.trunc(r/60),2),i=Je(r%60,2);return n+o+t+i}const $y=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},zy=(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"})}},Yu={p:zy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $y(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",$y(r,t)).replace("{{time}}",zy(o,t))}},EI=/^D+$/,CI=/^Y+$/,kI=["D","DD","YY","YYYY"];function Ry(e){return EI.test(e)}function By(e){return CI.test(e)}function Gu(e,t,n){const r=PI(e,t,n);if(console.warn(r),kI.includes(e))throw new RangeError(r)}function PI(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 AI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_I=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,II=/^'([^]*?)'?$/,OI=/''/g,MI=/[a-zA-Z]/;function DI(e,t,n){var u,d,p,f;const r=Rr(),o=r.locale??Dy,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=Qe(e,n==null?void 0:n.in);if(!Iy(s))throw new RangeError("Invalid time value");let l=t.match(_I).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Yu[g];return h(m,o.formatLong)}return m}).join("").match(AI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:NI(m)};if(Ly[g])return{isToken:!0,value:m};if(g.match(MI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(By(g)||Ry(g))&&Gu(g,t,String(e));const h=Ly[g[0]];return h(s,g,o.localize,c)}).join("")}function NI(e){const t=e.match(II);return t?t[1].replace(OI,"'"):e}function FI(){return Object.assign({},Rr())}function LI(e,t){const n=Qe(e,t==null?void 0:t.in).getDay();return n===0?7:n}function VI(e,t){return+Qe(e)>+Qe(t)}function jI(e,t){return+Qe(e)<+Qe(t)}function $I(e,t){const n=zI(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 zI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const RI=10;class Hy{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class BI extends Hy{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 HI extends Hy{constructor(n,r){super();pe(this,"priority",RI);pe(this,"subPriority",-1);this.context=n||(o=>at(r,o))}set(n,r){return r.timestampIsSet?n:at(n,$I(n,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new BI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class WI extends Ke{constructor(){super(...arguments);pe(this,"priority",140);pe(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}/},_n={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 In(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*N_+i*D_+a*F_),rest:t.slice(n[0].length)}}function Wy(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 ls(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 Zu(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 qy(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 Uy(e){return e%400===0||e%4===0&&e%100!==0}class qI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(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=qy(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 UI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(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=Ku(n,i);if(o.isTwoDigitYear){const l=qy(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),An(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),An(n,i)}}class KI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ls(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),Mo(i)}}class YI extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ls(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class GI extends Ke{constructor(){super(...arguments);pe(this,"priority",120);pe(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 ZI extends Ke{constructor(){super(...arguments);pe(this,"priority",120);pe(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 XI extends Ke{constructor(){super(...arguments);pe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);pe(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 QI extends Ke{constructor(){super(...arguments);pe(this,"priority",110);pe(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 JI(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=Fy(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n==null?void 0:n.in)}class eO extends Ke{constructor(){super(...arguments);pe(this,"priority",100);pe(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 An(JI(n,o,i),i)}}function tO(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=Ny(r,n)-t;return r.setDate(r.getDate()-o*7),r}class nO extends Ke{constructor(){super(...arguments);pe(this,"priority",100);pe(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 Mo(tO(n,o))}}const rO=[31,28,31,30,31,30,31,31,30,31,30,31],oO=[31,29,31,30,31,30,31,31,30,31,30,31];class iO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subPriority",1);pe(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=Uy(o),a=n.getMonth();return i?r>=1&&r<=oO[a]:r>=1&&r<=rO[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(this,"subpriority",1);pe(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 Uy(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 Xu(e,t,n){var d,p,f,m;const r=Rr(),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??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Qe(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 is(i,u,n)}class sO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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=Xu(n,o,i),n.setHours(0,0,0,0),n}}class lO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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=Xu(n,o,i),n.setHours(0,0,0,0),n}}class cO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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=Xu(n,o,i),n.setHours(0,0,0,0),n}}function uO(e,t,n){const r=Qe(e,n==null?void 0:n.in),o=LI(r,n),i=t-o;return is(r,i,n)}class dO extends Ke{constructor(){super(...arguments);pe(this,"priority",90);pe(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=uO(n,o),n.setHours(0,0,0,0),n}}class fO extends Ke{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Zu(o),0,0,0),n}}class pO extends Ke{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Zu(o),0,0,0),n}}class hO extends Ke{constructor(){super(...arguments);pe(this,"priority",80);pe(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(Zu(o),0,0,0),n}}class mO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 gO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 vO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 yO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(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 bO extends Ke{constructor(){super(...arguments);pe(this,"priority",60);pe(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 xO extends Ke{constructor(){super(...arguments);pe(this,"priority",50);pe(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 wO extends Ke{constructor(){super(...arguments);pe(this,"priority",30);pe(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 SO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return In(_n.basicOptionalMinutes,n);case"XX":return In(_n.basic,n);case"XXXX":return In(_n.basicOptionalSeconds,n);case"XXXXX":return In(_n.extendedOptionalSeconds,n);case"XXX":default:return In(_n.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-as(n)-o)}}class TO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return In(_n.basicOptionalMinutes,n);case"xx":return In(_n.basic,n);case"xxxx":return In(_n.basicOptionalSeconds,n);case"xxxxx":return In(_n.extendedOptionalSeconds,n);case"xxx":default:return In(_n.extended,n)}}set(n,r,o){return r.timestampIsSet?n:at(n,n.getTime()-as(n)-o)}}class EO extends Ke{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Wy(n)}set(n,r,o){return[at(n,o*1e3),{timestampIsSet:!0}]}}class CO extends Ke{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Wy(n)}set(n,r,o){return[at(n,o),{timestampIsSet:!0}]}}const kO={G:new WI,y:new qI,Y:new UI,R:new KI,u:new YI,Q:new GI,q:new ZI,M:new XI,L:new QI,w:new eO,I:new nO,d:new iO,D:new aO,E:new sO,e:new lO,c:new cO,i:new dO,a:new fO,b:new pO,B:new hO,h:new mO,H:new gO,K:new vO,k:new yO,m:new bO,s:new xO,S:new wO,X:new SO,x:new TO,t:new EO,T:new CO},PO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_O=/^'([^]*?)'?$/,IO=/''/g,OO=/\S/,MO=/[a-zA-Z]/;function DO(e,t,n,r){var h,y,v,x;const o=()=>at(n,NaN),i=FI(),a=i.locale??Dy,s=i.firstWeekContainsDate??((y=(h=i.locale)==null?void 0:h.options)==null?void 0:y.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(v=i.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Qe(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new HI(r==null?void 0:r.in,n)],d=t.match(AO).map(S=>{const w=S[0];if(w in Yu){const T=Yu[w];return T(S,a.formatLong)}return S}).join("").match(PO),p=[];for(let S of d){By(S)&&Gu(S,t,e),Ry(S)&&Gu(S,t,e);const w=S[0],T=kO[w];if(T){const{incompatibleTokens:C}=T;if(Array.isArray(C)){const I=p.find(_=>C.includes(_.token)||_.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(MO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=NO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&OO.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 m=Qe(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const S of f){if(!S.validate(m,c))return o();const w=S.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function NO(e){return e.match(_O)[1].replace(IO,"'")}function FO(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function LO(e,t){return z_(at(e,e),$_(e))}function VO(e,t,n){return is(e,-t,n)}function jO(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(+r)?at(e,NaN):(r.setFullYear(t),r)}function $O(e,t,n){return Ay(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=$O(e,o+r*12,n),d=VO(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return at(e,+d-m)}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 Qu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ju(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Yi=function(e){return e.replace(new RegExp(" ","g")," ")},Ky=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)},zO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Yy=function(e,t,n){var r=e.length-2,o=zO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Gy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},cs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},RO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ed=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},BO=function(e){return e==="money"||e==="currency"},HO=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:""})},us=function(e,t){var n=Ky(Gy(e),t.fraction.length),r="".concat(t.currency).concat(Yy(n,t.group,t.decimal));return Yi(r)},WO=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=Qu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=HO(r,i,s);return m.currency=Yi("".concat(m.currency.trim()," ")),m.literal=Yi(m.literal.trim()),m},[r,i]),p=function(m){var g=us(m.target.value,d),h=cs(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),l==null||l(m),h!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=us(m,d),h=cs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var y=new InputEvent("change",{});l==null||l(Et(Et({},y),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?us(c.defaultValue,d):void 0;return E.createElement("input",Et({},c,{value:typeof c.value=="string"?us(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),qO=1,UO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},KO=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:""})},ds=function(e,t){var n=Ky(Gy(e),t.fraction.length),r="".concat(Yy(n,t.group,t.decimal)," ").concat(t.percentSign);return Yi(r)},YO=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=Qu(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=Ju(E.useState(function(){var y,v;return(v=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,v=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(ds(v,d))},[a.value]);var d=E.useMemo(function(){var y=KO(r);return y.percentSign=Yi("".concat(y.percentSign)),y},[r]),p=c.length-d.percentSign.length-qO,f=function(y){var v,x=s.current;x&&(x.setSelectionRange(p,p),y&&((v=a.onFocus)===null||v===void 0||v.call(a,y)))},m=function(y){var v=y.currentTarget;if(v.selectionStart!==null){var x=v.selectionStart,S=v.selectionEnd,w=x!==S,T=p<x;!w&&T&&f()}i==null||i(y)},g=function(y){var v=ds(y.target.value,d),x=cs(v);u(v),y.target.value=v,y.target.setAttribute("data-number",x.toString()),o==null||o(y)};E.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var v=ds(y,d),x=cs(v);u(v),s.current.value=v,s.current.setAttribute("data-number",x.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 h=a.defaultValue?ds(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Gi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},GO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=fs[i];a===void 0?r.push(i.replace(Gi.dots,"\\.").replace(Gi.openParenthesis,"\\(").replace(Gi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Gi.leadingBars,"\\")},Zi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return td(o,n);var i=GO(o);return n?"^".concat(i,"$"):i},ZO=function(e){return e.replace(Gi.escape,"\\$&")},td=function(e,t){var n=e.map(function(r){return typeof r=="string"?ZO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fs={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]/}},XO=/\d/,Zy="(dd) 9dddd-dddd",Xy="(dd) dddd-dddd",Qy="ddd.ddd.ddd-dd",Jy="dd.ddd.ddd/dddd-dd",ps=function(e){return e.replace(/\D/g,"")},QO=["2",/[0-3]/,":",/[0-5]/,/\d/],JO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Kt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Qy,isoDate:"dddd-dd-dd",cnpj:Jy,telephone:Xy,cellphone:Zy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ps(e).length<=11?Qy:Jy},int:function(e){return e===void 0&&(e=""),XO.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=ps(e);return t.length<11?Xy:Zy},time:function(e){var t=ps(e),n=t[0];return n==="2"?QO:JO}},Yt=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:Zi(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:Yt(Kt.cellTelephone,"tel"),cellphone:Yt(Kt.cellphone,"tel"),cep:Yt(Kt.cep,"decimal"),cnpj:Yt(Kt.cnpj,"decimal"),color:Yt(Kt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Yt(Kt.cpf,"decimal"),cpfCnpj:Yt(Kt.cpfCnpj,"decimal",{transform:ps}),creditCard:Yt(Kt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Yt(Kt.date,"decimal"),int:Yt(Kt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Yt(Kt.isoDate,"decimal"),telephone:Yt(Kt.telephone,"tel"),time:Yt(Kt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Yt(Kt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function eb(e,t,n,r){var o,i;r===void 0&&(r=fs);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 tb=function(e){return e},eM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Zi(e,n,t));return r.test(n)};function tM(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var nM=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=Qu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=ed(s),h=ed(d),y=ed(u),v=E.useRef(eM(u,i,f.value||f.defaultValue)),x=p??"input",S=Ju(E.useState(""),2),w=S[0],T=S[1],C=tM(w),k=E.useCallback(function(N,O){var V,F,B=(V=N??O)!==null&&V!==void 0?V:"";if(u===void 0)return B;var D=(F=B==null?void 0:B.toString())!==null&&F!==void 0?F:"";return eb(D,typeof u=="function"?u(D):u,a??tb,c??fs)},[a,u,c]),I=Ju(E.useState(function(){return k(f.value,f.defaultValue)}),2),_=I[0],M=I[1],L=k(f.defaultValue,f.defaultValue),$=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(_);return Array.isArray(N)?td(N,i):Zi(u,_,i)}return typeof u=="string"?Zi(u,_,i):td(u,i)},[l,_,i,u]);E.useEffect(function(){if(f.value!==void 0){var N=k(f.value,f.defaultValue);M(N),m.current!==null&&(m.current.value=N)}},[f.value,u,a,f.defaultValue]);var A=function(N){var O,V,F,B,D,R=N.currentTarget,Q=N.target.value;if(y.current===void 0)return M(Q),(O=h.current)===null||O===void 0||O.call(h,Q),(V=g.current)===null||V===void 0||V.call(g,N),d==null?void 0:d(Q);var X=new RegExp(Zi(y.current,Q,i)),J=(F=R.selectionEnd)!==null&&F!==void 0?F:0,Z=function(K,ae,H){if(K.type!=="number")return K.setSelectionRange(ae,H)};if(r&&v.current&&Q.length>=_.length)return R.value=_,Z(R,J-1,J-1);var Y=!1;Q.length<C.length&&(v.current=!1,Y=!0),X.test(Q)&&(v.current=!0);var G=J,j=Q[G-1],z=eb(Q,typeof y.current=="function"?y.current(Q):y.current,a??tb,c??fs);for(R.value=z,M(z);G<z.length&&z.charAt(G-1)!==j;)G+=1;Y?Z(R,J,J):Z(R,G,G),N.target.value=z,T(z),(B=h.current)===null||B===void 0||B.call(h,z),(D=g.current)===null||D===void 0||D.call(g,N)};return E.createElement(x,Et({},f,{ref:m,pattern:$,onChange:A,defaultValue:nb(f.defaultValue)?L:void 0,value:nb(f.value)?k(f.value,f.value):f.value}))}),nb=function(e){return typeof e=="string"},rb=E.forwardRef(function(e,t){return BO(e.mask)?E.createElement(WO,Et({},e,{mask:void 0,ref:t})):UO(e.mask)?E.createElement(YO,Et({},e,{mask:void 0,ref:t})):E.createElement(nM,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(rb,Et({},e,t))}};Gt(jt.cellTelephone),Gt(jt.cellphone),Gt(jt.cep),Gt(jt.cnpj),Gt(jt.color),Gt(jt.cpf),Gt(jt.cpfCnpj),Gt(jt.creditCard),Gt(jt.date),Gt(jt.int),Gt(jt.isoDate),Gt(jt.telephone),Gt(jt.time),Gt(jt.uuid);var ob=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&RO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(rb,Et({},o,{ref:n}))}),hs={exports:{}},nd={},ms={exports:{}},rd={};/**
|
|
153
153
|
* @license React
|
|
154
154
|
* use-sync-external-store-shim.production.js
|
|
155
155
|
*
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
*
|
|
158
158
|
* This source code is licensed under the MIT license found in the
|
|
159
159
|
* LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/var ib;function rM(){if(ib)return rd;ib=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),m=r({inst:{value:f,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=f,g.getSnapshot=p,
|
|
160
|
+
*/var ib;function rM(){if(ib)return rd;ib=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),m=r({inst:{value:f,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&h({inst:g})},[d,f,p]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return rd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,rd}var od={};/**
|
|
161
161
|
* @license React
|
|
162
162
|
* use-sync-external-store-shim.development.js
|
|
163
163
|
*
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
*
|
|
166
166
|
* This source code is licensed under the MIT license found in the
|
|
167
167
|
* LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/var ab;function oM(){return ab||(ab=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!d){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:m}});var y=h[0].inst,v=h[1];return
|
|
168
|
+
*/var ab;function oM(){return ab||(ab=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!d){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:m}});var y=h[0].inst,v=h[1];return l(function(){y.value=g,y.getSnapshot=m,n(y)&&v({inst:y})},[f,g,m]),s(function(){return n(y)&&v({inst:y}),f(function(){n(y)&&v({inst:y})})},[f]),c(g),g}function n(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!i(f,g)}catch{return!0}}function r(f,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;od.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),od}var sb;function lb(){return sb||(sb=1,process.env.NODE_ENV==="production"?ms.exports=rM():ms.exports=oM()),ms.exports}/**
|
|
169
169
|
* @license React
|
|
170
170
|
* use-sync-external-store-shim/with-selector.production.js
|
|
171
171
|
*
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the MIT license found in the
|
|
175
175
|
* LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/var cb;function iM(){if(cb)return nd;cb=1;var e=E,t=lb();function n(
|
|
176
|
+
*/var cb;function iM(){if(cb)return nd;cb=1;var e=E,t=lb();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return nd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function y(T){if(!v){if(v=!0,x=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(x,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(x=T,C):(x=T,S=k)}var v=!1,x,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},nd}var id={};/**
|
|
177
177
|
* @license React
|
|
178
178
|
* use-sync-external-store-shim/with-selector.development.js
|
|
179
179
|
*
|
|
@@ -181,32 +181,32 @@
|
|
|
181
181
|
*
|
|
182
182
|
* This source code is licensed under the MIT license found in the
|
|
183
183
|
* LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/var ub;function aM(){return ub||(ub=1,process.env.NODE_ENV!=="production"&&function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&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=lb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,c=t.useDebugValue;id.useSyncExternalStoreWithSelector=function(l,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function y(S){if(!v){if(v=!0,x=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(x,S))return C;var k=p(S);return f!==void 0&&f(C,k)?(x=S,C):(x=S,T=k)}var v=!1,x,T,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var h=o(l,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),c(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),id}var db;function sM(){return db||(db=1,process.env.NODE_ENV==="production"?hs.exports=iM():hs.exports=aM()),hs.exports}sM();var Fo=function(){return Fo=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},Fo.apply(this,arguments)};function Xi(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 fb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Lo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},lM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},cM=function(e){return Object.entries(e)},pb=function(e){return e instanceof Promise},hb=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)},Fo(Fo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},uM=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var c=performance.now(),l=t.apply(void 0,fb([],Xi(a),!1)),u=function(d,p){return n(function(f){return hb(d,f,i,p)})};return pb(l)?l.then(function(d){o.current={method:e,props:r(),time:performance.now()-c},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-c},void u(l,o.current))}},dM=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 c=t.apply(void 0,fb([],Xi(a),!1)),l=function(u){return n(function(d){return hb(u,d,i,o.current)})};return pb(c)?c.then(function(u){return l(u)}):l(c)}},ad=function(e,t,n){var r,o,i,a=Xi(E.useState(function(){return e}),2),s=a[0],c=a[1],l=Lo(s),u=Lo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Lo(t),p=Lo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Lo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=lM(s),h=Lo(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var T=y.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var v=Xi(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return l.current},initialState:m.current,previousState:function(){return h.current}});return cM(w).reduce(function(S,C){var k,I=Xi(C,2),_=I[0],M=I[1];return Fo(Fo({},S),(k={},k[_]=n!=null&&n.debug?uM(_,M,c,T,y,f.current):dM(_,M,c,T,y,f.current),k))},{})}),1),x=v[0];return[s,x,u.current]};const fM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function pM(e,t){return E.useRef(fM(e,t)).current}const gs={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>)`},Hr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const c=r===""?`${n}${i}`:i;return o.concat(t(a,c,s))}return o.concat(Hr(a,t,n,s))},[]),mb=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const c=r===""?`${n}${i}`:i;return{...o,[c]:t(a,i,s)}}return{...o,[i]:mb(a,t,n,s)}},{}),gb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},vs=(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)},hM={default:e=>vs(e,{result:gb.default}),dark:e=>vs(e,{result:gb.dark})},Qi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},mM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),sd=(e,t)=>{const n=Hr(e.colors,Qi(t==null?void 0:t.colors)),r=Hr(e.spacing,Qi(t==null?void 0:t.spacing)),o=Hr(e.rounded,Qi(t==null?void 0:t.rounded)),i=Hr(e.zIndex,Qi((t==null?void 0:t.zIndex)??mM)),a=e.custom?Hr(e.custom,Qi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},gM=(e,t)=>vs(sd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),vM=(e,t)=>sd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),yM=(e,t)=>vs(sd(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ys={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=>b.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"},bs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},Vo=E.createContext({tweaks:bs,parser:gs.hsla,map:ys,locale:void 0}),ld=e=>{const t=E.useContext(Vo);if(e)return e;if(t)return t.locale||e};function bM(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 Pt=()=>{const e=E.useContext(Vo);return e?e.map:ys},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),jo=()=>{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,`${cn(t,4)+cn(n,3)}-${cn(r[0])+cn(r[1])}-${cn(r[2])+cn(r[3])}-${cn(r[4])+cn(r[5])}-${cn(r[6])+cn(r[7])+cn(r[8])+cn(r[9])}`},vb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),yb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},cd=(e,t)=>{const n=vb(t,yb.basic,e)||vb(t,yb.extend,e);return n===void 0||n===e?void 0:n},Wr=()=>typeof window>"u",ud=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bb=(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},xM=e=>!e,dd=()=>{},xb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},wM={type:"spring",bounce:.3,duration:.6},wb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Sb={enter:wb(1),exit:wb(-1),middle:{x:"0%",opacity:1}},Tb={exit:{visibility:"hidden"}},SM=e=>{const t=An(My(e));return Oy({start:t,end:Oo(t,{days:41})})},Eb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=My(new Date(1970,o,1).setMonth(o)),a=Eb(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),fd={ArrowLeft:(e,t)=>t==="days"?Ki(e,{days:1}):Ki(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Oo(e,{days:1}):Oo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ki(e,{weeks:1}):Ki(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Oo(e,{weeks:1}):Oo(e,{years:1})},Cb=(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)},qr=e=>e.getFullYear().toString().padStart(4,"0"),EM=(e,t,n)=>e===void 0||n===void 0?!1:VI(t,e)&&jI(t,n),CM=e=>{var n;const t=Pt();return b.jsx(ft.tbody,{layout:!0,variants:Sb,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,c;const i=$e.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(c=e.styles)==null?void 0:c.week;return b.jsx("tr",{className:i,children:r.map(l=>{var y,v,x,T,w,S,C,k,I,_,M,L,$,A,N,O,V,F;const u=l.toISOString(),d=e.rangeMode?u===((v=(y=e.range)==null?void 0:y.to)==null?void 0:v.toISOString())||u===((T=(x=e.range)==null?void 0:x.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=LO(l)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,l))||!1,m=FO(l,e.stateDate),g=!m||f,h=e.rangeMode?EM((C=e.range)==null?void 0:C.from,l,(k=e.range)==null?void 0:k.to):!1;return b.jsxs("td",{align:"center",className:Oe("relative",$e.function((I=e.styles)==null?void 0:I.dayFrame)?(_=e.styles)==null?void 0:_.dayFrame(l):(M=e.styles)==null?void 0:M.dayFrame),children:[b.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",$e.function((L=e.styles)==null?void 0:L.day)?($=e.styles)==null?void 0:$.day(l):(A=e.styles)==null?void 0:A.day),children:[l.getDate(),d&&((N=e.stateRange.from)==null?void 0:N.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:l}):null]},u)})},`week-${r.length}-${o}`)})})},kM=()=>Do(new Date),kb=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:c=!1,onChange:l,styles:u,markRange:d=!0,...p})=>{const f=E.useRef(jo()),m=Pt(),g=ld(o),h=E.useRef(null),{date:y,range:v}=p,x=y||new Date,T=E.useRef(null),[w,S]=ad({date:x,isAnimating:!1,year:qr(x),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:TM(f.current,x,g),selectMode:c?"from":void 0,week:Oy({start:An(x),end:W_(x)})},A=>({onChangeYear:N=>({year:N}),onExitComplete:()=>(Cb(T.current||null,h,A.state().date,200),T.current=null,{isAnimating:!1}),date:N=>{const O=N(A.state().date);return{date:O,year:qr(O)}},nextMonth:N=>{N&&(T.current=N.currentTarget);const O=A.state();if(O.isAnimating)return O;const V=Oo(O.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:qr(V)}},previousMonth:N=>{N&&(T.current=N.currentTarget);const O=A.state();if(O.isAnimating)return O;const V=Ki(O.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:qr(V)}},onSelectDate:N=>{const O=A.state(),V=N.currentTarget.dataset.range==="true",F=N.currentTarget.dataset.date||"",B=new Date(F);return{date:B,year:qr(B),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:V?{from:O.selectMode==="from"?B:O.range.from,to:O.selectMode==="to"?B:O.range.to}:O.range}},onChangeMonth:N=>{const O=N.target.value,F=Array.from(N.target.options).find(D=>D.value===O),B=A.state();if(F){const D=F.dataset.index||"",z=new Date(A.state().date);return z.setMonth(+D),{...B,date:z,year:qr(z)}}return B},onKeyDown:N=>{const O=N.key,V=A.state();if(O in fd){(O==="ArrowUp"||O==="ArrowDown")&&N.preventDefault();const F=A.state().date,B=$e.keyof(fd,O)?fd[O](F,N.shiftKey?"month":"days"):null;if(B!==null)return Cb(N.target,h,B),{...V,date:B,year:qr(B)}}return A.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(A,N,O)=>{var F,B;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((B=(F=O.props).onChangeMonth)==null||B.call(F,A.date)),A},(A,N,O)=>{var F,B;return O.method==="onChangeYear"&&((B=(F=O.props).onChangeYear)==null||B.call(F,A.date)),A},(A,N,O)=>{const V=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return c&&V&&t?(l==null||l(A.range),A):(V&&t&&(l==null||l(A.date)),A)}]}),C=SM(w.date),k=bb(C,7),I=w.date.toISOString(),_=Eb(w.date,g);E.useEffect(()=>{t||l==null||l(w.date)},[I,t]);const M=pM(A=>S.date(N=>jO(new Date(N),+A)),1200),L=A=>{const N=A.currentTarget.value;S.onChangeYear(N),s==null||s(new Date(N)),M(N)},$=bM((A,N)=>(A.preventDefault(),N==="right"?S.previousMonth():S.nextMonth()),10);return b.jsx(bE,{transition:wM,children:b.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Oe("relative overflow-hidden",$e.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(tr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:b.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Tb,onClick:S.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(y_,{className:"h-4 w-4"})}),b.jsx(ft.span,{layout:!0,variants:Sb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{value:_,onChange:S.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),b.jsx(ob,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:L,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:Tb,onClick:S.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(Wu,{className:"h-4 w-4"})}),b.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%)"}})]}),b.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:w.week.map(A=>b.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",$e.function(u==null?void 0:u.weekDay)?u.weekDay(A):u==null?void 0:u.weekDay),children:A.toLocaleDateString(g,{weekday:"short"})},A.toString()))})}),b.jsx(CM,{zip:k,range:v,styles:u,date:y||null,dispatch:S,markRange:d,markToday:i,rangeMode:c,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},_)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>S.date(kM),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},pd=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(on,{...s,as:r,"data-component":"card",className:Oe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,b.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-4 lg:px-8",a),children:e})]});pd.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return b.jsxs(i,{...o,title:$e.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[b.jsx(a,{className:"font-semibold",children:o.title}),r?b.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 Pb=e=>{const t=e.Icon??wy,n=Pt();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(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 Ab(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _b(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ab(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():Ab(e[o],null)}}}}function Ur(...e){return P.useCallback(_b(...e),e)}function Ib(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),c=n.length;n=[...n,a];const l=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[c])||s,h=P.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};l.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,m=P.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const o=()=>{const i=n.map(a=>P.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,PM(o,...t)]}function PM(...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:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $o=P.forwardRef((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),i=o.find(_M);if(i){const a=i.props.children,s=o.map(c=>c===i?P.Children.count(a)>1?P.Children.only(null):P.isValidElement(a)?a.props.children:null:c);return b.jsx(hd,{...r,ref:t,children:P.isValidElement(a)?P.cloneElement(a,void 0,s):null})}return b.jsx(hd,{...r,ref:t,children:n})});$o.displayName="Slot";var hd=P.forwardRef((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const o=OM(n),i=IM(r,n.props);return n.type!==P.Fragment&&(i.ref=t?_b(t,o):o),P.cloneElement(n,i)}return P.Children.count(n)>1?P.Children.only(null):null});hd.displayName="SlotClone";var AM=({children:e})=>b.jsx(b.Fragment,{children:e});function _M(e){return P.isValidElement(e)&&e.type===AM}function IM(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 OM(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 MM(e){const t=e+"CollectionProvider",[n,r]=Ib(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),y=E.useRef(new Map).current;return b.jsx(o,{scope:m,itemMap:y,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",c=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,y=i(s,g),v=Ur(m,y.collectionRef);return b.jsx($o,{ref:v,children:h})});c.displayName=s;const l=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...y}=f,v=E.useRef(null),x=Ur(m,v),T=i(l,g);return E.useEffect(()=>(T.itemMap.set(v,{ref:v,...y}),()=>void T.itemMap.delete(v))),b.jsx($o,{[u]:"",ref:x,children:h})});d.displayName=l;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const y=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((T,w)=>y.indexOf(T.ref.current)-y.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:c,ItemSlot:d},p,r]}var DM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],On=DM.reduce((e,t)=>{const n=P.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?$o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ob(e,t){e&&Oa.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function NM(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);P.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 FM="DismissableLayer",md="dismissableLayer.update",LM="dismissableLayer.pointerDownOutside",VM="dismissableLayer.focusOutside",Mb,Db=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nb=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,l=P.useContext(Db),[u,d]=P.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=P.useState({}),m=Ur(t,C=>d(C)),g=Array.from(l.layers),[h]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(h),v=u?g.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,T=v>=y,w=$M(C=>{const k=C.target,I=[...l.branches].some(_=>_.contains(k));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=zM(C=>{const k=C.target;[...l.branches].some(_=>_.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return NM(C=>{v===l.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),P.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Mb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Lb(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Mb)}},[u,p,n,l]),P.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Lb())},[u,l]),P.useEffect(()=>{const C=()=>f({});return document.addEventListener(md,C),()=>document.removeEventListener(md,C)},[]),b.jsx(On.div,{...c,ref:m,style:{pointerEvents:x?T?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});Nb.displayName=FM;var jM="DismissableLayerBranch",Fb=P.forwardRef((e,t)=>{const n=P.useContext(Db),r=P.useRef(null),o=Ur(t,r);return P.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(On.div,{...e,ref:o})});Fb.displayName=jM;function $M(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){Vb(LM,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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 zM(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=P.useRef(!1);return P.useEffect(()=>{const o=i=>{i.target&&!r.current&&Vb(VM,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 Lb(){const e=new CustomEvent(md);document.dispatchEvent(e)}function Vb(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?Ob(o,i):o.dispatchEvent(i)}var RM=Nb,BM=Fb,xs=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},HM="Portal",jb=P.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=P.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(b.jsx(On.div,{...r,ref:t}),a):null});jb.displayName=HM;function WM(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var $b=e=>{const{present:t,children:n}=e,r=qM(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),i=Ur(r.ref,UM(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:i}):null};$b.displayName="Presence";function qM(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[s,c]=WM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const l=ws(r.current);i.current=s==="mounted"?l:"none"},[s]),xs(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,f=ws(l);e?c("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),xs(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ws(r.current).includes(f.animationName);if(f.target===t&&g&&(c("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=ws(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:P.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function UM(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 KM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=YM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),c=P.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else o(l)},[i,e,o,s]);return[a,c]}function YM({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=Un(t);return P.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var GM="VisuallyHidden",gd=P.forwardRef((e,t)=>b.jsx(On.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}}));gd.displayName=GM;var vd="ToastProvider",[yd,ZM,XM]=MM("Toast"),[zb,CR]=Ib("Toast",[XM]),[QM,Ss]=zb(vd),Rb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=P.useState(null),[l,u]=P.useState(0),d=P.useRef(!1),p=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${vd}\`. Expected non-empty \`string\`.`),b.jsx(yd.Provider,{scope:t,children:b.jsx(QM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:P.useCallback(()=>u(f=>f+1),[]),onToastRemove:P.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Rb.displayName=vd;var Bb="ToastViewport",JM=["F8"],bd="toast.viewportPause",xd="toast.viewportResume",Hb=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=JM,label:o="Notifications ({hotkey})",...i}=e,a=Ss(Bb,n),s=ZM(n),c=P.useRef(null),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=Ur(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;P.useEffect(()=>{const h=y=>{var x;r.length!==0&&r.every(T=>y[T]||y.code===T)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),P.useEffect(()=>{const h=c.current,y=d.current;if(m&&h&&y){const v=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(bd);y.dispatchEvent(S),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(xd);y.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!h.contains(S.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",v),h.addEventListener("focusout",T),h.addEventListener("pointermove",v),h.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",v),h.removeEventListener("focusout",T),h.removeEventListener("pointermove",v),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=P.useCallback(({tabbingDirection:h})=>{const v=s().map(x=>{const T=x.ref.current,w=[T,...pD(T)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?v.reverse():v).flat()},[s]);return P.useEffect(()=>{const h=d.current;if(h){const y=v=>{var w,S,C;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const k=document.activeElement,I=v.shiftKey;if(v.target===h&&I){(w=l.current)==null||w.focus();return}const L=g({tabbingDirection:I?"backwards":"forwards"}),$=L.findIndex(A=>A===k);Td(L.slice($+1))?v.preventDefault():I?(S=l.current)==null||S.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[s,g]),b.jsxs(BM,{ref:c,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&b.jsx(wd,{ref:l,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Td(h)}}),b.jsx(yd.Slot,{scope:n,children:b.jsx(On.ol,{tabIndex:-1,...i,ref:p})}),m&&b.jsx(wd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Td(h)}})]})});Hb.displayName=Bb;var Wb="ToastFocusProxy",wd=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss(Wb,n);return b.jsx(gd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var l;const s=a.relatedTarget;!((l=i.viewport)!=null&&l.contains(s))&&r()}})});wd.displayName=Wb;var Ts="Toast",eD="toast.swipeStart",tD="toast.swipeMove",nD="toast.swipeCancel",rD="toast.swipeEnd",qb=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=KM({prop:r,defaultProp:o,onChange:i});return b.jsx($b,{present:n||s,children:b.jsx(aD,{open:s,...a,ref:t,onClose:()=>c(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Xt(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(e.onSwipeMove,l=>{const{x:u,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Xt(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Xt(e.onSwipeEnd,l=>{const{x:u,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});qb.displayName=Ts;var[oD,iD]=zb(Ts,{onClose(){}}),aD=P.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Ts,n),[h,y]=P.useState(null),v=Ur(t,A=>y(A)),x=P.useRef(null),T=P.useRef(null),w=o||g.duration,S=P.useRef(0),C=P.useRef(w),k=P.useRef(0),{onToastAdd:I,onToastRemove:_}=g,M=Un(()=>{var N;(h==null?void 0:h.contains(document.activeElement))&&((N=g.viewport)==null||N.focus()),a()}),L=P.useCallback(A=>{!A||A===1/0||(window.clearTimeout(k.current),S.current=new Date().getTime(),k.current=window.setTimeout(M,A))},[M]);P.useEffect(()=>{const A=g.viewport;if(A){const N=()=>{L(C.current),l==null||l()},O=()=>{const V=new Date().getTime()-S.current;C.current=C.current-V,window.clearTimeout(k.current),c==null||c()};return A.addEventListener(bd,O),A.addEventListener(xd,N),()=>{A.removeEventListener(bd,O),A.removeEventListener(xd,N)}}},[g.viewport,w,c,l,L]),P.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(w)},[i,w,g.isClosePausedRef,L]),P.useEffect(()=>(I(),()=>_()),[I,_]);const $=P.useMemo(()=>h?Xb(h):null,[h]);return g.viewport?b.jsxs(b.Fragment,{children:[$&&b.jsx(sD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),b.jsx(oD,{scope:n,onClose:M,children:Oa.createPortal(b.jsx(yd.ItemSlot,{scope:n,children:b.jsx(RM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(On.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:Xt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Xt(e.onPointerMove,A=>{if(!x.current)return;const N=A.clientX-x.current.x,O=A.clientY-x.current.y,V=!!T.current,F=["left","right"].includes(g.swipeDirection),B=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=F?B(0,N):0,z=F?0:B(0,O),J=A.pointerType==="touch"?10:2,X={x:D,y:z},Q={originalEvent:A,delta:X};V?(T.current=X,Es(tD,d,Q,{discrete:!1})):Qb(X,g.swipeDirection,J)?(T.current=X,Es(eD,u,Q,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(N)>J||Math.abs(O)>J)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,A=>{const N=T.current,O=A.target;if(O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),T.current=null,x.current=null,N){const V=A.currentTarget,F={originalEvent:A,delta:N};Qb(N,g.swipeDirection,g.swipeThreshold)?Es(rD,f,F,{discrete:!0}):Es(nD,p,F,{discrete:!0}),V.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),sD=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ts,t),[i,a]=P.useState(!1),[s,c]=P.useState(!1);return dD(()=>a(!0)),P.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),s?null:b.jsx(jb,{asChild:!0,children:b.jsx(gd,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},lD="ToastTitle",Ub=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(On.div,{...r,ref:t})});Ub.displayName=lD;var cD="ToastDescription",Kb=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(On.div,{...r,ref:t})});Kb.displayName=cD;var Yb="ToastAction",uD=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(Zb,{altText:n,asChild:!0,children:b.jsx(Sd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yb}\`. Expected non-empty \`string\`.`),null)});uD.displayName=Yb;var Gb="ToastClose",Sd=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=iD(Gb,n);return b.jsx(Zb,{asChild:!0,children:b.jsx(On.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});Sd.displayName=Gb;var Zb=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(On.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Xb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),fD(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(...Xb(r))}}),t}function Es(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?Ob(o,i):o.dispatchEvent(i)}var Qb=(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 dD(e=()=>{}){const t=Un(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function fD(e){return e.nodeType===e.ELEMENT_NODE}function pD(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 Td(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var hD=Rb,mD=Hb,gD=qb,vD=Ub,yD=Kb,bD=Sd;const xD=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},wD=fo("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"}}),Jb=E.createContext(()=>{throw new Error("Not implemented")}),SD=()=>E.useContext(Jb),ex={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]}},TD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=wD({theme:t.theme||"default"});return b.jsx(gD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(ft.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:ex[t.reversedIndex]||ex.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(vD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(yD,{className:"select-text truncate",children:t.text})]}),r?b.jsx(bD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(os,{className:"h-5 w-5"})}):null]})})})});function ED({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=xD(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const c=E.useCallback((l,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:l}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return b.jsxs(hD,{duration:n,swipeThreshold:150,children:[b.jsx(Jb.Provider,{value:c,children:e}),b.jsx(tr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((l,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==l.id));return E.createElement(TD,{...l,key:l.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(mD,{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 CD=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),tx=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},nx={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},rx=E.createContext(""),kD=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Ed=(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(!kD(a))return a}return n==="backward"?Ed(e,e.length-1,"backward"):Ed(e,-1,"forward")},ox=(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=Ed(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},ix={[nx.ArrowLeft]:(e,t)=>ox(t,"backward"),[nx.ArrowRight]:(e,t)=>ox(t,"forward")},PD=e=>{const[t,n]=tx(e.active),r=E.useRef(null),o=Dr(e.onChange);E.useEffect(()=>{const c=r.current;if(c===null)return;let l=c.querySelector("li[data-active=true]");if(l===null){l=c.querySelector("li[data-id]");const u=l.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=c=>{const l=c.currentTarget;n(l.dataset.id||"")},s=c=>{if(r.current===null)return;const l=c.key;if($e.keyof(ix,l)){const u=ix[l],d=u(c,r.current);if(d===null)return;n(d)}};return b.jsx(rx.Provider,{value:t,children:b.jsx(pd,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:b.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[b.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),b.jsx("nav",{className:"min-w-0",children:b.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(c=>{const l=c.props,u=t===l.id;return b.jsx("li",{"data-id":l.id,"data-active":u,"aria-disabled":l.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",l.disabled?"aria-disabled:text-disabled":""),children:b.jsx(on,{as:"button",type:"button","data-id":l.id,"aria-current":"page",disabled:l.disabled,onClick:l.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:l.title})},`tab-header-${l.id}`)})})})]}),children:e.children})})},AD=()=>E.useContext(rx),_D=e=>{const t=AD();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},Cs=e=>b.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[b.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),b.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Cs.Icon=function(t){return b.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Cs.Body=function(t){return b.jsx(on,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Cs.Right=function(t){return b.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:b.jsx(on,{...t,type:"button"})})};const ID=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ks(){return typeof window<"u"}function ar(e){return ax(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(ax(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ax(e){return ks()?e instanceof Node||e instanceof Ht(e).Node:!1}function nt(e){return ks()?e instanceof Element||e instanceof Ht(e).Element:!1}function Ct(e){return ks()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function Cd(e){return!ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function OD(e){return["table","td","th"].includes(ar(e))}function Ps(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function kd(e){const t=Pd(),n=nt(e)?Qt(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 MD(e){let t=Yn(e);for(;Ct(t)&&!sr(t);){if(kd(t))return t;if(Ps(t))return null;t=Yn(t)}return null}function Pd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sr(e){return["html","body","#document"].includes(ar(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function As(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cd(e)&&e.host||Kn(e);return Cd(t)?t.host:t}function sx(e){const t=Yn(e);return sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ct(t)&&Ji(t)?t:sx(t)}function lr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Ad(a);return t.concat(a,a.visualViewport||[],Ji(o)?o:[],s&&n?lr(s):[])}return t.concat(o,lr(o,[],n))}function Ad(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 xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Cd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _d(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function lx(){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 cx(e){return e.mozInputSource===0&&e.isTrusted?!0:Md()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Id(e){return DD()?!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 Od(){return/apple/i.test(navigator.vendor)}function Md(){const e=/android/i;return e.test(_d())||e.test(lx())}function ux(){return _d().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function DD(){return lx().includes("jsdom/")}function zo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ND(e){return"nativeEvent"in e}function FD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function Dd(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 Mn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const LD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Nd(e){return Ct(e)&&e.matches(LD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function dx(e){return e?e.getAttribute("role")==="combobox"&&Nd(e):!1}const Dn=Math.min,Jt=Math.max,_s=Math.round,Ro=Math.floor,cr=e=>({x:e,y:e}),VD={left:"right",right:"left",bottom:"top",top:"bottom"},jD={start:"end",end:"start"};function Fd(e,t,n){return Jt(e,Dn(t,n))}function Bo(e,t){return typeof e=="function"?e(t):e}function ur(e){return e.split("-")[0]}function Ho(e){return e.split("-")[1]}function fx(e){return e==="x"?"y":"x"}function Ld(e){return e==="y"?"height":"width"}function Kr(e){return["top","bottom"].includes(ur(e))?"y":"x"}function Vd(e){return fx(Kr(e))}function $D(e,t,n){n===void 0&&(n=!1);const r=Ho(e),o=Vd(e),i=Ld(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Is(a)),[a,Is(a)]}function zD(e){const t=Is(e);return[jd(e),t,jd(t)]}function jd(e){return e.replace(/start|end/g,t=>jD[t])}function RD(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 BD(e,t,n,r){const o=Ho(e);let i=RD(ur(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(jd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>VD[t])}function HD(e){return{top:0,right:0,bottom:0,left:0,...e}}function px(e){return typeof e!="number"?HD(e):{top:e,right:e,bottom:e,left:e}}function Os(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}}/*!
|
|
184
|
+
*/var ub;function aM(){return ub||(ub=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=lb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;id.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function y(T){if(!v){if(v=!0,x=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(x,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(x=T,C):(x=T,S=k)}var v=!1,x,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),id}var db;function sM(){return db||(db=1,process.env.NODE_ENV==="production"?hs.exports=iM():hs.exports=aM()),hs.exports}sM();var Fo=function(){return Fo=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},Fo.apply(this,arguments)};function Xi(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 fb(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Lo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},lM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},cM=function(e){return Object.entries(e)},pb=function(e){return e instanceof Promise},hb=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)},Fo(Fo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},uM=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,fb([],Xi(a),!1)),u=function(d,p){return n(function(f){return hb(d,f,i,p)})};return pb(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))}},dM=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,fb([],Xi(a),!1)),c=function(u){return n(function(d){return hb(u,d,i,o.current)})};return pb(l)?l.then(function(u){return c(u)}):c(l)}},ad=function(e,t,n){var r,o,i,a=Xi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Lo(s),u=Lo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Lo(t),p=Lo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Lo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=lM(s),h=Lo(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var v=Xi(E.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return cM(w).reduce(function(T,C){var k,I=Xi(C,2),_=I[0],M=I[1];return Fo(Fo({},T),(k={},k[_]=n!=null&&n.debug?uM(_,M,l,S,y,f.current):dM(_,M,l,S,y,f.current),k))},{})}),1),x=v[0];return[s,x,u.current]};const fM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function pM(e,t){return E.useRef(fM(e,t)).current}const gs={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>)`},Hr=(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(Hr(a,t,n,s))},[]),mb=(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]:mb(a,t,n,s)}},{}),gb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},vs=(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)},hM={default:e=>vs(e,{result:gb.default}),dark:e=>vs(e,{result:gb.dark})},Qi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},mM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),sd=(e,t)=>{const n=Hr(e.colors,Qi(t==null?void 0:t.colors)),r=Hr(e.spacing,Qi(t==null?void 0:t.spacing)),o=Hr(e.rounded,Qi(t==null?void 0:t.rounded)),i=Hr(e.zIndex,Qi((t==null?void 0:t.zIndex)??mM)),a=e.custom?Hr(e.custom,Qi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},gM=(e,t)=>vs(sd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),vM=(e,t)=>sd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),yM=(e,t)=>vs(sd(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ys={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=>b.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"},bs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},Vo=E.createContext({tweaks:bs,parser:gs.hsla,map:ys,locale:void 0}),ld=e=>{const t=E.useContext(Vo);if(e)return e;if(t)return t.locale||e};function bM(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 Pt=()=>{const e=E.useContext(Vo);return e?e.map:ys},cn=(e,t=2)=>e.toString(16).padStart(t,"0"),jo=()=>{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,`${cn(t,4)+cn(n,3)}-${cn(r[0])+cn(r[1])}-${cn(r[2])+cn(r[3])}-${cn(r[4])+cn(r[5])}-${cn(r[6])+cn(r[7])+cn(r[8])+cn(r[9])}`},vb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),yb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},cd=(e,t)=>{const n=vb(t,yb.basic,e)||vb(t,yb.extend,e);return n===void 0||n===e?void 0:n},Wr=()=>typeof window>"u",ud=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bb=(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},xM=e=>!e,dd=()=>{},xb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},wM={type:"spring",bounce:.3,duration:.6},wb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Sb={enter:wb(1),exit:wb(-1),middle:{x:"0%",opacity:1}},Tb={exit:{visibility:"hidden"}},SM=e=>{const t=An(My(e));return Oy({start:t,end:Oo(t,{days:41})})},Eb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=My(new Date(1970,o,1).setMonth(o)),a=Eb(i,n);return b.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),fd={ArrowLeft:(e,t)=>t==="days"?Ki(e,{days:1}):Ki(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Oo(e,{days:1}):Oo(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ki(e,{weeks:1}):Ki(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Oo(e,{weeks:1}):Oo(e,{years:1})},Cb=(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)},qr=e=>e.getFullYear().toString().padStart(4,"0"),EM=(e,t,n)=>e===void 0||n===void 0?!1:VI(t,e)&&jI(t,n),CM=e=>{var n;const t=Pt();return b.jsx(ft.tbody,{layout:!0,variants:Sb,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=$e.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 b.jsx("tr",{className:i,children:r.map(c=>{var y,v,x,S,w,T,C,k,I,_,M,L,$,A,N,O,V,F;const u=c.toISOString(),d=e.rangeMode?u===((v=(y=e.range)==null?void 0:y.to)==null?void 0:v.toISOString())||u===((S=(x=e.range)==null?void 0:x.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=LO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,m=FO(c,e.stateDate),g=!m||f,h=e.rangeMode?EM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return b.jsxs("td",{align:"center",className:Oe("relative",$e.function((I=e.styles)==null?void 0:I.dayFrame)?(_=e.styles)==null?void 0:_.dayFrame(c):(M=e.styles)==null?void 0:M.dayFrame),children:[b.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",$e.function((L=e.styles)==null?void 0:L.day)?($=e.styles)==null?void 0:$.day(c):(A=e.styles)==null?void 0:A.day),children:[c.getDate(),d&&((N=e.stateRange.from)==null?void 0:N.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?b.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:b.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?b.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},kM=()=>Do(new Date),kb=({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(jo()),m=Pt(),g=ld(o),h=E.useRef(null),{date:y,range:v}=p,x=y||new Date,S=E.useRef(null),[w,T]=ad({date:x,isAnimating:!1,year:qr(x),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:TM(f.current,x,g),selectMode:l?"from":void 0,week:Oy({start:An(x),end:W_(x)})},A=>({onChangeYear:N=>({year:N}),onExitComplete:()=>(Cb(S.current||null,h,A.state().date,200),S.current=null,{isAnimating:!1}),date:N=>{const O=N(A.state().date);return{date:O,year:qr(O)}},nextMonth:N=>{N&&(S.current=N.currentTarget);const O=A.state();if(O.isAnimating)return O;const V=Oo(O.date,{months:1});return{date:V,isAnimating:!0,direction:1,year:qr(V)}},previousMonth:N=>{N&&(S.current=N.currentTarget);const O=A.state();if(O.isAnimating)return O;const V=Ki(O.date,{months:1});return{date:V,isAnimating:!0,direction:-1,year:qr(V)}},onSelectDate:N=>{const O=A.state(),V=N.currentTarget.dataset.range==="true",F=N.currentTarget.dataset.date||"",B=new Date(F);return{date:B,year:qr(B),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:V?{from:O.selectMode==="from"?B:O.range.from,to:O.selectMode==="to"?B:O.range.to}:O.range}},onChangeMonth:N=>{const O=N.target.value,F=Array.from(N.target.options).find(D=>D.value===O),B=A.state();if(F){const D=F.dataset.index||"",R=new Date(A.state().date);return R.setMonth(+D),{...B,date:R,year:qr(R)}}return B},onKeyDown:N=>{const O=N.key,V=A.state();if(O in fd){(O==="ArrowUp"||O==="ArrowDown")&&N.preventDefault();const F=A.state().date,B=$e.keyof(fd,O)?fd[O](F,N.shiftKey?"month":"days"):null;if(B!==null)return Cb(N.target,h,B),{...V,date:B,year:qr(B)}}return A.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(A,N,O)=>{var F,B;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((B=(F=O.props).onChangeMonth)==null||B.call(F,A.date)),A},(A,N,O)=>{var F,B;return O.method==="onChangeYear"&&((B=(F=O.props).onChangeYear)==null||B.call(F,A.date)),A},(A,N,O)=>{const V=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return l&&V&&t?(c==null||c(A.range),A):(V&&t&&(c==null||c(A.date)),A)}]}),C=SM(w.date),k=bb(C,7),I=w.date.toISOString(),_=Eb(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const M=pM(A=>T.date(N=>jO(new Date(N),+A)),1200),L=A=>{const N=A.currentTarget.value;T.onChangeYear(N),s==null||s(new Date(N)),M(N)},$=bM((A,N)=>(A.preventDefault(),N==="right"?T.previousMonth():T.nextMonth()),10);return b.jsx(bE,{transition:wM,children:b.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Oe("relative overflow-hidden",$e.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[b.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:b.jsx(tr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:b.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[b.jsxs("header",{className:"relative flex justify-between",children:[b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Tb,onClick:T.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(y_,{className:"h-4 w-4"})}),b.jsx(ft.span,{layout:!0,variants:Sb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:b.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[b.jsx("select",{value:_,onChange:T.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),b.jsx(ob,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:L,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),b.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:Tb,onClick:T.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:b.jsx(Wu,{className:"h-4 w-4"})}),b.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%)"}})]}),b.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[b.jsx("thead",{children:b.jsx("tr",{children:w.week.map(A=>b.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",$e.function(u==null?void 0:u.weekDay)?u.weekDay(A):u==null?void 0:u.weekDay),children:A.toLocaleDateString(g,{weekday:"short"})},A.toString()))})}),b.jsx(CM,{zip:k,range:v,styles:u,date:y||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})]})]},_)})}),b.jsx("footer",{className:"mt-2 text-center text-primary",children:b.jsx("button",{type:"button",onClick:()=>T.date(kM),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},pd=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>b.jsxs(on,{...s,as:r,"data-component":"card",className:Oe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?b.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,b.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-4 lg:px-8",a),children:e})]});pd.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return b.jsxs(i,{...o,title:$e.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[b.jsx(a,{className:"font-semibold",children:o.title}),r?b.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 Pb=e=>{const t=e.Icon??wy,n=Pt();return b.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[b.jsx(t,{size:64,className:"text-disabled"}),b.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Xt(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 Ab(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _b(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ab(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():Ab(e[o],null)}}}}function Ur(...e){return P.useCallback(_b(...e),e)}function Ib(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,h=P.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,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,m=P.useContext(f);if(m)return m;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=>P.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,PM(o,...t)]}function PM(...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 P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $o=P.forwardRef((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),i=o.find(_M);if(i){const a=i.props.children,s=o.map(l=>l===i?P.Children.count(a)>1?P.Children.only(null):P.isValidElement(a)?a.props.children:null:l);return b.jsx(hd,{...r,ref:t,children:P.isValidElement(a)?P.cloneElement(a,void 0,s):null})}return b.jsx(hd,{...r,ref:t,children:n})});$o.displayName="Slot";var hd=P.forwardRef((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const o=OM(n),i=IM(r,n.props);return n.type!==P.Fragment&&(i.ref=t?_b(t,o):o),P.cloneElement(n,i)}return P.Children.count(n)>1?P.Children.only(null):null});hd.displayName="SlotClone";var AM=({children:e})=>b.jsx(b.Fragment,{children:e});function _M(e){return P.isValidElement(e)&&e.type===AM}function IM(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 OM(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 MM(e){const t=e+"CollectionProvider",[n,r]=Ib(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),y=E.useRef(new Map).current;return b.jsx(o,{scope:m,itemMap:y,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,y=i(s,g),v=Ur(m,y.collectionRef);return b.jsx($o,{ref:v,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...y}=f,v=E.useRef(null),x=Ur(m,v),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(v,{ref:v,...y}),()=>void S.itemMap.delete(v))),b.jsx($o,{[u]:"",ref:x,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const y=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((S,w)=>y.indexOf(S.ref.current)-y.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var DM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],On=DM.reduce((e,t)=>{const n=P.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?$o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ob(e,t){e&&Oa.flushSync(()=>e.dispatchEvent(t))}function Un(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function NM(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e);P.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 FM="DismissableLayer",md="dismissableLayer.update",LM="dismissableLayer.pointerDownOutside",VM="dismissableLayer.focusOutside",Mb,Db=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nb=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=P.useContext(Db),[u,d]=P.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=P.useState({}),m=Ur(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(h),v=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,w=$M(C=>{const k=C.target,I=[...c.branches].some(_=>_.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=zM(C=>{const k=C.target;[...c.branches].some(_=>_.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return NM(C=>{v===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Mb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Lb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Mb)}},[u,p,n,c]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Lb())},[u,c]),P.useEffect(()=>{const C=()=>f({});return document.addEventListener(md,C),()=>document.removeEventListener(md,C)},[]),b.jsx(On.div,{...l,ref:m,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});Nb.displayName=FM;var jM="DismissableLayerBranch",Fb=P.forwardRef((e,t)=>{const n=P.useContext(Db),r=P.useRef(null),o=Ur(t,r);return P.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(On.div,{...e,ref:o})});Fb.displayName=jM;function $M(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Vb(LM,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 zM(e,t=globalThis==null?void 0:globalThis.document){const n=Un(e),r=P.useRef(!1);return P.useEffect(()=>{const o=i=>{i.target&&!r.current&&Vb(VM,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 Lb(){const e=new CustomEvent(md);document.dispatchEvent(e)}function Vb(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?Ob(o,i):o.dispatchEvent(i)}var RM=Nb,BM=Fb,xs=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},HM="Portal",jb=P.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=P.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(b.jsx(On.div,{...r,ref:t}),a):null});jb.displayName=HM;function WM(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var $b=e=>{const{present:t,children:n}=e,r=qM(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),i=Ur(r.ref,UM(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:i}):null};$b.displayName="Presence";function qM(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[s,l]=WM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=ws(r.current);i.current=s==="mounted"?c:"none"},[s]),xs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ws(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]),xs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ws(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=ws(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:P.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function UM(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 KM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=YM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Un(n),l=P.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 YM({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=Un(t);return P.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var GM="VisuallyHidden",gd=P.forwardRef((e,t)=>b.jsx(On.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}}));gd.displayName=GM;var vd="ToastProvider",[yd,ZM,XM]=MM("Toast"),[zb,CR]=Ib("Toast",[XM]),[QM,Ss]=zb(vd),Rb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=P.useState(null),[c,u]=P.useState(0),d=P.useRef(!1),p=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${vd}\`. Expected non-empty \`string\`.`),b.jsx(yd.Provider,{scope:t,children:b.jsx(QM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:P.useCallback(()=>u(f=>f+1),[]),onToastRemove:P.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Rb.displayName=vd;var Bb="ToastViewport",JM=["F8"],bd="toast.viewportPause",xd="toast.viewportResume",Hb=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=JM,label:o="Notifications ({hotkey})",...i}=e,a=Ss(Bb,n),s=ZM(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=Ur(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;P.useEffect(()=>{const h=y=>{var x;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),P.useEffect(()=>{const h=l.current,y=d.current;if(m&&h&&y){const v=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(bd);y.dispatchEvent(T),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(xd);y.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!h.contains(T.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",v),h.addEventListener("focusout",S),h.addEventListener("pointermove",v),h.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",v),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",v),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=P.useCallback(({tabbingDirection:h})=>{const v=s().map(x=>{const S=x.ref.current,w=[S,...pD(S)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?v.reverse():v).flat()},[s]);return P.useEffect(()=>{const h=d.current;if(h){const y=v=>{var w,T,C;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const k=document.activeElement,I=v.shiftKey;if(v.target===h&&I){(w=c.current)==null||w.focus();return}const L=g({tabbingDirection:I?"backwards":"forwards"}),$=L.findIndex(A=>A===k);Td(L.slice($+1))?v.preventDefault():I?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[s,g]),b.jsxs(BM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&b.jsx(wd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Td(h)}}),b.jsx(yd.Slot,{scope:n,children:b.jsx(On.ol,{tabIndex:-1,...i,ref:p})}),m&&b.jsx(wd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Td(h)}})]})});Hb.displayName=Bb;var Wb="ToastFocusProxy",wd=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss(Wb,n);return b.jsx(gd,{"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()}})});wd.displayName=Wb;var Ts="Toast",eD="toast.swipeStart",tD="toast.swipeMove",nD="toast.swipeCancel",rD="toast.swipeEnd",qb=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=KM({prop:r,defaultProp:o,onChange:i});return b.jsx($b,{present:n||s,children:b.jsx(aD,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Un(e.onPause),onResume:Un(e.onResume),onSwipeStart:Xt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xt(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:Xt(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:Xt(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)})})})});qb.displayName=Ts;var[oD,iD]=zb(Ts,{onClose(){}}),aD=P.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,...m}=e,g=Ss(Ts,n),[h,y]=P.useState(null),v=Ur(t,A=>y(A)),x=P.useRef(null),S=P.useRef(null),w=o||g.duration,T=P.useRef(0),C=P.useRef(w),k=P.useRef(0),{onToastAdd:I,onToastRemove:_}=g,M=Un(()=>{var N;(h==null?void 0:h.contains(document.activeElement))&&((N=g.viewport)==null||N.focus()),a()}),L=P.useCallback(A=>{!A||A===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(M,A))},[M]);P.useEffect(()=>{const A=g.viewport;if(A){const N=()=>{L(C.current),c==null||c()},O=()=>{const V=new Date().getTime()-T.current;C.current=C.current-V,window.clearTimeout(k.current),l==null||l()};return A.addEventListener(bd,O),A.addEventListener(xd,N),()=>{A.removeEventListener(bd,O),A.removeEventListener(xd,N)}}},[g.viewport,w,l,c,L]),P.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(w)},[i,w,g.isClosePausedRef,L]),P.useEffect(()=>(I(),()=>_()),[I,_]);const $=P.useMemo(()=>h?Xb(h):null,[h]);return g.viewport?b.jsxs(b.Fragment,{children:[$&&b.jsx(sD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),b.jsx(oD,{scope:n,onClose:M,children:Oa.createPortal(b.jsx(yd.ItemSlot,{scope:n,children:b.jsx(RM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(On.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:Xt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Xt(e.onPointerMove,A=>{if(!x.current)return;const N=A.clientX-x.current.x,O=A.clientY-x.current.y,V=!!S.current,F=["left","right"].includes(g.swipeDirection),B=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=F?B(0,N):0,R=F?0:B(0,O),Q=A.pointerType==="touch"?10:2,X={x:D,y:R},J={originalEvent:A,delta:X};V?(S.current=X,Es(tD,d,J,{discrete:!1})):Qb(X,g.swipeDirection,Q)?(S.current=X,Es(eD,u,J,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(N)>Q||Math.abs(O)>Q)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,A=>{const N=S.current,O=A.target;if(O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),S.current=null,x.current=null,N){const V=A.currentTarget,F={originalEvent:A,delta:N};Qb(N,g.swipeDirection,g.swipeThreshold)?Es(rD,f,F,{discrete:!0}):Es(nD,p,F,{discrete:!0}),V.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),sD=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ts,t),[i,a]=P.useState(!1),[s,l]=P.useState(!1);return dD(()=>a(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(jb,{asChild:!0,children:b.jsx(gd,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},lD="ToastTitle",Ub=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(On.div,{...r,ref:t})});Ub.displayName=lD;var cD="ToastDescription",Kb=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(On.div,{...r,ref:t})});Kb.displayName=cD;var Yb="ToastAction",uD=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(Zb,{altText:n,asChild:!0,children:b.jsx(Sd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yb}\`. Expected non-empty \`string\`.`),null)});uD.displayName=Yb;var Gb="ToastClose",Sd=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=iD(Gb,n);return b.jsx(Zb,{asChild:!0,children:b.jsx(On.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});Sd.displayName=Gb;var Zb=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(On.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Xb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),fD(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(...Xb(r))}}),t}function Es(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?Ob(o,i):o.dispatchEvent(i)}var Qb=(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 dD(e=()=>{}){const t=Un(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function fD(e){return e.nodeType===e.ELEMENT_NODE}function pD(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 Td(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var hD=Rb,mD=Hb,gD=qb,vD=Ub,yD=Kb,bD=Sd;const xD=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},wD=fo("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"}}),Jb=E.createContext(()=>{throw new Error("Not implemented")}),SD=()=>E.useContext(Jb),ex={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]}},TD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=wD({theme:t.theme||"default"});return b.jsx(gD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:b.jsx(ft.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:ex[t.reversedIndex]||ex.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:b.jsxs("div",{className:a,children:[b.jsxs("div",{className:"flex flex-col p-4",children:[t.title?b.jsx(vD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,b.jsx(yD,{className:"select-text truncate",children:t.text})]}),r?b.jsx(bD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:b.jsx(os,{className:"h-5 w-5"})}):null]})})})});function ED({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=xD(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 m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return b.jsxs(hD,{duration:n,swipeThreshold:150,children:[b.jsx(Jb.Provider,{value:l,children:e}),b.jsx(tr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(TD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),b.jsx(mD,{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 CD=e=>b.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[b.jsxs("header",{className:"flex items-start gap-4 p-6",children:[b.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:b.jsx("div",{children:b.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("header",{children:b.jsx("h3",{className:"text-base leading-none",children:e.title})}),b.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?b.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),tx=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},nx={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},rx=E.createContext(""),kD=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Ed=(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(!kD(a))return a}return n==="backward"?Ed(e,e.length-1,"backward"):Ed(e,-1,"forward")},ox=(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=Ed(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},ix={[nx.ArrowLeft]:(e,t)=>ox(t,"backward"),[nx.ArrowRight]:(e,t)=>ox(t,"forward")},PD=e=>{const[t,n]=tx(e.active),r=E.useRef(null),o=Dr(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($e.keyof(ix,c)){const u=ix[c],d=u(l,r.current);if(d===null)return;n(d)}};return b.jsx(rx.Provider,{value:t,children:b.jsx(pd,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:b.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[b.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),b.jsx("nav",{className:"min-w-0",children:b.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 b.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:b.jsx(on,{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})})},AD=()=>E.useContext(rx),_D=e=>{const t=AD();return b.jsx(E.Fragment,{children:e.id===t?e.children:null})},Cs=e=>b.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[b.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),b.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Cs.Icon=function(t){return b.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Cs.Body=function(t){return b.jsx(on,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Cs.Right=function(t){return b.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:b.jsx(on,{...t,type:"button"})})};const ID=e=>b.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ks(){return typeof window<"u"}function ar(e){return ax(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(ax(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ax(e){return ks()?e instanceof Node||e instanceof Ht(e).Node:!1}function nt(e){return ks()?e instanceof Element||e instanceof Ht(e).Element:!1}function Ct(e){return ks()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function Cd(e){return!ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function OD(e){return["table","td","th"].includes(ar(e))}function Ps(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function kd(e){const t=Pd(),n=nt(e)?Qt(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 MD(e){let t=Yn(e);for(;Ct(t)&&!sr(t);){if(kd(t))return t;if(Ps(t))return null;t=Yn(t)}return null}function Pd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sr(e){return["html","body","#document"].includes(ar(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function As(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cd(e)&&e.host||Kn(e);return Cd(t)?t.host:t}function sx(e){const t=Yn(e);return sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ct(t)&&Ji(t)?t:sx(t)}function lr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Ad(a);return t.concat(a,a.visualViewport||[],Ji(o)?o:[],s&&n?lr(s):[])}return t.concat(o,lr(o,[],n))}function Ad(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 xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Cd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _d(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function lx(){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 cx(e){return e.mozInputSource===0&&e.isTrusted?!0:Md()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Id(e){return DD()?!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 Od(){return/apple/i.test(navigator.vendor)}function Md(){const e=/android/i;return e.test(_d())||e.test(lx())}function ux(){return _d().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function DD(){return lx().includes("jsdom/")}function zo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ND(e){return"nativeEvent"in e}function FD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function Dd(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 Mn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const LD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Nd(e){return Ct(e)&&e.matches(LD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function dx(e){return e?e.getAttribute("role")==="combobox"&&Nd(e):!1}const Dn=Math.min,Jt=Math.max,_s=Math.round,Ro=Math.floor,cr=e=>({x:e,y:e}),VD={left:"right",right:"left",bottom:"top",top:"bottom"},jD={start:"end",end:"start"};function Fd(e,t,n){return Jt(e,Dn(t,n))}function Bo(e,t){return typeof e=="function"?e(t):e}function ur(e){return e.split("-")[0]}function Ho(e){return e.split("-")[1]}function fx(e){return e==="x"?"y":"x"}function Ld(e){return e==="y"?"height":"width"}function Kr(e){return["top","bottom"].includes(ur(e))?"y":"x"}function Vd(e){return fx(Kr(e))}function $D(e,t,n){n===void 0&&(n=!1);const r=Ho(e),o=Vd(e),i=Ld(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Is(a)),[a,Is(a)]}function zD(e){const t=Is(e);return[jd(e),t,jd(t)]}function jd(e){return e.replace(/start|end/g,t=>jD[t])}function RD(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 BD(e,t,n,r){const o=Ho(e);let i=RD(ur(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(jd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>VD[t])}function HD(e){return{top:0,right:0,bottom:0,left:0,...e}}function px(e){return typeof e!="number"?HD(e):{top:e,right:e,bottom:e,left:e}}function Os(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}}/*!
|
|
185
185
|
* tabbable 6.2.0
|
|
186
186
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
187
|
-
*/var WD=["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])"],Ms=WD.join(","),hx=typeof Element>"u",Wo=hx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ds=!hx&&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},Ns=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},qD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},UD=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&Wo.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},KD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ns(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=Wo.call(a,Ms);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ns(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},mx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},gx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qD(t))&&!mx(t)?0:t.tabIndex},YD=function(t,n){var r=gx(t);return r<0&&n&&!mx(t)?0:r},GD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},vx=function(t){return t.tagName==="INPUT"},ZD=function(t){return vx(t)&&t.type==="hidden"},XD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JD=function(t){if(!t.name)return!0;var n=t.form||Ds(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=QD(o,t.form);return!i||i===t},eN=function(t){return vx(t)&&t.type==="radio"},tN=function(t){return eN(t)&&!JD(t)},nN=function(t){var n,r=t&&Ds(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,d;r=Ds(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},yx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rN=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=Ds(t);if(c&&!c.shadowRoot&&o(c)===!0)return yx(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(nN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yx(t);return!1},oN=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 Wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},iN=function(t,n){return!(n.disabled||Ns(n)||ZD(n)||rN(n,t)||XD(n)||oN(n))},$d=function(t,n){return!(tN(n)||gx(n)<0||!iN(t,n))},aN=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sN=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=YD(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(GD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ea=function(t,n){n=n||{};var r;return n.getShadowRoot?r=KD([t],n.includeContainer,{filter:$d.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:aN}):r=UD(t,n.includeContainer,$d.bind(null,n)),sN(r)},lN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wo.call(t,Ms)===!1?!1:$d(n,t)};function bx(e,t,n){let{reference:r,floating:o}=e;const i=Kr(t),a=Vd(t),s=Ld(a),c=ur(t),l=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(c){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(Ho(t)){case"start":f[a]-=p*(n&&l?-1:1);break;case"end":f[a]+=p*(n&&l?-1:1);break}return f}const cN=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=bx(l,r,c),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x:v,y:x,data:T,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});u=v??u,d=x??d,f={...f,[h]:{...f[h],...T}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(l=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=bx(l,p,c)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function zd(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Bo(t,e),m=px(f),h=s[p?d==="floating"?"reference":"floating":d],y=Os(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),v=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:c}):v);return{top:(y.top-w.top+m.top)/T.y,bottom:(w.bottom-y.bottom+m.bottom)/T.y,left:(y.left-w.left+m.left)/T.x,right:(w.right-y.right+m.right)/T.x}}const uN=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Bo(e,t)||{};if(l==null)return{};const d=px(u),p={x:n,y:r},f=Vd(o),m=Ld(f),g=await a.getDimensions(l),h=f==="y",y=h?"top":"left",v=h?"bottom":"right",x=h?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let C=S?S[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[x]||i.floating[m]);const k=T/2-w/2,I=C/2-g[m]/2-1,_=Dn(d[y],I),M=Dn(d[v],I),L=_,$=C-g[m]-M,A=C/2-g[m]/2+k,N=Fd(L,A,$),O=!c.arrow&&Ho(o)!=null&&A!==N&&i.reference[m]/2-(A<L?_:M)-g[m]/2<0,V=O?A<L?A-L:A-$:0;return{[f]:p[f]+V,data:{[f]:N,centerOffset:A-N-V,...O&&{alignmentOffset:V}},reset:O}}}),dN=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:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=Bo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ur(o),v=Kr(s),x=ur(s)===s,T=await(c.isRTL==null?void 0:c.isRTL(l.floating)),w=p||(x||!g?[Is(s)]:zD(s)),S=m!=="none";!p&&S&&w.push(...BD(s,g,m,T));const C=[s,...w],k=await zd(t,h),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const A=$D(o,a,T);I.push(k[A[0]],k[A[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(A=>A<=0)){var M,L;const A=(((M=i.flip)==null?void 0:M.index)||0)+1,N=C[A];if(N)return{data:{index:A,overflows:_},reset:{placement:N}};let O=(L=_.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!O)switch(f){case"bestFit":{var $;const V=($=_.filter(F=>{if(S){const B=Kr(F.placement);return B===v||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,D)=>B+D,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:$[0];V&&(O=V);break}case"initialPlacement":O=s;break}if(o!==O)return{reset:{placement:O}}}return{}}}};async function fN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ur(n),s=Ho(n),c=Kr(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=Bo(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),c?{x:f*u,y:p*l}:{x:p*l,y:f*u}}const pN=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,c=await fN(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},hN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:v}=h;return{x:y,y:v}}},...c}=Bo(e,t),l={x:n,y:r},u=await zd(t,c),d=Kr(ur(o)),p=fx(d);let f=l[p],m=l[d];if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+u[h],x=f-u[y];f=Fd(v,f,x)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=m+u[h],x=m-u[y];m=Fd(v,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},mN=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}=Bo(e,t),c=await zd(t,s),l=ur(n),u=Ho(n),d=Kr(n)==="y",{width:p,height:f}=r.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=l,m=u==="end"?"top":"bottom");const h=f-c.top-c.bottom,y=p-c.left-c.right,v=Dn(f-c[m],h),x=Dn(p-c[g],y),T=!t.middlewareData.shift;let w=v,S=x;if(d?S=u||T?Dn(x,y):y:w=u||T?Dn(v,h):h,T&&!u){const k=Jt(c.left,0),I=Jt(c.right,0),_=Jt(c.top,0),M=Jt(c.bottom,0);d?S=p-2*(k!==0||I!==0?k+I:Jt(c.left,c.right)):w=f-2*(_!==0||M!==0?_+M:Jt(c.top,c.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function xx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ct(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_s(n)!==i||_s(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Rd(e){return nt(e)?e:e.contextElement}function qo(e){const t=Rd(e);if(!Ct(t))return cr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=xx(t);let a=(i?_s(n.width):n.width)/r,s=(i?_s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const gN=cr(0);function wx(e){const t=Ht(e);return!Pd()||!t.visualViewport?gN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Rd(e);let a=cr(1);t&&(r?nt(r)&&(a=qo(r)):a=qo(e));const s=vN(i,n,r)?wx(i):cr(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Ht(i),f=r&&nt(r)?Ht(r):r;let m=p,g=Ad(m);for(;g&&r&&f!==m;){const h=qo(g),y=g.getBoundingClientRect(),v=Qt(g),x=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*h.x,T=y.top+(g.clientTop+parseFloat(v.paddingTop))*h.y;c*=h.x,l*=h.y,u*=h.x,d*=h.y,c+=x,l+=T,m=Ht(g),g=Ad(m)}}return Os({width:u,height:d,x:c,y:l})}function yN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Kn(r),s=t?Ps(t.floating):!1;if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=cr(1);const u=cr(0),d=Ct(r);if((d||!d&&!i)&&((ar(r)!=="body"||Ji(a))&&(c=As(r)),Ct(r))){const p=Yr(r);l=qo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function bN(e){return Array.from(e.getClientRects())}function Sx(e){return Yr(Kn(e)).left+As(e).scrollLeft}function xN(e){const t=Kn(e),n=As(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function wN(e,t){const n=Ht(e),r=Kn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Pd();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function SN(e,t){const n=Yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ct(e)?qo(e):cr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function Tx(e,t,n){let r;if(t==="viewport")r=wN(e,n);else if(t==="document")r=xN(Kn(e));else if(nt(t))r=SN(t,n);else{const o=wx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Os(r)}function Ex(e,t){const n=Yn(e);return n===t||!nt(n)||sr(n)?!1:Qt(n).position==="fixed"||Ex(n,t)}function TN(e,t){const n=t.get(e);if(n)return n;let r=lr(e,[],!1).filter(s=>nt(s)&&ar(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Yn(e):e;for(;nt(a)&&!sr(a);){const s=Qt(a),c=kd(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ji(a)&&!c&&Ex(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function EN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ps(t)?[]:TN(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const d=Tx(t,u,o);return l.top=Jt(d.top,l.top),l.right=Dn(d.right,l.right),l.bottom=Dn(d.bottom,l.bottom),l.left=Jt(d.left,l.left),l},Tx(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function CN(e){const{width:t,height:n}=xx(e);return{width:t,height:n}}function kN(e,t,n){const r=Ct(t),o=Kn(t),i=n==="fixed",a=Yr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=cr(0);if(r||!r&&!i)if((ar(t)!=="body"||Ji(o))&&(s=As(t)),r){const d=Yr(t,!0,i,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else o&&(c.x=Sx(o));const l=a.left+s.scrollLeft-c.x,u=a.top+s.scrollTop-c.y;return{x:l,y:u,width:a.width,height:a.height}}function Bd(e){return Qt(e).position==="static"}function Cx(e,t){return!Ct(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function kx(e,t){const n=Ht(e);if(Ps(e))return n;if(!Ct(e)){let o=Yn(e);for(;o&&!sr(o);){if(nt(o)&&!Bd(o))return o;o=Yn(o)}return n}let r=Cx(e,t);for(;r&&OD(r)&&Bd(r);)r=Cx(r,t);return r&&sr(r)&&Bd(r)&&!kd(r)?n:r||MD(e)||n}const PN=async function(e){const t=this.getOffsetParent||kx,n=this.getDimensions,r=await n(e.floating);return{reference:kN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AN(e){return Qt(e).direction==="rtl"}const _N={convertOffsetParentRelativeRectToViewportRelativeRect:yN,getDocumentElement:Kn,getClippingRect:EN,getOffsetParent:kx,getElementRects:PN,getClientRects:bN,getDimensions:CN,getScale:qo,isElement:nt,isRTL:AN};function IN(e,t){let n=null,r;const o=Kn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=Ro(u),m=Ro(o.clientWidth-(l+d)),g=Ro(o.clientHeight-(u+p)),h=Ro(l),v={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Dn(1,c))||1};let x=!0;function T(w){const S=w[0].intersectionRatio;if(S!==c){if(!x)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(T,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,v)}n.observe(e)}return a(!0),i}function Uo(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:c=!1}=r,l=Rd(e),u=o||i?[...l?lr(l):[],...lr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=l&&s?IN(l,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let m,g=c?Yr(e):null;c&&h();function h(){const y=Yr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const ON=pN,MN=hN,DN=dN,NN=mN,Px=uN,FN=(e,t,n)=>{const r=new Map,o={platform:_N,...n},i={...o.platform,_c:r};return cN(e,t,{...o,platform:i})};var Fs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ls(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(!Ls(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)&&!Ls(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ax(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _x(e,t){const n=Ax(e);return Math.round(t*n)/n}function Hd(e){const t=P.useRef(e);return Fs(()=>{t.current=e}),t}function LN(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:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(r);Ls(p,r)||f(r);const[m,g]=P.useState(null),[h,y]=P.useState(null),v=P.useCallback(F=>{F!==S.current&&(S.current=F,g(F))},[]),x=P.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),T=i||m,w=a||h,S=P.useRef(null),C=P.useRef(null),k=P.useRef(u),I=c!=null,_=Hd(c),M=Hd(o),L=Hd(l),$=P.useCallback(()=>{if(!S.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};M.current&&(F.platform=M.current),FN(S.current,C.current,F).then(B=>{const D={...B,isPositioned:L.current!==!1};A.current&&!Ls(k.current,D)&&(k.current=D,Oa.flushSync(()=>{d(D)}))})},[p,t,n,M,L]);Fs(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[l]);const A=P.useRef(!1);Fs(()=>(A.current=!0,()=>{A.current=!1}),[]),Fs(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(_.current)return _.current(T,w,$);$()}},[T,w,$,_,I]);const N=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:x}),[v,x]),O=P.useMemo(()=>({reference:T,floating:w}),[T,w]),V=P.useMemo(()=>{const F={position:n,left:0,top:0};if(!O.floating)return F;const B=_x(O.floating,u.x),D=_x(O.floating,u.y);return s?{...F,transform:"translate("+B+"px, "+D+"px)",...Ax(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:D}},[n,s,O.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:N,elements:O,floatingStyles:V}),[u,$,N,O,V])}const VN=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?Px({element:r.current,padding:o}).fn(n):{}:r?Px({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...ON(e),options:[e,t]}),Wd=(e,t)=>({...MN(e),options:[e,t]}),qd=(e,t)=>({...DN(e),options:[e,t]}),Ix=(e,t)=>({...NN(e),options:[e,t]}),Ox=(e,t)=>({...VN(e),options:[e,t]}),Mx={...P},jN=Mx.useInsertionEffect||(e=>e());function At(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jN(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Ud="ArrowUp",na="ArrowDown",Ko="ArrowLeft",Yo="ArrowRight";function Vs(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Kd(e,t){return $t(e,{disabledIndices:t})}function Dx(e,t){return $t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $t(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&&js(a,s,o));return s}function $N(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,d=l;if(n.key===Ud){if(u&&Nt(n),l===-1)d=c;else if(d=$t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||d<0)){const p=l%i,f=c%i,m=c-(f-p);f===p?d=c:d=f>p?m:m-i}ra(e,d)&&(d=l)}if(n.key===na&&(u&&Nt(n),l===-1?d=s:(d=$t(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(d=$t(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=l)),r==="both"){const p=Ro(l/i);n.key===Yo&&(u&&Nt(n),l%i!==i-1?(d=$t(e,{startingIndex:l,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:l-l%i-1,disabledIndices:a})),Vs(d,i,p)&&(d=l)),n.key===Ko&&(u&&Nt(n),l%i!==0?(d=$t(e,{startingIndex:l,decrement:!0,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),Vs(d,i,p)&&(d=l));const f=Ro(c/i)===p;ra(e,d)&&(o&&f?d=n.key===Ko?c:$t(e,{startingIndex:l-l%i-1,disabledIndices:a}):d=l)}return d}function zN(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:c}=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 l=!1;for(n&&(o=0);!l;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<c;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),l=!0):o++}}),[...r]}function RN(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 BN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function js(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 Nx=0;function dr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Nx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Nx=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function HN(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 WN(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 Fx=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function qN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Map),a=P.useCallback(c=>{i(l=>new Map(l).set(c,null))},[]),s=P.useCallback(c=>{i(l=>{const u=new Map(l);return u.delete(c),u})},[]);return We(()=>{const c=new Map(o);Array.from(c.keys()).sort(HN).forEach((u,d)=>{c.set(u,d)}),WN(o,c)||i(c)},[o]),P.createElement(Fx.Provider,{value:P.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Lx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=P.useContext(Fx),[s,c]=P.useState(null),l=P.useRef(null),u=P.useCallback(d=>{if(l.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=l.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=l.current?o.get(l.current):null;d!=null&&c(d)},[o]),P.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Go(){return Go=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},Go.apply(this,arguments)}let Vx=!1,UN=0;const jx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+UN++;function KN(){const[e,t]=P.useState(()=>Vx?jx():void 0);return We(()=>{e==null&&t(jx())},[]),P.useEffect(()=>{Vx=!0},[]),e}const Zo=Mx.useId||KN;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function $s(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function YN(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const $x=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:c=0,strokeWidth:l=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Zo(),[y,v]=P.useState(!1);if(We(()=>{if(!o)return;Qt(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const x=l*2,T=x/2,w=a/2*(c/-8+1),S=s/2*c/4,[C,k]=r.split("-"),I=!!p,_=C==="top"||C==="bottom",M=u&&k==="end"?"bottom":"top";let L=u&&k==="end"?"right":"left";u&&y&&(L=k==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",N=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",O={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",Go({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[L]:$,[M]:A,[C]:_||I?"100%":"calc(100% - "+x/2+"px)",transform:""+O+(f??""),...m}}),x>0&&P.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:N}),P.createElement("path",{stroke:x&&!p?g.fill:"none",d:N}),P.createElement("clipPath",{id:h},P.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+x,height:a})))});function zx(){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 Rx=P.createContext(null),Bx=P.createContext(null),fr=()=>{var e;return((e=P.useContext(Rx))==null?void 0:e.id)||null},pr=()=>P.useContext(Bx);function GN(e){const t=Zo(),n=pr(),o=fr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function ZN(e){const{children:t,id:n}=e,r=fr();return P.createElement(Rx.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function XN(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(a=>{n.current=[...n.current,a]},[]),o=P.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=P.useState(()=>zx())[0];return P.createElement(Bx.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function hr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const Hx=hr("safe-polygon");function Yd(e,t,n){return n&&!zo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Wx(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=pr(),m=fr(),g=Ft(l),h=Ft(c),y=Ft(n),v=P.useRef(),x=P.useRef(-1),T=P.useRef(),w=P.useRef(-1),S=P.useRef(!0),C=P.useRef(!1),k=P.useRef(()=>{}),I=P.useCallback(()=>{var N;const O=(N=o.current.openEvent)==null?void 0:N.type;return(O==null?void 0:O.includes("mouse"))&&O!=="mousedown"},[o]);P.useEffect(()=>{if(!s)return;function N(O){let{open:V}=O;V||(clearTimeout(x.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[s,i]),P.useEffect(()=>{if(!s||!g.current||!n)return;function N(V){I()&&r(!1,V,"hover")}const O=Mt(a.floating).documentElement;return O.addEventListener("mouseleave",N),()=>{O.removeEventListener("mouseleave",N)}},[a.floating,n,r,s,g,I]);const _=P.useCallback(function(N,O,V){O===void 0&&(O=!0),V===void 0&&(V="hover");const F=Yd(h.current,"close",v.current);F&&!T.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,N,V),F)):O&&(clearTimeout(x.current),r(!1,N,V))},[h,r]),M=At(()=>{k.current(),T.current=void 0}),L=At(()=>{if(C.current){const N=Mt(a.floating).body;N.style.pointerEvents="",N.removeAttribute(Hx),C.current=!1}});P.useEffect(()=>{if(!s)return;function N(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function O(D){if(clearTimeout(x.current),S.current=!1,u&&!zo(v.current)||d>0&&!Yd(h.current,"open"))return;const z=Yd(h.current,"open",v.current);z?x.current=window.setTimeout(()=>{y.current||r(!0,D,"hover")},z):r(!0,D,"hover")}function V(D){if(N())return;k.current();const z=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),T.current=g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D,!0,"safe-polygon")}});const X=T.current;z.addEventListener("mousemove",X),k.current=()=>{z.removeEventListener("mousemove",X)};return}(v.current==="touch"?!xt(a.floating,D.relatedTarget):!0)&&_(D)}function F(D){N()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D)}})(D))}if(nt(a.domReference)){var B;const D=a.domReference;return n&&D.addEventListener("mouseleave",F),(B=a.floating)==null||B.addEventListener("mouseleave",F),p&&D.addEventListener("mousemove",O,{once:!0}),D.addEventListener("mouseenter",O),D.addEventListener("mouseleave",V),()=>{var z;n&&D.removeEventListener("mouseleave",F),(z=a.floating)==null||z.removeEventListener("mouseleave",F),p&&D.removeEventListener("mousemove",O),D.removeEventListener("mouseenter",O),D.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,_,M,L,r,n,y,f,h,g,o]),We(()=>{var N;if(s&&n&&(N=g.current)!=null&&N.__options.blockPointerEvents&&I()){const V=Mt(a.floating).body;V.setAttribute(Hx,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(nt(a.domReference)&&F){var O;const B=a.domReference,D=f==null||(O=f.nodesRef.current.find(z=>z.id===m))==null||(O=O.context)==null?void 0:O.elements.floating;return D&&(D.style.pointerEvents=""),B.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{B.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),We(()=>{n||(v.current=void 0,M(),L())},[n,M,L]),P.useEffect(()=>()=>{M(),clearTimeout(x.current),clearTimeout(w.current),L()},[s,a.domReference,M,L]);const $=P.useMemo(()=>{function N(O){v.current=O.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(O){const{nativeEvent:V}=O;function F(){!S.current&&!y.current&&r(!0,V,"hover")}u&&!zo(v.current)||n||d===0||(clearTimeout(w.current),v.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,y,d]),A=P.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(N){_(N.nativeEvent,!1)}}),[_]);return P.useMemo(()=>s?{reference:$,floating:A}:{},[s,$,A])}function QN(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 Gr(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 JN(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Gr(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Xo=new WeakMap,zs=new WeakSet,Rs={},Gd=0;const e2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qx=e=>e&&(e.host||qx(e.parentNode)),t2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function n2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=t2(t,e),s=new Set,c=new Set(a),l=[];Rs[o]||(Rs[o]=new WeakMap);const u=Rs[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||c.has(f)||[].forEach.call(f.children,m=>{if(ar(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",y=(Xo.get(m)||0)+1,v=(u.get(m)||0)+1;Xo.set(m,y),u.set(m,v),l.push(m),y===1&&h&&zs.add(m),v===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Gd++,()=>{l.forEach(f=>{const m=(Xo.get(f)||0)-1,g=(u.get(f)||0)-1;Xo.set(f,m),u.set(f,g),m||(!zs.has(f)&&i&&f.removeAttribute(i),zs.delete(f)),g||f.removeAttribute(o)}),Gd--,Gd||(Xo=new WeakMap,Xo=new WeakMap,zs=new WeakSet,Rs={})}}function Ux(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return n2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Kx(e,t){const n=ea(e,Qo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function Yx(){return Kx(document.body,"next")}function Gx(){return Kx(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function r2(e){ea(e,Qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function o2(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 i2(e,t,n){const r=e.indexOf(t);function o(a){const s=hr("focus-guard");let c=r+(a?1:0),l=e[c];for(;l&&(!l.isConnected||l.hasAttribute(s)||xt(n,l));)a?c++:c--,l=e[c];return l}const i=o(!0);return i||o(!1)}const Zd={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 a2;function Zx(e){e.key==="Tab"&&(e.target,clearTimeout(a2))}const Bs=P.forwardRef(function(t,n){const[r,o]=P.useState();We(()=>(Od()&&o("button"),document.addEventListener("keydown",Zx),()=>{document.removeEventListener("keydown",Zx)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[hr("focus-guard")]:"",style:Zd};return P.createElement("span",Go({},t,i))}),Xx=P.createContext(null),Qx=hr("portal");function s2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=Jx(),[i,a]=P.useState(null),s=P.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{if(!r||s.current)return;const c=t?document.getElementById(t):null;if(!c)return;const l=document.createElement("div");l.id=r,l.setAttribute(Qx,""),c.appendChild(l),s.current=l,a(l)},[t,r]),We(()=>{if(!r||s.current)return;let c=n||(o==null?void 0:o.portalNode);c&&!nt(c)&&(c=c.current),c=c||document.body;let l=null;t&&(l=document.createElement("div"),l.id=t,c.appendChild(l));const u=document.createElement("div");u.id=r,u.setAttribute(Qx,""),c=l||c,c.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Zr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=s2({id:n,root:r}),[a,s]=P.useState(null),c=P.useRef(null),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?o2:r2)(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]),P.createElement(Xx.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=Gx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:Zd}),i&&Oa.createPortal(t,i),p&&i&&P.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Yx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Jx=()=>P.useContext(Xx),l2=20;let Xr=[];function Xd(e){Xr=Xr.filter(n=>n.isConnected);let t=e;if(!(!t||ar(t)==="body")){if(!lN(t,Qo())){const n=ea(t,Qo())[0];n&&(t=n)}Xr.push(t),Xr.length>l2&&(Xr=Xr.slice(-20))}}function e0(){return Xr.slice().reverse().find(e=>e.isConnected)}const c2=P.forwardRef(function(t,n){return P.createElement("button",Go({},t,{type:"button",ref:n,tabIndex:-1,style:Zd}))});function Jo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:y,floatingId:v,elements:{domReference:x,floating:T}}=t,w=typeof a=="number"&&a<0,S=dx(x)&&w,C=e2()?i:!0,k=Ft(o),I=Ft(a),_=Ft(s),M=pr(),L=Jx(),$=P.useRef(null),A=P.useRef(null),N=P.useRef(!1),O=P.useRef(!1),V=P.useRef(-1),F=L!=null,B=T==null?void 0:T.firstElementChild,D=(B==null?void 0:B.id)===v?B:T,z=At(function(Z){return Z===void 0&&(Z=D),Z?ea(Z,Qo()):[]}),J=At(Z=>{const Y=z(Z);return k.current.map(G=>x&&G==="reference"?x:D&&G==="floating"?D:Y).filter(Boolean).flat()});P.useEffect(()=>{if(r||!l)return;function Z(G){if(G.key==="Tab"){xt(D,gn(Mt(D)))&&z().length===0&&!S&&Nt(G);const j=J(),R=Mn(G);k.current[0]==="reference"&&R===x&&(Nt(G),G.shiftKey?dr(j[j.length-1]):dr(j[1])),k.current[1]==="floating"&&R===D&&G.shiftKey&&(Nt(G),dr(j[0]))}}const Y=Mt(D);return Y.addEventListener("keydown",Z),()=>{Y.removeEventListener("keydown",Z)}},[r,x,D,l,k,S,z,J]),P.useEffect(()=>{if(r||!T)return;function Z(Y){const G=Mn(Y),R=z().indexOf(G);R!==-1&&(V.current=R)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,z]),P.useEffect(()=>{if(r||!d)return;function Z(){O.current=!0,setTimeout(()=>{O.current=!1})}function Y(G){const j=G.relatedTarget;queueMicrotask(()=>{const R=!(xt(x,j)||xt(T,j)||xt(j,T)||xt(L==null?void 0:L.portalNode,j)||j!=null&&j.hasAttribute(hr("focus-guard"))||M&&(Gr(M.nodesRef.current,m).find(K=>{var ae,H;return xt((ae=K.context)==null?void 0:ae.elements.floating,j)||xt((H=K.context)==null?void 0:H.elements.domReference,j)})||QN(M.nodesRef.current,m).find(K=>{var ae,H;return((ae=K.context)==null?void 0:ae.elements.floating)===j||((H=K.context)==null?void 0:H.elements.domReference)===j})));if(c&&R&&gn(Mt(D))===Mt(D).body){Ct(D)&&(D==null||D.focus());const K=V.current,ae=z(),H=ae[K]||ae[ae.length-1]||D;Ct(H)&&H.focus()}(S||!l)&&j&&R&&!O.current&&j!==e0()&&(N.current=!0,g(!1,G))})}if(T&&Ct(x))return x.addEventListener("focusout",Y),x.addEventListener("pointerdown",Z),T.addEventListener("focusout",Y),()=>{x.removeEventListener("focusout",Y),x.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",Y)}},[r,x,T,D,l,m,M,L,g,d,c,z,S]),P.useEffect(()=>{var Z;if(r)return;const Y=Array.from((L==null||(Z=L.portalNode)==null?void 0:Z.querySelectorAll("["+hr("portal")+"]"))||[]);if(T){const G=[T,...Y,$.current,A.current,k.current.includes("reference")||S?x:null].filter(R=>R!=null),j=l||S?Ux(G,C,!C):Ux(G);return()=>{j()}}},[r,x,T,l,k,L,S,C]),We(()=>{if(r||!Ct(D))return;const Z=Mt(D),Y=gn(Z);queueMicrotask(()=>{const G=J(D),j=I.current,R=(typeof j=="number"?G[j]:j.current)||D,K=xt(D,Y);!w&&!K&&p&&dr(R,{preventScroll:R===D})})},[r,p,D,w,J,I]),We(()=>{if(r||!D)return;let Z=!1;const Y=Mt(D),G=gn(Y);let R=y.current.openEvent;const K=f.domReference.current;Xd(G);function ae(H){let{open:be,reason:Ce,event:_e,nested:Re}=H;be&&(R=_e),Ce==="escape-key"&&f.domReference.current&&Xd(f.domReference.current),Ce==="hover"&&_e.type==="mouseleave"&&(N.current=!0),Ce==="outside-press"&&(Re?(N.current=!1,Z=!0):N.current=!(cx(_e)||Id(_e)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const H=gn(Y),be=xt(T,H)||M&&Gr(M.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,H)});(be||R&&["click","mousedown"].includes(R.type))&&f.domReference.current&&Xd(f.domReference.current);const _e=K||G,Re=ea(Mt(_e).body,Qo());queueMicrotask(()=>{let le=e0();!le&&Ct(_e)&&T&&(le=i2(Re,_e,T)),_.current&&!N.current&&Ct(le)&&(!(le!==H&&H!==Y.body)||be)&&le.focus({preventScroll:Z})})}},[r,T,D,_,y,f,h,M,m]),We(()=>{if(!r&&L)return L.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,l,p,g,f,d]),We(()=>{if(r||!D||typeof MutationObserver!="function"||w)return;const Z=()=>{const G=D.getAttribute("tabindex"),j=z(),R=gn(Mt(T)),K=j.indexOf(R);K!==-1&&(V.current=K),k.current.includes("floating")||R!==f.domReference.current&&j.length===0?G!=="0"&&D.setAttribute("tabindex","0"):G!=="-1"&&D.setAttribute("tabindex","-1")};Z();const Y=new MutationObserver(Z);return Y.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,T,D,f,k,z,w]);function X(Z){return r||!u||!l?null:P.createElement(c2,{ref:Z==="start"?$:A,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&C&&(l?!S:!0)&&(F||l);return P.createElement(P.Fragment,null,Q&&P.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:Z=>{if(l){const G=J();dr(o[0]==="reference"?G[0]:G[G.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(N.current=!1,ia(Z,L.portalNode)){const G=Yx()||x;G==null||G.focus()}else{var Y;(Y=L.beforeOutsideRef.current)==null||Y.focus()}}}),!S&&X("start"),n,X("end"),Q&&P.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:Z=>{if(l)dr(J()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(N.current=!0),ia(Z,L.portalNode)){const G=Gx()||x;G==null||G.focus()}else{var Y;(Y=L.afterOutsideRef.current)==null||Y.focus()}}}))}const Qd=new Set,u2=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Zo();return We(()=>{if(!r)return;Qd.add(i);const a=/iP(hone|ad|od)|iOS/.test(_d()),s=document.body.style,l=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[l]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{Qd.delete(i),Qd.size===0&&(Object.assign(s,{overflow:"",[l]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),P.createElement("div",Go({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function t0(e){return Ct(e.target)&&e.target.tagName==="BUTTON"}function n0(e){return Nd(e)}function aa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,d=P.useRef(),p=P.useRef(!1),f=P.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(zo(g,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}zo(g,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||t0(m))&&(m.key===" "&&!n0(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&c),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||t0(m)||n0(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&c),m.nativeEvent,"click"))}}),[o,i,s,l,u,r,n,c]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function d2(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",c=t.axis==="y"||t.axis==="both",l=["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&&c&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||l?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=c&&t.y!=null?t.y:f):o&&!l&&(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 r0(e){return e!=null&&e.clientX!=null}function f2(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:c="both",x:l=null,y:u=null}=t,d=P.useRef(!1),p=P.useRef(null),[f,m]=P.useState(),[g,h]=P.useState([]),y=At((S,C)=>{d.current||r.current.openEvent&&!r0(r.current.openEvent)||a.setPositionReference(d2(i,{x:S,y:C,axis:c,dataRef:r,pointerType:f}))}),v=At(S=>{l!=null||u!=null||(n?p.current||h([]):y(S.clientX,S.clientY))}),x=zo(f)?o:n,T=P.useCallback(()=>{if(!x||!s||l!=null||u!=null)return;const S=Ht(o);function C(k){const I=Mn(k);xt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||r0(r.current.openEvent)){S.addEventListener("mousemove",C);const k=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[x,s,l,u,o,r,a,i,y]);P.useEffect(()=>T(),[T,g]),P.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),P.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(l!=null||u!=null)&&(d.current=!1,y(l,u))},[s,l,u,y]);const w=P.useMemo(()=>{function S(C){let{pointerType:k}=C;m(k)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:v,onMouseEnter:v}},[v]);return P.useMemo(()=>s?{reference:w}:{},[s,w])}const p2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},h2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},o0=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 Qr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=pr(),h=At(typeof c=="function"?c:()=>!1),y=typeof c=="function"?h:c,v=P.useRef(!1),x=P.useRef(!1),{escapeKey:T,outsidePress:w}=o0(f),{escapeKey:S,outsidePress:C}=o0(m),k=At(A=>{var N;if(!n||!a||!s||A.key!=="Escape")return;const O=(N=i.current.floatingContext)==null?void 0:N.nodeId,V=g?Gr(g.nodesRef.current,O):[];if(!T&&(A.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(B=>{var D;if((D=B.context)!=null&&D.open&&!B.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,ND(A)?A.nativeEvent:A,"escape-key")}),I=At(A=>{var N;const O=()=>{var V;k(A),(V=Mn(A))==null||V.removeEventListener("keydown",O)};(N=Mn(A))==null||N.addEventListener("keydown",O)}),_=At(A=>{var N;const O=v.current;v.current=!1;const V=x.current;if(x.current=!1,l==="click"&&V||O||typeof y=="function"&&!y(A))return;const F=Mn(A),B="["+hr("inert")+"]",D=Mt(o.floating).querySelectorAll(B);let z=nt(F)?F:null;for(;z&&!sr(z);){const Z=Yn(z);if(sr(Z)||!nt(Z))break;z=Z}if(D.length&&nt(F)&&!FD(F)&&!xt(F,o.floating)&&Array.from(D).every(Z=>!xt(z,Z)))return;if(Ct(F)&&$){const Z=F.clientWidth>0&&F.scrollWidth>F.clientWidth,Y=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let G=Y&&A.offsetX>F.clientWidth;if(Y&&Qt(F).direction==="rtl"&&(G=A.offsetX<=F.offsetWidth-F.clientWidth),G||Z&&A.offsetY>F.clientHeight)return}const J=(N=i.current.floatingContext)==null?void 0:N.nodeId,X=g&&Gr(g.nodesRef.current,J).some(Z=>{var Y;return Dd(A,(Y=Z.context)==null?void 0:Y.elements.floating)});if(Dd(A,o.floating)||Dd(A,o.domReference)||X)return;const Q=g?Gr(g.nodesRef.current,J):[];if(Q.length>0){let Z=!0;if(Q.forEach(Y=>{var G;if((G=Y.context)!=null&&G.open&&!Y.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,A,"outside-press")}),M=At(A=>{var N;const O=()=>{var V;_(A),(V=Mn(A))==null||V.removeEventListener(l,O)};(N=Mn(A))==null||N.addEventListener(l,O)});P.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function A(V){r(!1,V,"ancestor-scroll")}const N=Mt(o.floating);s&&N.addEventListener("keydown",S?I:k,S),y&&N.addEventListener(l,C?M:_,C);let O=[];return p&&(nt(o.domReference)&&(O=lr(o.domReference)),nt(o.floating)&&(O=O.concat(lr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(O=O.concat(lr(o.reference.contextElement)))),O=O.filter(V=>{var F;return V!==((F=N.defaultView)==null?void 0:F.visualViewport)}),O.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&N.removeEventListener("keydown",S?I:k,S),y&&N.removeEventListener(l,C?M:_,C),O.forEach(V=>{V.removeEventListener("scroll",A)})}},[i,o,s,y,l,n,r,p,a,T,w,k,S,I,_,C,M]),P.useEffect(()=>{v.current=!1},[y,l]);const L=P.useMemo(()=>({onKeyDown:k,[p2[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[h2[l]]:()=>{v.current=!0}}),[k,l]);return P.useMemo(()=>a?{reference:L,floating:$}:{},[a,L,$])}function m2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),i=P.useRef({}),[a]=P.useState(()=>zx()),s=fr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&YN("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=P.useState(r.reference),u=At((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=P.useMemo(()=>({setPositionReference:l}),[]),p=P.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function mr(e){e===void 0&&(e={});const{nodeId:t}=e,n=m2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=P.useState(null),[s,c]=P.useState(null),u=(o==null?void 0:o.reference)||i,d=P.useRef(null),p=pr();We(()=>{u&&(d.current=u)},[u]);const f=LN({...e,elements:{...o,...s&&{reference:s}}}),m=P.useCallback(x=>{const T=nt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;c(T),f.refs.setReference(T)},[f.refs]),g=P.useCallback(x=>{(nt(x)||x===null)&&(d.current=x,a(x)),(nt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!nt(x))&&f.refs.setReference(x)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),y=P.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),v=P.useMemo(()=>({...f,...r,refs:h,elements:y,nodeId:t}),[f,h,y,t,r]);return We(()=>{r.dataRef.current.floatingContext=v;const x=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);x&&(x.context=v)}),P.useMemo(()=>({...f,context:v,refs:h,elements:y}),[f,h,y,v])}function g2(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=P.useRef(!1),u=P.useRef(),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&Ct(a.domReference)&&a.domReference===gn(Mt(a.domReference))&&(l.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),P.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(l.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=P.useMemo(()=>({onPointerDown(f){Id(f.nativeEvent)||(d.current=!1)},onMouseLeave(){l.current=!1},onFocus(f){if(l.current)return;const m=Mn(f.nativeEvent);if(c&&nt(m))try{if(Od()&&ux())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Nd(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){l.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=nt(m)&&m.hasAttribute(hr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const v=gn(a.domReference?a.domReference.ownerDocument:document);!m&&v===a.domReference||xt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||xt(a.domReference,v)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,c]);return P.useMemo(()=>s?{reference:p}:{},[s,p])}const i0="active",a0="selected";function Jd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[i0]:a,[a0]:s,...c}=e;i=c}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(c=>{let[l,u]=c;if(!(o&&[i0,a0].includes(l)))if(l.indexOf("on")===0){if(r.has(l)||r.set(l,[]),typeof u=="function"){var d;(d=r.get(l))==null||d.push(u),a[l]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(l))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[l]=u}),a),{})}}function gr(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=P.useCallback(s=>Jd(s,e,"reference"),t),i=P.useCallback(s=>Jd(s,e,"floating"),n),a=P.useCallback(s=>Jd(s,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let s0=!1;function Hs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function l0(e,t){return Hs(t,e===Ud||e===na,e===Ko||e===Yo)}function ef(e,t,n){return Hs(t,e===na,n?e===Ko:e===Yo)||e==="Enter"||e===" "||e===""}function v2(e,t,n){return Hs(t,n?e===Ko:e===Yo,e===na)}function c0(e,t,n){return Hs(t,n?e===Yo:e===Ko,e===Ud)}function Ws(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:y=!0,disabledIndices:v=void 0,orientation:x="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$s("`useListNavigation` looping must be enabled to allow escaping."),m||$s("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&T>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=fr(),_=pr(),M=At(s),L=P.useRef(g),$=P.useRef(l??-1),A=P.useRef(null),N=P.useRef(!0),O=P.useRef(M),V=P.useRef(!!o.floating),F=P.useRef(n),B=P.useRef(!1),D=P.useRef(!1),z=Ft(v),J=Ft(n),X=Ft(w),Q=Ft(o.floating),Z=Ft(l),[Y,G]=P.useState(),[j,R]=P.useState(),K=At(function(le,we,ce){ce===void 0&&(ce=!1);function Se(de){m?(G(de.id),_==null||_.events.emit("virtualfocus",de),S&&(S.current=de)):dr(de,{preventScroll:!0,sync:ux()&&Od()?s0||B.current:!1})}const ie=le.current[we.current];ie&&Se(ie),requestAnimationFrame(()=>{const de=le.current[we.current]||ie;if(!de)return;ie||Se(de);const ee=X.current;ee&&H&&(ce||!N.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return s0=!0,!1}})},[]),We(()=>{c&&(n&&o.floating?L.current&&l!=null&&(D.current=!0,$.current=l,M(l)):V.current&&($.current=-1,O.current(null)))},[c,n,o.floating,l,M]),We(()=>{if(c&&n&&o.floating)if(a==null){if(B.current=!1,Z.current!=null)return;if(V.current&&($.current=-1,K(i,$)),(!F.current||!V.current)&&L.current&&(A.current!=null||L.current===!0&&A.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):($.current=A.current==null||ef(A.current,x,f)||p?Kd(i,z.current):Dx(i,z.current),A.current=null,M($.current))};we()}}else ra(i,a)||($.current=a,K(i,$,D.current),D.current=!1)},[c,n,o.floating,a,Z,p,i,x,f,M,K,z]),We(()=>{var le;if(!c||o.floating||!_||m||!V.current)return;const we=_.nodesRef.current,ce=(le=we.find(de=>de.id===I))==null||(le=le.context)==null?void 0:le.elements.floating,Se=gn(Mt(o.floating)),ie=we.some(de=>de.context&&xt(de.context.elements.floating,Se));ce&&!ie&&N.current&&ce.focus({preventScroll:!0})},[c,o.floating,_,I,m]),We(()=>{if(!c||!_||!m||I)return;function le(we){R(we.id),S&&(S.current=we)}return _.events.on("virtualfocus",le),()=>{_.events.off("virtualfocus",le)}},[c,_,m,I,S]),We(()=>{O.current=M,V.current=!!o.floating}),We(()=>{n||(A.current=null)},[n]),We(()=>{F.current=n},[n]);const ae=a!=null,H=P.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&M(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!N.current||Se==="touch"||($.current=-1,K(i,$),M(null),m||dr(Q.current,{preventScroll:!0}))}}}},[n,Q,K,h,i,M,m]),be=At(le=>{if(N.current=!1,B.current=!0,!J.current&&le.currentTarget===Q.current)return;if(p&&c0(le.key,x,f)){Nt(le),r(!1,le.nativeEvent,"list-navigation"),Ct(o.domReference)&&!m&&o.domReference.focus();return}const we=$.current,ce=Kd(i,v),Se=Dx(i,v);if(le.key==="Home"&&(Nt(le),$.current=ce,M($.current)),le.key==="End"&&(Nt(le),$.current=Se,M($.current)),T>1){const ie=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=zN(ie,T,k),ee=de.findIndex(ne=>ne!=null&&!js(i.current,ne,v)),q=de.reduce((ne,me,De)=>me!=null&&!js(i.current,me,v)?De:ne,-1);if($.current=de[$N({current:de.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:x,loop:d,cols:T,disabledIndices:BN([...v||i.current.map((ne,me)=>js(i.current,me)?me:void 0),void 0],de),minIndex:ee,maxIndex:q,prevIndex:RN($.current>Se?ce:$.current,ie,de,T,le.key===na?"bl":le.key===Yo?"tr":"tl"),stopEvent:!0})],M($.current),x==="both")return}if(l0(le.key,x)){if(Nt(le),n&&!m&&gn(le.currentTarget.ownerDocument)===le.currentTarget){$.current=ef(le.key,x,f)?ce:Se,M($.current);return}ef(le.key,x,f)?d?$.current=we>=Se?u&&we!==i.current.length?-1:ce:$t(i,{startingIndex:we,disabledIndices:v}):$.current=Math.min(Se,$t(i,{startingIndex:we,disabledIndices:v})):d?$.current=we<=ce?u&&we!==-1?i.current.length:Se:$t(i,{startingIndex:we,decrement:!0,disabledIndices:v}):$.current=Math.max(ce,$t(i,{startingIndex:we,decrement:!0,disabledIndices:v})),ra(i,$.current)?M(null):M($.current)}}),Ce=P.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||Y},[m,n,ae,j,Y]),_e=P.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!dx(o.domReference)&&Ce,onKeyDown:be,onPointerMove(){N.current=!0}}),[Ce,be,o.domReference,x]),Re=P.useMemo(()=>{function le(ce){g==="auto"&&cx(ce.nativeEvent)&&(L.current=!0)}function we(ce){L.current=g,g==="auto"&&Id(ce.nativeEvent)&&(L.current=!0)}return{...Ce,onKeyDown(ce){N.current=!1;const Se=ce.key.indexOf("Arrow")===0,ie=v2(ce.key,x,f),de=c0(ce.key,x,f),ee=l0(ce.key,x),q=(p?ie:ee)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const Ue=_==null?void 0:_.nodesRef.current.find(Lt=>Lt.parentId==null),Xe=_&&Ue?JN(_.nodesRef.current,Ue.id):null;if(Se&&Xe&&S){const Lt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ie||de){var ne,me;const Tn=((ne=Xe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Bn=de&&!Tn?(me=Xe.context)==null?void 0:me.elements.domReference:ie?i.current.find(Cr=>(Cr==null?void 0:Cr.id)===Y):null;Bn&&(Nt(ce),Bn.dispatchEvent(Lt),R(void 0))}if(ee&&Xe.context&&Xe.context.open&&Xe.parentId&&ce.currentTarget!==Xe.context.elements.domReference){var De;Nt(ce),(De=Xe.context.elements.domReference)==null||De.dispatchEvent(Lt);return}}return be(ce)}if(!(!n&&!y&&Se)){if(q&&(A.current=p&&ee?null:ce.key),p){ie&&(Nt(ce),n?($.current=Kd(i,z.current),M($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}ee&&(l!=null&&($.current=l),Nt(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&M($.current))}},onFocus(){n&&!m&&M(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ce,be,z,g,i,p,M,r,n,y,x,f,l,_,m,S]);return P.useMemo(()=>c?{reference:Re,floating:_e,item:H}:{},[c,Re,_e,H])}const y2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Jr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=y2.get(a))!=null?n:a,c=Zo(),u=fr()!=null,d=P.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:c},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,c,a]),p=P.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":c}}},[s,o,c,a]),f=P.useCallback(m=>{let{active:g,selected:h}=m;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&h};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return P.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const u0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ei(e,t){return typeof e=="function"?e(t):e}function b2(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function x2(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,c]=P.useState("unmounted"),l=b2(n,a);return!l&&s==="close"&&c("unmounted"),We(()=>{if(r){if(n){c("initial");const u=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(u)}}c("close")}},[n,r]),{isMounted:l,status:s}}function d0(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,c=s.split("-")[0],l=P.useMemo(()=>({side:c,placement:s}),[c,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=P.useState(()=>({...ei(i,l),...ei(n,l)})),{isMounted:g,status:h}=x2(e,{duration:a}),y=Ft(n),v=Ft(r),x=Ft(o),T=Ft(i);return We(()=>{const w=ei(y.current,l),S=ei(x.current,l),C=ei(T.current,l),k=ei(v.current,l)||Object.keys(w).reduce((I,_)=>(I[_]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(k).map(u0).join(","),transitionDuration:d+"ms",...C,...k}),h==="close"){const I=S||w;m({transitionProperty:Object.keys(I).map(u0).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,y,v,T,d,h,l]),{isMounted:g,styles:f}}function w2(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=P.useRef(),g=P.useRef(""),h=P.useRef((n=f??a)!=null?n:-1),y=P.useRef(null),v=At(s),x=At(c),T=Ft(u),w=Ft(p);We(()=>{r&&(clearTimeout(m.current),y.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var _;h.current=(_=f??a)!=null?_:-1}},[r,f,a]);const S=At(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),C=At(_=>{function M(O,V,F){const B=T.current?T.current(V,F):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return B?O.indexOf(B):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(M(L,L,g.current)===-1?S(!1):_.key===" "&&Nt(_)),L==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Nt(_),S(!0)),L.every(O=>{var V,F;return O?((V=O[0])==null?void 0:V.toLocaleLowerCase())!==((F=O[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=y.current),g.current+=_.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=y.current,S(!1)},d);const A=h.current,N=M(L,[...L.slice((A||0)+1),...L.slice(0,(A||0)+1)],g.current);N!==-1?(v(N),y.current=N):_.key!==" "&&(g.current="",S(!1))}),k=P.useMemo(()=>({onKeyDown:C}),[C]),I=P.useMemo(()=>({onKeyDown:C,onKeyUp(_){_.key===" "&&S(!1)}}),[C,S]);return P.useMemo(()=>l?{reference:k,floating:I}:{},[l,k,I])}function f0(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[c,l]=t[a]||[0,0],[u,d]=t[s]||[0,0];l>=r!=d>=r&&n<=(u-c)*(r-l)/(d-l)+c&&(o=!o)}return o}function S2(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function p0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,c=performance.now();function l(d,p){const f=performance.now(),m=f-c;if(a===null||s===null||m===0)return a=d,s=p,c=f,null;const g=d-a,h=p-s,v=Math.sqrt(g*g+h*h)/m;return a=d,s=p,c=f,v}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:y,tree:v}=d;return function(T){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,k=[S,C],I=Mn(T),_=T.type==="mouseleave",M=xt(g.floating,I),L=xt(g.domReference,I),$=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),N=m.split("-")[0],O=p>A.right-A.width/2,V=f>A.bottom-A.height/2,F=S2(k,$),B=A.width>$.width,D=A.height>$.height,z=(B?$:A).left,J=(B?$:A).right,X=(D?$:A).top,Q=(D?$:A).bottom;if(M&&(i=!0,!_))return;if(L&&(i=!1),L&&!_){i=!0;return}if(_&&nt(T.relatedTarget)&&xt(g.floating,T.relatedTarget)||v&&Gr(v.nodesRef.current,y).some(G=>{let{context:j}=G;return j==null?void 0:j.open}))return;if(N==="top"&&f>=$.bottom-1||N==="bottom"&&f<=$.top+1||N==="left"&&p>=$.right-1||N==="right"&&p<=$.left+1)return w();let Z=[];switch(N){case"top":Z=[[z,$.top+1],[z,A.bottom-1],[J,A.bottom-1],[J,$.top+1]];break;case"bottom":Z=[[z,A.top+1],[z,$.bottom-1],[J,$.bottom-1],[J,A.top+1]];break;case"left":Z=[[A.right-1,Q],[A.right-1,X],[$.left+1,X],[$.left+1,Q]];break;case"right":Z=[[$.right-1,Q],[$.right-1,X],[A.left+1,X],[A.left+1,Q]];break}function Y(G){let[j,R]=G;switch(N){case"top":{const K=[B?j+t/2:O?j+t*4:j-t*4,R+t+1],ae=[B?j-t/2:O?j+t*4:j-t*4,R+t+1],H=[[A.left,O||B?A.bottom-t:A.top],[A.right,O?B?A.bottom-t:A.top:A.bottom-t]];return[K,ae,...H]}case"bottom":{const K=[B?j+t/2:O?j+t*4:j-t*4,R-t],ae=[B?j-t/2:O?j+t*4:j-t*4,R-t],H=[[A.left,O||B?A.top+t:A.bottom],[A.right,O?B?A.top+t:A.bottom:A.top+t]];return[K,ae,...H]}case"left":{const K=[j+t+1,D?R+t/2:V?R+t*4:R-t*4],ae=[j+t+1,D?R-t/2:V?R+t*4:R-t*4];return[...[[V||D?A.right-t:A.left,A.top],[V?D?A.right-t:A.left:A.right-t,A.bottom]],K,ae]}case"right":{const K=[j-t,D?R+t/2:V?R+t*4:R-t*4],ae=[j-t,D?R-t/2:V?R+t*4:R-t*4],H=[[V||D?A.left+t:A.right,A.top],[V?D?A.left+t:A.right:A.left+t,A.bottom]];return[K,ae,...H]}}}if(!f0([S,C],Z)){if(i&&!F)return w();if(!_&&r){const G=l(T.clientX,T.clientY);if(G!==null&&G<.1)return w()}f0([S,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const T2=/Mac|iPod|iPhone|iPad/,qs=()=>T2.test(navigator.userAgent),E2=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?qs()?"Meta":"Control":n==="Hyper"?qs()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),h0=e=>e.map(t=>t.trim()).join("+");class C2{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=h0(E2(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=h0(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 vn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof vn&&(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 vn(this);return t?t(n):n}static from(t,n){return new vn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(vn.from(t,n).values())}toArray(){return Array.from(this.values())}}const k2=(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 c=[a];for(let l=1;l<t.length;l++){const u=t[l];if(s=e.indexOf(u,s),s===-1)return;c.push(s),s++}o.push(c)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const c=a[a.length-1]-a[0],l=s[s.length-1]-s[0];return c-l})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},m0=(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},g0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},v0=(e,t)=>{const n=m0(t,g0.basic,e);return n!==void 0&&n!==e?n:m0(t,g0.extend,e)},y0=e=>e.replace(/[^0-9]/g,""),Us=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),b0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?y0(e).includes(y0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?k2(e,t)!==null:!1,P2=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>b0(e,o,n,r)):b0(e,t,n,r),tf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:$e.array(i.value)?i.value.map(Us):Us(`${i.value}`)}));return e.forEach(i=>{const a=v0(i,t);o.forEach(s=>{const c=v0(i,s.key);if(!c)return;const l=Us(`${s.value}`.toLocaleLowerCase()).trim(),u=Us(`${c}`.toLocaleLowerCase()).trim();if(P2(u,l,s.score,s.match))return void r.set(a,i);$e.function(s.ifNotMatch)&&s.ifNotMatch(l,u)&&r.set(a,i)})}),Array.from(r.values())},A2=e=>(e=e.trim(),e==="Alt"?qs()?b.jsx(T_,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?qs()?b.jsx(x_,{"aria-label":"Command",size:14}):"Ctrl":e),_2=e=>{const t=e.value.trim().split("+");return b.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return b.jsxs(E.Fragment,{children:[b.jsx("kbd",{"aria-label":n,children:A2(n)}),o?null:b.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},nf=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),I2=(e,t)=>Wr()?t:window.matchMedia(e).matches,O2=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(I2(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},x0=()=>window.matchMedia("@media (pointer: coarse)"),M2=()=>{var r;const e=E.useRef(Wr()?null:x0()),[t,n]=E.useState(Wr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?x0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},rf=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=M2(),o=E.useRef(Wr()?"":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||xb())return;document.documentElement.style.padding=tm(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=c=>{const l=n.current;if(l&&l.contains(c.target)){const u=l.getBoundingClientRect(),d=l.style.height?Number(sT(l.style.height)):null,p=$e.number(d)?d:u.height,f=l.scrollHeight<=p;return p===l.scrollHeight?e?c.preventDefault():void 0:f?void 0:e?c.preventDefault():void 0}return c.currentTarget===document.documentElement,e?c.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},yn="500ms",D2={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:yn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:yn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:yn}},N2={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:yn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:yn}},of={drawer:e=>e==="left"?D2:N2,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:yn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:yn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:yn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:yn},initial:{opacity:.5,scale:.95,animationDuration:yn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:yn}}},F2=fo("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"}}),w0={top:0,left:0,right:0,bottom:0},S0=e=>e*.65,L2=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const l=e.parent.current,u=e.value.get()||l.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),c=S0(window.outerHeight);return s>=c?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return b.jsx(ft.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:w0,whileDrag:{cursor:"grabbing"},className:Oe("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?b.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ks={drawer:"right",sheet:"none",dialog:"none"},V2=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ks.drawer:Ks[o]:t?Ks[o]:Ks.sheet},j2=[],T0=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:c,bodyClassName:l,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:m=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:v=!1,role:x="dialog",interactions:T=j2,...w},S)=>{const C=d?ft.div:"div",k=rf(e,"block-only"),I=E.useId(),_=E.useId(),M=O2("(min-width: 64rem)"),L=h!=="dialog",$=V2(M,f,h,y),A=M||f?of[h]:of.sheet,N=typeof A=="function"?A($):A,O=M||f?h:"sheet",V=mr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),F=aa(V.context),B=Jr(V.context,{role:x}),D=Qr(V.context,{escapeKey:!0,referencePress:!0,outsidePress:v}),z=gr([F,B,D].concat(T)),J=o,X=rs(void 0);E.useEffect(()=>{X.set(void 0)},[X,O]);const Q=()=>a(!1);E.useImperativeHandle(S,()=>({context:V.context,floating:k.current}),[V.context,k]);const Y=d&&O==="sheet"?{layout:!0,exit:"exit",dragListener:!0,dragMomentum:!0,animate:"enter",dragElastic:0,dragPropagation:!0,onDrag:(G,j)=>{const R=V.refs.floating;if(R.current&&O==="sheet"){const ae=R.current.getBoundingClientRect(),H=X.get()||ae.height,be=Math.abs(H-j.delta.y),Ce=S0(window.outerHeight);return be<Ce?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(be)}},dragSnapToOrigin:!0,dragDirectionLock:!0,initial:"initial",layoutId:m,variants:N,drag:O==="sheet"?"y":"x",draggable:O==="sheet",dragConstraints:w0}:{};return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx($o,{ref:V.refs.setReference,...z.getReferenceProps({layoutId:m}),children:J}):b.jsx(ft.button,{ref:V.refs.setReference,...z.getReferenceProps(),layoutId:m,type:"button",children:J})}):null,b.jsx(Zr,{children:b.jsx(tr,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(u2,{lockScroll:!0,className:Oe(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${O==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:V.context,children:b.jsxs(C,{...w,...Y,...t?{"aria-labelledby":I,"aria-describedby":_}:{"aria-label":s},...z.getFloatingProps({"aria-modal":e,ref:Hn(V.refs.setFloating,k),className:Oe(F2({position:$,type:O}),c,"overscroll-contain")}),"data-component":"modal",style:O==="drawer"?{width:X}:{height:X},children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:I,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,b.jsx("section",{className:Oe("flex-1 overflow-y-auto px-8 select-text py-1",l),children:i}),n?b.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?b.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:b.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:b.jsx(os,{})})}):null,L&&u?b.jsx(L2,{onChange:a,parent:V.refs.floating,position:$,sheet:O==="sheet",value:X}):null]})})}):null})})]})}),$2=e=>b.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Oc(e.item.title)?b.jsx(e.item.title,{text:e.text}):e.item.title}),z2=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?b.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:b.jsx($2,{text:e.text,item:o})}):o.type!=="shortcut"?b.jsx(E.Fragment,{}):b.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[b.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,b.jsx("span",{children:Oc(o.title)?b.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?b.jsx(_2,{value:o.shortcut}):null]})}),R2=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:$e.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,c)=>{const l=$e.function(c.enabled)?c.enabled({text:t}):c.enabled??!0;return l&&s.push({...c,enabled:l}),s},[]),i=tf(o,"title",n),a=r.filter(s=>$e.function(s.enabled)?s.enabled({text:t}):!1);return vn.unique(i.concat(a),s=>s.title)},B2=[0,0,0,0,0],H2=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Pt(),[o,i]=E.useState(""),a=Dr(o),s=E.useId(),c=E.useRef(null),[l,u]=E.useState(null),d=mr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Uo}),p=Ws(d.context,{listRef:n,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:v=>u(x=>$e.number(v)?v:e.open?x??0:null)}),{getItemProps:f}=gr([p]),m=e.commands.flatMap(v=>v.type==="group"?[v,...v.items]:[v]),g=R2(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(v=>v.type!=="group")];E.useEffect(()=>{const v=new C2;return v.add(t,()=>{var x;return(x=e.onChangeVisibility)==null?void 0:x.call(e,!0)}),m.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&v.add(x.shortcut,T=>x.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),v.register()},[t]);const y=e.Icon??Sy;return b.jsx(E.Fragment,{children:b.jsxs(T0,{ref:c,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:[b.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:[b.jsx("div",{className:"flex size-10 items-center justify-center",children:b.jsx(y,{Default:Sy,text:o,size:16})}),b.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:v=>i(v.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:v=>{var x;if((v.key==="ArrowDown"||v.key==="ArrowUp")&&l!==null&&((x=n.current[l])==null||x.scrollIntoView({block:"start",inline:"start"})),v.key==="Enter"){if(l!==null&&h[l]){v.preventDefault();const T=h[l],w=v.currentTarget.value;if(T.type==="shortcut")return T.action({event:v,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){v.preventDefault();const T=h[0],w=v.currentTarget.value;if(T.type==="shortcut")return T.action({event:v,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?b.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:[b.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),B2.map((v,x)=>b.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:nf},`${s}-${x}-skeleton-index`))]}):b.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[b.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:[h.map((v,x)=>E.createElement(z2,{...f({onMouseEnter:()=>u(x),ref(T){n.current[x]=T},onClick(T){var w;T.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),v.type==="shortcut"&&v.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:v,text:o,active:l===x,key:`${s}-${v.type}-${x}`})),h.length===1?b.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&$e.number(l)?b.jsx(e.Preview,{command:h[l],text:o}):null]}),e.footer?b.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},ti=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),qd({fallbackAxisSideDirection:"end"}),Wd(),Ox({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:c}=mr({open:n,middleware:i,transform:!0,whileElementsMounted:Uo,onOpenChange:(m,g)=>{var y;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(y=e.onChange)==null||y.call(e,m))}}),l=aa(c),u=Qr(c),d=Jr(c,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=gr([l,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(Zr,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Jo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:c,modal:!1,children:b.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:[b.jsx($x,{ref:o,context:c,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},W2=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:c}=mr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),l=aa(s,{enabled:e.disabled??!0}),u=Jr(s,{role:"tooltip"}),d=Qr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=gr([l,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(vo,{...f(e),as:ft.button,layoutId:r,ref:c.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(ft.span,{layoutId:o,children:e.trigger})}),b.jsx(tr,{children:i?b.jsx(Zr,{root:t,children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(ft.div,{...p(),ref:c.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},E0=200,q2=500,C0=(e="")=>Oe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),af=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),k0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},c)=>{const[l,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,m]=E.useState(null),g=E.useRef([]),h=E.useRef([]),y=E.useContext(af),v=fr(),x=pr(),T=GN(),w=Lx(),S=v!==null,{floatingStyles:C,refs:k,context:I}=mr({nodeId:T,open:l,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Uo,placement:S?"right":"bottom-start",middleware:[ta({mainAxis:S?0:4,alignmentAxis:S?-4:0}),qd(),Wd()]}),_=Jr(I,{role:"menu"}),M=Qr(I,{bubbles:!0}),L=Wx(I,{move:!1,enabled:n,delay:{open:E0},handleClose:p0({blockPointerEvents:!0})}),$=aa(I,{toggle:!S,event:"mousedown",ignoreMouse:S,keyboardHandlers:!0}),A=Ws(I,{loop:!0,activeIndex:f,nested:S,listRef:g,onNavigate:m}),N=w2(I,{activeIndex:f,listRef:h,resetMs:q2,onMatch:l?m:void 0}),{getReferenceProps:O,getFloatingProps:V,getItemProps:F}=gr([L,$,_,M,A,N]);E.useEffect(()=>{if(!x)return;const D=()=>u(!1),z=J=>{J.nodeId!==T&&J.parentId===v&&u(!1)};return x.events.on("click",D),x.events.on("menuopen",z),()=>{x.events.off("click",D),x.events.off("menuopen",z)}},[x,T,v]),E.useEffect(()=>{l&&x&&x.events.emit("menuopen",{parentId:v,nodeId:T})},[x,l,T,v]);const B=o?s.className:Oe(C0(s.className));return b.jsxs(ZN,{id:T,children:[b.jsx(E.Fragment,{children:s.asChild?b.jsx($o,{...O(y.getItemProps({...s,onFocus(D){var z;(z=s.onFocus)==null||z.call(s,D),p(!1),y.setHasFocusInside(!0)}})),children:a,className:B,"data-open":l?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Hn(k.setReference,w.ref,c),tabIndex:S?y.activeIndex===w.index?0:-1:void 0}):b.jsxs("button",{type:"button",className:B,"data-open":l?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Hn(k.setReference,w.ref,c),tabIndex:S?y.activeIndex===w.index?0:-1:void 0,...O(y.getItemProps({...s,onFocus(D){var z;(z=s.onFocus)==null||z.call(s,D),p(!1),y.setHasFocusInside(!0)}})),children:[a,S&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(Wu,{size:14})]})]})}),b.jsx(af.Provider,{value:{activeIndex:f,setActiveIndex:m,getItemProps:F,setHasFocusInside:p,isOpen:l},children:b.jsx(qN,{elementsRef:g,labelsRef:h,children:l&&b.jsx(Zr,{preserveTabOrder:!0,children:b.jsx(Jo,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:b.jsx(t,{...V(),ref:k.setFloating,style:{...s.style,...C},className:Oe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),U2=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(af),s=Lx({label:n?null:e}),c=pr(),l=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":l,"data-open":a.isOpen,tabIndex:l?0:-1,ref:Hn(s.ref,i),className:C0(`${o.className??""} ${l?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),c==null||c.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?b.jsx(t,{size:16}):null]})}),K2=E.forwardRef((e,t)=>fr()!==null?b.jsx(k0,{...e,isParent:!1,ref:t}):b.jsx(XN,{children:b.jsx(k0,{...e,isParent:!0,ref:t})})),Y2=e=>b.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),sf=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:c=!0,popover:l=!0,followCursor:u=!1,onChange:d=dd,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),y=t||"span",v=A=>{g(A),d==null||d(A)},{refs:x,floatingStyles:T,context:w}=mr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Uo,onOpenChange:i?void 0:v,middleware:[Wd(),ta(5),qd({fallbackAxisSideDirection:"start"}),Ox({padding:5,element:h})]}),S=Wx(w,{move:!0,delay:{open:E0},enabled:c?s:!1,handleClose:l?p0():null}),C=g2(w,{enabled:c?a:!1}),k=aa(w,{enabled:c?l:!1}),I=Qr(w,{enabled:c}),_=Jr(w,{role:"tooltip",enabled:c}),M=f2(w,{enabled:!!c&&!!u}),{getReferenceProps:L,getFloatingProps:$}=gr([_,I,M,a?C:void 0,s?S:void 0,l?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),b.jsxs(E.Fragment,{children:[b.jsx(y,{...L(p),ref:Hn(x.setReference,f),children:n}),m&&b.jsx(Zr,{preserveTabOrder:!0,children:b.jsxs(on,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx($x,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Ys=0,vr=1,ni=2,P0=4;function A0(e){return()=>e}function G2(e){e()}function sa(e,t){return n=>e(t(n))}function _0(e,t){return()=>e(t)}function I0(e,t){return n=>e(t,n)}function lf(e){return e!==void 0}function Z2(...e){return()=>{e.map(G2)}}function ri(){}function Gs(e,t){return t(e),e}function X2(e,t){return t(e)}function lt(...e){return e}function et(e,t){return e(vr,t)}function Ne(e,t){e(Ys,t)}function cf(e){e(ni)}function zt(e){return e(P0)}function xe(e,t){return et(e,I0(t,Ys))}function Nn(e,t){const n=e(vr,r=>{n(),t(r)});return n}function O0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function M0(e,t){return e===t}function ct(e=M0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ke(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Fn(e){return t=>()=>{t(e)}}function re(e,...t){const n=Q2(...t);return(r,o)=>{switch(r){case ni:cf(e);return;case vr:return et(e,n(o))}}}function Ln(e,t){return n=>r=>{n(t=e(t,r))}}function oi(e){return t=>n=>{e>0?e--:t(n)}}function yr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Le(...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);et(i,c=>{const l=n;n=n|s,t[a]=c,l!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function Q2(...e){return t=>e.reduceRight(X2,t)}function J2(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case vr:return i?n===i?void 0:(r(),n=i,t=et(e,i),t):(r(),ri);case ni:r(),n=null;return}}}function se(e){let t=e;const n=He();return(r,o)=>{switch(r){case Ys:t=o;break;case vr:{o(t);break}case P0:return t}return n(r,o)}}function Rt(e,t){return Gs(se(t),n=>xe(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Ys:e.slice().forEach(r=>{r(n)});return;case ni:e.splice(0,e.length);return;case vr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Gs(He(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:eF(),singleton:n}}const eF=()=>Symbol();function tF(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(c=>n(c)));return a&&t.set(i,s),s};return n(e)}function _t(...e){const t=He(),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);et(i,c=>{n[a]=c,r=r|s,r===o&&Ne(t,n)})}),function(i,a){switch(i){case ni:{cf(t);return}case vr:return r===o&&a(n),et(t,a)}}}function Ae(e,t=M0){return re(e,ct(t))}function D0(...e){return function(t,n){switch(t){case ni:return;case vr:return Z2(...e.map(r=>et(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const nF={0:"debug",3:"error",1:"log",2:"warn"},rF=()=>typeof globalThis>"u"?window:globalThis,br=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=rF().VIRTUOSO_LOG_LEVEL)!=null?o:zt(e);r>=i&&console[nF[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 uf(e,t,n).callbackRef}function uf(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 c=a[0].target;c.offsetParent!==null&&e(c)};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 N0(e,t,n,r,o,i,a,s,c){const l=E.useCallback(u=>{const d=oF(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 m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?F0("column-gap",getComputedStyle(u).columnGap,o):F0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return uf(l,n,c)}function oF(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 c=parseInt(s.dataset.index),l=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===l)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==c-1?i.push({endIndex:c,size:u,startIndex:c}):i[i.length-1].endIndex++}return i}function F0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function df(e,t,n){const r=E.useRef(null),o=E.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=l.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,l.top),d=l.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=uf(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var c;if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(()=>{requestAnimationFrame(s)});return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else{const l=(c=a.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",s),l==null||l.addEventListener("resize",s),()=>{l==null||l.removeEventListener("scroll",s),l==null||l.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ye(()=>{const e=He(),t=He(),n=se(0),r=He(),o=se(0),i=He(),a=He(),s=se(0),c=se(0),l=se(0),u=se(0),d=He(),p=He(),f=se(!1),m=se(!1),g=se(!1);return xe(re(e,he(({scrollTop:h})=>h)),t),xe(re(e,he(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),la={lvl:0};function L0(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:c}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=c}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===la}function ca(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function bn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=bn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return bn(e.l,t,n)}function nn(e,t,n){return ot(e)?$0(t,n,1):t===e.k?It(e,{k:t,v:n}):t<e.k?z0(It(e,{l:nn(e.l,t,n)})):z0(It(e,{r:nn(e.r,t,n)}))}function ii(){return la}function Zs(e,t,n){if(ot(e))return[];const r=bn(e,t)[0];return iF(pf(e,r,n))}function ff(e,t){if(ot(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=j0(r);return Xs(It(e,{k:i,l:V0(r),v:a}))}}else return t<n?Xs(It(e,{l:ff(r,t)})):Xs(It(e,{r:ff(o,t)}))}function eo(e){return ot(e)?[]:[...eo(e.l),{k:e.k,v:e.v},...eo(e.r)]}function pf(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(pf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(pf(i,t,n))),s}function Xs(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(hf(t))return R0(It(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return It(t.r,{l:It(t,{r:t.r.l}),lvl:n,r:It(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(hf(e))return mf(It(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=hf(o)?r.lvl-1:r.lvl;return It(o,{l:It(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:mf(It(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function It(e,t){return $0(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 V0(e){return ot(e.r)?e.l:Xs(It(e,{r:V0(e.r)}))}function hf(e){return ot(e)||e.lvl>e.r.lvl}function j0(e){return ot(e.r)?[e.k,e.v]:j0(e.r)}function $0(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function z0(e){return mf(R0(e))}function R0(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?It(t,{r:It(e,{l:t.r})}):e}function mf(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?It(n,{l:It(e,{r:n.l}),lvl:t+1}):e}function iF(e){return L0(e,({k:t,v:n})=>({index:t,value:n}))}function B0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const gf=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function H0(e,t,n){return e[Qs(e,t,n)]}function Qs(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 aF(e,t,n,r){const o=Qs(e,t,r),i=Qs(e,n,r,o);return e.slice(o,i+1)}function xn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Js(e){return!ot(e.groupOffsetTree)}function vf({index:e},t){return t===e?0:t<e?-1:1}function sF(){return{groupIndices:[],groupOffsetTree:ii(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ii()}}function lF(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=nn(e,0,i);continue}const s=Zs(e,a-1,o+1);if(s.some(mF(r)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:p}of s)c?(o>=d||i===p)&&(e=ff(e,d)):(l=p!==i,c=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));l&&(e=nn(e,a,i))}return[e,n]}function cF(e){return typeof e.groupIndex<"u"}function uF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=H0(t,e,vf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function W0(e,t){if(!Js(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function q0(e,t,n){if(cF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=W0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function dF(e,t,n,r=0){return r>0&&(t=Math.max(t,H0(e,r,vf).offset)),L0(aF(e,t,n,uF),hF)}function fF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=lF(a,t);if(a===i)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=yf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),ii()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:a}}function pF(e){return eo(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 U0(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 yf(e,t,n,r){let o=e,i=0,a=0,s=0,c=0;if(t!==0){c=Qs(o,t-1,vf),s=o[c].offset;const l=bn(n,t-1);i=l[0],a=l[1],o.length&&o[c].size===bn(n,t)[1]&&(c-=1),o=o.slice(0,c+1)}else o=[];for(const{start:l,value:u}of Zs(n,t,1/0)){const d=l-i,p=d*a+s+d*r;o.push({index:l,offset:p,size:u}),i=l,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function hF(e){return{index:e.index,value:e}}function mF(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 gF={offsetHeight:"height",offsetWidth:"width"},jn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Rt(r,0),i=He(),a=He(),s=se(0),c=se([]),l=se(void 0),u=se(void 0),d=se((w,S)=>xn(w,gF[S])),p=se(void 0),f=se(0),m=sF(),g=Rt(re(n,Le(c,e,f),Ln(fF,m),ct()),m),h=Rt(re(c,ct(),Ln((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);xe(re(c,ke(w=>w.length>0),Le(g,f),he(([w,S,C])=>{const k=w.reduce((I,_,M)=>nn(I,_,da(_,S.offsetTree,C)||M),ii());return{...S,groupIndices:w,groupOffsetTree:k}})),g),xe(re(r,Le(g),ke(([w,{lastIndex:S}])=>w<S),he(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),xe(l,u);const y=Rt(re(l,he(w=>w===void 0)),!0);xe(re(u,ke(w=>w!==void 0&&ot(zt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const v=en(re(n,Le(g),Ln(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));et(re(s,Ln((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:S}=zt(g);if(w>0)Ne(t,!0),Ne(i,w+U0(w,S));else if(w<0){const C=zt(h);C.length>0&&(w-=U0(-w,C)),Ne(a,w)}}),et(re(s,Le(e)),([w,S])=>{w<0&&S("`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},tn.ERROR)});const x=en(i);xe(re(i,Le(g),he(([w,S])=>{const C=S.groupIndices.length>0,k=[],I=S.lastSize;if(C){const _=ca(S.sizeTree,0);let M=0,L=0;for(;M<w;){const A=S.groupIndices[L],N=S.groupIndices.length===L+1?1/0:S.groupIndices[L+1]-A-1;k.push({endIndex:A,size:_,startIndex:A}),k.push({endIndex:A+1+N-1,size:I,startIndex:A+1}),L++,M+=N+1}const $=eo(S.sizeTree);return M!==w&&$.shift(),$.reduce((A,{k:N,v:O})=>{let V=A.ranges;return A.prevSize!==0&&(V=[...A.ranges,{endIndex:N+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:N+w,prevSize:O,ranges:V}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return eo(S.sizeTree).reduce((_,{k:M,v:L})=>({prevIndex:M+w,prevSize:L,ranges:[..._.ranges,{endIndex:M+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(re(a,Le(g,f),he(([w,{offsetTree:S},C])=>{const k=-w;return da(k,S,C)})));return xe(re(a,Le(g,f),he(([w,S,C])=>{if(S.groupIndices.length>0){if(ot(S.sizeTree))return S;let k=ii();const I=zt(h);let _=0,M=0,L=0;for(;_<-w;){L=I[M];const $=I[M+1]-L-1;M++,_+=$+1}if(k=eo(S.sizeTree).reduce(($,{k:A,v:N})=>nn($,Math.max(0,A+w),N),k),_!==-w){const $=ca(S.sizeTree,L);k=nn(k,0,$);const A=bn(S.sizeTree,-w+1)[1];k=nn(k,1,A)}return{...S,sizeTree:k,...yf(S.offsetTree,0,k,C)}}else{const k=eo(S.sizeTree).reduce((I,{k:_,v:M})=>nn(I,Math.max(0,_+w),M),ii());return{...S,sizeTree:k,...yf(S.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,gap:f,groupIndices:c,itemSize:d,listRefresh:v,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},lt(br,gf),{singleton:!0});function vF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const K0=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=en(re(i,he(vF)));return xe(re(s,he(c=>c.totalCount)),n),xe(re(s,he(c=>c.groupIndices)),e),xe(re(_t(o,t,r),ke(([c,l])=>Js(l)),he(([c,l,u])=>bn(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),ct(),he(c=>[c])),a),{groupCounts:i,topItemsIndexes:a}},lt(jn,Wt)),xr=Ye(([{log:e}])=>{const t=se(!1),n=en(re(t,ke(r=>r),ct()));return et(t,r=>{r&&zt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},lt(br),{singleton:!0}),yF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Y0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!yF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ye(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=He(),m=He(),g=se(0);let h=null,y=null,v=null;function x(){h&&(h(),h=null),v&&(v(),v=null),y&&(clearTimeout(y),y=null),Ne(c,!1)}return xe(re(f,Le(n,d,r,g,s,a,p),Le(e,i,o),he(([[T,w,S,C,k,I,_,M],L,$,A])=>{const N=Y0(T),{align:O,behavior:V,offset:F}=N,B=C-1,D=q0(N,w,B);let z=da(D,w.offsetTree,L)+I;O==="end"?(z+=$+bn(w.sizeTree,D)[1]-S+A,D===B&&(z+=_)):O==="center"?z+=($+bn(w.sizeTree,D)[1]-S+A)/2:z-=k,F&&(z+=F);const J=X=>{x(),X?(M("retrying to scroll to",{location:T},tn.DEBUG),Ne(f,T)):(Ne(m,!0),M("list did not change, scroll successful",{},tn.DEBUG))};if(x(),V==="smooth"){let X=!1;v=et(t,Q=>{X=X||Q}),h=Nn(u,()=>{J(X)})}else h=Nn(re(t,bF(150)),J);return y=setTimeout(()=>{x()},1200),Ne(c,!0),M("scrolling from index to",{behavior:V,index:D,top:z},tn.DEBUG),{behavior:V,top:z}})),l),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},lt(jn,Wt,br),{singleton:!0});function bF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function bf(e,t){e==0?t():requestAnimationFrame(()=>{bf(e-1,t)})}function xf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ye(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),c=se(0),l=se(!0);return xe(re(a,Le(c),ke(([u,d])=>!!d),Fn(!1)),s),xe(re(a,Le(c),ke(([u,d])=>!!d),Fn(!1)),l),et(re(_t(t,a),Le(s,n,e,l),ke(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||lf(f))&&!d&&!m),Le(c)),([,u])=>{Nn(o,()=>{Ne(l,!0)}),bf(4,()=>{Nn(r,()=>{Ne(s,!0)}),Ne(i,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},lt(jn,Wt,fa,xr),{singleton:!0});function G0(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",xF="none",wF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},SF=0,ga=Ye(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),c=He(),l=He(),u=se(4),d=se(SF),p=Rt(re(D0(re(Ae(o),oi(1),Fn(!0)),re(Ae(o),oi(1),Fn(!1),O0(100))),ct()),!1),f=Rt(re(D0(re(n,Fn(!0)),re(n,Fn(!1),O0(200))),ct()),!1);xe(re(_t(Ae(o),Ae(d)),he(([v,x])=>v<=x),ct()),s),xe(re(s,yr(50)),l);const m=en(re(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),Ln((v,[{scrollHeight:x,scrollTop:T},w,S,C,k])=>{const I=T+w-x>-k,_={scrollHeight:x,scrollTop:T,viewportHeight:w};if(I){let L,$;return T>v.state.scrollTop?(L="SCROLLED_DOWN",$=v.state.scrollTop-T):(L="SIZE_DECREASED",$=v.state.scrollTop-T||v.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:$,state:_}}let M;return _.scrollHeight>v.state.scrollHeight?M="SIZE_INCREASED":w<v.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":T<v.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:_}},wF),ct((v,x)=>v&&v.atBottom===x.atBottom))),g=Rt(re(r,Ln((v,{scrollHeight:x,scrollTop:T,viewportHeight:w})=>{if(G0(v.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const S=x-(T+w)<1;return v.scrollTop!==T&&S?{changed:!0,jump:v.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ke(v=>v.changed),he(v=>v.jump)),0);xe(re(m,he(v=>v.atBottom)),a),xe(re(a,yr(50)),c);const h=se(ma);xe(re(r,he(({scrollTop:v})=>v),ct(),Ln((v,x)=>zt(f)?{direction:v.direction,prevScrollTop:x}:{direction:x<v.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(v=>v.direction)),h),xe(re(r,yr(50),Fn(xF)),h);const y=se(0);return xe(re(p,ke(v=>!v),Fn(0)),y),xe(re(o,yr(100),Le(p),ke(([v,x])=>!!x),Ln(([v,x],[T])=>[x,T],[0,0]),he(([v,x])=>x-v)),y),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},lt(Wt)),el="top",tl="bottom",Z0="none";function X0(e,t,n){return typeof e=="number"?n===ha&&t===el||n===ma&&t===tl?e:0:n===ha?t===el?e.main:e.reverse:t===tl?e.main:e.reverse}function Q0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const wf=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=se(0),s=se(0),c=se(0),l=Rt(re(_t(Ae(r),Ae(o),Ae(n),Ae(i,ua),Ae(c),Ae(a),Ae(t),Ae(e),Ae(s)),he(([u,d,p,[f,m],g,h,y,v,x])=>{const T=u-v,w=h+y,S=Math.max(p-T,0);let C=Z0;const k=Q0(x,el),I=Q0(x,tl);return f-=v,f+=p+y,m+=p+y,m-=v,f>u+w-k&&(C=ha),m<u-S+d+I&&(C=ma),C!==Z0?[Math.max(T-p-X0(g,el,C)-k,0),T-S-y+d+X0(g,tl,C)+I]:null}),ke(u=>u!=null),ct(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:c,topListHeight:a,visibleRange:l}},lt(Wt),{singleton:!0});function TF(e,t,n){if(Js(t)){const r=W0(e,t);return[{index:bn(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 Sf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function nl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:c}=o;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*c+(d-1)*r,f=l,m=p-u;return{bottom:u,firstItemIndex:i,items:ew(e,o,i),offsetBottom:m,offsetTop:l,top:f,topItems:ew(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function J0(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,c=xf(t,s),l=Array.from({length:s}).map((u,d)=>({data:i[d+c],index:d+c,offset:0,size:0}));return nl(l,[],s,o,n,r)}function ew(e,t,n){if(e.length===0)return[];if(!Js(t))return e.map(l=>({...l,index:l.index+n,originalIndex:l.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Zs(t.groupOffsetTree,r,o);let s,c=0;for(const l of e){(!s||s.end<l.index)&&(s=a.shift(),c=t.groupIndices.indexOf(s.start));let u;l.index===s.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+n},i.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return i}const to=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),y=He();xe(i.topItemsIndexes,g);const v=Rt(re(_t(f,m,Ae(c,ua),Ae(o),Ae(r),Ae(l),u,Ae(g),Ae(t),Ae(n),e),ke(([S,C,,k,,,,,,,I])=>{const _=I&&I.length!==k;return S&&!C&&!_}),he(([,,[S,C],k,I,_,M,L,$,A,N])=>{const O=I,{offsetTree:V,sizeTree:F}=O,B=zt(h);if(k===0)return{...Sf,totalCount:k};if(S===0&&C===0)return B===0?{...Sf,totalCount:k}:J0(B,_,I,$,A,N||[]);if(ot(F))return B>0?null:nl(TF(xf(_,k),O,N),[],k,A,O,$);const D=[];if(L.length>0){const Z=L[0],Y=L[L.length-1];let G=0;for(const j of Zs(F,Z,Y)){const R=j.value,K=Math.max(j.start,Z),ae=Math.min(j.end,Y);for(let H=K;H<=ae;H++)D.push({data:N==null?void 0:N[H],index:H,offset:G,size:R}),G+=R}}if(!M)return nl([],D,k,A,O,$);const z=L.length>0?L[L.length-1]+1:0,J=dF(V,S,C,z);if(J.length===0)return null;const X=k-1,Q=Gs([],Z=>{for(const Y of J){const G=Y.value;let j=G.offset,R=Y.start;const K=G.size;if(G.offset<S){R+=Math.floor((S-G.offset+A)/(K+A));const H=R-Y.start;j+=H*K+H*A}R<z&&(j+=(z-R)*K,R=z);const ae=Math.min(Y.end,X);for(let H=R;H<=ae&&!(j>=C);H++)Z.push({data:N==null?void 0:N[H],index:H,offset:j,size:K}),j+=K+A}});return nl(Q,D,k,A,O,$)}),ke(S=>S!==null),ct()),Sf);xe(re(e,ke(lf),he(S=>S==null?void 0:S.length)),o),xe(re(v,he(S=>S.topListHeight)),d),xe(d,s),xe(re(v,he(S=>[S.top,S.bottom])),a),xe(re(v,he(S=>S.items)),y);const x=en(re(v,ke(({items:S})=>S.length>0),Le(o,e),ke(([{items:S},C])=>S[S.length-1].originalIndex===C-1),he(([,S,C])=>[S-1,C]),ct(ua),he(([S])=>S))),T=en(re(v,yr(200),ke(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),he(({items:S})=>S[0].index),ct())),w=en(re(v,ke(({items:S})=>S.length>0),he(({items:S})=>{let C=0,k=S.length-1;for(;S[C].type==="group"&&C<k;)C++;for(;S[k].type==="group"&&k>C;)k--;return{endIndex:S[k].index,startIndex:S[C].index}}),ct(B0)));return{endReached:x,initialItemCount:h,itemsRendered:y,listState:v,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},lt(jn,K0,wf,pa,fa,ga,xr,gf),{singleton:!0}),tw=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Rt(re(_t(n,e,r,t,o),he(([s,c,l,u,d])=>s+c+l+u+d.offsetBottom+d.bottom)),0);return xe(Ae(a),i),{totalListHeight:a,totalListHeightChanged:i}},lt(Wt,to),{singleton:!0}),EF=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Rt(re(_t(n,e,t),ke(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),yr(0),ct()),0);return{alignToBottom:n,paddingTopAddition:r}},lt(Wt,tw),{singleton:!0});function nw(e){return e?e==="smooth"?"smooth":"auto":!1}const CF=(e,t)=>typeof e=="function"?nw(e(t)):t&&nw(e),kF=Ye(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:c},{scrollingInProgress:l}])=>{const u=se(!1),d=He();let p=null;function f(g){Ne(o,{align:"end",behavior:g,index:"LAST"})}et(re(_t(re(Ae(t),oi(1)),a),Le(Ae(u),r,i,l),he(([[g,h],y,v,x,T])=>{let w=h&&x,S="auto";return w&&(S=CF(y,v||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),ke(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Nn(e,()=>{zt(c)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Nn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(zt(c)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return et(re(_t(Ae(u),t,s),ke(([g,,h])=>g&&h),Ln(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),ke(({refreshed:g})=>g),Le(u,t)),([,g])=>{zt(i)&&m(g!==!1)}),et(d,()=>{m(zt(u)!==!1)}),et(_t(Ae(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},lt(jn,ga,fa,pa,xr,br,Wt)),PF=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Le(i),ke(([,c])=>c!==0),Le(o,r,t,n,e),he(([[,c],l,u,d,p,f=[]])=>J0(c,l,u,d,p,f))),a),{}),lt(jn,pa,to,xr),{singleton:!0}),AF=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return et(re(e,Le(r),ke(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Nn(re(n,oi(1),ke(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ne(t,o)})})}),{initialScrollTop:r}},lt(xr,Wt,to),{singleton:!0}),_F=({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,IF=Ye(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{const u=He();return xe(re(u,Le(t,c,n,i,o,r,s),Le(e),he(([[d,p,f,m,g,h,y,v],x])=>{const{align:T,behavior:w,calculateViewLocation:S=_F,done:C,...k}=d,I=q0(d,p,m-1),_=da(I,p.offsetTree,x)+g+h,M=_+bn(p.sizeTree,I)[1],L=v+h,$=v+f-y,A=S({itemBottom:M,itemTop:_,locationParams:{align:T,behavior:w,...k},viewportBottom:$,viewportTop:L});return A?C&&Nn(re(a,ke(N=>!N),oi(zt(a)?1:2)),C):C&&C(),A}),ke(d=>d!==null)),l),{scrollIntoView:u}},lt(jn,Wt,fa,to,br),{singleton:!0}),rw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=He(),r=se(!1);return xe(re(e,Le(r,t,n),ke(([o,i])=>!!i),he(([o,i,a,s])=>{const{enter:c,exit:l}=i;if(a){if(l(o,s))return!1}else if(c(o,s))return!0;return a}),ct()),t),et(re(_t(t,e,n),Le(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},lt(ga),{singleton:!0}),Tf=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=se(!1),a=se(void 0);return xe(re(_t(n,r),he(([{scrollHeight:s,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),xe(re(t,Le(r),he(([s,{offsetTop:c}])=>({...s,top:s.top+c}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},lt(Wt)),OF=Ye(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:c}])=>{const l=He(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(c,p),et(re(l,Le(t,r,a,d,p,n)),([f,m,g,h,y,v,x])=>{const T=pF(m.sizeTree);h&&y!==null&&v!==null&&(g=y.scrollTop-v.offsetTop),g-=x,f({ranges:T,scrollTop:g})}),xe(re(u,ke(lf),he(MF)),o),xe(re(i,Le(u),ke(([,f])=>f!==void 0),ct(),he(([,f])=>f.ranges)),e),{getState:l,restoreStateFrom:u}},lt(jn,Wt,pa,xr,Tf));function MF(e){return{align:"start",index:0,offset:e.scrollTop}}const DF=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,ke(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},lt(to));function ow(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const NF=ow(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),FF=Ye(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(re(c,Le(a),Ln(([,y,v,x],[{bottom:T,items:w,offsetBottom:S,totalCount:C},k])=>{const I=T+S;let _=0;return v===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(_=I-x,_!==0&&(_+=k))),[_,w,C,I]},[0,[],0,0]),ke(([y])=>y!==0),Le(r,s,n,o,f,m),ke(([,y,v,x,,,T])=>!T&&!x&&y!==0&&v===ha),he(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},tn.DEBUG),y))));function h(y){y>0?(Ne(t,{behavior:"auto",top:-y}),Ne(e,0)):(Ne(e,0),Ne(t,{behavior:"auto",top:-y}))}return et(re(g,Le(e,i)),([y,v,x])=>{x&&NF()?Ne(e,v-y):h(-y)}),et(re(_t(Rt(i,!1),e,m),ke(([y,v,x])=>!y&&!x&&v!==0),he(([y,v])=>v),yr(1)),h),xe(re(d,he(y=>({top:-y}))),t),et(re(l,Le(p,u),he(([y,{groupIndices:v,lastSize:x,sizeTree:T},w])=>{function S(C){return C*(x+w)}if(v.length===0)return S(y);{let C=0;const k=ca(T,0);let I=0,_=0;for(;I<y;){I++,C+=k;let M=v.length===_+1?1/0:v[_+1]-v[_]-1;I+M>y&&(C-=k,M=y-I+1),I+=M,C+=S(M),_++}return C}})),y=>{Ne(e,y),requestAnimationFrame(()=>{Ne(t,{top:y}),requestAnimationFrame(()=>{Ne(e,0),Ne(m,!1)})})}),{deviation:e}},lt(Wt,ga,to,jn,br,gf)),LF=Ye(([e,t,n,r,o,i,a,s,c,l])=>({...e,...t,...n,...r,...o,...i,...a,...s,...c,...l}),lt(wf,PF,xr,rw,tw,AF,EF,Tf,IF,br)),iw=Ye(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:c,statefulTotalCount:l,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,y,{listState:v,topItemsIndexes:x,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:k},I])=>(xe(T.rangeChanged,I.scrollSeekRangeChanged),xe(re(I.windowViewportRect,he(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...y,groupIndices:i,itemSize:a,listState:v,scrollToIndex:w,statefulTotalCount:l,trackItemSizes:d,...T,...I,...g,sizes:c,...h}),lt(jn,pa,Wt,OF,kF,to,fa,FF,DF,K0,LF));function VF(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 rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ef(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 c(h,y){h.propsReady&&Ne(h.propsReady,!1);for(const v of r){const x=h[t.required[v]];Ne(x,y[v])}for(const v of o)if(v in y){const x=h[t.optional[v]];Ne(x,y[v])}h.propsReady&&Ne(h.propsReady,!0)}function l(h){return i.reduce((y,v)=>(y[v]=x=>{const T=h[t.methods[v]];Ne(T,x)},y),{})}function u(h){return a.reduce((y,v)=>(y[v]=J2(h[t.events[v]]),y),{})}const d=E.forwardRef((h,y)=>{const{children:v,...x}=h,[T]=E.useState(()=>Gs(tF(e),C=>{c(C,x)})),[w]=E.useState(_0(u,T));rl(()=>{for(const C of a)C in x&&et(w[C],x[C]);return()=>{Object.values(w).map(cf)}},[x,w,T]),rl(()=>{c(T,x)}),E.useImperativeHandle(y,A0(l(T)));const S=n;return b.jsx(s.Provider,{value:T,children:n?b.jsx(S,{...VF([...r,...o,...a],x),children:v}):v})}),p=h=>E.useCallback(I0(Ne,E.useContext(s)[h]),[h]),f=h=>{const y=E.useContext(s)[h],v=E.useCallback(x=>et(y,x),[y]);return E.useSyncExternalStore(v,()=>zt(y),()=>zt(y))},m=h=>{const y=E.useContext(s)[h],[v,x]=E.useState(_0(zt,y));return rl(()=>et(y,T=>{T!==v&&x(A0(T))}),[y,v]),v},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,y)=>{const v=E.useContext(s)[h];rl(()=>et(v,y),[y,v])},useEmitterValue:g,usePublisher:p}}const ol=E.createContext(void 0),aw=E.createContext(void 0),sw=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Cf(e){return"self"in e}function jF(e){return"body"in e}function lw(e,t,n,r=ri,o,i){const a=E.useRef(null),s=E.useRef(null),c=E.useRef(null),l=E.useCallback(p=>{let f,m,g;const h=p.target;if(jF(h)||Cf(h)){const v=Cf(h)?h:h.defaultView;g=i?v.scrollX:v.scrollY,f=i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,m=i?v.innerWidth:v.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?y():wi.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),l({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",l,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",l)}},[a,l,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 m=p.behavior==="smooth";let g,h,y;Cf(f)?(h=Math.max(xn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=xn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const v=h-g;if(p.top=Math.ceil(Math.max(Math.min(v,p.top),0)),G0(g,h)||p.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.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 kf="-webkit-sticky",cw="sticky",uw=ow(()=>{if(typeof document>"u")return cw;const e=document.createElement("div");return e.style.position=kf,e.style.position===kf?kf:cw});function Pf(e){return e}const $F=Ye(()=>{const e=se(c=>`Item ${c}`),t=se(null),n=se(c=>`Group ${c}`),r=se({}),o=se(Pf),i=se("div"),a=se(ri),s=(c,l=null)=>Rt(re(r,he(u=>u[c]),ct()),l);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")}}),zF=Ye(([e,t])=>({...e,...t}),lt(iw,$F)),RF=({height:e})=>b.jsx("div",{style:{height:e}}),BF={overflowAnchor:"none",position:uw(),zIndex:1},dw={overflowAnchor:"none"},HF={...dw,display:"inline-block",height:"100%"},fw=E.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=un("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,c=Ie("itemContent"),l=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),p=Ie("itemSize"),f=Ie("log"),m=un("gap"),g=Ie("horizontalDirection"),{callbackRef:h}=N0(n,p,d,e?ri:s,f,m,o,g,Ie("skipAnimationFrameInResizeObserver")),[y,v]=E.useState(0);If("deviation",A=>{y!==A&&v(A)});const x=Ie("EmptyPlaceholder"),T=Ie("ScrollSeekPlaceholder")||RF,w=Ie("ListComponent"),S=Ie("ItemComponent"),C=Ie("GroupComponent"),k=Ie("computeItemKey"),I=Ie("isSeeking"),_=Ie("groupIndices").length>0,M=Ie("alignToBottom"),L=Ie("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:M?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:M?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...ut(x,l)}):b.jsx(w,{...ut(w,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(A=>{const N=A.originalIndex,O=k(N+t.firstItemIndex,A.data,l);return I?E.createElement(T,{...ut(T,l),height:A.size,index:A.index,key:O,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?E.createElement(C,{...ut(C,l),"data-index":N,"data-item-index":A.index,"data-known-size":A.size,key:O,style:BF},u(A.index,l)):E.createElement(S,{...ut(S,l),...pw(S,A.data),"data-index":N,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:O,style:g?HF:dw},_?c(A.index,A.groupIndex,A.data,l):c(A.index,A.data,l))})})}),WF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},qF={outline:"none",overflowX:"auto",position:"relative"},ai=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),UF={position:uw(),top:0,width:"100%",zIndex:1};function ut(e,t){if(typeof e!="string")return{context:t}}function pw(e,t){return{item:typeof e=="string"?void 0:t}}const KF=E.memo(function(){const e=Ie("HeaderComponent"),t=un("headerHeight"),n=Ie("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null}),YF=E.memo(function(){const e=Ie("FooterComponent"),t=un("footerHeight"),n=Ie("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null});function Af({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),l=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=lw(a,c,s,l,void 0,d);return e("scrollTo",m),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?qF:WF,...o},tabIndex:0,...i,...ut(s,u),children:r})})}function _f({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),l=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=lw(a,c,s,m,d);return sw(()=>{var v;return h.current=d||((v=f.current)==null?void 0:v.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",y),e("scrollBy",g),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...l!==0?{height:l+u}:{}},...i,...ut(s,p),children:r})})}const GF=({children:e})=>{const t=E.useContext(ol),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=E.useMemo(()=>sa(n,c=>xn(c,i?"width":"height")),[n,i]),s=Vn(a,!0,Ie("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ai(o),children:e})},ZF=({children:e})=>{const t=E.useContext(ol),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Ie("customScrollParent"),i=df(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(a),children:e})},XF=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...UF,marginTop:`${n}px`},o=Ie("context");return b.jsx(t,{style:r,...ut(t,o),children:e})},QF=E.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?tL:eL,a=r||t?ZF:GF;return b.jsxs(i,{...e,...ut(i,o),children:[n&&b.jsx(XF,{children:b.jsx(fw,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(KF,{}),b.jsx(fw,{}),b.jsx(YF,{})]})]})}),{Component:JF,useEmitter:If,useEmitterValue:Ie,usePublisher:un}=Ef(zF,{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:{}},QF),eL=Af({useEmitter:If,useEmitterValue:Ie,usePublisher:un}),tL=_f({useEmitter:If,useEmitterValue:Ie,usePublisher:un}),Of=JF,nL=Ye(()=>{const e=se(c=>b.jsxs("td",{children:["Item $",c]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(Pf),a=se(ri),s=(c,l=null)=>Rt(re(o,he(u=>u[c]),ct()),l);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")}}),rL=Ye(([e,t])=>({...e,...t}),lt(iw,nL)),oL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),iL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),aL={overflowAnchor:"none"},hw=E.memo(function({showTopList:e=!1}){const t=Ve("listState"),n=Ve("computeItemKey"),r=Ve("firstItemIndex"),o=Ve("isSeeking"),i=Ve("ScrollSeekPlaceholder")||oL,a=Ve("context"),s=Ve("TableRowComponent"),c=Ve("fixedHeaderHeight"),l=Ve("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=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:m,type:p.type||"item"}):E.createElement(s,{...ut(s,a),...pw(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:c+g,zIndex:2}:aL},l(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),sL=E.memo(function(){const e=Ve("listState"),t=Ve("topItemsIndexes").length>0,n=wn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,c=Ve("trackItemSizes"),l=Ve("itemSize"),u=Ve("log"),{callbackRef:d,ref:p}=N0(n,l,c,s,u,void 0,o,!1,Ve("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Mf("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,m(_))});const g=Ve("EmptyPlaceholder"),h=Ve("FillerRow")||iL,y=Ve("TableBodyComponent"),v=Ve("paddingTopAddition"),x=Ve("statefulTotalCount"),T=Ve("context");if(x===0&&g)return b.jsx(g,{...ut(g,T)});const w=(t?e.topItems:[]).reduce((_,M)=>_+M.size,0),S=e.offsetTop+v+f-w,C=e.offsetBottom,k=S>0?b.jsx(h,{context:T,height:S},"padding-top"):null,I=C>0?b.jsx(h,{context:T,height:C},"padding-bottom"):null;return b.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...ut(y,T),children:[k,t&&b.jsx(hw,{showTopList:!0}),b.jsx(hw,{}),I]})}),lL=({children:e})=>{const t=E.useContext(ol),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Vn(E.useMemo(()=>sa(n,i=>xn(i,"height")),[n]),!0,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:ai(!1),children:e})},cL=({children:e})=>{const t=E.useContext(ol),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Ve("customScrollParent"),i=df(n,o,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(!1),children:e})},uL=E.memo(function(e){const t=Ve("useWindowScroll"),n=Ve("customScrollParent"),r=wn("fixedHeaderHeight"),o=wn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),s=Ve("context"),c=Vn(E.useMemo(()=>sa(r,y=>xn(y,"height")),[r]),!0,Ve("skipAnimationFrameInResizeObserver")),l=Vn(E.useMemo(()=>sa(o,y=>xn(y,"height")),[o]),!0,Ve("skipAnimationFrameInResizeObserver")),u=n||t?pL:fL,d=n||t?cL:lL,p=Ve("TableComponent"),f=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),g=i?b.jsx(f,{ref:c,style:{position:"sticky",top:0,zIndex:2},...ut(f,s),children:i()},"TableHead"):null,h=a?b.jsx(m,{ref:l,style:{bottom:0,position:"sticky",zIndex:1},...ut(m,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...ut(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ut(p,s),children:[g,b.jsx(sL,{},"TableBody"),h]})})})}),{Component:dL,useEmitter:Mf,useEmitterValue:Ve,usePublisher:wn}=Ef(rL,{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:{}},uL),fL=Af({useEmitter:Mf,useEmitterValue:Ve,usePublisher:wn}),pL=_f({useEmitter:Mf,useEmitterValue:Ve,usePublisher:wn}),hL=dL,mw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},mL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:gw,floor:il,max:va,min:Df,round:vw}=Math;function yw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function gL(e){return{...mL,items:e}}function al(e,t){return e&&e.width===t.width&&e.height===t.height}function vL(e,t){return e&&e.column===t.column&&e.row===t.row}const yL=Ye(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:v,windowScrollTo:x,windowViewportRect:T},w])=>{const S=se(0),C=se(0),k=se(mw),I=se({height:0,width:0}),_=se({height:0,width:0}),M=He(),L=He(),$=se(0),A=se(null),N=se({column:0,row:0}),O=He(),V=He(),F=se(!1),B=se(0),D=se(!0),z=se(!1),J=se(!1);et(re(m,Le(B),ke(([j,R])=>!!R)),()=>{Ne(D,!1)}),et(re(_t(m,D,_,I,B,z),ke(([j,R,K,ae,,H])=>j&&!R&&K.height!==0&&ae.height!==0&&!H)),([,,,,j])=>{Ne(z,!0),bf(1,()=>{Ne(M,j)}),Nn(re(l),()=>{Ne(t,[0,0]),Ne(D,!0)})}),xe(re(V,ke(j=>j!=null&&j.scrollTop>0),Fn(0)),C),et(re(m,Le(V),ke(([,j])=>j!=null)),([,j])=>{j&&(Ne(I,j.viewport),Ne(_,j.item),Ne(N,j.gap),j.scrollTop>0&&(Ne(F,!0),Nn(re(l,oi(1)),R=>{Ne(F,!1)}),Ne(c,{top:j.scrollTop})))}),xe(re(I,he(({height:j})=>j)),d),xe(re(_t(Ae(I,al),Ae(_,al),Ae(N,(j,R)=>j&&j.column===R.column&&j.row===R.row),Ae(l)),he(([j,R,K,ae])=>({gap:K,item:R,scrollTop:ae,viewport:j}))),O),xe(re(_t(Ae(S),r,Ae(N,vL),Ae(_,al),Ae(I,al),Ae(A),Ae(C),Ae(F),Ae(D),Ae(B)),ke(([,,,,,,,j])=>!j),he(([j,[R,K],ae,H,be,Ce,_e,,Re,le])=>{const{column:we,row:ce}=ae,{height:Se,width:ie}=H,{width:de}=be;if(_e===0&&(j===0||de===0))return mw;if(ie===0){const Tn=xf(le,j),Bn=Tn+Math.max(_e-1,0);return gL(yw(Tn,Bn,Ce))}const ee=bw(de,ie,we);let q,ne;Re?R===0&&K===0&&_e>0?(q=0,ne=_e-1):(q=ee*il((R+ce)/(Se+ce)),ne=ee*gw((K+ce)/(Se+ce))-1,ne=Df(j-1,va(ne,ee-1)),q=Df(ne,va(0,q))):(q=0,ne=-1);const me=yw(q,ne,Ce),{bottom:De,top:Ue}=xw(be,ae,H,me),Xe=gw(j/ee),Lt=Xe*Se+(Xe-1)*ce-De;return{bottom:De,itemHeight:Se,items:me,itemWidth:ie,offsetBottom:Lt,offsetTop:Ue,top:Ue}})),k),xe(re(A,ke(j=>j!==null),he(j=>j.length)),S),xe(re(_t(I,_,k,N),ke(([j,R,{items:K}])=>K.length>0&&R.height!==0&&j.height!==0),he(([j,R,{items:K},ae])=>{const{bottom:H,top:be}=xw(j,ae,R,K);return[be,H]}),ct(ua)),t);const X=se(!1);xe(re(l,Le(X),he(([j,R])=>R||j!==0)),X);const Q=en(re(_t(k,S),ke(([{items:j}])=>j.length>0),Le(X),ke(([[j,R],K])=>{const ae=j.items[j.items.length-1].index===R-1;return(K||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===R)&&ae}),he(([[,j]])=>j-1),ct())),Z=en(re(Ae(k),ke(({items:j})=>j.length>0&&j[0].index===0),Fn(0),ct())),Y=en(re(Ae(k),Le(F),ke(([{items:j},R])=>j.length>0&&!R),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),ct(B0),yr(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(M,Le(I,_,S,N),he(([j,R,K,ae,H])=>{const be=Y0(j),{align:Ce,behavior:_e,offset:Re}=be;let le=be.index;le==="LAST"&&(le=ae-1),le=va(0,le,Df(ae-1,le));let we=Nf(R,H,K,le);return Ce==="end"?we=vw(we-R.height+K.height):Ce==="center"&&(we=vw(we-R.height/2+K.height/2)),Re&&(we+=Re),{behavior:_e,top:we}})),c);const G=Rt(re(k,he(j=>j.offsetBottom+j.bottom)),0);return xe(re(T,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),I),{customScrollParent:h,data:A,deviation:$,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:c,scrollToIndex:M,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:y,viewportDimensions:I,windowScrollContainerState:v,windowScrollTo:x,windowViewportRect:T,...f,gridState:k,horizontalDirection:J,initialTopMostItemIndex:B,totalListHeight:G,...p,endReached:Q,propsReady:g,rangeChanged:Y,startReached:Z,stateChanged:O,stateRestoreInProgress:F,...w}},lt(wf,Wt,ga,rw,xr,Tf,br));function bw(e,t,n){return va(1,il((e+n)/(il(t)+n)))}function xw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Nf(e,t,n,r[0].index);return{bottom:Nf(e,t,n,r[r.length-1].index)+o,top:i}}function Nf(e,t,n,r){const o=bw(e.width,n.width,t.column),i=il(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const bL=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(Pf),a=se("div"),s=se(ri),c=(d,p=null)=>Rt(re(t,he(f=>f[d]),ct()),p),l=se(!1),u=se(!1);return xe(Ae(u),l),{components:t,computeItemKey:i,context:n,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:c("Item","div"),itemContent:e,listClassName:o,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),xL=Ye(([e,t])=>({...e,...t}),lt(yL,bL)),wL=E.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=dn("scrollHeight"),s=ht("ItemComponent"),c=ht("ListComponent"),l=ht("ScrollSeekPlaceholder"),u=ht("context"),d=dn("itemDimensions"),p=dn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=dn("reportReadyState"),h=Vn(E.useMemo(()=>y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const x=y.firstChild;if(x){const{height:T,width:w}=x.getBoundingClientRect();d({height:T,width:w})}p({column:Sw("column-gap",getComputedStyle(y).columnGap,f),row:Sw("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return sw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:b.jsx(c,{className:t,ref:h,...ut(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const v=o(y.index,y.data,u);return i?b.jsx(l,{...ut(l,u),height:e.itemHeight,index:y.index,width:e.itemWidth},v):E.createElement(s,{...ut(s,u),className:n,"data-index":y.index,key:v},r(y.index,y.data,u))})})}),SL=E.memo(function(){const e=ht("HeaderComponent"),t=dn("headerHeight"),n=ht("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,!1),o=ht("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null}),TL=E.memo(function(){const e=ht("FooterComponent"),t=dn("footerHeight"),n=ht("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,!1),o=ht("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null}),EL=({children:e})=>{const t=E.useContext(aw),n=dn("itemDimensions"),r=dn("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]),b.jsx("div",{ref:o,style:ai(!1),children:e})},CL=({children:e})=>{const t=E.useContext(aw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ht("customScrollParent"),i=df(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]),b.jsx("div",{ref:i,style:ai(!1),children:e})},kL=E.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?AL:PL,o=n||t?CL:EL,i=ht("context");return b.jsx(r,{...e,...ut(r,i),children:b.jsxs(o,{children:[b.jsx(SL,{}),b.jsx(wL,{}),b.jsx(TL,{})]})})}),{useEmitter:ww,useEmitterValue:ht,usePublisher:dn}=Ef(xL,{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"}},kL),PL=Af({useEmitter:ww,useEmitterValue:ht,usePublisher:dn}),AL=_f({useEmitter:ww,useEmitterValue:ht,usePublisher:dn});function Sw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Ff=()=>{const e=E.useContext(Vo);return e?e.tweaks:bs},Tw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>b.jsxs("span",{className:Oe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:b.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?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?b.jsx(sf,{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:b.jsx("span",{className:"cursor-help",children:b.jsx(Ty,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:b.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?b.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[b.jsx(xy,{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}),b.jsx(b_,{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]}),ya=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:c,error:l,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:y=!1,required:v,disabled:x,reportStatus:T},w)=>{const S=Ff(),C=T!==void 0?T:S.input.iconFeedback,k=d??f,I=Pt(),_=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!l,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[b.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:[b.jsx(Tw,{info:s,hideLeft:y,reportStatus:C,title:m,placeholder:h,children:_||n?b.jsxs(E.Fragment,{children:[v?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:_}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.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?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,c,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.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:l}),b.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})]})}),_L=e=>b.jsx(E.Fragment,{children:e.children}),IL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},OL=[],ML=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(tr,{children:t.children})})}),DL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),NL={List:ML,Item:DL},si=40,FL=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:c,optionalText:l,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const y=E.useRef(null),v=E.useRef(null),x=E.useRef(null),T=g.value??g.defaultValue??"",w=Pt(),[S,C]=E.useState(()=>Math.min(320,si*o.length)),[k,I]=E.useState(!1),[_,M]=E.useState(""),[L,$]=E.useState(T),[A,N]=E.useState(()=>{var ie;return((ie=o.find(de=>de.value===T))==null?void 0:ie.label)??T}),[O,V]=E.useState(null),F=E.useRef(OL),B=rf(k,"block-only"),D=m&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,z=_?tf(D,"value",[{key:"value",value:_},{key:"label",value:_}]):D,J=()=>{I(!1),C(0)},X=z.filter(ie=>ie.hidden!==!0),Q=m?void 0:`^(${o.map(ie=>`${ud(ie.value)}${ie.label?"|"+ud(ie.label):""}`).join("|")})$`,{x:Z,y:Y,strategy:G,refs:j,context:R}=mr({open:k,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:Uo,middleware:[ta(4),Ix({padding:10,elementContext:"reference",apply(ie){const de=ie.elements.floating.querySelector("ul"),ee=(de==null?void 0:de.getBoundingClientRect().height)||0,q=Ti(j.reference.current,window.innerHeight),ne=Math.min(ee<si?q:ee,q,ie.availableHeight),me=X.length===0?si:Math.min(ne,q,ee),De=`${v.current.getBoundingClientRect().width}px`;Object.assign(ie.elements.floating.style,{width:De,maxWidth:De,height:me})}})]}),K=d0(R,IL),{getReferenceProps:ae,getFloatingProps:H,getItemProps:be}=gr([Jr(R,{role:"listbox"}),Qr(R),Ws(R,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const ie=o.find(de=>de.value===g.value);$((ie==null?void 0:ie.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!k)return C(0);const ie=j.reference;if(ie.current===null)return;const de=Ti(ie.current,window.innerHeight);setTimeout(()=>C(Math.min(de,X.length*si)),100)},[_,k,j.reference]),E.useEffect(()=>{const ie=j.reference.current;if(ie)return Si(ie)},[]);const Ce=(ie,de)=>{$(ie.value);const ee=j.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",ie.value),ee.value=ie.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),N(ie.label??""),J(),M(""),V(de)},_e=ie=>{var ee;const de=ie.target.value;return M(de),!k&&de===""?I(!0):(ie.target.name=g.name||"",de?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,ie))},Re=()=>{var ie;I(!0),M(""),(ie=j.reference.current)==null||ie.focus()},le=()=>{V(ie=>ie===null?0:ie),I(!0),M("")},we=()=>{var ie;(ie=j.reference.current)==null||ie.setAttribute("data-value",""),M(""),$(""),N(""),em(j.reference.current),J()},ce=g.id||g.name,Se=X.length===0;return b.jsxs(ya,{...g,left:e,error:t,ref:v,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:l,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Re,children:[b.jsx(Hu,{size:20}),b.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),L?b.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("input",{"data-shadow":"true",...ae({...g,onChange:_e,onFocus:le,pattern:Q,ref:j.setReference,name:`${ce}-shadow`,id:`${ce}-shadow`,onClick:ie=>ie.currentTarget.focus(),onKeyDown(ie){var de,ee;if(ie.key==="Escape")return ie.currentTarget.blur(),J();if(k){if(ie.key==="ArrowDown"){let q=$e.number(O)?O+1:0;return q>X.length-1&&(q=0),(de=x.current)==null||de.scrollIntoView({index:q}),V(q)}if(ie.key==="ArrowUp"){let q=$e.number(O)?O-1:X.length-1;return q<0&&(q=X.length-1),(ee=x.current)==null||ee.scrollIntoView({index:q}),V(q)}if(ie.key==="Enter"){if(O!==null&&X[O])return ie.preventDefault(),Ce(X[O],O);if(X.length===1)return ie.preventDefault(),Ce(X[0],0)}}}}),"data-value":L,"data-error":!!t,"data-name":ce,"data-target":ce,required:f,value:k?_:A||L,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary text-base",g.className)}),b.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||L||void 0}),b.jsx(Zr,{preserveTabOrder:!0,children:k?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:R,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs(ft.div,{...H({ref:Hn(B,j.setFloating),style:{...K.styles,left:Z,top:Y??0,position:G}}),initial:!1,"data-floating":"true",animate:{height:Se?"auto":S},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 de=j.floating.current.querySelectorAll("li").item(0),ee=(de?de.getBoundingClientRect().height:si)*X.length;return wi.flushSync(()=>C(ee+2))},children:[Se?b.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:c||w.autocompleteEmpty})}):null,b.jsx(Of,{overscan:40,ref:x,hidden:Se,data:X,style:{height:S},defaultItemHeight:si,components:NL,scrollerRef:ie=>void(y.current=ie),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ie,de)=>{const ee=de.Render??_L,q=L===de.value||L===de.label,ne=O===ie,me=de.label??de.value;return b.jsx("button",{"data-value":de.value,...be({ref:De=>void(F.current[ie]=De),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":de.disabled,onClick:()=>Ce(de,ie),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${ne?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(ee,{...g,label:de.label,value:de.value,children:me})})}})]})}):null})]})}),Lf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...c},l)=>{const u=c.disabled||r;return b.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[b.jsx("input",{...c,ref:l,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,b.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Ew=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:c,right:l,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:v,...x},T)=>{const w=e,S=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=Si(C.current),_=r==null?void 0:r(k),M=L=>{const $=L;if($.key==="Enter"&&k.enterKeyHint==="next"){const A=k.getAttribute("data-next");if(A){const N=document.getElementById(A);if(N)return N.focus(),void $.preventDefault()}}};return k.addEventListener("keydown",M),()=>{_==null||_(),I(),k.removeEventListener("keydown",M)}},[]),b.jsx(ya,{...n,info:i,left:a,error:c,right:l,loading:v,form:x.form,name:x.name,feedback:h,hideLeft:y,title:x.title,container:Oe(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:b.jsx(w,{...n,...x,id:S,name:S,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Hn(T,C),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=Ew(ob,"input",{type:"text"}),Cw=new Date(1970,11,31),Vf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},kw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},LL={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")},jf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},VL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=ld(t),c=E.useId(),l=Pt(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=jf(u,Cw).flatMap(C=>$e.keyof(Vf,C.type)?Vf[C.type](C.value):[]),h=jf(u,Cw).reduce((C,k)=>C+($e.keyof(kw,k.type)?kw[k.type](k.value):""),""),[y,v]=E.useState(d?jf(u,d).reduce((C,k)=>C+($e.keyof(Vf,k.type)?LL[k.type](d,k.value):""),""):""),x=C=>{const k=C.target.value;if(v(k),g.length===k.length&&g.every((_,M)=>{const L=k.charAt(M);return typeof _=="string"?L===_:_.test(L)})){const _=Do(DO(k,h,new Date));return p(_),r==null?void 0:r(_)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),v(C?DI(C,h):"")),w=Iy(d),S=w?d.toISOString():void 0;return b.jsx(ba,{...i,mask:g,value:y,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(ti,{open:f,onChange:m,trigger:b.jsxs("span",{"aria-labelledby":c,children:[b.jsx("span",{id:c,className:"sr-only",children:l.datePickerCalendarButtonLabel}),b.jsx(v_,{})]}),buttonProps:{"aria-describedby":c},children:b.jsx(kb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),jL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],$L=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],zL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],RL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Pw=(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 Aw(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?RL:zL:t.binary?$L:jL,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=Pw(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 c=Pw(Number(e),t.locale,a),l=n[s];return i+c+r+l}var sl={exports:{}},ll={exports:{}},Ge={};/** @license React v16.13.1
|
|
187
|
+
*/var WD=["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])"],Ms=WD.join(","),hx=typeof Element>"u",Wo=hx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ds=!hx&&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},Ns=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},qD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},UD=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&Wo.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},KD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ns(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=Wo.call(a,Ms);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ns(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},mx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},gx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qD(t))&&!mx(t)?0:t.tabIndex},YD=function(t,n){var r=gx(t);return r<0&&n&&!mx(t)?0:r},GD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},vx=function(t){return t.tagName==="INPUT"},ZD=function(t){return vx(t)&&t.type==="hidden"},XD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JD=function(t){if(!t.name)return!0;var n=t.form||Ds(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=QD(o,t.form);return!i||i===t},eN=function(t){return vx(t)&&t.type==="radio"},tN=function(t){return eN(t)&&!JD(t)},nN=function(t){var n,r=t&&Ds(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=Ds(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},yx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rN=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wo.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=Ds(t);if(l&&!l.shadowRoot&&o(l)===!0)return yx(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(nN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yx(t);return!1},oN=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 Wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},iN=function(t,n){return!(n.disabled||Ns(n)||ZD(n)||rN(n,t)||XD(n)||oN(n))},$d=function(t,n){return!(tN(n)||gx(n)<0||!iN(t,n))},aN=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sN=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=YD(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(GD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ea=function(t,n){n=n||{};var r;return n.getShadowRoot?r=KD([t],n.includeContainer,{filter:$d.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:aN}):r=UD(t,n.includeContainer,$d.bind(null,n)),sN(r)},lN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wo.call(t,Ms)===!1?!1:$d(n,t)};function bx(e,t,n){let{reference:r,floating:o}=e;const i=Kr(t),a=Vd(t),s=Ld(a),l=ur(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(Ho(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const cN=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}=bx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x:v,y:x,data:S,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=v??u,d=x??d,f={...f,[h]:{...f[h],...S}},w&&m<=50&&(m++,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}=bx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function zd(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}=Bo(t,e),m=px(f),h=s[p?d==="floating"?"reference":"floating":d],y=Os(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:l}):v);return{top:(y.top-w.top+m.top)/S.y,bottom:(w.bottom-y.bottom+m.bottom)/S.y,left:(y.left-w.left+m.left)/S.x,right:(w.right-y.right+m.right)/S.x}}const uN=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}=Bo(e,t)||{};if(c==null)return{};const d=px(u),p={x:n,y:r},f=Vd(o),m=Ld(f),g=await a.getDimensions(c),h=f==="y",y=h?"top":"left",v=h?"bottom":"right",x=h?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[x]||i.floating[m]);const k=S/2-w/2,I=C/2-g[m]/2-1,_=Dn(d[y],I),M=Dn(d[v],I),L=_,$=C-g[m]-M,A=C/2-g[m]/2+k,N=Fd(L,A,$),O=!l.arrow&&Ho(o)!=null&&A!==N&&i.reference[m]/2-(A<L?_:M)-g[m]/2<0,V=O?A<L?A-L:A-$:0;return{[f]:p[f]+V,data:{[f]:N,centerOffset:A-N-V,...O&&{alignmentOffset:V}},reset:O}}}),dN=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:m="none",flipAlignment:g=!0,...h}=Bo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ur(o),v=Kr(s),x=ur(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Is(s)]:zD(s)),T=m!=="none";!p&&T&&w.push(...BD(s,g,m,S));const C=[s,...w],k=await zd(t,h),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const A=$D(o,a,S);I.push(k[A[0]],k[A[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(A=>A<=0)){var M,L;const A=(((M=i.flip)==null?void 0:M.index)||0)+1,N=C[A];if(N)return{data:{index:A,overflows:_},reset:{placement:N}};let O=(L=_.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!O)switch(f){case"bestFit":{var $;const V=($=_.filter(F=>{if(T){const B=Kr(F.placement);return B===v||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,D)=>B+D,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:$[0];V&&(O=V);break}case"initialPlacement":O=s;break}if(o!==O)return{reset:{placement:O}}}return{}}}};async function fN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ur(n),s=Ho(n),l=Kr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Bo(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const pN=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 fN(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}}}}},hN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:v}=h;return{x:y,y:v}}},...l}=Bo(e,t),c={x:n,y:r},u=await zd(t,l),d=Kr(ur(o)),p=fx(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+u[h],x=f-u[y];f=Fd(v,f,x)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=m+u[h],x=m-u[y];m=Fd(v,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},mN=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}=Bo(e,t),l=await zd(t,s),c=ur(n),u=Ho(n),d=Kr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,y=p-l.left-l.right,v=Dn(f-l[m],h),x=Dn(p-l[g],y),S=!t.middlewareData.shift;let w=v,T=x;if(d?T=u||S?Dn(x,y):y:w=u||S?Dn(v,h):h,S&&!u){const k=Jt(l.left,0),I=Jt(l.right,0),_=Jt(l.top,0),M=Jt(l.bottom,0);d?T=p-2*(k!==0||I!==0?k+I:Jt(l.left,l.right)):w=f-2*(_!==0||M!==0?_+M:Jt(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 xx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ct(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_s(n)!==i||_s(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Rd(e){return nt(e)?e:e.contextElement}function qo(e){const t=Rd(e);if(!Ct(t))return cr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=xx(t);let a=(i?_s(n.width):n.width)/r,s=(i?_s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const gN=cr(0);function wx(e){const t=Ht(e);return!Pd()||!t.visualViewport?gN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Rd(e);let a=cr(1);t&&(r?nt(r)&&(a=qo(r)):a=qo(e));const s=vN(i,n,r)?wx(i):cr(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=Ht(i),f=r&&nt(r)?Ht(r):r;let m=p,g=Ad(m);for(;g&&r&&f!==m;){const h=qo(g),y=g.getBoundingClientRect(),v=Qt(g),x=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*h.x,S=y.top+(g.clientTop+parseFloat(v.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=S,m=Ht(g),g=Ad(m)}}return Os({width:u,height:d,x:l,y:c})}function yN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Kn(r),s=t?Ps(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=cr(1);const u=cr(0),d=Ct(r);if((d||!d&&!i)&&((ar(r)!=="body"||Ji(a))&&(l=As(r)),Ct(r))){const p=Yr(r);c=qo(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 bN(e){return Array.from(e.getClientRects())}function Sx(e){return Yr(Kn(e)).left+As(e).scrollLeft}function xN(e){const t=Kn(e),n=As(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sx(e);const s=-n.scrollTop;return Qt(r).direction==="rtl"&&(a+=Jt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function wN(e,t){const n=Ht(e),r=Kn(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=Pd();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function SN(e,t){const n=Yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ct(e)?qo(e):cr(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 Tx(e,t,n){let r;if(t==="viewport")r=wN(e,n);else if(t==="document")r=xN(Kn(e));else if(nt(t))r=SN(t,n);else{const o=wx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Os(r)}function Ex(e,t){const n=Yn(e);return n===t||!nt(n)||sr(n)?!1:Qt(n).position==="fixed"||Ex(n,t)}function TN(e,t){const n=t.get(e);if(n)return n;let r=lr(e,[],!1).filter(s=>nt(s)&&ar(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Yn(e):e;for(;nt(a)&&!sr(a);){const s=Qt(a),l=kd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ji(a)&&!l&&Ex(e,a))?r=r.filter(u=>u!==a):o=s,a=Yn(a)}return t.set(e,r),r}function EN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ps(t)?[]:TN(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Tx(t,u,o);return c.top=Jt(d.top,c.top),c.right=Dn(d.right,c.right),c.bottom=Dn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},Tx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function CN(e){const{width:t,height:n}=xx(e);return{width:t,height:n}}function kN(e,t,n){const r=Ct(t),o=Kn(t),i=n==="fixed",a=Yr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=cr(0);if(r||!r&&!i)if((ar(t)!=="body"||Ji(o))&&(s=As(t)),r){const d=Yr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Sx(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 Bd(e){return Qt(e).position==="static"}function Cx(e,t){return!Ct(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function kx(e,t){const n=Ht(e);if(Ps(e))return n;if(!Ct(e)){let o=Yn(e);for(;o&&!sr(o);){if(nt(o)&&!Bd(o))return o;o=Yn(o)}return n}let r=Cx(e,t);for(;r&&OD(r)&&Bd(r);)r=Cx(r,t);return r&&sr(r)&&Bd(r)&&!kd(r)?n:r||MD(e)||n}const PN=async function(e){const t=this.getOffsetParent||kx,n=this.getDimensions,r=await n(e.floating);return{reference:kN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AN(e){return Qt(e).direction==="rtl"}const _N={convertOffsetParentRelativeRectToViewportRelativeRect:yN,getDocumentElement:Kn,getClippingRect:EN,getOffsetParent:kx,getElementRects:PN,getClientRects:bN,getDimensions:CN,getScale:qo,isElement:nt,isRTL:AN};function IN(e,t){let n=null,r;const o=Kn(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),m=Ro(o.clientWidth-(c+d)),g=Ro(o.clientHeight-(u+p)),h=Ro(c),v={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Dn(1,l))||1};let x=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return a(!0),i}function Uo(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=Rd(e),u=o||i?[...c?lr(c):[],...lr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?IN(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Yr(e):null;l&&h();function h(){const y=Yr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const ON=pN,MN=hN,DN=dN,NN=mN,Px=uN,FN=(e,t,n)=>{const r=new Map,o={platform:_N,...n},i={...o.platform,_c:r};return cN(e,t,{...o,platform:i})};var Fs=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ls(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(!Ls(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)&&!Ls(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ax(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _x(e,t){const n=Ax(e);return Math.round(t*n)/n}function Hd(e){const t=P.useRef(e);return Fs(()=>{t.current=e}),t}function LN(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]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(r);Ls(p,r)||f(r);const[m,g]=P.useState(null),[h,y]=P.useState(null),v=P.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),x=P.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),S=i||m,w=a||h,T=P.useRef(null),C=P.useRef(null),k=P.useRef(u),I=l!=null,_=Hd(l),M=Hd(o),L=Hd(c),$=P.useCallback(()=>{if(!T.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};M.current&&(F.platform=M.current),FN(T.current,C.current,F).then(B=>{const D={...B,isPositioned:L.current!==!1};A.current&&!Ls(k.current,D)&&(k.current=D,Oa.flushSync(()=>{d(D)}))})},[p,t,n,M,L]);Fs(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const A=P.useRef(!1);Fs(()=>(A.current=!0,()=>{A.current=!1}),[]),Fs(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(_.current)return _.current(S,w,$);$()}},[S,w,$,_,I]);const N=P.useMemo(()=>({reference:T,floating:C,setReference:v,setFloating:x}),[v,x]),O=P.useMemo(()=>({reference:S,floating:w}),[S,w]),V=P.useMemo(()=>{const F={position:n,left:0,top:0};if(!O.floating)return F;const B=_x(O.floating,u.x),D=_x(O.floating,u.y);return s?{...F,transform:"translate("+B+"px, "+D+"px)",...Ax(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:D}},[n,s,O.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:N,elements:O,floatingStyles:V}),[u,$,N,O,V])}const VN=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?Px({element:r.current,padding:o}).fn(n):{}:r?Px({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...ON(e),options:[e,t]}),Wd=(e,t)=>({...MN(e),options:[e,t]}),qd=(e,t)=>({...DN(e),options:[e,t]}),Ix=(e,t)=>({...NN(e),options:[e,t]}),Ox=(e,t)=>({...VN(e),options:[e,t]}),Mx={...P},jN=Mx.useInsertionEffect||(e=>e());function At(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jN(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Ud="ArrowUp",na="ArrowDown",Ko="ArrowLeft",Yo="ArrowRight";function Vs(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Kd(e,t){return $t(e,{disabledIndices:t})}function Dx(e,t){return $t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $t(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&&js(a,s,o));return s}function $N(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===Ud){if(u&&Nt(n),c===-1)d=l;else if(d=$t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Nt(n),c===-1?d=s:(d=$t(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=$t(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=Ro(c/i);n.key===Yo&&(u&&Nt(n),c%i!==i-1?(d=$t(e,{startingIndex:c,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c-c%i-1,disabledIndices:a})),Vs(d,i,p)&&(d=c)),n.key===Ko&&(u&&Nt(n),c%i!==0?(d=$t(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Vs(d,i,p)&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=$t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Vs(d,i,p)&&(d=c));const f=Ro(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Ko?l:$t(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function zN(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 RN(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 BN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function js(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 Nx=0;function dr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Nx);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Nx=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function HN(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 WN(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 Fx=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function qN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Map),a=P.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=P.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(HN).forEach((u,d)=>{l.set(u,d)}),WN(o,l)||i(l)},[o]),P.createElement(Fx.Provider,{value:P.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Lx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=P.useContext(Fx),[s,l]=P.useState(null),c=P.useRef(null),u=P.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]),P.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Go(){return Go=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},Go.apply(this,arguments)}let Vx=!1,UN=0;const jx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+UN++;function KN(){const[e,t]=P.useState(()=>Vx?jx():void 0);return We(()=>{e==null&&t(jx())},[]),P.useEffect(()=>{Vx=!0},[]),e}const Zo=Mx.useId||KN;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function $s(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function YN(){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=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const $x=P.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,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Zo(),[y,v]=P.useState(!1);if(We(()=>{if(!o)return;Qt(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const x=c*2,S=x/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),I=!!p,_=C==="top"||C==="bottom",M=u&&k==="end"?"bottom":"top";let L=u&&k==="end"?"right":"left";u&&y&&(L=k==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",N=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",O={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",Go({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[L]:$,[M]:A,[C]:_||I?"100%":"calc(100% - "+x/2+"px)",transform:""+O+(f??""),...m}}),x>0&&P.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:N}),P.createElement("path",{stroke:x&&!p?g.fill:"none",d:N}),P.createElement("clipPath",{id:h},P.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+x,height:a})))});function zx(){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 Rx=P.createContext(null),Bx=P.createContext(null),fr=()=>{var e;return((e=P.useContext(Rx))==null?void 0:e.id)||null},pr=()=>P.useContext(Bx);function GN(e){const t=Zo(),n=pr(),o=fr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function ZN(e){const{children:t,id:n}=e,r=fr();return P.createElement(Rx.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function XN(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(a=>{n.current=[...n.current,a]},[]),o=P.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=P.useState(()=>zx())[0];return P.createElement(Bx.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function hr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const Hx=hr("safe-polygon");function Yd(e,t,n){return n&&!zo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Wx(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=pr(),m=fr(),g=Ft(c),h=Ft(l),y=Ft(n),v=P.useRef(),x=P.useRef(-1),S=P.useRef(),w=P.useRef(-1),T=P.useRef(!0),C=P.useRef(!1),k=P.useRef(()=>{}),I=P.useCallback(()=>{var N;const O=(N=o.current.openEvent)==null?void 0:N.type;return(O==null?void 0:O.includes("mouse"))&&O!=="mousedown"},[o]);P.useEffect(()=>{if(!s)return;function N(O){let{open:V}=O;V||(clearTimeout(x.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[s,i]),P.useEffect(()=>{if(!s||!g.current||!n)return;function N(V){I()&&r(!1,V,"hover")}const O=Mt(a.floating).documentElement;return O.addEventListener("mouseleave",N),()=>{O.removeEventListener("mouseleave",N)}},[a.floating,n,r,s,g,I]);const _=P.useCallback(function(N,O,V){O===void 0&&(O=!0),V===void 0&&(V="hover");const F=Yd(h.current,"close",v.current);F&&!S.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,N,V),F)):O&&(clearTimeout(x.current),r(!1,N,V))},[h,r]),M=At(()=>{k.current(),S.current=void 0}),L=At(()=>{if(C.current){const N=Mt(a.floating).body;N.style.pointerEvents="",N.removeAttribute(Hx),C.current=!1}});P.useEffect(()=>{if(!s)return;function N(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function O(D){if(clearTimeout(x.current),T.current=!1,u&&!zo(v.current)||d>0&&!Yd(h.current,"open"))return;const R=Yd(h.current,"open",v.current);R?x.current=window.setTimeout(()=>{y.current||r(!0,D,"hover")},R):r(!0,D,"hover")}function V(D){if(N())return;k.current();const R=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),S.current=g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D,!0,"safe-polygon")}});const X=S.current;R.addEventListener("mousemove",X),k.current=()=>{R.removeEventListener("mousemove",X)};return}(v.current==="touch"?!xt(a.floating,D.relatedTarget):!0)&&_(D)}function F(D){N()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){L(),M(),_(D)}})(D))}if(nt(a.domReference)){var B;const D=a.domReference;return n&&D.addEventListener("mouseleave",F),(B=a.floating)==null||B.addEventListener("mouseleave",F),p&&D.addEventListener("mousemove",O,{once:!0}),D.addEventListener("mouseenter",O),D.addEventListener("mouseleave",V),()=>{var R;n&&D.removeEventListener("mouseleave",F),(R=a.floating)==null||R.removeEventListener("mouseleave",F),p&&D.removeEventListener("mousemove",O),D.removeEventListener("mouseenter",O),D.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,_,M,L,r,n,y,f,h,g,o]),We(()=>{var N;if(s&&n&&(N=g.current)!=null&&N.__options.blockPointerEvents&&I()){const V=Mt(a.floating).body;V.setAttribute(Hx,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(nt(a.domReference)&&F){var O;const B=a.domReference,D=f==null||(O=f.nodesRef.current.find(R=>R.id===m))==null||(O=O.context)==null?void 0:O.elements.floating;return D&&(D.style.pointerEvents=""),B.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{B.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),We(()=>{n||(v.current=void 0,M(),L())},[n,M,L]),P.useEffect(()=>()=>{M(),clearTimeout(x.current),clearTimeout(w.current),L()},[s,a.domReference,M,L]);const $=P.useMemo(()=>{function N(O){v.current=O.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(O){const{nativeEvent:V}=O;function F(){!T.current&&!y.current&&r(!0,V,"hover")}u&&!zo(v.current)||n||d===0||(clearTimeout(w.current),v.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,y,d]),A=P.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(N){_(N.nativeEvent,!1)}}),[_]);return P.useMemo(()=>s?{reference:$,floating:A}:{},[s,$,A])}function QN(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 Gr(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 JN(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Gr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Xo=new WeakMap,zs=new WeakSet,Rs={},Gd=0;const e2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qx=e=>e&&(e.host||qx(e.parentNode)),t2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function n2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=t2(t,e),s=new Set,l=new Set(a),c=[];Rs[o]||(Rs[o]=new WeakMap);const u=Rs[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,m=>{if(ar(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",y=(Xo.get(m)||0)+1,v=(u.get(m)||0)+1;Xo.set(m,y),u.set(m,v),c.push(m),y===1&&h&&zs.add(m),v===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Gd++,()=>{c.forEach(f=>{const m=(Xo.get(f)||0)-1,g=(u.get(f)||0)-1;Xo.set(f,m),u.set(f,g),m||(!zs.has(f)&&i&&f.removeAttribute(i),zs.delete(f)),g||f.removeAttribute(o)}),Gd--,Gd||(Xo=new WeakMap,Xo=new WeakMap,zs=new WeakSet,Rs={})}}function Ux(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return n2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Kx(e,t){const n=ea(e,Qo());t==="prev"&&n.reverse();const r=n.indexOf(gn(Mt(e)));return n.slice(r+1)[0]}function Yx(){return Kx(document.body,"next")}function Gx(){return Kx(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function r2(e){ea(e,Qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function o2(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 i2(e,t,n){const r=e.indexOf(t);function o(a){const s=hr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||xt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Zd={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 a2;function Zx(e){e.key==="Tab"&&(e.target,clearTimeout(a2))}const Bs=P.forwardRef(function(t,n){const[r,o]=P.useState();We(()=>(Od()&&o("button"),document.addEventListener("keydown",Zx),()=>{document.removeEventListener("keydown",Zx)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[hr("focus-guard")]:"",style:Zd};return P.createElement("span",Go({},t,i))}),Xx=P.createContext(null),Qx=hr("portal");function s2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=Jx(),[i,a]=P.useState(null),s=P.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(Qx,""),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(Qx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Zr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=s2({id:n,root:r}),[a,s]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?o2:r2)(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]),P.createElement(Xx.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=Gx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:Zd}),i&&Oa.createPortal(t,i),p&&i&&P.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Yx()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Jx=()=>P.useContext(Xx),l2=20;let Xr=[];function Xd(e){Xr=Xr.filter(n=>n.isConnected);let t=e;if(!(!t||ar(t)==="body")){if(!lN(t,Qo())){const n=ea(t,Qo())[0];n&&(t=n)}Xr.push(t),Xr.length>l2&&(Xr=Xr.slice(-20))}}function e0(){return Xr.slice().reverse().find(e=>e.isConnected)}const c2=P.forwardRef(function(t,n){return P.createElement("button",Go({},t,{type:"button",ref:n,tabIndex:-1,style:Zd}))});function Jo(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:m,onOpenChange:g,events:h,dataRef:y,floatingId:v,elements:{domReference:x,floating:S}}=t,w=typeof a=="number"&&a<0,T=dx(x)&&w,C=e2()?i:!0,k=Ft(o),I=Ft(a),_=Ft(s),M=pr(),L=Jx(),$=P.useRef(null),A=P.useRef(null),N=P.useRef(!1),O=P.useRef(!1),V=P.useRef(-1),F=L!=null,B=S==null?void 0:S.firstElementChild,D=(B==null?void 0:B.id)===v?B:S,R=At(function(Z){return Z===void 0&&(Z=D),Z?ea(Z,Qo()):[]}),Q=At(Z=>{const Y=R(Z);return k.current.map(G=>x&&G==="reference"?x:D&&G==="floating"?D:Y).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function Z(G){if(G.key==="Tab"){xt(D,gn(Mt(D)))&&R().length===0&&!T&&Nt(G);const j=Q(),z=Mn(G);k.current[0]==="reference"&&z===x&&(Nt(G),G.shiftKey?dr(j[j.length-1]):dr(j[1])),k.current[1]==="floating"&&z===D&&G.shiftKey&&(Nt(G),dr(j[0]))}}const Y=Mt(D);return Y.addEventListener("keydown",Z),()=>{Y.removeEventListener("keydown",Z)}},[r,x,D,c,k,T,R,Q]),P.useEffect(()=>{if(r||!S)return;function Z(Y){const G=Mn(Y),z=R().indexOf(G);z!==-1&&(V.current=z)}return S.addEventListener("focusin",Z),()=>{S.removeEventListener("focusin",Z)}},[r,S,R]),P.useEffect(()=>{if(r||!d)return;function Z(){O.current=!0,setTimeout(()=>{O.current=!1})}function Y(G){const j=G.relatedTarget;queueMicrotask(()=>{const z=!(xt(x,j)||xt(S,j)||xt(j,S)||xt(L==null?void 0:L.portalNode,j)||j!=null&&j.hasAttribute(hr("focus-guard"))||M&&(Gr(M.nodesRef.current,m).find(K=>{var ae,H;return xt((ae=K.context)==null?void 0:ae.elements.floating,j)||xt((H=K.context)==null?void 0:H.elements.domReference,j)})||QN(M.nodesRef.current,m).find(K=>{var ae,H;return((ae=K.context)==null?void 0:ae.elements.floating)===j||((H=K.context)==null?void 0:H.elements.domReference)===j})));if(l&&z&&gn(Mt(D))===Mt(D).body){Ct(D)&&(D==null||D.focus());const K=V.current,ae=R(),H=ae[K]||ae[ae.length-1]||D;Ct(H)&&H.focus()}(T||!c)&&j&&z&&!O.current&&j!==e0()&&(N.current=!0,g(!1,G))})}if(S&&Ct(x))return x.addEventListener("focusout",Y),x.addEventListener("pointerdown",Z),S.addEventListener("focusout",Y),()=>{x.removeEventListener("focusout",Y),x.removeEventListener("pointerdown",Z),S.removeEventListener("focusout",Y)}},[r,x,S,D,c,m,M,L,g,d,l,R,T]),P.useEffect(()=>{var Z;if(r)return;const Y=Array.from((L==null||(Z=L.portalNode)==null?void 0:Z.querySelectorAll("["+hr("portal")+"]"))||[]);if(S){const G=[S,...Y,$.current,A.current,k.current.includes("reference")||T?x:null].filter(z=>z!=null),j=c||T?Ux(G,C,!C):Ux(G);return()=>{j()}}},[r,x,S,c,k,L,T,C]),We(()=>{if(r||!Ct(D))return;const Z=Mt(D),Y=gn(Z);queueMicrotask(()=>{const G=Q(D),j=I.current,z=(typeof j=="number"?G[j]:j.current)||D,K=xt(D,Y);!w&&!K&&p&&dr(z,{preventScroll:z===D})})},[r,p,D,w,Q,I]),We(()=>{if(r||!D)return;let Z=!1;const Y=Mt(D),G=gn(Y);let z=y.current.openEvent;const K=f.domReference.current;Xd(G);function ae(H){let{open:be,reason:Ce,event:_e,nested:Re}=H;be&&(z=_e),Ce==="escape-key"&&f.domReference.current&&Xd(f.domReference.current),Ce==="hover"&&_e.type==="mouseleave"&&(N.current=!0),Ce==="outside-press"&&(Re?(N.current=!1,Z=!0):N.current=!(cx(_e)||Id(_e)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const H=gn(Y),be=xt(S,H)||M&&Gr(M.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,H)});(be||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&Xd(f.domReference.current);const _e=K||G,Re=ea(Mt(_e).body,Qo());queueMicrotask(()=>{let le=e0();!le&&Ct(_e)&&S&&(le=i2(Re,_e,S)),_.current&&!N.current&&Ct(le)&&(!(le!==H&&H!==Y.body)||be)&&le.focus({preventScroll:Z})})}},[r,S,D,_,y,f,h,M,m]),We(()=>{if(!r&&L)return L.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{L.setFocusManagerState(null)}},[r,L,c,p,g,f,d]),We(()=>{if(r||!D||typeof MutationObserver!="function"||w)return;const Z=()=>{const G=D.getAttribute("tabindex"),j=R(),z=gn(Mt(S)),K=j.indexOf(z);K!==-1&&(V.current=K),k.current.includes("floating")||z!==f.domReference.current&&j.length===0?G!=="0"&&D.setAttribute("tabindex","0"):G!=="-1"&&D.setAttribute("tabindex","-1")};Z();const Y=new MutationObserver(Z);return Y.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,D,f,k,R,w]);function X(Z){return r||!u||!c?null:P.createElement(c2,{ref:Z==="start"?$:A,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(F||c);return P.createElement(P.Fragment,null,J&&P.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:Z=>{if(c){const G=Q();dr(o[0]==="reference"?G[0]:G[G.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(N.current=!1,ia(Z,L.portalNode)){const G=Yx()||x;G==null||G.focus()}else{var Y;(Y=L.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&X("start"),n,X("end"),J&&P.createElement(Bs,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:Z=>{if(c)dr(Q()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(N.current=!0),ia(Z,L.portalNode)){const G=Gx()||x;G==null||G.focus()}else{var Y;(Y=L.afterOutsideRef.current)==null||Y.focus()}}}))}const Qd=new Set,u2=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Zo();return We(()=>{if(!r)return;Qd.add(i);const a=/iP(hone|ad|od)|iOS/.test(_d()),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,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{Qd.delete(i),Qd.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),P.createElement("div",Go({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function t0(e){return Ct(e.target)&&e.target.tagName==="BUTTON"}function n0(e){return Nd(e)}function aa(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=P.useRef(),p=P.useRef(!1),f=P.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(zo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}zo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||t0(m))&&(m.key===" "&&!n0(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||t0(m)||n0(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function d2(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 r0(e){return e!=null&&e.clientX!=null}function f2(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=P.useRef(!1),p=P.useRef(null),[f,m]=P.useState(),[g,h]=P.useState([]),y=At((T,C)=>{d.current||r.current.openEvent&&!r0(r.current.openEvent)||a.setPositionReference(d2(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),v=At(T=>{c!=null||u!=null||(n?p.current||h([]):y(T.clientX,T.clientY))}),x=zo(f)?o:n,S=P.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const T=Ht(o);function C(k){const I=Mn(k);xt(o,I)?(T.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||r0(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,y]);P.useEffect(()=>S(),[S,g]),P.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),P.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const w=P.useMemo(()=>{function T(C){let{pointerType:k}=C;m(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:v,onMouseEnter:v}},[v]);return P.useMemo(()=>s?{reference:w}:{},[s,w])}const p2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},h2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},o0=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 Qr(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:m}=t,g=pr(),h=At(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,v=P.useRef(!1),x=P.useRef(!1),{escapeKey:S,outsidePress:w}=o0(f),{escapeKey:T,outsidePress:C}=o0(m),k=At(A=>{var N;if(!n||!a||!s||A.key!=="Escape")return;const O=(N=i.current.floatingContext)==null?void 0:N.nodeId,V=g?Gr(g.nodesRef.current,O):[];if(!S&&(A.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(B=>{var D;if((D=B.context)!=null&&D.open&&!B.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,ND(A)?A.nativeEvent:A,"escape-key")}),I=At(A=>{var N;const O=()=>{var V;k(A),(V=Mn(A))==null||V.removeEventListener("keydown",O)};(N=Mn(A))==null||N.addEventListener("keydown",O)}),_=At(A=>{var N;const O=v.current;v.current=!1;const V=x.current;if(x.current=!1,c==="click"&&V||O||typeof y=="function"&&!y(A))return;const F=Mn(A),B="["+hr("inert")+"]",D=Mt(o.floating).querySelectorAll(B);let R=nt(F)?F:null;for(;R&&!sr(R);){const Z=Yn(R);if(sr(Z)||!nt(Z))break;R=Z}if(D.length&&nt(F)&&!FD(F)&&!xt(F,o.floating)&&Array.from(D).every(Z=>!xt(R,Z)))return;if(Ct(F)&&$){const Z=F.clientWidth>0&&F.scrollWidth>F.clientWidth,Y=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let G=Y&&A.offsetX>F.clientWidth;if(Y&&Qt(F).direction==="rtl"&&(G=A.offsetX<=F.offsetWidth-F.clientWidth),G||Z&&A.offsetY>F.clientHeight)return}const Q=(N=i.current.floatingContext)==null?void 0:N.nodeId,X=g&&Gr(g.nodesRef.current,Q).some(Z=>{var Y;return Dd(A,(Y=Z.context)==null?void 0:Y.elements.floating)});if(Dd(A,o.floating)||Dd(A,o.domReference)||X)return;const J=g?Gr(g.nodesRef.current,Q):[];if(J.length>0){let Z=!0;if(J.forEach(Y=>{var G;if((G=Y.context)!=null&&G.open&&!Y.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,A,"outside-press")}),M=At(A=>{var N;const O=()=>{var V;_(A),(V=Mn(A))==null||V.removeEventListener(c,O)};(N=Mn(A))==null||N.addEventListener(c,O)});P.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function A(V){r(!1,V,"ancestor-scroll")}const N=Mt(o.floating);s&&N.addEventListener("keydown",T?I:k,T),y&&N.addEventListener(c,C?M:_,C);let O=[];return p&&(nt(o.domReference)&&(O=lr(o.domReference)),nt(o.floating)&&(O=O.concat(lr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(O=O.concat(lr(o.reference.contextElement)))),O=O.filter(V=>{var F;return V!==((F=N.defaultView)==null?void 0:F.visualViewport)}),O.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&N.removeEventListener("keydown",T?I:k,T),y&&N.removeEventListener(c,C?M:_,C),O.forEach(V=>{V.removeEventListener("scroll",A)})}},[i,o,s,y,c,n,r,p,a,S,w,k,T,I,_,C,M]),P.useEffect(()=>{v.current=!1},[y,c]);const L=P.useMemo(()=>({onKeyDown:k,[p2[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[h2[c]]:()=>{v.current=!0}}),[k,c]);return P.useMemo(()=>a?{reference:L,floating:$}:{},[a,L,$])}function m2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),i=P.useRef({}),[a]=P.useState(()=>zx()),s=fr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&YN("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=P.useState(r.reference),u=At((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=P.useMemo(()=>({setPositionReference:c}),[]),p=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function mr(e){e===void 0&&(e={});const{nodeId:t}=e,n=m2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=P.useState(null),[s,l]=P.useState(null),u=(o==null?void 0:o.reference)||i,d=P.useRef(null),p=pr();We(()=>{u&&(d.current=u)},[u]);const f=LN({...e,elements:{...o,...s&&{reference:s}}}),m=P.useCallback(x=>{const S=nt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(S),f.refs.setReference(S)},[f.refs]),g=P.useCallback(x=>{(nt(x)||x===null)&&(d.current=x,a(x)),(nt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!nt(x))&&f.refs.setReference(x)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),y=P.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),v=P.useMemo(()=>({...f,...r,refs:h,elements:y,nodeId:t}),[f,h,y,t,r]);return We(()=>{r.dataRef.current.floatingContext=v;const x=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);x&&(x.context=v)}),P.useMemo(()=>({...f,context:v,refs:h,elements:y}),[f,h,y,v])}function g2(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=P.useRef(!1),u=P.useRef(),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&Ct(a.domReference)&&a.domReference===gn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),P.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=P.useMemo(()=>({onPointerDown(f){Id(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Mn(f.nativeEvent);if(l&&nt(m))try{if(Od()&&ux())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Nd(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=nt(m)&&m.hasAttribute(hr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const v=gn(a.domReference?a.domReference.ownerDocument:document);!m&&v===a.domReference||xt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||xt(a.domReference,v)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return P.useMemo(()=>s?{reference:p}:{},[s,p])}const i0="active",a0="selected";function Jd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[i0]:a,[a0]: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&&[i0,a0].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,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function gr(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=P.useCallback(s=>Jd(s,e,"reference"),t),i=P.useCallback(s=>Jd(s,e,"floating"),n),a=P.useCallback(s=>Jd(s,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let s0=!1;function Hs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function l0(e,t){return Hs(t,e===Ud||e===na,e===Ko||e===Yo)}function ef(e,t,n){return Hs(t,e===na,n?e===Ko:e===Yo)||e==="Enter"||e===" "||e===""}function v2(e,t,n){return Hs(t,n?e===Ko:e===Yo,e===na)}function c0(e,t,n){return Hs(t,n?e===Yo:e===Ko,e===Ud)}function Ws(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:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:y=!0,disabledIndices:v=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$s("`useListNavigation` looping must be enabled to allow escaping."),m||$s("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&S>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=fr(),_=pr(),M=At(s),L=P.useRef(g),$=P.useRef(c??-1),A=P.useRef(null),N=P.useRef(!0),O=P.useRef(M),V=P.useRef(!!o.floating),F=P.useRef(n),B=P.useRef(!1),D=P.useRef(!1),R=Ft(v),Q=Ft(n),X=Ft(w),J=Ft(o.floating),Z=Ft(c),[Y,G]=P.useState(),[j,z]=P.useState(),K=At(function(le,we,ce){ce===void 0&&(ce=!1);function Se(de){m?(G(de.id),_==null||_.events.emit("virtualfocus",de),T&&(T.current=de)):dr(de,{preventScroll:!0,sync:ux()&&Od()?s0||B.current:!1})}const ie=le.current[we.current];ie&&Se(ie),requestAnimationFrame(()=>{const de=le.current[we.current]||ie;if(!de)return;ie||Se(de);const ee=X.current;ee&&H&&(ce||!N.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return s0=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?L.current&&c!=null&&(D.current=!0,$.current=c,M(c)):V.current&&($.current=-1,O.current(null)))},[l,n,o.floating,c,M]),We(()=>{if(l&&n&&o.floating)if(a==null){if(B.current=!1,Z.current!=null)return;if(V.current&&($.current=-1,K(i,$)),(!F.current||!V.current)&&L.current&&(A.current!=null||L.current===!0&&A.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):($.current=A.current==null||ef(A.current,x,f)||p?Kd(i,R.current):Dx(i,R.current),A.current=null,M($.current))};we()}}else ra(i,a)||($.current=a,K(i,$,D.current),D.current=!1)},[l,n,o.floating,a,Z,p,i,x,f,M,K,R]),We(()=>{var le;if(!l||o.floating||!_||m||!V.current)return;const we=_.nodesRef.current,ce=(le=we.find(de=>de.id===I))==null||(le=le.context)==null?void 0:le.elements.floating,Se=gn(Mt(o.floating)),ie=we.some(de=>de.context&&xt(de.context.elements.floating,Se));ce&&!ie&&N.current&&ce.focus({preventScroll:!0})},[l,o.floating,_,I,m]),We(()=>{if(!l||!_||!m||I)return;function le(we){z(we.id),T&&(T.current=we)}return _.events.on("virtualfocus",le),()=>{_.events.off("virtualfocus",le)}},[l,_,m,I,T]),We(()=>{O.current=M,V.current=!!o.floating}),We(()=>{n||(A.current=null)},[n]),We(()=>{F.current=n},[n]);const ae=a!=null,H=P.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&M(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!N.current||Se==="touch"||($.current=-1,K(i,$),M(null),m||dr(J.current,{preventScroll:!0}))}}}},[n,J,K,h,i,M,m]),be=At(le=>{if(N.current=!1,B.current=!0,!Q.current&&le.currentTarget===J.current)return;if(p&&c0(le.key,x,f)){Nt(le),r(!1,le.nativeEvent,"list-navigation"),Ct(o.domReference)&&!m&&o.domReference.focus();return}const we=$.current,ce=Kd(i,v),Se=Dx(i,v);if(le.key==="Home"&&(Nt(le),$.current=ce,M($.current)),le.key==="End"&&(Nt(le),$.current=Se,M($.current)),S>1){const ie=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=zN(ie,S,k),ee=de.findIndex(ne=>ne!=null&&!js(i.current,ne,v)),q=de.reduce((ne,me,De)=>me!=null&&!js(i.current,me,v)?De:ne,-1);if($.current=de[$N({current:de.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:x,loop:d,cols:S,disabledIndices:BN([...v||i.current.map((ne,me)=>js(i.current,me)?me:void 0),void 0],de),minIndex:ee,maxIndex:q,prevIndex:RN($.current>Se?ce:$.current,ie,de,S,le.key===na?"bl":le.key===Yo?"tr":"tl"),stopEvent:!0})],M($.current),x==="both")return}if(l0(le.key,x)){if(Nt(le),n&&!m&&gn(le.currentTarget.ownerDocument)===le.currentTarget){$.current=ef(le.key,x,f)?ce:Se,M($.current);return}ef(le.key,x,f)?d?$.current=we>=Se?u&&we!==i.current.length?-1:ce:$t(i,{startingIndex:we,disabledIndices:v}):$.current=Math.min(Se,$t(i,{startingIndex:we,disabledIndices:v})):d?$.current=we<=ce?u&&we!==-1?i.current.length:Se:$t(i,{startingIndex:we,decrement:!0,disabledIndices:v}):$.current=Math.max(ce,$t(i,{startingIndex:we,decrement:!0,disabledIndices:v})),ra(i,$.current)?M(null):M($.current)}}),Ce=P.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||Y},[m,n,ae,j,Y]),_e=P.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!dx(o.domReference)&&Ce,onKeyDown:be,onPointerMove(){N.current=!0}}),[Ce,be,o.domReference,x]),Re=P.useMemo(()=>{function le(ce){g==="auto"&&cx(ce.nativeEvent)&&(L.current=!0)}function we(ce){L.current=g,g==="auto"&&Id(ce.nativeEvent)&&(L.current=!0)}return{...Ce,onKeyDown(ce){N.current=!1;const Se=ce.key.indexOf("Arrow")===0,ie=v2(ce.key,x,f),de=c0(ce.key,x,f),ee=l0(ce.key,x),q=(p?ie:ee)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const Ue=_==null?void 0:_.nodesRef.current.find(Lt=>Lt.parentId==null),Xe=_&&Ue?JN(_.nodesRef.current,Ue.id):null;if(Se&&Xe&&T){const Lt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ie||de){var ne,me;const Tn=((ne=Xe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Bn=de&&!Tn?(me=Xe.context)==null?void 0:me.elements.domReference:ie?i.current.find(Cr=>(Cr==null?void 0:Cr.id)===Y):null;Bn&&(Nt(ce),Bn.dispatchEvent(Lt),z(void 0))}if(ee&&Xe.context&&Xe.context.open&&Xe.parentId&&ce.currentTarget!==Xe.context.elements.domReference){var De;Nt(ce),(De=Xe.context.elements.domReference)==null||De.dispatchEvent(Lt);return}}return be(ce)}if(!(!n&&!y&&Se)){if(q&&(A.current=p&&ee?null:ce.key),p){ie&&(Nt(ce),n?($.current=Kd(i,R.current),M($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}ee&&(c!=null&&($.current=c),Nt(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&M($.current))}},onFocus(){n&&!m&&M(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ce,be,R,g,i,p,M,r,n,y,x,f,c,_,m,T]);return P.useMemo(()=>l?{reference:Re,floating:_e,item:H}:{},[l,Re,_e,H])}const y2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Jr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=y2.get(a))!=null?n:a,l=Zo(),u=fr()!=null,d=P.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=P.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=P.useCallback(m=>{let{active:g,selected:h}=m;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&h};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return P.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const u0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ei(e,t){return typeof e=="function"?e(t):e}function b2(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function x2(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]=P.useState("unmounted"),c=b2(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 d0(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=P.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=P.useState(()=>({...ei(i,c),...ei(n,c)})),{isMounted:g,status:h}=x2(e,{duration:a}),y=Ft(n),v=Ft(r),x=Ft(o),S=Ft(i);return We(()=>{const w=ei(y.current,c),T=ei(x.current,c),C=ei(S.current,c),k=ei(v.current,c)||Object.keys(w).reduce((I,_)=>(I[_]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(k).map(u0).join(","),transitionDuration:d+"ms",...C,...k}),h==="close"){const I=T||w;m({transitionProperty:Object.keys(I).map(u0).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,y,v,S,d,h,c]),{isMounted:g,styles:f}}function w2(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,m=P.useRef(),g=P.useRef(""),h=P.useRef((n=f??a)!=null?n:-1),y=P.useRef(null),v=At(s),x=At(l),S=Ft(u),w=Ft(p);We(()=>{r&&(clearTimeout(m.current),y.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var _;h.current=(_=f??a)!=null?_:-1}},[r,f,a]);const T=At(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),C=At(_=>{function M(O,V,F){const B=S.current?S.current(V,F):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return B?O.indexOf(B):-1}const L=i.current;if(g.current.length>0&&g.current[0]!==" "&&(M(L,L,g.current)===-1?T(!1):_.key===" "&&Nt(_)),L==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Nt(_),T(!0)),L.every(O=>{var V,F;return O?((V=O[0])==null?void 0:V.toLocaleLowerCase())!==((F=O[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=y.current),g.current+=_.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=y.current,T(!1)},d);const A=h.current,N=M(L,[...L.slice((A||0)+1),...L.slice(0,(A||0)+1)],g.current);N!==-1?(v(N),y.current=N):_.key!==" "&&(g.current="",T(!1))}),k=P.useMemo(()=>({onKeyDown:C}),[C]),I=P.useMemo(()=>({onKeyDown:C,onKeyUp(_){_.key===" "&&T(!1)}}),[C,T]);return P.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function f0(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 S2(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function p0(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(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,v=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,v}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:y,tree:v}=d;return function(S){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],I=Mn(S),_=S.type==="mouseleave",M=xt(g.floating,I),L=xt(g.domReference,I),$=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),N=m.split("-")[0],O=p>A.right-A.width/2,V=f>A.bottom-A.height/2,F=S2(k,$),B=A.width>$.width,D=A.height>$.height,R=(B?$:A).left,Q=(B?$:A).right,X=(D?$:A).top,J=(D?$:A).bottom;if(M&&(i=!0,!_))return;if(L&&(i=!1),L&&!_){i=!0;return}if(_&&nt(S.relatedTarget)&&xt(g.floating,S.relatedTarget)||v&&Gr(v.nodesRef.current,y).some(G=>{let{context:j}=G;return j==null?void 0:j.open}))return;if(N==="top"&&f>=$.bottom-1||N==="bottom"&&f<=$.top+1||N==="left"&&p>=$.right-1||N==="right"&&p<=$.left+1)return w();let Z=[];switch(N){case"top":Z=[[R,$.top+1],[R,A.bottom-1],[Q,A.bottom-1],[Q,$.top+1]];break;case"bottom":Z=[[R,A.top+1],[R,$.bottom-1],[Q,$.bottom-1],[Q,A.top+1]];break;case"left":Z=[[A.right-1,J],[A.right-1,X],[$.left+1,X],[$.left+1,J]];break;case"right":Z=[[$.right-1,J],[$.right-1,X],[A.left+1,X],[A.left+1,J]];break}function Y(G){let[j,z]=G;switch(N){case"top":{const K=[B?j+t/2:O?j+t*4:j-t*4,z+t+1],ae=[B?j-t/2:O?j+t*4:j-t*4,z+t+1],H=[[A.left,O||B?A.bottom-t:A.top],[A.right,O?B?A.bottom-t:A.top:A.bottom-t]];return[K,ae,...H]}case"bottom":{const K=[B?j+t/2:O?j+t*4:j-t*4,z-t],ae=[B?j-t/2:O?j+t*4:j-t*4,z-t],H=[[A.left,O||B?A.top+t:A.bottom],[A.right,O?B?A.top+t:A.bottom:A.top+t]];return[K,ae,...H]}case"left":{const K=[j+t+1,D?z+t/2:V?z+t*4:z-t*4],ae=[j+t+1,D?z-t/2:V?z+t*4:z-t*4];return[...[[V||D?A.right-t:A.left,A.top],[V?D?A.right-t:A.left:A.right-t,A.bottom]],K,ae]}case"right":{const K=[j-t,D?z+t/2:V?z+t*4:z-t*4],ae=[j-t,D?z-t/2:V?z+t*4:z-t*4],H=[[V||D?A.left+t:A.right,A.top],[V?D?A.left+t:A.right:A.left+t,A.bottom]];return[K,ae,...H]}}}if(!f0([T,C],Z)){if(i&&!F)return w();if(!_&&r){const G=c(S.clientX,S.clientY);if(G!==null&&G<.1)return w()}f0([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const T2=/Mac|iPod|iPhone|iPad/,qs=()=>T2.test(navigator.userAgent),E2=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?qs()?"Meta":"Control":n==="Hyper"?qs()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),h0=e=>e.map(t=>t.trim()).join("+");class C2{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=h0(E2(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=h0(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 vn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof vn&&(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 vn(this);return t?t(n):n}static from(t,n){return new vn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(vn.from(t,n).values())}toArray(){return Array.from(this.values())}}const k2=(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]},m0=(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},g0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},v0=(e,t)=>{const n=m0(t,g0.basic,e);return n!==void 0&&n!==e?n:m0(t,g0.extend,e)},y0=e=>e.replace(/[^0-9]/g,""),Us=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),b0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?y0(e).includes(y0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?k2(e,t)!==null:!1,P2=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>b0(e,o,n,r)):b0(e,t,n,r),tf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:$e.array(i.value)?i.value.map(Us):Us(`${i.value}`)}));return e.forEach(i=>{const a=v0(i,t);o.forEach(s=>{const l=v0(i,s.key);if(!l)return;const c=Us(`${s.value}`.toLocaleLowerCase()).trim(),u=Us(`${l}`.toLocaleLowerCase()).trim();if(P2(u,c,s.score,s.match))return void r.set(a,i);$e.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},A2=e=>(e=e.trim(),e==="Alt"?qs()?b.jsx(T_,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?qs()?b.jsx(x_,{"aria-label":"Command",size:14}):"Ctrl":e),_2=e=>{const t=e.value.trim().split("+");return b.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return b.jsxs(E.Fragment,{children:[b.jsx("kbd",{"aria-label":n,children:A2(n)}),o?null:b.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},nf=b.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),I2=(e,t)=>Wr()?t:window.matchMedia(e).matches,O2=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(I2(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},x0=()=>window.matchMedia("@media (pointer: coarse)"),M2=()=>{var r;const e=E.useRef(Wr()?null:x0()),[t,n]=E.useState(Wr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?x0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},rf=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=M2(),o=E.useRef(Wr()?"":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||xb())return;document.documentElement.style.padding=tm(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(sT(c.style.height)):null,p=$e.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},yn="500ms",D2={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:yn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:yn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:yn}},N2={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:yn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:yn}},of={drawer:e=>e==="left"?D2:N2,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:yn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:yn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:yn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:yn},initial:{opacity:.5,scale:.95,animationDuration:yn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:yn}}},F2=fo("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"}}),w0={top:0,left:0,right:0,bottom:0},S0=e=>e*.65,L2=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=S0(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return b.jsx(ft.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:w0,whileDrag:{cursor:"grabbing"},className:Oe("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?b.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ks={drawer:"right",sheet:"none",dialog:"none"},V2=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ks.drawer:Ks[o]:t?Ks[o]:Ks.sheet},j2=[],T0=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:m=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:v=!1,role:x="dialog",interactions:S=j2,...w},T)=>{const C=d?ft.div:"div",k=rf(e,"block-only"),I=E.useId(),_=E.useId(),M=O2("(min-width: 64rem)"),L=h!=="dialog",$=V2(M,f,h,y),A=M||f?of[h]:of.sheet,N=typeof A=="function"?A($):A,O=M||f?h:"sheet",V=mr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),F=aa(V.context),B=Jr(V.context,{role:x}),D=Qr(V.context,{escapeKey:!0,referencePress:!0,outsidePress:v}),R=gr([F,B,D].concat(S)),Q=o,X=rs(void 0);E.useEffect(()=>{X.set(void 0)},[X,O]);const J=()=>a(!1);E.useImperativeHandle(T,()=>({context:V.context,floating:k.current}),[V.context,k]);const Y=d&&O==="sheet"?{layout:!0,exit:"exit",dragListener:!0,dragMomentum:!0,animate:"enter",dragElastic:0,dragPropagation:!0,onDrag:(G,j)=>{const z=V.refs.floating;if(z.current&&O==="sheet"){const ae=z.current.getBoundingClientRect(),H=X.get()||ae.height,be=Math.abs(H-j.delta.y),Ce=S0(window.outerHeight);return be<Ce?(J(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(be)}},dragSnapToOrigin:!0,dragDirectionLock:!0,initial:"initial",layoutId:m,variants:N,drag:O==="sheet"?"y":"x",draggable:O==="sheet",dragConstraints:w0}:{};return b.jsxs(E.Fragment,{children:[o?b.jsx(E.Fragment,{children:r?b.jsx($o,{ref:V.refs.setReference,...R.getReferenceProps({layoutId:m}),children:Q}):b.jsx(ft.button,{ref:V.refs.setReference,...R.getReferenceProps(),layoutId:m,type:"button",children:Q})}):null,b.jsx(Zr,{children:b.jsx(tr,{mode:"wait",presenceAffectsLayout:!0,children:e?b.jsx(u2,{lockScroll:!0,className:Oe(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${O==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:V.context,children:b.jsxs(C,{...w,...Y,...t?{"aria-labelledby":I,"aria-describedby":_}:{"aria-label":s},...R.getFloatingProps({"aria-modal":e,ref:Hn(V.refs.setFloating,k),className:Oe(F2({position:$,type:O}),l,"overscroll-contain")}),"data-component":"modal",style:O==="drawer"?{width:X}:{height:X},children:[t?b.jsx("header",{className:"relative w-full",children:t?b.jsx("h2",{id:I,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,b.jsx("section",{className:Oe("flex-1 overflow-y-auto px-8 select-text py-1",c),children:i}),n?b.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?b.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:b.jsx("button",{type:"button",onClick:J,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:b.jsx(os,{})})}):null,L&&u?b.jsx(L2,{onChange:a,value:X,sheet:O==="sheet",position:$,parent:V.refs.floating}):null]})})}):null})})]})}),$2=e=>b.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Oc(e.item.title)?b.jsx(e.item.title,{text:e.text}):e.item.title}),z2=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?b.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:b.jsx($2,{text:e.text,item:o})}):o.type!=="shortcut"?b.jsx(E.Fragment,{}):b.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[b.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,b.jsx("span",{children:Oc(o.title)?b.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?b.jsx(_2,{value:o.shortcut}):null]})}),R2=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:$e.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=$e.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=tf(o,"title",n),a=r.filter(s=>$e.function(s.enabled)?s.enabled({text:t}):!1);return vn.unique(i.concat(a),s=>s.title)},B2=[0,0,0,0,0],H2=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Pt(),[o,i]=E.useState(""),a=Dr(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=mr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Uo}),p=Ws(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:v=>u(x=>$e.number(v)?v:e.open?x??0:null)}),{getItemProps:f}=gr([p]),m=e.commands.flatMap(v=>v.type==="group"?[v,...v.items]:[v]),g=R2(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(v=>v.type!=="group")];E.useEffect(()=>{const v=new C2;return v.add(t,()=>{var x;return(x=e.onChangeVisibility)==null?void 0:x.call(e,!0)}),m.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&v.add(x.shortcut,S=>x.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),v.register()},[t]);const y=e.Icon??Sy;return b.jsx(E.Fragment,{children:b.jsxs(T0,{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:[b.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:[b.jsx("div",{className:"flex size-10 items-center justify-center",children:b.jsx(y,{Default:Sy,text:o,size:16})}),b.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:v=>i(v.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:v=>{var x;if((v.key==="ArrowDown"||v.key==="ArrowUp")&&c!==null&&((x=n.current[c])==null||x.scrollIntoView({block:"start",inline:"start"})),v.key==="Enter"){if(c!==null&&h[c]){v.preventDefault();const S=h[c],w=v.currentTarget.value;if(S.type==="shortcut")return S.action({event:v,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){v.preventDefault();const S=h[0],w=v.currentTarget.value;if(S.type==="shortcut")return S.action({event:v,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?b.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:[b.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),B2.map((v,x)=>b.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:nf},`${s}-${x}-skeleton-index`))]}):b.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[b.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:[h.map((v,x)=>E.createElement(z2,{...f({onMouseEnter:()=>u(x),ref(S){n.current[x]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),v.type==="shortcut"&&v.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:v,text:o,active:c===x,key:`${s}-${v.type}-${x}`})),h.length===1?b.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&$e.number(c)?b.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?b.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},ti=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),qd({fallbackAxisSideDirection:"end"}),Wd(),Ox({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=mr({open:n,middleware:i,transform:!0,whileElementsMounted:Uo,onOpenChange:(m,g)=>{var y;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(y=e.onChange)==null||y.call(e,m))}}),c=aa(l),u=Qr(l),d=Jr(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=gr([c,u,d]);return b.jsxs(E.Fragment,{children:[b.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&b.jsx(Zr,{preserveTabOrder:!0,id:`${t}-portal`,children:b.jsx(Jo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:b.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:[b.jsx($x,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),b.jsx("header",{className:"mb-2",children:b.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},W2=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}=mr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=Jr(s,{role:"tooltip"}),d=Qr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=gr([c,u,d]);return b.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[b.jsx(vo,{...f(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:b.jsx(ft.span,{layoutId:o,children:e.trigger})}),b.jsx(tr,{children:i?b.jsx(Zr,{root:t,children:b.jsx(Jo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:b.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},E0=200,q2=500,C0=(e="")=>Oe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),af=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),k0=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),[m,g]=E.useState(null),h=E.useRef([]),y=E.useRef([]),v=E.useContext(af),x=fr(),S=pr(),w=GN(),T=Lx(),C=x!==null,{floatingStyles:k,refs:I,context:_}=mr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Uo,placement:C?"right":"bottom-start",middleware:[ta({mainAxis:C?0:4,alignmentAxis:C?-4:0}),qd(),Wd()]}),M=Jr(_,{role:"menu"}),L=Qr(_,{bubbles:!0}),$=Wx(_,{move:!1,enabled:n,delay:{open:E0},handleClose:p0({blockPointerEvents:!0})}),A=aa(_,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),N=Ws(_,{loop:!0,activeIndex:m,nested:C,listRef:h,onNavigate:g}),O=w2(_,{activeIndex:m,listRef:y,resetMs:q2,onMatch:u?g:void 0}),{getReferenceProps:V,getFloatingProps:F,getItemProps:B}=gr([$,A,M,L,N,O]);E.useEffect(()=>{if(!S)return;const R=()=>d(!1),Q=X=>{X.nodeId!==w&&X.parentId===x&&d(!1)};return S.events.on("click",R),S.events.on("menuopen",Q),()=>{S.events.off("click",R),S.events.off("menuopen",Q)}},[S,w,x]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:x,nodeId:w})},[S,u,w,x]);const D=o?l.className:Oe(C0(l.className));return b.jsxs(ZN,{id:w,children:[b.jsx(E.Fragment,{children:l.asChild?b.jsx($o,{...V(v.getItemProps({...l,onFocus(R){var Q;(Q=l.onFocus)==null||Q.call(l,R),f(!1),v.setHasFocusInside(!0)}})),children:s,className:D,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Hn(I.setReference,T.ref,c),tabIndex:C?v.activeIndex===T.index?0:-1:void 0}):b.jsxs("button",{type:"button",className:D,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Hn(I.setReference,T.ref,c),tabIndex:C?v.activeIndex===T.index?0:-1:void 0,...V(v.getItemProps({...l,onFocus(R){var Q;(Q=l.onFocus)==null||Q.call(l,R),f(!1),v.setHasFocusInside(!0)}})),children:[s,C&&b.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[b.jsx("span",{className:"sr-only",children:"Next menu"}),b.jsx(Wu,{size:14})]})]})}),b.jsx(af.Provider,{value:{activeIndex:m,setActiveIndex:g,getItemProps:B,setHasFocusInside:f,isOpen:u},children:b.jsx(qN,{elementsRef:h,labelsRef:y,children:u&&b.jsx(Zr,{preserveTabOrder:!0,children:b.jsx(Jo,{context:_,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:b.jsx(t,{...F(),ref:I.setFloating,style:{...l.style,...k},className:Oe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",a),children:e})})})})})]})}),U2=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(af),s=Lx({label:n?null:e}),l=pr(),c=s.index===a.activeIndex;return b.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Hn(s.ref,i),className:C0(`${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?b.jsx(t,{size:16}):null]})}),K2=E.forwardRef((e,t)=>fr()!==null?b.jsx(k0,{...e,isParent:!1,ref:t}):b.jsx(XN,{children:b.jsx(k0,{...e,isParent:!0,ref:t})})),Y2=e=>b.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),sf=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=dd,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),y=t||"span",v=A=>{g(A),d==null||d(A)},{refs:x,floatingStyles:S,context:w}=mr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Uo,onOpenChange:i?void 0:v,middleware:[Wd(),ta(5),qd({fallbackAxisSideDirection:"start"}),Ox({padding:5,element:h})]}),T=Wx(w,{move:!0,delay:{open:E0},enabled:l?s:!1,handleClose:c?p0():null}),C=g2(w,{enabled:l?a:!1}),k=aa(w,{enabled:l?c:!1}),I=Qr(w,{enabled:l}),_=Jr(w,{role:"tooltip",enabled:l}),M=f2(w,{enabled:!!l&&!!u}),{getReferenceProps:L,getFloatingProps:$}=gr([_,I,M,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),b.jsxs(E.Fragment,{children:[b.jsx(y,{...L(p),ref:Hn(x.setReference,f),children:n}),m&&b.jsx(Zr,{preserveTabOrder:!0,children:b.jsxs(on,{...$(),ref:x.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[b.jsx($x,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Ys=0,vr=1,ni=2,P0=4;function A0(e){return()=>e}function G2(e){e()}function sa(e,t){return n=>e(t(n))}function _0(e,t){return()=>e(t)}function I0(e,t){return n=>e(t,n)}function lf(e){return e!==void 0}function Z2(...e){return()=>{e.map(G2)}}function ri(){}function Gs(e,t){return t(e),e}function X2(e,t){return t(e)}function lt(...e){return e}function et(e,t){return e(vr,t)}function Ne(e,t){e(Ys,t)}function cf(e){e(ni)}function zt(e){return e(P0)}function xe(e,t){return et(e,I0(t,Ys))}function Nn(e,t){const n=e(vr,r=>{n(),t(r)});return n}function O0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function M0(e,t){return e===t}function ct(e=M0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ke(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Fn(e){return t=>()=>{t(e)}}function re(e,...t){const n=Q2(...t);return(r,o)=>{switch(r){case ni:cf(e);return;case vr:return et(e,n(o))}}}function Ln(e,t){return n=>r=>{n(t=e(t,r))}}function oi(e){return t=>n=>{e>0?e--:t(n)}}function yr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Le(...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);et(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 Q2(...e){return t=>e.reduceRight(X2,t)}function J2(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case vr:return i?n===i?void 0:(r(),n=i,t=et(e,i),t):(r(),ri);case ni:r(),n=null;return}}}function se(e){let t=e;const n=He();return(r,o)=>{switch(r){case Ys:t=o;break;case vr:{o(t);break}case P0:return t}return n(r,o)}}function Rt(e,t){return Gs(se(t),n=>xe(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Ys:e.slice().forEach(r=>{r(n)});return;case ni:e.splice(0,e.length);return;case vr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Gs(He(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:eF(),singleton:n}}const eF=()=>Symbol();function tF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function _t(...e){const t=He(),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);et(i,l=>{n[a]=l,r=r|s,r===o&&Ne(t,n)})}),function(i,a){switch(i){case ni:{cf(t);return}case vr:return r===o&&a(n),et(t,a)}}}function Ae(e,t=M0){return re(e,ct(t))}function D0(...e){return function(t,n){switch(t){case ni:return;case vr:return Z2(...e.map(r=>et(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const nF={0:"debug",3:"error",1:"log",2:"warn"},rF=()=>typeof globalThis>"u"?window:globalThis,br=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=rF().VIRTUOSO_LOG_LEVEL)!=null?o:zt(e);r>=i&&console[nF[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 uf(e,t,n).callbackRef}function uf(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 N0(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=oF(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 m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?F0("column-gap",getComputedStyle(u).columnGap,o):F0("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return uf(c,n,l)}function oF(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},tn.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 F0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function df(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(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+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}=uf(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=Ye(()=>{const e=He(),t=He(),n=se(0),r=He(),o=se(0),i=He(),a=He(),s=se(0),l=se(0),c=se(0),u=se(0),d=He(),p=He(),f=se(!1),m=se(!1),g=se(!1);return xe(re(e,he(({scrollTop:h})=>h)),t),xe(re(e,he(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),la={lvl:0};function L0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===la}function ca(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function bn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=bn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return bn(e.l,t,n)}function nn(e,t,n){return ot(e)?$0(t,n,1):t===e.k?It(e,{k:t,v:n}):t<e.k?z0(It(e,{l:nn(e.l,t,n)})):z0(It(e,{r:nn(e.r,t,n)}))}function ii(){return la}function Zs(e,t,n){if(ot(e))return[];const r=bn(e,t)[0];return iF(pf(e,r,n))}function ff(e,t){if(ot(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=j0(r);return Xs(It(e,{k:i,l:V0(r),v:a}))}}else return t<n?Xs(It(e,{l:ff(r,t)})):Xs(It(e,{r:ff(o,t)}))}function eo(e){return ot(e)?[]:[...eo(e.l),{k:e.k,v:e.v},...eo(e.r)]}function pf(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(pf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(pf(i,t,n))),s}function Xs(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(hf(t))return R0(It(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return It(t.r,{l:It(t,{r:t.r.l}),lvl:n,r:It(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(hf(e))return mf(It(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=hf(o)?r.lvl-1:r.lvl;return It(o,{l:It(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:mf(It(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function It(e,t){return $0(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 V0(e){return ot(e.r)?e.l:Xs(It(e,{r:V0(e.r)}))}function hf(e){return ot(e)||e.lvl>e.r.lvl}function j0(e){return ot(e.r)?[e.k,e.v]:j0(e.r)}function $0(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function z0(e){return mf(R0(e))}function R0(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?It(t,{r:It(e,{l:t.r})}):e}function mf(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?It(n,{l:It(e,{r:n.l}),lvl:t+1}):e}function iF(e){return L0(e,({k:t,v:n})=>({index:t,value:n}))}function B0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const gf=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function H0(e,t,n){return e[Qs(e,t,n)]}function Qs(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 aF(e,t,n,r){const o=Qs(e,t,r),i=Qs(e,n,r,o);return e.slice(o,i+1)}function xn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Js(e){return!ot(e.groupOffsetTree)}function vf({index:e},t){return t===e?0:t<e?-1:1}function sF(){return{groupIndices:[],groupOffsetTree:ii(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ii()}}function lF(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=nn(e,0,i);continue}const s=Zs(e,a-1,o+1);if(s.some(mF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=ff(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=nn(e,o+1,p));c&&(e=nn(e,a,i))}return[e,n]}function cF(e){return typeof e.groupIndex<"u"}function uF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=H0(t,e,vf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function W0(e,t){if(!Js(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function q0(e,t,n){if(cF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=W0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function dF(e,t,n,r=0){return r>0&&(t=Math.max(t,H0(e,r,vf).offset)),L0(aF(e,t,n,uF),hF)}function fF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=lF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=yf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),ii()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function pF(e){return eo(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 U0(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 yf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Qs(o,t-1,vf),s=o[l].offset;const c=bn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===bn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Zs(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 hF(e){return{index:e.index,value:e}}function mF(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 gF={offsetHeight:"height",offsetWidth:"width"},jn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Rt(r,0),i=He(),a=He(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,T)=>xn(w,gF[T])),p=se(void 0),f=se(0),m=sF(),g=Rt(re(n,Le(l,e,f),Ln(fF,m),ct()),m),h=Rt(re(l,ct(),Ln((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);xe(re(l,ke(w=>w.length>0),Le(g,f),he(([w,T,C])=>{const k=w.reduce((I,_,M)=>nn(I,_,da(_,T.offsetTree,C)||M),ii());return{...T,groupIndices:w,groupOffsetTree:k}})),g),xe(re(r,Le(g),ke(([w,{lastIndex:T}])=>w<T),he(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),xe(c,u);const y=Rt(re(c,he(w=>w===void 0)),!0);xe(re(u,ke(w=>w!==void 0&&ot(zt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const v=en(re(n,Le(g),Ln(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));et(re(s,Ln((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:T}=zt(g);if(w>0)Ne(t,!0),Ne(i,w+U0(w,T));else if(w<0){const C=zt(h);C.length>0&&(w-=U0(-w,C)),Ne(a,w)}}),et(re(s,Le(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},tn.ERROR)});const x=en(i);xe(re(i,Le(g),he(([w,T])=>{const C=T.groupIndices.length>0,k=[],I=T.lastSize;if(C){const _=ca(T.sizeTree,0);let M=0,L=0;for(;M<w;){const A=T.groupIndices[L],N=T.groupIndices.length===L+1?1/0:T.groupIndices[L+1]-A-1;k.push({endIndex:A,size:_,startIndex:A}),k.push({endIndex:A+1+N-1,size:I,startIndex:A+1}),L++,M+=N+1}const $=eo(T.sizeTree);return M!==w&&$.shift(),$.reduce((A,{k:N,v:O})=>{let V=A.ranges;return A.prevSize!==0&&(V=[...A.ranges,{endIndex:N+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:N+w,prevSize:O,ranges:V}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return eo(T.sizeTree).reduce((_,{k:M,v:L})=>({prevIndex:M+w,prevSize:L,ranges:[..._.ranges,{endIndex:M+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(re(a,Le(g,f),he(([w,{offsetTree:T},C])=>{const k=-w;return da(k,T,C)})));return xe(re(a,Le(g,f),he(([w,T,C])=>{if(T.groupIndices.length>0){if(ot(T.sizeTree))return T;let k=ii();const I=zt(h);let _=0,M=0,L=0;for(;_<-w;){L=I[M];const $=I[M+1]-L-1;M++,_+=$+1}if(k=eo(T.sizeTree).reduce(($,{k:A,v:N})=>nn($,Math.max(0,A+w),N),k),_!==-w){const $=ca(T.sizeTree,L);k=nn(k,0,$);const A=bn(T.sizeTree,-w+1)[1];k=nn(k,1,A)}return{...T,sizeTree:k,...yf(T.offsetTree,0,k,C)}}else{const k=eo(T.sizeTree).reduce((I,{k:_,v:M})=>nn(I,Math.max(0,_+w),M),ii());return{...T,sizeTree:k,...yf(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:v,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},lt(br,gf),{singleton:!0});function vF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const K0=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=en(re(i,he(vF)));return xe(re(s,he(l=>l.totalCount)),n),xe(re(s,he(l=>l.groupIndices)),e),xe(re(_t(o,t,r),ke(([l,c])=>Js(c)),he(([l,c,u])=>bn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ct(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},lt(jn,Wt)),xr=Ye(([{log:e}])=>{const t=se(!1),n=en(re(t,ke(r=>r),ct()));return et(t,r=>{r&&zt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},lt(br),{singleton:!0}),yF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Y0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!yF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ye(([{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=He(),m=He(),g=se(0);let h=null,y=null,v=null;function x(){h&&(h(),h=null),v&&(v(),v=null),y&&(clearTimeout(y),y=null),Ne(l,!1)}return xe(re(f,Le(n,d,r,g,s,a,p),Le(e,i,o),he(([[S,w,T,C,k,I,_,M],L,$,A])=>{const N=Y0(S),{align:O,behavior:V,offset:F}=N,B=C-1,D=q0(N,w,B);let R=da(D,w.offsetTree,L)+I;O==="end"?(R+=$+bn(w.sizeTree,D)[1]-T+A,D===B&&(R+=_)):O==="center"?R+=($+bn(w.sizeTree,D)[1]-T+A)/2:R-=k,F&&(R+=F);const Q=X=>{x(),X?(M("retrying to scroll to",{location:S},tn.DEBUG),Ne(f,S)):(Ne(m,!0),M("list did not change, scroll successful",{},tn.DEBUG))};if(x(),V==="smooth"){let X=!1;v=et(t,J=>{X=X||J}),h=Nn(u,()=>{Q(X)})}else h=Nn(re(t,bF(150)),Q);return y=setTimeout(()=>{x()},1200),Ne(l,!0),M("scrolling from index to",{behavior:V,index:D,top:R},tn.DEBUG),{behavior:V,top:R}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},lt(jn,Wt,br),{singleton:!0});function bF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function bf(e,t){e==0?t():requestAnimationFrame(()=>{bf(e-1,t)})}function xf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ye(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(re(a,Le(l),ke(([u,d])=>!!d),Fn(!1)),s),xe(re(a,Le(l),ke(([u,d])=>!!d),Fn(!1)),c),et(re(_t(t,a),Le(s,n,e,c),ke(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||lf(f))&&!d&&!m),Le(l)),([,u])=>{Nn(o,()=>{Ne(c,!0)}),bf(4,()=>{Nn(r,()=>{Ne(s,!0)}),Ne(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},lt(jn,Wt,fa,xr),{singleton:!0});function G0(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",xF="none",wF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},SF=0,ga=Ye(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=He(),c=He(),u=se(4),d=se(SF),p=Rt(re(D0(re(Ae(o),oi(1),Fn(!0)),re(Ae(o),oi(1),Fn(!1),O0(100))),ct()),!1),f=Rt(re(D0(re(n,Fn(!0)),re(n,Fn(!1),O0(200))),ct()),!1);xe(re(_t(Ae(o),Ae(d)),he(([v,x])=>v<=x),ct()),s),xe(re(s,yr(50)),c);const m=en(re(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),Ln((v,[{scrollHeight:x,scrollTop:S},w,T,C,k])=>{const I=S+w-x>-k,_={scrollHeight:x,scrollTop:S,viewportHeight:w};if(I){let L,$;return S>v.state.scrollTop?(L="SCROLLED_DOWN",$=v.state.scrollTop-S):(L="SIZE_DECREASED",$=v.state.scrollTop-S||v.scrollTopDelta),{atBottom:!0,atBottomBecause:L,scrollTopDelta:$,state:_}}let M;return _.scrollHeight>v.state.scrollHeight?M="SIZE_INCREASED":w<v.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":S<v.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:_}},wF),ct((v,x)=>v&&v.atBottom===x.atBottom))),g=Rt(re(r,Ln((v,{scrollHeight:x,scrollTop:S,viewportHeight:w})=>{if(G0(v.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const T=x-(S+w)<1;return v.scrollTop!==S&&T?{changed:!0,jump:v.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ke(v=>v.changed),he(v=>v.jump)),0);xe(re(m,he(v=>v.atBottom)),a),xe(re(a,yr(50)),l);const h=se(ma);xe(re(r,he(({scrollTop:v})=>v),ct(),Ln((v,x)=>zt(f)?{direction:v.direction,prevScrollTop:x}:{direction:x<v.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(v=>v.direction)),h),xe(re(r,yr(50),Fn(xF)),h);const y=se(0);return xe(re(p,ke(v=>!v),Fn(0)),y),xe(re(o,yr(100),Le(p),ke(([v,x])=>!!x),Ln(([v,x],[S])=>[x,S],[0,0]),he(([v,x])=>x-v)),y),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},lt(Wt)),el="top",tl="bottom",Z0="none";function X0(e,t,n){return typeof e=="number"?n===ha&&t===el||n===ma&&t===tl?e:0:n===ha?t===el?e.main:e.reverse:t===tl?e.main:e.reverse}function Q0(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const wf=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=se(0),s=se(0),l=se(0),c=Rt(re(_t(Ae(r),Ae(o),Ae(n),Ae(i,ua),Ae(l),Ae(a),Ae(t),Ae(e),Ae(s)),he(([u,d,p,[f,m],g,h,y,v,x])=>{const S=u-v,w=h+y,T=Math.max(p-S,0);let C=Z0;const k=Q0(x,el),I=Q0(x,tl);return f-=v,f+=p+y,m+=p+y,m-=v,f>u+w-k&&(C=ha),m<u-T+d+I&&(C=ma),C!==Z0?[Math.max(S-p-X0(g,el,C)-k,0),S-T-y+d+X0(g,tl,C)+I]:null}),ke(u=>u!=null),ct(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},lt(Wt),{singleton:!0});function TF(e,t,n){if(Js(t)){const r=W0(e,t);return[{index:bn(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 Sf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function nl(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,m=p-u;return{bottom:u,firstItemIndex:i,items:ew(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:ew(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function J0(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=xf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return nl(c,[],s,o,n,r)}function ew(e,t,n){if(e.length===0)return[];if(!Js(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=Zs(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 to=Ye(([{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:m}])=>{const g=se([]),h=se(0),y=He();xe(i.topItemsIndexes,g);const v=Rt(re(_t(f,m,Ae(l,ua),Ae(o),Ae(r),Ae(c),u,Ae(g),Ae(t),Ae(n),e),ke(([T,C,,k,,,,,,,I])=>{const _=I&&I.length!==k;return T&&!C&&!_}),he(([,,[T,C],k,I,_,M,L,$,A,N])=>{const O=I,{offsetTree:V,sizeTree:F}=O,B=zt(h);if(k===0)return{...Sf,totalCount:k};if(T===0&&C===0)return B===0?{...Sf,totalCount:k}:J0(B,_,I,$,A,N||[]);if(ot(F))return B>0?null:nl(TF(xf(_,k),O,N),[],k,A,O,$);const D=[];if(L.length>0){const Z=L[0],Y=L[L.length-1];let G=0;for(const j of Zs(F,Z,Y)){const z=j.value,K=Math.max(j.start,Z),ae=Math.min(j.end,Y);for(let H=K;H<=ae;H++)D.push({data:N==null?void 0:N[H],index:H,offset:G,size:z}),G+=z}}if(!M)return nl([],D,k,A,O,$);const R=L.length>0?L[L.length-1]+1:0,Q=dF(V,T,C,R);if(Q.length===0)return null;const X=k-1,J=Gs([],Z=>{for(const Y of Q){const G=Y.value;let j=G.offset,z=Y.start;const K=G.size;if(G.offset<T){z+=Math.floor((T-G.offset+A)/(K+A));const H=z-Y.start;j+=H*K+H*A}z<R&&(j+=(R-z)*K,z=R);const ae=Math.min(Y.end,X);for(let H=z;H<=ae&&!(j>=C);H++)Z.push({data:N==null?void 0:N[H],index:H,offset:j,size:K}),j+=K+A}});return nl(J,D,k,A,O,$)}),ke(T=>T!==null),ct()),Sf);xe(re(e,ke(lf),he(T=>T==null?void 0:T.length)),o),xe(re(v,he(T=>T.topListHeight)),d),xe(d,s),xe(re(v,he(T=>[T.top,T.bottom])),a),xe(re(v,he(T=>T.items)),y);const x=en(re(v,ke(({items:T})=>T.length>0),Le(o,e),ke(([{items:T},C])=>T[T.length-1].originalIndex===C-1),he(([,T,C])=>[T-1,C]),ct(ua),he(([T])=>T))),S=en(re(v,yr(200),ke(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),he(({items:T})=>T[0].index),ct())),w=en(re(v,ke(({items:T})=>T.length>0),he(({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(B0)));return{endReached:x,initialItemCount:h,itemsRendered:y,listState:v,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},lt(jn,K0,wf,pa,fa,ga,xr,gf),{singleton:!0}),tw=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Rt(re(_t(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ae(a),i),{totalListHeight:a,totalListHeightChanged:i}},lt(Wt,to),{singleton:!0}),EF=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Rt(re(_t(n,e,t),ke(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),yr(0),ct()),0);return{alignToBottom:n,paddingTopAddition:r}},lt(Wt,tw),{singleton:!0});function nw(e){return e?e==="smooth"?"smooth":"auto":!1}const CF=(e,t)=>typeof e=="function"?nw(e(t)):t&&nw(e),kF=Ye(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=He();let p=null;function f(g){Ne(o,{align:"end",behavior:g,index:"LAST"})}et(re(_t(re(Ae(t),oi(1)),a),Le(Ae(u),r,i,c),he(([[g,h],y,v,x,S])=>{let w=h&&x,T="auto";return w&&(T=CF(y,v||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),ke(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Nn(e,()=>{zt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Nn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(zt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return et(re(_t(Ae(u),t,s),ke(([g,,h])=>g&&h),Ln(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),ke(({refreshed:g})=>g),Le(u,t)),([,g])=>{zt(i)&&m(g!==!1)}),et(d,()=>{m(zt(u)!==!1)}),et(_t(Ae(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},lt(jn,ga,fa,pa,xr,br,Wt)),PF=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Le(i),ke(([,l])=>l!==0),Le(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>J0(l,c,u,d,p,f))),a),{}),lt(jn,pa,to,xr),{singleton:!0}),AF=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return et(re(e,Le(r),ke(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Nn(re(n,oi(1),ke(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ne(t,o)})})}),{initialScrollTop:r}},lt(xr,Wt,to),{singleton:!0}),_F=({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,IF=Ye(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=He();return xe(re(u,Le(t,l,n,i,o,r,s),Le(e),he(([[d,p,f,m,g,h,y,v],x])=>{const{align:S,behavior:w,calculateViewLocation:T=_F,done:C,...k}=d,I=q0(d,p,m-1),_=da(I,p.offsetTree,x)+g+h,M=_+bn(p.sizeTree,I)[1],L=v+h,$=v+f-y,A=T({itemBottom:M,itemTop:_,locationParams:{align:S,behavior:w,...k},viewportBottom:$,viewportTop:L});return A?C&&Nn(re(a,ke(N=>!N),oi(zt(a)?1:2)),C):C&&C(),A}),ke(d=>d!==null)),c),{scrollIntoView:u}},lt(jn,Wt,fa,to,br),{singleton:!0}),rw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=He(),r=se(!1);return xe(re(e,Le(r,t,n),ke(([o,i])=>!!i),he(([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),et(re(_t(t,e,n),Le(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},lt(ga),{singleton:!0}),Tf=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=se(!1),a=se(void 0);return xe(re(_t(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(re(t,Le(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},lt(Wt)),OF=Ye(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=He(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),et(re(c,Le(t,r,a,d,p,n)),([f,m,g,h,y,v,x])=>{const S=pF(m.sizeTree);h&&y!==null&&v!==null&&(g=y.scrollTop-v.offsetTop),g-=x,f({ranges:S,scrollTop:g})}),xe(re(u,ke(lf),he(MF)),o),xe(re(i,Le(u),ke(([,f])=>f!==void 0),ct(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},lt(jn,Wt,pa,xr,Tf));function MF(e){return{align:"start",index:0,offset:e.scrollTop}}const DF=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,ke(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},lt(to));function ow(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const NF=ow(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),FF=Ye(([{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:m}])=>{const g=en(re(l,Le(a),Ln(([,y,v,x],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const I=S+T;let _=0;return v===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(_=I-x,_!==0&&(_+=k))),[_,w,C,I]},[0,[],0,0]),ke(([y])=>y!==0),Le(r,s,n,o,f,m),ke(([,y,v,x,,,S])=>!S&&!x&&y!==0&&v===ha),he(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},tn.DEBUG),y))));function h(y){y>0?(Ne(t,{behavior:"auto",top:-y}),Ne(e,0)):(Ne(e,0),Ne(t,{behavior:"auto",top:-y}))}return et(re(g,Le(e,i)),([y,v,x])=>{x&&NF()?Ne(e,v-y):h(-y)}),et(re(_t(Rt(i,!1),e,m),ke(([y,v,x])=>!y&&!x&&v!==0),he(([y,v])=>v),yr(1)),h),xe(re(d,he(y=>({top:-y}))),t),et(re(c,Le(p,u),he(([y,{groupIndices:v,lastSize:x,sizeTree:S},w])=>{function T(C){return C*(x+w)}if(v.length===0)return T(y);{let C=0;const k=ca(S,0);let I=0,_=0;for(;I<y;){I++,C+=k;let M=v.length===_+1?1/0:v[_+1]-v[_]-1;I+M>y&&(C-=k,M=y-I+1),I+=M,C+=T(M),_++}return C}})),y=>{Ne(e,y),requestAnimationFrame(()=>{Ne(t,{top:y}),requestAnimationFrame(()=>{Ne(e,0),Ne(m,!1)})})}),{deviation:e}},lt(Wt,ga,to,jn,br,gf)),LF=Ye(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),lt(wf,PF,xr,rw,tw,AF,EF,Tf,IF,br)),iw=Ye(([{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:m},g,h,y,{listState:v,topItemsIndexes:x,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},I])=>(xe(S.rangeChanged,I.scrollSeekRangeChanged),xe(re(I.windowViewportRect,he(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...y,groupIndices:i,itemSize:a,listState:v,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...h}),lt(jn,pa,Wt,OF,kF,to,fa,FF,DF,K0,LF));function VF(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 rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ef(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(h,y){h.propsReady&&Ne(h.propsReady,!1);for(const v of r){const x=h[t.required[v]];Ne(x,y[v])}for(const v of o)if(v in y){const x=h[t.optional[v]];Ne(x,y[v])}h.propsReady&&Ne(h.propsReady,!0)}function c(h){return i.reduce((y,v)=>(y[v]=x=>{const S=h[t.methods[v]];Ne(S,x)},y),{})}function u(h){return a.reduce((y,v)=>(y[v]=J2(h[t.events[v]]),y),{})}const d=E.forwardRef((h,y)=>{const{children:v,...x}=h,[S]=E.useState(()=>Gs(tF(e),C=>{l(C,x)})),[w]=E.useState(_0(u,S));rl(()=>{for(const C of a)C in x&&et(w[C],x[C]);return()=>{Object.values(w).map(cf)}},[x,w,S]),rl(()=>{l(S,x)}),E.useImperativeHandle(y,A0(c(S)));const T=n;return b.jsx(s.Provider,{value:S,children:n?b.jsx(T,{...VF([...r,...o,...a],x),children:v}):v})}),p=h=>E.useCallback(I0(Ne,E.useContext(s)[h]),[h]),f=h=>{const y=E.useContext(s)[h],v=E.useCallback(x=>et(y,x),[y]);return E.useSyncExternalStore(v,()=>zt(y),()=>zt(y))},m=h=>{const y=E.useContext(s)[h],[v,x]=E.useState(_0(zt,y));return rl(()=>et(y,S=>{S!==v&&x(A0(S))}),[y,v]),v},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,y)=>{const v=E.useContext(s)[h];rl(()=>et(v,y),[y,v])},useEmitterValue:g,usePublisher:p}}const ol=E.createContext(void 0),aw=E.createContext(void 0),sw=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Cf(e){return"self"in e}function jF(e){return"body"in e}function lw(e,t,n,r=ri,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if(jF(h)||Cf(h)){const v=Cf(h)?h:h.defaultView;g=i?v.scrollX:v.scrollY,f=i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,m=i?v.innerWidth:v.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?y():wi.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(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 m=p.behavior==="smooth";let g,h,y;Cf(f)?(h=Math.max(xn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=xn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const v=h-g;if(p.top=Math.ceil(Math.max(Math.min(v,p.top),0)),G0(g,h)||p.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),m&&t(!0);return}m?(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 kf="-webkit-sticky",cw="sticky",uw=ow(()=>{if(typeof document>"u")return cw;const e=document.createElement("div");return e.style.position=kf,e.style.position===kf?kf:cw});function Pf(e){return e}const $F=Ye(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(Pf),i=se("div"),a=se(ri),s=(l,c=null)=>Rt(re(r,he(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")}}),zF=Ye(([e,t])=>({...e,...t}),lt(iw,$F)),RF=({height:e})=>b.jsx("div",{style:{height:e}}),BF={overflowAnchor:"none",position:uw(),zIndex:1},dw={overflowAnchor:"none"},HF={...dw,display:"inline-block",height:"100%"},fw=E.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=un("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=un("windowScrollContainerState"),a=un("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),p=Ie("itemSize"),f=Ie("log"),m=un("gap"),g=Ie("horizontalDirection"),{callbackRef:h}=N0(n,p,d,e?ri:s,f,m,o,g,Ie("skipAnimationFrameInResizeObserver")),[y,v]=E.useState(0);If("deviation",A=>{y!==A&&v(A)});const x=Ie("EmptyPlaceholder"),S=Ie("ScrollSeekPlaceholder")||RF,w=Ie("ListComponent"),T=Ie("ItemComponent"),C=Ie("GroupComponent"),k=Ie("computeItemKey"),I=Ie("isSeeking"),_=Ie("groupIndices").length>0,M=Ie("alignToBottom"),L=Ie("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:M?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:M?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...L?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?b.jsx(x,{...ut(x,c)}):b.jsx(w,{...ut(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(A=>{const N=A.originalIndex,O=k(N+t.firstItemIndex,A.data,c);return I?E.createElement(S,{...ut(S,c),height:A.size,index:A.index,key:O,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?E.createElement(C,{...ut(C,c),"data-index":N,"data-item-index":A.index,"data-known-size":A.size,key:O,style:BF},u(A.index,c)):E.createElement(T,{...ut(T,c),...pw(T,A.data),"data-index":N,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:O,style:g?HF:dw},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),WF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},qF={outline:"none",overflowX:"auto",position:"relative"},ai=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),UF={position:uw(),top:0,width:"100%",zIndex:1};function ut(e,t){if(typeof e!="string")return{context:t}}function pw(e,t){return{item:typeof e=="string"?void 0:t}}const KF=E.memo(function(){const e=Ie("HeaderComponent"),t=un("headerHeight"),n=Ie("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null}),YF=E.memo(function(){const e=Ie("FooterComponent"),t=un("footerHeight"),n=Ie("HeaderFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null});function Af({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:m}=lw(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),b.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?qF:WF,...o},tabIndex:0,...i,...ut(s,u),children:r})})}function _f({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),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=lw(a,l,s,m,d);return sw(()=>{var v;return h.current=d||((v=f.current)==null?void 0:v.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",y),e("scrollBy",g),b.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...ut(s,p),children:r})})}const GF=({children:e})=>{const t=E.useContext(ol),n=un("viewportHeight"),r=un("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>xn(l,i?"width":"height")),[n,i]),s=Vn(a,!0,Ie("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:s,style:ai(o),children:e})},ZF=({children:e})=>{const t=E.useContext(ol),n=un("windowViewportRect"),r=un("fixedItemHeight"),o=Ie("customScrollParent"),i=df(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(a),children:e})},XF=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...UF,marginTop:`${n}px`},o=Ie("context");return b.jsx(t,{style:r,...ut(t,o),children:e})},QF=E.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?tL:eL,a=r||t?ZF:GF;return b.jsxs(i,{...e,...ut(i,o),children:[n&&b.jsx(XF,{children:b.jsx(fw,{showTopList:!0})}),b.jsxs(a,{children:[b.jsx(KF,{}),b.jsx(fw,{}),b.jsx(YF,{})]})]})}),{Component:JF,useEmitter:If,useEmitterValue:Ie,usePublisher:un}=Ef(zF,{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:{}},QF),eL=Af({useEmitter:If,useEmitterValue:Ie,usePublisher:un}),tL=_f({useEmitter:If,useEmitterValue:Ie,usePublisher:un}),Of=JF,nL=Ye(()=>{const e=se(l=>b.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(Pf),a=se(ri),s=(l,c=null)=>Rt(re(o,he(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")}}),rL=Ye(([e,t])=>({...e,...t}),lt(iw,nL)),oL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{height:e}})}),iL=({height:e})=>b.jsx("tr",{children:b.jsx("td",{style:{border:0,height:e,padding:0}})}),aL={overflowAnchor:"none"},hw=E.memo(function({showTopList:e=!1}){const t=Ve("listState"),n=Ve("computeItemKey"),r=Ve("firstItemIndex"),o=Ve("isSeeking"),i=Ve("ScrollSeekPlaceholder")||oL,a=Ve("context"),s=Ve("TableRowComponent"),l=Ve("fixedHeaderHeight"),c=Ve("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=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:m,type:p.type||"item"}):E.createElement(s,{...ut(s,a),...pw(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:aL},c(p.index,p.data,a))});return b.jsx(b.Fragment,{children:d})}),sL=E.memo(function(){const e=Ve("listState"),t=Ve("topItemsIndexes").length>0,n=wn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Ve("trackItemSizes"),c=Ve("itemSize"),u=Ve("log"),{callbackRef:d,ref:p}=N0(n,c,l,s,u,void 0,o,!1,Ve("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Mf("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,m(_))});const g=Ve("EmptyPlaceholder"),h=Ve("FillerRow")||iL,y=Ve("TableBodyComponent"),v=Ve("paddingTopAddition"),x=Ve("statefulTotalCount"),S=Ve("context");if(x===0&&g)return b.jsx(g,{...ut(g,S)});const w=(t?e.topItems:[]).reduce((_,M)=>_+M.size,0),T=e.offsetTop+v+f-w,C=e.offsetBottom,k=T>0?b.jsx(h,{context:S,height:T},"padding-top"):null,I=C>0?b.jsx(h,{context:S,height:C},"padding-bottom"):null;return b.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...ut(y,S),children:[k,t&&b.jsx(hw,{showTopList:!0}),b.jsx(hw,{}),I]})}),lL=({children:e})=>{const t=E.useContext(ol),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Vn(E.useMemo(()=>sa(n,i=>xn(i,"height")),[n]),!0,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.jsx("div",{"data-viewport-type":"element",ref:o,style:ai(!1),children:e})},cL=({children:e})=>{const t=E.useContext(ol),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Ve("customScrollParent"),i=df(n,o,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.jsx("div",{"data-viewport-type":"window",ref:i,style:ai(!1),children:e})},uL=E.memo(function(e){const t=Ve("useWindowScroll"),n=Ve("customScrollParent"),r=wn("fixedHeaderHeight"),o=wn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),s=Ve("context"),l=Vn(E.useMemo(()=>sa(r,y=>xn(y,"height")),[r]),!0,Ve("skipAnimationFrameInResizeObserver")),c=Vn(E.useMemo(()=>sa(o,y=>xn(y,"height")),[o]),!0,Ve("skipAnimationFrameInResizeObserver")),u=n||t?pL:fL,d=n||t?cL:lL,p=Ve("TableComponent"),f=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),g=i?b.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ut(f,s),children:i()},"TableHead"):null,h=a?b.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ut(m,s),children:a()},"TableFoot"):null;return b.jsx(u,{...e,...ut(u,s),children:b.jsx(d,{children:b.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ut(p,s),children:[g,b.jsx(sL,{},"TableBody"),h]})})})}),{Component:dL,useEmitter:Mf,useEmitterValue:Ve,usePublisher:wn}=Ef(rL,{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:{}},uL),fL=Af({useEmitter:Mf,useEmitterValue:Ve,usePublisher:wn}),pL=_f({useEmitter:Mf,useEmitterValue:Ve,usePublisher:wn}),hL=dL,mw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},mL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:gw,floor:il,max:va,min:Df,round:vw}=Math;function yw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function gL(e){return{...mL,items:e}}function al(e,t){return e&&e.width===t.width&&e.height===t.height}function vL(e,t){return e&&e.column===t.column&&e.row===t.row}const yL=Ye(([{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:m,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:v,windowScrollTo:x,windowViewportRect:S},w])=>{const T=se(0),C=se(0),k=se(mw),I=se({height:0,width:0}),_=se({height:0,width:0}),M=He(),L=He(),$=se(0),A=se(null),N=se({column:0,row:0}),O=He(),V=He(),F=se(!1),B=se(0),D=se(!0),R=se(!1),Q=se(!1);et(re(m,Le(B),ke(([j,z])=>!!z)),()=>{Ne(D,!1)}),et(re(_t(m,D,_,I,B,R),ke(([j,z,K,ae,,H])=>j&&!z&&K.height!==0&&ae.height!==0&&!H)),([,,,,j])=>{Ne(R,!0),bf(1,()=>{Ne(M,j)}),Nn(re(c),()=>{Ne(t,[0,0]),Ne(D,!0)})}),xe(re(V,ke(j=>j!=null&&j.scrollTop>0),Fn(0)),C),et(re(m,Le(V),ke(([,j])=>j!=null)),([,j])=>{j&&(Ne(I,j.viewport),Ne(_,j.item),Ne(N,j.gap),j.scrollTop>0&&(Ne(F,!0),Nn(re(c,oi(1)),z=>{Ne(F,!1)}),Ne(l,{top:j.scrollTop})))}),xe(re(I,he(({height:j})=>j)),d),xe(re(_t(Ae(I,al),Ae(_,al),Ae(N,(j,z)=>j&&j.column===z.column&&j.row===z.row),Ae(c)),he(([j,z,K,ae])=>({gap:K,item:z,scrollTop:ae,viewport:j}))),O),xe(re(_t(Ae(T),r,Ae(N,vL),Ae(_,al),Ae(I,al),Ae(A),Ae(C),Ae(F),Ae(D),Ae(B)),ke(([,,,,,,,j])=>!j),he(([j,[z,K],ae,H,be,Ce,_e,,Re,le])=>{const{column:we,row:ce}=ae,{height:Se,width:ie}=H,{width:de}=be;if(_e===0&&(j===0||de===0))return mw;if(ie===0){const Tn=xf(le,j),Bn=Tn+Math.max(_e-1,0);return gL(yw(Tn,Bn,Ce))}const ee=bw(de,ie,we);let q,ne;Re?z===0&&K===0&&_e>0?(q=0,ne=_e-1):(q=ee*il((z+ce)/(Se+ce)),ne=ee*gw((K+ce)/(Se+ce))-1,ne=Df(j-1,va(ne,ee-1)),q=Df(ne,va(0,q))):(q=0,ne=-1);const me=yw(q,ne,Ce),{bottom:De,top:Ue}=xw(be,ae,H,me),Xe=gw(j/ee),Lt=Xe*Se+(Xe-1)*ce-De;return{bottom:De,itemHeight:Se,items:me,itemWidth:ie,offsetBottom:Lt,offsetTop:Ue,top:Ue}})),k),xe(re(A,ke(j=>j!==null),he(j=>j.length)),T),xe(re(_t(I,_,k,N),ke(([j,z,{items:K}])=>K.length>0&&z.height!==0&&j.height!==0),he(([j,z,{items:K},ae])=>{const{bottom:H,top:be}=xw(j,ae,z,K);return[be,H]}),ct(ua)),t);const X=se(!1);xe(re(c,Le(X),he(([j,z])=>z||j!==0)),X);const J=en(re(_t(k,T),ke(([{items:j}])=>j.length>0),Le(X),ke(([[j,z],K])=>{const ae=j.items[j.items.length-1].index===z-1;return(K||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===z)&&ae}),he(([[,j]])=>j-1),ct())),Z=en(re(Ae(k),ke(({items:j})=>j.length>0&&j[0].index===0),Fn(0),ct())),Y=en(re(Ae(k),Le(F),ke(([{items:j},z])=>j.length>0&&!z),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),ct(B0),yr(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(M,Le(I,_,T,N),he(([j,z,K,ae,H])=>{const be=Y0(j),{align:Ce,behavior:_e,offset:Re}=be;let le=be.index;le==="LAST"&&(le=ae-1),le=va(0,le,Df(ae-1,le));let we=Nf(z,H,K,le);return Ce==="end"?we=vw(we-z.height+K.height):Ce==="center"&&(we=vw(we-z.height/2+K.height/2)),Re&&(we+=Re),{behavior:_e,top:we}})),l);const G=Rt(re(k,he(j=>j.offsetBottom+j.bottom)),0);return xe(re(S,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),I),{customScrollParent:h,data:A,deviation:$,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:L,scrollTo:l,scrollToIndex:M,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:y,viewportDimensions:I,windowScrollContainerState:v,windowScrollTo:x,windowViewportRect:S,...f,gridState:k,horizontalDirection:Q,initialTopMostItemIndex:B,totalListHeight:G,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:Z,stateChanged:O,stateRestoreInProgress:F,...w}},lt(wf,Wt,ga,rw,xr,Tf,br));function bw(e,t,n){return va(1,il((e+n)/(il(t)+n)))}function xw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Nf(e,t,n,r[0].index);return{bottom:Nf(e,t,n,r[r.length-1].index)+o,top:i}}function Nf(e,t,n,r){const o=bw(e.width,n.width,t.column),i=il(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const bL=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(Pf),a=se("div"),s=se(ri),l=(d,p=null)=>Rt(re(t,he(f=>f[d]),ct()),p),c=se(!1),u=se(!1);return xe(Ae(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),xL=Ye(([e,t])=>({...e,...t}),lt(yL,bL)),wL=E.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=dn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=dn("itemDimensions"),p=dn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=dn("reportReadyState"),h=Vn(E.useMemo(()=>y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const x=y.firstChild;if(x){const{height:S,width:w}=x.getBoundingClientRect();d({height:S,width:w})}p({column:Sw("column-gap",getComputedStyle(y).columnGap,f),row:Sw("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return sw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:b.jsx(l,{className:t,ref:h,...ut(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const v=o(y.index,y.data,u);return i?b.jsx(c,{...ut(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},v):E.createElement(s,{...ut(s,u),className:n,"data-index":y.index,key:v},r(y.index,y.data,u))})})}),SL=E.memo(function(){const e=ht("HeaderComponent"),t=dn("headerHeight"),n=ht("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,!1),o=ht("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null}),TL=E.memo(function(){const e=ht("FooterComponent"),t=dn("footerHeight"),n=ht("headerFooterTag"),r=Vn(E.useMemo(()=>i=>{t(xn(i,"height"))},[t]),!0,!1),o=ht("context");return e?b.jsx(n,{ref:r,children:b.jsx(e,{...ut(e,o)})}):null}),EL=({children:e})=>{const t=E.useContext(aw),n=dn("itemDimensions"),r=dn("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]),b.jsx("div",{ref:o,style:ai(!1),children:e})},CL=({children:e})=>{const t=E.useContext(aw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=ht("customScrollParent"),i=df(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]),b.jsx("div",{ref:i,style:ai(!1),children:e})},kL=E.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?AL:PL,o=n||t?CL:EL,i=ht("context");return b.jsx(r,{...e,...ut(r,i),children:b.jsxs(o,{children:[b.jsx(SL,{}),b.jsx(wL,{}),b.jsx(TL,{})]})})}),{useEmitter:ww,useEmitterValue:ht,usePublisher:dn}=Ef(xL,{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"}},kL),PL=Af({useEmitter:ww,useEmitterValue:ht,usePublisher:dn}),AL=_f({useEmitter:ww,useEmitterValue:ht,usePublisher:dn});function Sw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Ff=()=>{const e=E.useContext(Vo);return e?e.tweaks:bs},Tw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>b.jsxs("span",{className:Oe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:b.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?b.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?b.jsx(sf,{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:b.jsx("span",{className:"cursor-help",children:b.jsx(Ty,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:b.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?b.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[b.jsx(xy,{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}),b.jsx(b_,{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]}),ya=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:m,componentName:g,placeholder:h,hideLeft:y=!1,required:v,disabled:x,reportStatus:S},w)=>{const T=Ff(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,I=Pt(),_=e??I.inputOptionalLabel;return b.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[b.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:[b.jsx(Tw,{info:s,hideLeft:y,reportStatus:C,title:m,placeholder:h,children:_||n?b.jsxs(E.Fragment,{children:[v?null:b.jsx("span",{"aria-disabled":x,className:"text-opacity-70 aria-disabled:text-disabled",children:_}),n?b.jsx(E.Fragment,{children:n}):null]}):null}),b.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?b.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?b.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),b.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}),b.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})]})}),_L=e=>b.jsx(E.Fragment,{children:e.children}),IL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},OL=[],ML=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(tr,{children:t.children})})}),DL=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),NL={List:ML,Item:DL},si=40,FL=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:m=!1,...g},h)=>{const y=E.useRef(null),v=E.useRef(null),x=E.useRef(null),S=g.value??g.defaultValue??"",w=Pt(),[T,C]=E.useState(()=>Math.min(320,si*o.length)),[k,I]=E.useState(!1),[_,M]=E.useState(""),[L,$]=E.useState(S),[A,N]=E.useState(()=>{var ie;return((ie=o.find(de=>de.value===S))==null?void 0:ie.label)??S}),[O,V]=E.useState(null),F=E.useRef(OL),B=rf(k,"block-only"),D=m&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,R=_?tf(D,"value",[{key:"value",value:_},{key:"label",value:_}]):D,Q=()=>{I(!1),C(0)},X=R.filter(ie=>ie.hidden!==!0),J=m?void 0:`^(${o.map(ie=>`${ud(ie.value)}${ie.label?"|"+ud(ie.label):""}`).join("|")})$`,{x:Z,y:Y,strategy:G,refs:j,context:z}=mr({open:k,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:Uo,middleware:[ta(4),Ix({padding:10,elementContext:"reference",apply(ie){const de=ie.elements.floating.querySelector("ul"),ee=(de==null?void 0:de.getBoundingClientRect().height)||0,q=Ti(j.reference.current,window.innerHeight),ne=Math.min(ee<si?q:ee,q,ie.availableHeight),me=X.length===0?si:Math.min(ne,q,ee),De=`${v.current.getBoundingClientRect().width}px`;Object.assign(ie.elements.floating.style,{width:De,maxWidth:De,height:me})}})]}),K=d0(z,IL),{getReferenceProps:ae,getFloatingProps:H,getItemProps:be}=gr([Jr(z,{role:"listbox"}),Qr(z),Ws(z,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const ie=o.find(de=>de.value===g.value);$((ie==null?void 0:ie.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!k)return C(0);const ie=j.reference;if(ie.current===null)return;const de=Ti(ie.current,window.innerHeight);setTimeout(()=>C(Math.min(de,X.length*si)),100)},[_,k,j.reference]),E.useEffect(()=>{const ie=j.reference.current;if(ie)return Si(ie)},[]);const Ce=(ie,de)=>{$(ie.value);const ee=j.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",ie.value),ee.value=ie.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),N(ie.label??""),Q(),M(""),V(de)},_e=ie=>{var ee;const de=ie.target.value;return M(de),!k&&de===""?I(!0):(ie.target.name=g.name||"",de?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,ie))},Re=()=>{var ie;I(!0),M(""),(ie=j.reference.current)==null||ie.focus()},le=()=>{V(ie=>ie===null?0:ie),I(!0),M("")},we=()=>{var ie;(ie=j.reference.current)==null||ie.setAttribute("data-value",""),M(""),$(""),N(""),em(j.reference.current),Q()},ce=g.id||g.name,Se=X.length===0;return b.jsxs(ya,{...g,left:e,error:t,ref:v,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:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Re,children:[b.jsx(Hu,{size:20}),b.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),L?b.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("input",{"data-shadow":"true",...ae({...g,onChange:_e,onFocus:le,pattern:J,ref:j.setReference,name:`${ce}-shadow`,id:`${ce}-shadow`,onClick:ie=>ie.currentTarget.focus(),onKeyDown(ie){var de,ee;if(ie.key==="Escape")return ie.currentTarget.blur(),Q();if(k){if(ie.key==="ArrowDown"){let q=$e.number(O)?O+1:0;return q>X.length-1&&(q=0),(de=x.current)==null||de.scrollIntoView({index:q}),V(q)}if(ie.key==="ArrowUp"){let q=$e.number(O)?O-1:X.length-1;return q<0&&(q=X.length-1),(ee=x.current)==null||ee.scrollIntoView({index:q}),V(q)}if(ie.key==="Enter"){if(O!==null&&X[O])return ie.preventDefault(),Ce(X[O],O);if(X.length===1)return ie.preventDefault(),Ce(X[0],0)}}}}),"data-value":L,"data-error":!!t,"data-name":ce,"data-target":ce,required:f,value:k?_:A||L,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary text-base",g.className)}),b.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||L||void 0}),b.jsx(Zr,{preserveTabOrder:!0,children:k?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs(ft.div,{...H({ref:Hn(B,j.setFloating),style:{...K.styles,left:Z,top:Y??0,position:G}}),initial:!1,"data-floating":"true",animate:{height:Se?"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 de=j.floating.current.querySelectorAll("li").item(0),ee=(de?de.getBoundingClientRect().height:si)*X.length;return wi.flushSync(()=>C(ee+2))},children:[Se?b.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,b.jsx(Of,{overscan:40,ref:x,hidden:Se,data:X,style:{height:T},defaultItemHeight:si,components:NL,scrollerRef:ie=>void(y.current=ie),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ie,de)=>{const ee=de.Render??_L,q=L===de.value||L===de.label,ne=O===ie,me=de.label??de.value;return b.jsx("button",{"data-value":de.value,...be({ref:De=>void(F.current[ie]=De),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":de.disabled,onClick:()=>Ce(de,ie),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${ne?"bg-floating-hover text-floating-foreground":""}`}),children:b.jsx(ee,{...g,label:de.label,value:de.value,children:me})})}})]})}):null})]})}),Lf=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 b.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[b.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,b.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Ew=(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:m="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:v,...x},S)=>{const w=e,T=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=Si(C.current),_=r==null?void 0:r(k),M=L=>{const $=L;if($.key==="Enter"&&k.enterKeyHint==="next"){const A=k.getAttribute("data-next");if(A){const N=document.getElementById(A);if(N)return N.focus(),void $.preventDefault()}}};return k.addEventListener("keydown",M),()=>{_==null||_(),I(),k.removeEventListener("keydown",M)}},[]),b.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:v,form:x.form,name:x.name,feedback:h,hideLeft:y,title:x.title,container:Oe(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:b.jsx(w,{...n,...x,id:T,name:T,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Hn(S,C),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=Ew(ob,"input",{type:"text"}),Cw=new Date(1970,11,31),Vf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},kw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},LL={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")},jf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},VL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=ld(t),l=E.useId(),c=Pt(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=jf(u,Cw).flatMap(C=>$e.keyof(Vf,C.type)?Vf[C.type](C.value):[]),h=jf(u,Cw).reduce((C,k)=>C+($e.keyof(kw,k.type)?kw[k.type](k.value):""),""),[y,v]=E.useState(d?jf(u,d).reduce((C,k)=>C+($e.keyof(Vf,k.type)?LL[k.type](d,k.value):""),""):""),x=C=>{const k=C.target.value;if(v(k),g.length===k.length&&g.every((_,M)=>{const L=k.charAt(M);return typeof _=="string"?L===_:_.test(L)})){const _=Do(DO(k,h,new Date));return p(_),r==null?void 0:r(_)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),v(C?DI(C,h):"")),w=Iy(d),T=w?d.toISOString():void 0;return b.jsx(ba,{...i,mask:g,value:y,id:void 0,name:void 0,className:"uppercase","data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:b.jsxs(E.Fragment,{children:[b.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),b.jsx(ti,{open:f,onChange:m,trigger:b.jsxs("span",{"aria-labelledby":l,children:[b.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),b.jsx(v_,{})]}),buttonProps:{"aria-describedby":l},children:b.jsx(kb,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),jL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],$L=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],zL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],RL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Pw=(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 Aw(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?RL:zL:t.binary?$L:jL,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=Pw(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=Pw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var sl={exports:{}},ll={exports:{}},Ge={};/** @license React v16.13.1
|
|
188
188
|
* react-is.production.min.js
|
|
189
189
|
*
|
|
190
190
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
191
191
|
*
|
|
192
192
|
* This source code is licensed under the MIT license found in the
|
|
193
193
|
* LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/var _w;function BL(){if(_w)return Ge;_w=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,
|
|
194
|
+
*/var _w;function BL(){if(_w)return Ge;_w=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return T}}case n:return T}}}function S(w){return x(w)===c}return Ge.AsyncMode=l,Ge.ConcurrentMode=c,Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=m,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(w){return S(w)||x(w)===l},Ge.isConcurrentMode=S,Ge.isContextConsumer=function(w){return x(w)===s},Ge.isContextProvider=function(w){return x(w)===a},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return x(w)===u},Ge.isFragment=function(w){return x(w)===r},Ge.isLazy=function(w){return x(w)===m},Ge.isMemo=function(w){return x(w)===f},Ge.isPortal=function(w){return x(w)===n},Ge.isProfiler=function(w){return x(w)===i},Ge.isStrictMode=function(w){return x(w)===o},Ge.isSuspense=function(w){return x(w)===d},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===y||w.$$typeof===v||w.$$typeof===g)},Ge.typeOf=x,Ge}var Ze={};/** @license React v16.13.1
|
|
195
195
|
* react-is.development.js
|
|
196
196
|
*
|
|
197
197
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the MIT license found in the
|
|
200
200
|
* LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/var Iw;function HL(){return Iw||(Iw=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,
|
|
201
|
+
*/var Iw;function HL(){return Iw||(Iw=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,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function x(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===p||typeof H=="object"&&H!==null&&(H.$$typeof===m||H.$$typeof===f||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===h||H.$$typeof===y||H.$$typeof===v||H.$$typeof===g)}function S(H){if(typeof H=="object"&&H!==null){var be=H.$$typeof;switch(be){case t:var Ce=H.type;switch(Ce){case l:case c:case r:case i:case o:case d:return Ce;default:var _e=Ce&&Ce.$$typeof;switch(_e){case s:case u:case m:case f:case a:return _e;default:return be}}case n:return be}}}var w=l,T=c,C=s,k=a,I=t,_=u,M=r,L=m,$=f,A=n,N=i,O=o,V=d,F=!1;function B(H){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(H)||S(H)===l}function D(H){return S(H)===c}function R(H){return S(H)===s}function Q(H){return S(H)===a}function X(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function J(H){return S(H)===u}function Z(H){return S(H)===r}function Y(H){return S(H)===m}function G(H){return S(H)===f}function j(H){return S(H)===n}function z(H){return S(H)===i}function K(H){return S(H)===o}function ae(H){return S(H)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=T,Ze.ContextConsumer=C,Ze.ContextProvider=k,Ze.Element=I,Ze.ForwardRef=_,Ze.Fragment=M,Ze.Lazy=L,Ze.Memo=$,Ze.Portal=A,Ze.Profiler=N,Ze.StrictMode=O,Ze.Suspense=V,Ze.isAsyncMode=B,Ze.isConcurrentMode=D,Ze.isContextConsumer=R,Ze.isContextProvider=Q,Ze.isElement=X,Ze.isForwardRef=J,Ze.isFragment=Z,Ze.isLazy=Y,Ze.isMemo=G,Ze.isPortal=j,Ze.isProfiler=z,Ze.isStrictMode=K,Ze.isSuspense=ae,Ze.isValidElementType=x,Ze.typeOf=S}()),Ze}var Ow;function Mw(){return Ow||(Ow=1,process.env.NODE_ENV==="production"?ll.exports=BL():ll.exports=HL()),ll.exports}/*
|
|
202
202
|
object-assign
|
|
203
203
|
(c) Sindre Sorhus
|
|
204
204
|
@license MIT
|
|
205
|
-
*/var $f,Dw;function WL(){if(Dw)return $f;Dw=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
|
|
206
|
-
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var H=ae(G,K,Q,Z,Y+"."+K,n);if(H)return H}return null}return h(z)}function A(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(A);if(D===null||s(D))return!0;var z=d(D);if(z){var J=z.call(D),X;if(z!==D.entries){for(;!(X=J.next()).done;)if(!A(X.value))return!1}else for(;!(X=J.next()).done;){var Q=X.value;if(Q&&!A(Q[1]))return!1}}else return!1;return!0;default:return!1}}function N(D,z){return D==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function O(D){var z=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":N(z,D)?"symbol":z}function V(D){if(typeof D>"u"||D===null)return""+D;var z=O(D);if(z==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return z}function F(D){var z=V(D);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function B(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Wf}var qf,$w;function KL(){if($w)return qf;$w=1;var e=Rf();function t(){}function n(){}return n.resetWarningCache=t,qf=function(){function r(a,s,c,l,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},qf}var zw;function YL(){if(zw)return sl.exports;if(zw=1,process.env.NODE_ENV!=="production"){var e=Mw(),t=!0;sl.exports=UL()(e.isElement,t)}else sl.exports=KL()();return sl.exports}var GL=YL();const it=Up(GL);function no(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{l(r.next(u))}catch(d){a(d)}}function c(u){try{l(r.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const ZL=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 li(e,t,n){const r=XL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Rw(r,"path",i),Rw(r,"relativePath",i),r}function XL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=ZL.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Rw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const QL=[".DS_Store","Thumbs.db"];function JL(e){return no(this,void 0,void 0,function*(){return cl(e)&&eV(e.dataTransfer)?oV(e.dataTransfer,e.type):tV(e)?nV(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?rV(e):[]})}function eV(e){return cl(e)}function tV(e){return cl(e)&&cl(e.target)}function cl(e){return typeof e=="object"&&e!==null}function nV(e){return Uf(e.target.files).map(t=>li(t))}function rV(e){return no(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>li(n))})}function oV(e,t){return no(this,void 0,void 0,function*(){if(e.items){const n=Uf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(iV));return Bw(Hw(r))}return Bw(Uf(e.files).map(n=>li(n)))})}function Bw(e){return e.filter(t=>QL.indexOf(t.name)===-1)}function Uf(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function iV(e){if(typeof e.webkitGetAsEntry!="function")return Ww(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?qw(t):Ww(e,t)}function Hw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Hw(n):[n]],[])}function Ww(e,t){return no(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,li(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return li(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function aV(e){return no(this,void 0,void 0,function*(){return e.isDirectory?qw(e):sV(e)})}function qw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>no(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(aV));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function sV(e){return no(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=li(r,e.fullPath);t(o)},r=>{n(r)})})})}var ul={},Uw;function lV(){return Uw||(Uw=1,ul.__esModule=!0,ul.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}),ul}var cV=lV();const Kf=Up(cV);function Kw(e){return fV(e)||dV(e)||Xw(e)||uV()}function uV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
205
|
+
*/var $f,Dw;function WL(){if(Dw)return $f;Dw=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 $f=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},$f}var zf,Nw;function Rf(){if(Nw)return zf;Nw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zf=e,zf}var Bf,Fw;function Lw(){return Fw||(Fw=1,Bf=Function.call.bind(Object.prototype.hasOwnProperty)),Bf}var Hf,Vw;function qL(){if(Vw)return Hf;Vw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rf(),n={},r=Lw();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(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Hf=o,Hf}var Wf,jw;function UL(){if(jw)return Wf;jw=1;var e=Mw(),t=WL(),n=Rf(),r=Lw(),o=qL(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Wf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var R=D&&(c&&D[c]||D[u]);if(typeof R=="function")return R}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:x,element:S(),elementType:w(),instanceOf:T,node:_(),objectOf:k,oneOf:C,oneOfType:I,shape:L,exact:$};function m(D,R){return D===R?D!==0||1/D===1/R:D!==D&&R!==R}function g(D,R){this.message=D,this.data=R&&typeof R=="object"?R:{},this.stack=""}g.prototype=Error.prototype;function h(D){if(process.env.NODE_ENV!=="production")var R={},Q=0;function X(Z,Y,G,j,z,K,ae){if(j=j||p,K=K||G,ae!==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 be=j+":"+G;!R[be]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+j+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[be]=!0,Q++)}}return Y[G]==null?Z?Y[G]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:D(Y,G,j,z,K)}var J=X.bind(null,!1);return J.isRequired=X.bind(null,!0),J}function y(D){function R(Q,X,J,Z,Y,G){var j=Q[X],z=O(j);if(z!==D){var K=V(j);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return h(R)}function v(){return h(a)}function x(D){function R(Q,X,J,Z,Y){if(typeof D!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var G=Q[X];if(!Array.isArray(G)){var j=O(G);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an array."))}for(var z=0;z<G.length;z++){var K=D(G,z,J,Z,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return h(R)}function S(){function D(R,Q,X,J,Z){var Y=R[Q];if(!s(Y)){var G=O(Y);return new g("Invalid "+J+" `"+Z+"` of type "+("`"+G+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return h(D)}function w(){function D(R,Q,X,J,Z){var Y=R[Q];if(!e.isValidElementType(Y)){var G=O(Y);return new g("Invalid "+J+" `"+Z+"` of type "+("`"+G+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return h(D)}function T(D){function R(Q,X,J,Z,Y){if(!(Q[X]instanceof D)){var G=D.name||p,j=B(Q[X]);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected ")+("instance of `"+G+"`."))}return null}return h(R)}function C(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function R(Q,X,J,Z,Y){for(var G=Q[X],j=0;j<D.length;j++)if(m(G,D[j]))return null;var z=JSON.stringify(D,function(ae,H){var be=V(H);return be==="symbol"?String(H):H});return new g("Invalid "+Z+" `"+Y+"` of value `"+String(G)+"` "+("supplied to `"+J+"`, expected one of "+z+"."))}return h(R)}function k(D){function R(Q,X,J,Z,Y){if(typeof D!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var G=Q[X],j=O(G);if(j!=="object")return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an object."));for(var z in G)if(r(G,z)){var K=D(G,z,J,Z,Y+"."+z,n);if(K instanceof Error)return K}return null}return h(R)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<D.length;R++){var Q=D[R];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(Q)+" at index "+R+"."),a}function X(J,Z,Y,G,j){for(var z=[],K=0;K<D.length;K++){var ae=D[K],H=ae(J,Z,Y,G,j,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&z.push(H.data.expectedType)}var be=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+G+" `"+j+"` supplied to "+("`"+Y+"`"+be+"."))}return h(X)}function _(){function D(R,Q,X,J,Z){return A(R[Q])?null:new g("Invalid "+J+" `"+Z+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return h(D)}function M(D,R,Q,X,J){return new g((D||"React class")+": "+R+" type `"+Q+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function L(D){function R(Q,X,J,Z,Y){var G=Q[X],j=O(G);if(j!=="object")return new g("Invalid "+Z+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));for(var z in D){var K=D[z];if(typeof K!="function")return M(J,Z,Y,z,V(K));var ae=K(G,z,J,Z,Y+"."+z,n);if(ae)return ae}return null}return h(R)}function $(D){function R(Q,X,J,Z,Y){var G=Q[X],j=O(G);if(j!=="object")return new g("Invalid "+Z+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));var z=t({},Q[X],D);for(var K in z){var ae=D[K];if(r(D,K)&&typeof ae!="function")return M(J,Z,Y,K,V(ae));if(!ae)return new g("Invalid "+Z+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Q[X],null," ")+`
|
|
206
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var H=ae(G,K,J,Z,Y+"."+K,n);if(H)return H}return null}return h(R)}function A(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(A);if(D===null||s(D))return!0;var R=d(D);if(R){var Q=R.call(D),X;if(R!==D.entries){for(;!(X=Q.next()).done;)if(!A(X.value))return!1}else for(;!(X=Q.next()).done;){var J=X.value;if(J&&!A(J[1]))return!1}}else return!1;return!0;default:return!1}}function N(D,R){return D==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function O(D){var R=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":N(R,D)?"symbol":R}function V(D){if(typeof D>"u"||D===null)return""+D;var R=O(D);if(R==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return R}function F(D){var R=V(D);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function B(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Wf}var qf,$w;function KL(){if($w)return qf;$w=1;var e=Rf();function t(){}function n(){}return n.resetWarningCache=t,qf=function(){function r(a,s,l,c,u,d){if(d!==e){var 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},qf}var zw;function YL(){if(zw)return sl.exports;if(zw=1,process.env.NODE_ENV!=="production"){var e=Mw(),t=!0;sl.exports=UL()(e.isElement,t)}else sl.exports=KL()();return sl.exports}var GL=YL();const it=Up(GL);function no(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const ZL=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 li(e,t,n){const r=XL(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Rw(r,"path",i),Rw(r,"relativePath",i),r}function XL(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=ZL.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Rw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const QL=[".DS_Store","Thumbs.db"];function JL(e){return no(this,void 0,void 0,function*(){return cl(e)&&eV(e.dataTransfer)?oV(e.dataTransfer,e.type):tV(e)?nV(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?rV(e):[]})}function eV(e){return cl(e)}function tV(e){return cl(e)&&cl(e.target)}function cl(e){return typeof e=="object"&&e!==null}function nV(e){return Uf(e.target.files).map(t=>li(t))}function rV(e){return no(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>li(n))})}function oV(e,t){return no(this,void 0,void 0,function*(){if(e.items){const n=Uf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(iV));return Bw(Hw(r))}return Bw(Uf(e.files).map(n=>li(n)))})}function Bw(e){return e.filter(t=>QL.indexOf(t.name)===-1)}function Uf(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function iV(e){if(typeof e.webkitGetAsEntry!="function")return Ww(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?qw(t):Ww(e,t)}function Hw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Hw(n):[n]],[])}function Ww(e,t){return no(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,li(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return li(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function aV(e){return no(this,void 0,void 0,function*(){return e.isDirectory?qw(e):sV(e)})}function qw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>no(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(aV));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function sV(e){return no(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=li(r,e.fullPath);t(o)},r=>{n(r)})})})}var ul={},Uw;function lV(){return Uw||(Uw=1,ul.__esModule=!0,ul.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}),ul}var cV=lV();const Kf=Up(cV);function Kw(e){return fV(e)||dV(e)||Xw(e)||uV()}function uV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
207
207
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fV(e){if(Array.isArray(e))return Yf(e)}function Yw(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 Gw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(n),!0).forEach(function(r){Zw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e,t){return mV(e)||hV(e,t)||Xw(e,t)||pV()}function pV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
208
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xw(e,t){if(e){if(typeof e=="string")return Yf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yf(e,t)}}function Yf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hV(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(
|
|
208
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xw(e,t){if(e){if(typeof e=="string")return Yf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yf(e,t)}}function Yf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hV(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 mV(e){if(Array.isArray(e))return e}var gV=typeof Kf=="function"?Kf:Kf.default,vV="file-invalid-type",yV="file-too-large",bV="file-too-small",xV="too-many-files",wV=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:vV,message:"File type must be ".concat(r)}},Qw=function(t){return{code:yV,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Jw=function(t){return{code:bV,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},SV={code:xV,message:"Too many files"};function e1(e,t){var n=e.type==="application/x-moz-file"||gV(e,t);return[n,n?null:wV(t)]}function t1(e,t,n){if(ro(e.size))if(ro(t)&&ro(n)){if(e.size>n)return[!1,Qw(n)];if(e.size<t)return[!1,Jw(t)]}else{if(ro(t)&&e.size<t)return[!1,Jw(t)];if(ro(n)&&e.size>n)return[!1,Qw(n)]}return[!0,null]}function ro(e){return e!=null}function TV(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=e1(l,n),u=xa(c,1),d=u[0],p=t1(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function dl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function fl(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 n1(e){e.preventDefault()}function EV(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function CV(e){return e.indexOf("Edge/")!==-1}function kV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return EV(e)||CV(e)}function $n(){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!dl(r)&&s&&s.apply(void 0,[r].concat(i)),dl(r)})}}function PV(){return"showOpenFilePicker"in window}function AV(e){if(ro(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return r1(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(o1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xa(r,2),i=o[0],a=o[1];return Gw(Gw({},n),{},Zw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function _V(e){if(ro(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(Kw(t),[o],Kw(i))},[]).filter(function(t){return r1(t)||o1(t)}).join(",")}function IV(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function OV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function r1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function o1(e){return/^.*\.[\w]+$/.test(e)}var MV=["children"],DV=["open"],NV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],FV=["refKey","onChange","onClick"];function LV(e){return $V(e)||jV(e)||i1(e)||VV()}function VV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
209
209
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $V(e){if(Array.isArray(e))return Zf(e)}function Gf(e,t){return BV(e)||RV(e,t)||i1(e,t)||zV()}function zV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
210
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i1(e,t){if(e){if(typeof e=="string")return Zf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zf(e,t)}}function Zf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RV(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(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function BV(e){if(Array.isArray(e))return e}function a1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a1(Object(n),!0).forEach(function(r){Xf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(e,t){if(e==null)return{};var n=HV(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 HV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Qf=E.forwardRef(function(e,t){var n=e.children,r=pl(e,MV),o=l1(r),i=o.open,a=pl(o,DV);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});Qf.displayName="Dropzone";var s1={disabled:!1,getFilesFromEvent:JL,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Qf.defaultProps=s1,Qf.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var Jf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function l1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},s1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,_=E.useMemo(function(){return _V(n)},[n]),M=E.useMemo(function(){return AV(n)},[n]),L=E.useMemo(function(){return typeof h=="function"?h:c1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:c1},[g]),A=E.useRef(null),N=E.useRef(null),O=E.useReducer(WV,Jf),V=Gf(O,2),F=V[0],B=V[1],D=F.isFocused,z=F.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&PV()),X=function(){!J.current&&z&&setTimeout(function(){if(N.current){var ne=N.current.files;ne.length||(B({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[N,z,$,J]);var Q=E.useRef([]),Z=function(ne){A.current&&A.current.contains(ne.target)||(ne.preventDefault(),Q.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",n1,!1),document.addEventListener("drop",Z,!1)),function(){x&&(document.removeEventListener("dragover",n1),document.removeEventListener("drop",Z))}},[A,x]),E.useEffect(function(){return!r&&v&&A.current&&A.current.focus(),function(){}},[A,v,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),G=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),Q.current=[].concat(LV(Q.current),[q.target]),fl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(dl(q)&&!C)){var me=ne.length,De=me>0&&TV({files:ne,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:c,validator:I}),Ue=me>0&&!De;B({isDragAccept:De,isDragReject:Ue,isDragActive:!0,type:"setDraggedFiles"}),l&&l(q)}}).catch(function(ne){return Y(ne)})},[o,l,Y,C,_,a,i,s,c,I]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=fl(q);if(ne&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(q),!1},[d,C]),R=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=Q.current.filter(function(De){return A.current&&A.current.contains(De)}),me=ne.indexOf(q.target);me!==-1&&ne.splice(me,1),Q.current=ne,!(ne.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fl(q)&&u&&u(q))},[A,u,C]),K=E.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Xe=e1(Ue,_),Lt=Gf(Xe,2),Tn=Lt[0],Bn=Lt[1],Cr=t1(Ue,a,i),kr=Gf(Cr,2),Pr=kr[0],W=kr[1],U=I?I(Ue):null;if(Tn&&Pr&&!U)me.push(Ue);else{var Be=[Bn,W];U&&(Be=Be.concat(U)),De.push({file:Ue,errors:Be.filter(function(rt){return rt})})}}),(!s&&me.length>1||s&&c>=1&&me.length>c)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[SV]})}),me.splice(0)),B({acceptedFiles:me,fileRejections:De,isDragReject:De.length>0,type:"setFiles"}),p&&p(me,De,ne),De.length>0&&m&&m(De,ne),me.length>0&&f&&f(me,ne)},[B,s,_,a,i,c,p,f,m,I]),ae=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),Q.current=[],fl(q)&&Promise.resolve(o(q)).then(function(ne){dl(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),B({type:"reset"})},[o,K,Y,C]),H=E.useCallback(function(){if(J.current){B({type:"openDialog"}),L();var q={multiple:s,types:M};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),B({type:"closeDialog"})}).catch(function(ne){IV(ne)?($(ne),B({type:"closeDialog"})):OV(ne)?(J.current=!1,N.current?(N.current.value=null,N.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(ne)});return}N.current&&(B({type:"openDialog"}),L(),N.current.value=null,N.current.click())},[B,L,$,y,K,Y,M,s]),be=E.useCallback(function(q){!A.current||!A.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[A,H]),Ce=E.useCallback(function(){B({type:"focus"})},[]),_e=E.useCallback(function(){B({type:"blur"})},[]),Re=E.useCallback(function(){T||(kV()?setTimeout(H,0):H())},[T,H]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return S?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},ie=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.role,Ue=q.onKeyDown,Xe=q.onFocus,Lt=q.onBlur,Tn=q.onClick,Bn=q.onDragEnter,Cr=q.onDragOver,kr=q.onDragLeave,Pr=q.onDrop,W=pl(q,NV);return vt(vt(Xf({onKeyDown:we($n(Ue,be)),onFocus:we($n(Xe,Ce)),onBlur:we($n(Lt,_e)),onClick:le($n(Tn,Re)),onDragEnter:ce($n(Bn,G)),onDragOver:ce($n(Cr,j)),onDragLeave:ce($n(kr,R)),onDrop:ce($n(Pr,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,be,Ce,_e,Re,G,j,R,ae,w,S,r]),de=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Xe=pl(q,FV),Lt=Xf({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le($n(De,ae)),onClick:le($n(Ue,de)),tabIndex:-1},me,N);return vt(vt({},Lt),Xe)}},[N,n,s,ae,r]);return vt(vt({},F),{},{isFocused:D&&!r,getRootProps:ie,getInputProps:ee,rootRef:A,inputRef:N,open:le(H)})}function WV(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},Jf),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},Jf);default:return e}}function c1(){}const qV={isImage:e=>e.type.includes("image")},UV=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(qV.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Aw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Aw(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(vo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Io,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(wy,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(vo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Io,{className:"text-danger"})})]})},KV=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(UV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),YV=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(KV,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),GV=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(A_,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),ZV=({idle:e=GV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:c,isDragActive:l}=l1({onDrop:a});return b.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[b.jsx("input",{...c(r),name:r.name,id:r.name}),b.jsx(YV,{onDeleteFile:t,isDragActive:l,idle:e,files:r.files??o})]})},XV=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})},u1=40,QV=e=>b.jsx(E.Fragment,{children:e.children}),JV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},d1=[],ej=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(tr,{children:t.children})})}),tj=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),nj={List:ej,Item:tj},rj=e=>{const t=Pt(),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(),c=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(c>a.width)return i(!0)},[r]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(Mc,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},oj=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:c,selectedLabel:l,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},y)=>{const v=E.useMemo(()=>new vn(r.map(ee=>[ee.value,ee])),[r]),x=E.useRef(null),T=E.useRef(null),w=h.value??h.defaultValue??d1,S=Pt(),[C,k]=E.useState(0),[I,_]=E.useState(!1),[M,L]=E.useState(""),[$,A]=E.useState(()=>{const ee=new vn;return w.forEach(q=>{const ne=v.get(q);return ne?ee.set(q,ne):void 0}),ee}),N=E.useMemo(()=>Array.from($.keys()),[$]),[O,V]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,ne)=>ee.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,B]=E.useState(null),D=E.useRef(d1),z=m&&M!==""?[{value:M,label:M,"data-dynamic":"true"},...r]:r,J=M.length===0?z:tf(z,"value",[{key:"value",value:M},{key:"label",value:M}]),X=rf(I,"block-only"),Q=J.filter(ee=>ee.hidden!==!0),Z=Q.length===0,{x:Y,y:G,strategy:j,refs:R,context:K}=mr({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Uo,middleware:[ta(4),Ix({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ti(R.reference.current,window.innerHeight),De=Math.min(ne<u1?me:ne,me,ee.availableHeight),Ue=Q.length===0?u1:Math.min(De,me,ne),Xe=`${x.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Xe,maxWidth:Xe,height:Ue})}})]}),ae=d0(K,JV),{getReferenceProps:H,getFloatingProps:be,getItemProps:Ce}=gr([Jr(K,{role:"listbox"}),Qr(K),Ws(K,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>B(q=>ee??q)})]);E.useEffect(()=>{if(!I)return k(0);const ee=R.reference;if(ee.current===null)return;const q=Ti(ee.current,window.innerHeight);setTimeout(()=>k(Math.min(q,Q.length*40)),100)},[M,I,R.reference]),E.useEffect(()=>{h.value&&A(new vn(h.value.map(ee=>[ee,v.get(ee)])))},[h.value,v]),E.useEffect(()=>{const ee=R.reference.current;if(ee)return Si(ee)},[]);const _e=(ee,q)=>{const ne=$.clone(Ue=>Ue.has(ee.value)?Ue.remove(ee.value):Ue.set(ee.value,ee));A(ne);const me=R.reference.current;if(!me)return;const De=ne.map(Ue=>Ue.value);me==null||me.setAttribute("data-value",JSON.stringify(De)),g&&g(De),V(Ue=>Ue.concat(ee.label??"")),L(""),B(q)},Re=ee=>{const q=ee.target.value;return L(q),!I&&q===""?_(!0):(ee.target.name=h.name||"",q?_(!0):void 0)},le=()=>{var ee;_(!0),L(""),(ee=R.reference.current)==null||ee.focus()},we=()=>{_(!0),L("")},ce=()=>{var ee;(ee=R.reference.current)==null||ee.setAttribute("data-value","[]"),L(""),_(!1),A(new vn),g==null||g([])},Se=h.id||h.name,ie=$.map((ee,q)=>b.jsx(Mc,{size:"small",icon:b.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),_e(ee,q),_(!1)},children:b.jsx(os,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),de={height:Z?"0":$.size===0?C-49:C-86};return b.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[b.jsx(Hu,{size:20}),b.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),$?b.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("li",{...H({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:R.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),value:I?M:O||$,className:Oe("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",h.className),children:b.jsx(rj,{label:l,children:ie})}),b.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:y,required:f,defaultValue:h.value||N||void 0}),b.jsx(Zr,{preserveTabOrder:!0,children:I?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...be({ref:R.setFloating,style:{...ae.styles,top:G??0,position:j,left:Y}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-80 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:[b.jsx("input",{autoFocus:!0,value:M,onChange:Re,title:h.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:ee=>{var q,ne;if(ee.key==="ArrowDown"){let me=F+1;return me>Q.length-1&&(me=0),(q=T.current)==null||q.scrollIntoView({index:me}),B(me)}if(ee.key==="ArrowUp"){let me=F-1;return me<0&&(me=Q.length-1),(ne=T.current)==null||ne.scrollIntoView({index:me}),B(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),_(!1);if(ee.key==="Enter"){if(F!==null&&Q[F])return ee.preventDefault(),_e(Q[F],F);if(Q.length===1)return ee.preventDefault(),_e(Q[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 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"}),Z?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,Z?null:b.jsx(ft.div,{initial:!1,"data-floating":"true",ref:X,animate:{height:Z?"auto":C},style:de,className:"max-h-80 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=R.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*Q.length;return wi.flushSync(()=>k(ne+2))},children:b.jsx(Of,{ref:T,hidden:Z,data:Q,components:nj,style:de,className:"max-h-80 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const ne=q.Render??QV,me=$.has(q.value)||$.has(q.label??""),De=F===ee,Ue=q.label??q.value;return b.jsxs("button",{"data-value":q.value,...Ce({ref:Xe=>void(D.current[ee]=Xe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>_e(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||De?"bg-floating-hover text-floating-foreground":""}`,children:[b.jsx(Lf,{onChange:dd,checked:me,"aria-checked":me,onClick:Xe=>{Xe.stopPropagation(),_e(q,ee)}}),b.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),$.size===0?null:b.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:ie})]})}):null})]})}),ij=({children:e,className:t="",size:n,...r})=>b.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:[b.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),oo=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:c,optionalText:l,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const y=Pt(),v=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const w=new AbortController,S=v.current,C=Si(v.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=v.current)==null?void 0:w.focus()};return b.jsx(ya,{info:n,left:f,error:m,form:g.form,loading:c,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:l,labelClassName:i,placeholder:g.placeholder,right:b.jsxs("label",{htmlFor:x,children:[p,b.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Hu,{size:20}),b.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:b.jsxs("select",{...g,id:x,name:x,value:g.value,required:e,ref:Hn(h,v),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Oe("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:[b.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:`${x}-select-option-${w.value}`}))]})})});function f1(e,[t,n]){return Math.min(n,Math.max(t,e))}function ci(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 p1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function h1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=p1(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():p1(e[o],null)}}}}function io(...e){return P.useCallback(h1(...e),e)}function m1(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),c=n.length;n=[...n,a];const l=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[c])||s,h=P.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,children:f})};l.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,m=P.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const o=()=>{const i=n.map(a=>P.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,aj(o,...t)]}function aj(...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:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function g1(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function sj({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=lj({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=g1(n),c=P.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else o(l)},[i,e,o,s]);return[a,c]}function lj({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=g1(t);return P.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var cj=P.createContext(void 0);function uj(e){const t=P.useContext(cj);return e||t||"ltr"}function dj(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var fj=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{};function pj(e){const[t,n]=P.useState(void 0);return fj(()=>{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 c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.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 ep(e){const t=hj(e),n=P.forwardRef((r,o)=>{const{children:i,...a}=r,s=P.Children.toArray(i),c=s.find(gj);if(c){const l=c.props.children,u=s.map(d=>d===c?P.Children.count(l)>1?P.Children.only(null):P.isValidElement(l)?l.props.children:null:d);return b.jsx(t,{...a,ref:o,children:P.isValidElement(l)?P.cloneElement(l,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hj(e){const t=P.forwardRef((n,r)=>{const{children:o,...i}=n;if(P.isValidElement(o)){const a=yj(o),s=vj(i,o.props);return o.type!==P.Fragment&&(s.ref=r?h1(r,a):a),P.cloneElement(o,s)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mj=Symbol("radix.slottable");function gj(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mj}function vj(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 yj(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 bj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],hl=bj.reduce((e,t)=>{const n=ep(`Primitive.${t}`),r=P.forwardRef((o,i)=>{const{asChild:a,...s}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xj(e){const t=e+"CollectionProvider",[n,r]=m1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:y}=g,v=E.useRef(null),x=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:x,collectionRef:v,children:y})};a.displayName=t;const s=e+"CollectionSlot",c=ep(s),l=E.forwardRef((g,h)=>{const{scope:y,children:v}=g,x=i(s,y),T=io(h,x.collectionRef);return b.jsx(c,{ref:T,children:v})});l.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ep(u),f=E.forwardRef((g,h)=>{const{scope:y,children:v,...x}=g,T=E.useRef(null),w=io(h,T),S=i(u,y);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...x}),()=>void S.itemMap.delete(T))),b.jsx(p,{[d]:"",ref:w,children:v})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,C)=>x.indexOf(S.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:f},m,r]}var v1=["PageUp","PageDown"],y1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],b1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ui="Slider",[tp,wj,Sj]=xj(ui),[x1,AR]=m1(ui,[Sj]),[Tj,ml]=x1(ui),w1=P.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=P.useRef(new Set),y=P.useRef(0),x=a==="horizontal"?Ej:Cj,[T=[],w]=sj({prop:u,defaultProp:l,onChange:M=>{var $;($=[...h.current][y.current])==null||$.focus(),d(M)}}),S=P.useRef(T);function C(M){const L=Ij(T,M);_(M,L)}function k(M){_(M,y.current)}function I(){const M=S.current[y.current];T[y.current]!==M&&p(T)}function _(M,L,{commit:$}={commit:!1}){const A=Nj(i),N=Fj(Math.round((M-r)/i)*i+r,A),O=f1(N,[r,o]);w((V=[])=>{const F=Aj(V,O,L);if(Dj(F,c*i)){y.current=F.indexOf(O);const B=String(F)!==String(V);return B&&$&&p(F),B?F:V}else return V})}return b.jsx(Tj,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:h.current,values:T,orientation:a,form:m,children:b.jsx(tp.Provider,{scope:e.__scopeSlider,children:b.jsx(tp.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ci(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,T.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:L})=>{if(!s){const N=v1.includes(M.key)||M.shiftKey&&y1.includes(M.key)?10:1,O=y.current,V=T[O],F=i*N*L;_(V+F,O,{commit:!0})}}})})})})});w1.displayName=ui;var[S1,T1]=x1(ui,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Ej=P.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,p]=P.useState(null),f=io(t,x=>p(x)),m=P.useRef(void 0),g=uj(o),h=g==="ltr",y=h&&!i||!h&&i;function v(x){const T=m.current||d.getBoundingClientRect(),w=[0,T.width],C=op(w,y?[n,r]:[r,n]);return m.current=T,C(x-T.left)}return b.jsx(S1,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(E1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const T=v(x.clientX);a==null||a(T)},onSlideMove:x=>{const T=v(x.clientX);s==null||s(T)},onSlideEnd:()=>{m.current=void 0,c==null||c()},onStepKeyDown:x=>{const w=b1[y?"from-left":"from-right"].includes(x.key);l==null||l({event:x,direction:w?-1:1})}})})}),Cj=P.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=P.useRef(null),d=io(t,u),p=P.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),y=[0,h.height],x=op(y,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return b.jsx(S1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:b.jsx(E1,{"data-orientation":"vertical",...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const y=b1[f?"from-bottom":"from-top"].includes(g.key);c==null||c({event:g,direction:y?-1:1})}})})}),E1=P.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=ml(ui,n);return b.jsx(hl.span,{...l,ref:t,onKeyDown:ci(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):v1.concat(y1).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:ci(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ci(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ci(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),C1="SliderTrack",k1=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ml(C1,n);return b.jsx(hl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});k1.displayName=C1;var np="SliderRange",P1=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ml(np,n),i=T1(np,n),a=P.useRef(null),s=io(t,a),c=o.values.length,l=o.values.map(p=>_1(p,o.min,o.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return b.jsx(hl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});P1.displayName=np;var rp="SliderThumb",A1=P.forwardRef((e,t)=>{const n=wj(e.__scopeSlider),[r,o]=P.useState(null),i=io(t,s=>o(s)),a=P.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(kj,{...e,ref:i,index:a})}),kj=P.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ml(rp,n),s=T1(rp,n),[c,l]=P.useState(null),u=io(t,v=>l(v)),d=c?a.form||!!c.closest("form"):!0,p=pj(c),f=a.values[r],m=f===void 0?0:_1(f,a.min,a.max),g=_j(r,a.values.length),h=p==null?void 0:p[s.size],y=h?Oj(h,m,s.direction):0;return P.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${y}px)`},children:[b.jsx(tp.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(hl.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:ci(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(Pj,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});A1.displayName=rp;var Pj=e=>{const{value:t,...n}=e,r=P.useRef(null),o=dj(t);return P.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&c){const l=new Event("input",{bubbles:!0});c.call(i,t),i.dispatchEvent(l)}},[o,t]),b.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function Aj(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function _1(e,t,n){const i=100/(n-t)*(e-t);return f1(i,[0,100])}function _j(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Ij(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 Oj(e,t,n){const r=e/2,i=op([0,50],[0,r]);return(r-i(t)*n)*n}function Mj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Dj(e,t){if(t>0){const n=Mj(e);return Math.min(...n)>=t}return!0}function op(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 Nj(e){return(String(e).split(".")[1]||"").length}function Fj(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Lj=w1,Vj=k1,jj=P1,$j=A1;const zj=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"));$e.number(i)&&n(i);const a=new MutationObserver(s=>{const c=s[0].target,l=Number(c.getAttribute("aria-valuenow"));n($e.number(l)?l:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),b.jsx(sf,{title:"",ref:r,as:$j,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},Rj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(jo()),s=r||o||[];return b.jsxs(Lj,{...i,defaultValue:r,value:o,className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[b.jsx(Vj,{className:"relative h-2 grow rounded-full bg-background",children:b.jsx(jj,{className:"absolute h-full rounded-full bg-primary"})}),s.map((c,l)=>b.jsx(zj,{tooltip:t??!1},`${a.current}-${l}`))]})},Bj=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,c]=E.useState(o.checked??!1),l=s,u=E.useRef(null),d=Dr(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);c(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 b.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:l,id:o.id||a,"data-trigger":"change","data-checked":l,disabled:o.disabled||t,onChange:f=>c(f.target.checked)}),b.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":l,"data-checked":l,"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:b.jsx("span",{"aria-hidden":"true","data-checked":l,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"})}),b.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Hj=e=>{const[t,n]=e_();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]")),c=s.every(u=>u.checked),l=s.indexOf(a);c&&l!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:i_(.075,{from:l})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Wj=Ew("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
211
|
-
`);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)}),qj=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},Uj={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Kj=e=>{const t=E.useRef(null),n=qj(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.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:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(Of,{height:n,useWindowScroll:!0,data:e.source,components:Uj,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Lf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(vo,{children:b.jsx(Wu,{})})}),b.jsx("div",{})]})};var Yj=Object.defineProperty,I1=Object.getOwnPropertySymbols,Gj=Object.prototype.hasOwnProperty,Zj=Object.prototype.propertyIsEnumerable,O1=(e,t,n)=>t in e?Yj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xj=(e,t)=>{for(var n in t||(t={}))Gj.call(t,n)&&O1(e,n,t[n]);if(I1)for(var n of I1(t))Zj.call(t,n)&&O1(e,n,t[n]);return e},ip=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Qj=(e,t,n,r)=>vl(ip,e,t,n,r),di=e=>typeof e=="object",wr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!di(e)&&!di(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=>wr(e[r],t[r]))},Jj=(e,t)=>(di(e)||Array.isArray(e))&&t?e[t]:e,e$=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,gl=e=>/[0-9.]+/.test(e),M1=e=>["string","number"].includes(typeof e),D1=e=>e==null||(e==null?void 0:e.length)===0||e==="",N1={eq:wr,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:D1,notEmpty:e=>!D1(e),in:(e,t)=>ip(t,n=>wr(e,n)),notIn:(e,t)=>F1(t,n=>!wr(e,n))},t$=e=>{if(e in N1)return N1[e];throw new Error("Linq - Symbol not found")},fi=(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},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=t$(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},n$=(e,t,n,r)=>vl(fi,e,t,n,r),F1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},r$=(e,t,n,r)=>vl(F1,e,t,n,r),L1=e=>{if(e===null)return null;const t=Xj({},e);return Object.keys(t).forEach(n=>t[n]=di(e[n])?L1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},V1=(e,t)=>{if(di(t)){for(let n=0;n<e.length;n++){const r=e[n];if(wr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(wr(t,r))return!0}return!1},o$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},i$=e=>fi(e,(t,n,r)=>di(t)?n===r.findIndex(o=>wr(o,t)):n===r.indexOf(t)),a$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},j1=(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())},s$=(e,t)=>j1(e,n=>n[t]),$1=(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},l$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},c$=(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 gl(e)&&gl(t)?r.map(a=>Number.parseInt(a)):r},ap=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&gl(e)&&gl(t)){const o=[],[i,a]=l$(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return c$(e,t,r)},u$=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?ap(r,o,1):ap(r,i,Number.parseInt(o,10))}return M1(e)&&M1(t)?ap(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},sp=(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},z1=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},d$=(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)},f$=(e,t,n,r)=>vl(d$,e,t,n,r),R1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(e$(t))},B1=(e=>(e.Asc="asc",e.Desc="desc",e))(B1||{}),p$=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(p$(t)),m$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:fi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},g$=class $p{constructor(t=[]){this.array=t}static Range(...t){return u$(...t)}static New(t){return new $p(t)}Where(t,n,r){return this.array=n$(this.array,t,n,r),this}Some(t,n,r){return Qj(this.array,t,n,r)}All(t,n,r){return r$(this.array,t,n,r)}Reverse(){return this.array=z1(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=f$(this.array,t,n,r),this}Distinct(){return this.array=i$(this.array),this}First(t){return t===void 0?this.array[0]:a$(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?sp((n,r)=>n+r,0,this.array):sp((n,r)=>n+Jj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return s$(this.array,t)}GroupWith(t){return j1(this.array,t)}Except(t){return fi(this.array,n=>!V1(t,n))}Intersect(t){return fi(this.array,n=>V1(t,n))}OrderBy(t,n){let r;return r=t?R1(this.array,t):this.array.toSorted(),this.array=n==="desc"?z1(r):r,this}Includes(t){return ip(this.array,n=>wr(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 sp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map($1(this.array,n=>[t,n]))}Zip(t,n){return $1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:fi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new $p(L1(this.array))}ToObject(t){return o$(this.array,t)}Sort(t){return Array.isArray(t)?h$(this.array,t):R1(this.array,t)}Unique(t){return m$(this.array,t)}},H1=g$,lp={},W1;function v$(){return W1||(W1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(v){window.console.log(v)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const v=y.getItem(h);try{return JSON.parse(v)}catch{return v??null}},i=h=>Object.keys(h).reduce((y,v)=>({...y,[v]:o(v,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",c=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),l=new Set,u=()=>{const h=c();l.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:c,listener:h=>(l.add(h),()=>l.delete(h)),clearListeners:()=>l.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=p.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,v={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((w,S)=>{const C=S.parse(v);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=T,u()}},f=h=>{const y=new Set,v=x=>{h().removeItem(x);const T=i(h());y.forEach(w=>w(T))};return{delete:v,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const T=h().getItem(x);return!n(T)},deleteAll:()=>{t(h(),v),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,T)=>{h().setItem(x,JSON.stringify(T)),y.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(lp)),lp}var wa=v$();const cp=e=>e.headerLabel??e.thead??e.id,up=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var pi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(pi||{});const dp=e=>e.type==="number"?e.valueAsNumber:e.value,y$=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$={},x$=(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})},w$=(e,t,n=b$)=>{const r=Wr()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ad({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:x$(t,r==null?void 0:r.cols)},a=>{const s=c=>{const l=a.state(),u={...l,...c};return Wr()||wa.LocalStorage.set(`@components/table-${l.name}`,u),u};return s(a.state()),{set:c=>s(c)}});return{...o,...i,name:e}},S$=e=>{const t=Dr(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]},fp=(e,t,n,r={})=>{var l,u;const o=e.id,i=e.type??pi.Text,a=t[i]??[],s=((l=a.find(d=>d["data-default"]))==null?void 0:l.value)??((u=a[0])==null?void 0:u.value),c=n[s];return{id:jo(),operation:c,label:cp(e),name:o,type:i,value:"",...r}},pp=()=>{const e=Pt(),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(()=>({[pi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[pi.Boolean]:[t.is,t.isNot],[pi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},T$=e=>{const t=Pt(),n=pp(),r=()=>{const c=e.cols.at(0);e.set(l=>[...l,fp(c,n.options,n.operations)])},o=c=>{const l=c.target.dataset.id||"",u=c.target.value;e.set(d=>d.map(p=>{if(l!==p.id)return p;const f=e.cols.find(m=>u===m.id);return fp(f,n.options,n.operations,{value:""})}))},i=c=>{const l=c.target.dataset.id||"",u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,operation:n.operations[u]}:p))},a=c=>{const l=c.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==l))},s=c=>{const l=c.target.dataset.id||"",u=dp(c.target);e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(ti,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(S_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const l=n.options[c.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:o}),b.jsx(oo,{"data-id":c.id,onChange:i,value:c.operation.value,options:l,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ba,{"data-id":c.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:b.jsx(Io,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(qu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},E$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=pp(),i=s=>{const c=s.target.value,l=s.target.dataset.id||"";n(u=>u.map(d=>d.id===l?{...d,operation:o.operations[c]}:d))},a=s=>{const c=s.target.dataset.id||"",l=dp(s.target);n(u=>u.map(d=>d.id===c?{...d,value:l}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(Io,{className:"text-danger",size:14})})]})},C$=({item:e,onPointerDown:t})=>{const n=rs(0);return b.jsxs(gy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(w_,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},k$=e=>{var c;const t=Pt(),n=up(e.cols),r=r_(),[o,i]=E.useState(((c=e.groups[0])==null?void 0:c.thead)||""),a=l=>{var h;const u=l.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new H1(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(aT(m).map((y,v)=>{const x=m[y];return{...g,groupId:jo(),groupKey:d,index:v,rows:x,groupName:y}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(ti,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(P_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(oo,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(vo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Io,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(mE,{children:b.jsx(hy,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>b.jsx(C$,{item:l,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},l.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)),q1=(e,t,n)=>({label:t,id:jo(),type:n,value:e.id}),_$=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const c=e.cols[0];c&&e.set(l=>[...l,q1(c,n.asc.label,n.asc.value)])},i=c=>l=>{const u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))},a=c=>l=>{const u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,type:u}:p))},s=c=>{const l=c.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==l))};return b.jsx(E.Fragment,{children:b.jsx(ti,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(by,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(c=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(oo,{options:e.options,value:c.value,onChange:i(c.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(oo,{onChange:a(c.id),value:c.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":c.id,onClick:s,children:b.jsx(Io,{className:"text-danger",size:14})})]},`sorter-select-${c.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(qu,{size:14})," ",t.tableSortAddButton]})})]})})})},I$=e=>{const t=Pt(),[n,r]=E.useState(()=>{const s=e.sorters.find(c=>c.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 c=s.findIndex(u=>u.value===e.col.id),l=q1(e.col,n,n);return c===-1?[...s,l]:(s[c]=l,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=cp(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(g_,{size:14}):null,n==="desc"?b.jsx(m_,{size:14}):null,n==="undefined"?b.jsx(by,{size:14}):null]})},O$=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(T$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(_$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(k$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.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=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=dp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});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=Pt(),r=E.useMemo(()=>M$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return b.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.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=>b.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:b.jsx(E.Fragment,{children:typeof i=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.jsx(on,{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?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},N$=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 l=n.current,u=t.current;l===null||u===null||(u.style.left=`-${l.getBoundingClientRect().width+4}px`)},c=()=>o("opacity-100");return E.useEffect(()=>{const l=n.current;if(l===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(l),()=>u.disconnect()},[]),b.jsx("div",{ref:t,onMouseEnter:c,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:b.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},F$=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,c=cd(t,i.id),l=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?b.jsx(N$,{children:b.jsx(p,{col:i,row:t,rowIndex:e})}):null,b.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),b.jsx("span",{className:"relative",children:o?nf:l?b.jsx(E.Fragment,{children:b.jsx(l,{row:t,matrix:s,col:i,rowIndex:e,value:c})}):b.jsx(E.Fragment,{children:$e.nil(c)?"":c})}))})})},L$={top:0,left:0,right:0,bottom:-1},V$=e=>{var g;const t=Ff(),n=Pt(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=pp(),c=o?E_:C_,l=E.useRef(null),u=h=>{const y=h.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(x=>x.id!==y))},d=E.useCallback(h=>{if(h===null)return;l.current=h;const y=new AbortController;return h.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===B1.Asc?"ascending":"descending":"none",m=cp(e.header);return b.jsxs(gy,{...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:[b.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:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?b.jsx(ti,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),b.jsx(c,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"font-medium",children:m})]}),children:b.jsxs("ul",{className:"font-medium",children:[r.length===0?null:b.jsx(E.Fragment,{children:r.map(h=>b.jsx("li",{className:"my-1",children:b.jsx(E$,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(fp(e.header,s.options,s.operations))),children:[b.jsx(qu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?b.jsx(I$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(ft.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:L$,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:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(l.current===null)return;l.current.setAttribute("data-resized","true");const y=l.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);l.current.style.width=`${Math.abs(y+x)}px`}},onDoubleClick:()=>{l.current!==null&&(l.current.style.width="auto")},onDrag:(h,y)=>{if(l.current===null)return;l.current.setAttribute("data-resized","true");const v=l.current.getBoundingClientRect().width,x=y.delta.x;l.current.style.width=`${Math.abs(v+x)}px`}})]})},j$=e=>{const[t,n]=S$(e.setCols);return b.jsx(hy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:b.jsx(tr,{children:e.headers.map((r,o)=>b.jsx(V$,{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}`))})})},U1=E.createContext({}),$$=()=>E.useContext(U1),z$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(tr,{children:n.children})})),R$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),B$=E.forwardRef(({context:e,...t},n)=>{const r=$$(),o={...t==null?void 0:t.style,top:$e.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs hidden md:table-header-group group:sticky top-0 bg-transparent",ref:n})}),H$=E.forwardRef(({context:e,item:t,...n},r)=>b.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)??""}`})),W$=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),q$={TableHead:B$,Table:R$,TableBody:z$,TableRow:H$,TableFoot:W$},U$=[0,0,0,0,0,0,0,0,0,0],K$=e=>b.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?nf:b.jsx(Pb,{})}),Y$=()=>b.jsx(E.Fragment,{}),G$=()=>b.jsx(E.Fragment,{}),Z$=[],K1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:c=null,useControl:l=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=Dr(a),g=Dr(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return U$;if(l)return u.rows;const x=new H1(u.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:x.Where(T.name,T.operation.symbol,T.value)),r.length===0?x.Select():A$(x.Select(),r)},[u.loading,u.rows,l,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,T=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=m.current)==null||k.call(m),void f(!0)):f(!1)});return T.observe(x),()=>T.disconnect()},[g,m]);const y=h.length===0,v={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(hL,{useWindowScroll:!0,context:v,components:q$,totalCount:h.length,itemContent:y?Y$:F$,data:y?Z$:h,fixedFooterContent:p?G$:null,fixedHeaderContent:()=>b.jsx(j$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),y?b.jsx(K$,{loading:u.loading}):null,b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),c!==null?b.jsx(D$,{...c}):null]})},X$=(e,t)=>typeof t=="function"?t(e):t,yl=(e,t,n)=>e===t||n==null?void 0:n(t),Q$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Ff(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>up(e.cols),[e.cols]),[i,a]=ad({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const c=l=>u=>{const d=s.state();return{...d,[l]:X$(d[l],u)}};return{cols:c("cols"),sorters:c("sorters"),groups:c("groups"),filters:c("filters")}},{postMiddleware:[(s,c)=>{var l;return(l=e.set)==null||l.call(e,s),yl((c==null?void 0:c.filters)??[],s.filters??[],e.setFilters),yl((c==null?void 0:c.sorters)??[],s.sorters??[],e.setSorters),yl((c==null?void 0:c.groups)??[],s.groups??[],e.setGroups),yl((c==null?void 0:c.cols)??[],s.cols??[],e.setCols),s}]});return b.jsx(U1.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?b.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?b.jsx(K1,{...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}):b.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,c)=>b.jsx("div",{className:"min-w-full",children:b.jsx(K1,{...e,group:s,index:c,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}`))})]})})},J$=["INPUT","SELECT"],Y1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{J$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var hp,G1;function mp(){if(G1)return hp;G1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return hp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},hp}var gp,Z1;function X1(){if(Z1)return gp;Z1=1;var e=mp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),o=function(y){for(;y.length>1;){var v=y.pop(),x=v.obj[v.prop];if(n(x)){for(var T=[],w=0;w<x.length;++w)typeof x[w]<"u"&&T.push(x[w]);v.obj[v.prop]=T}}},i=function(y,v){for(var x=v&&v.plainObjects?{__proto__:null}:{},T=0;T<y.length;++T)typeof y[T]<"u"&&(x[T]=y[T]);return x},a=function h(y,v,x){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(n(y))y.push(v);else if(y&&typeof y=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var T=y;return n(y)&&!n(v)&&(T=i(y,x)),n(y)&&n(v)?(v.forEach(function(w,S){if(t.call(y,S)){var C=y[S];C&&typeof C=="object"&&w&&typeof w=="object"?y[S]=h(C,w,x):y.push(w)}else y[S]=w}),y):Object.keys(v).reduce(function(w,S){var C=v[S];return t.call(w,S)?w[S]=h(w[S],C,x):w[S]=C,w},T)},s=function(y,v){return Object.keys(v).reduce(function(x,T){return x[T]=v[T],x},y)},c=function(h,y,v){var x=h.replace(/\+/g," ");if(v==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},l=1024,u=function(y,v,x,T,w){if(y.length===0)return y;var S=y;if(typeof y=="symbol"?S=Symbol.prototype.toString.call(y):typeof y!="string"&&(S=String(y)),x==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",k=0;k<S.length;k+=l){for(var I=S.length>=l?S.slice(k,k+l):S,_=[],M=0;M<I.length;++M){var L=I.charCodeAt(M);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||w===e.RFC1738&&(L===40||L===41)){_[_.length]=I.charAt(M);continue}if(L<128){_[_.length]=r[L];continue}if(L<2048){_[_.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){_[_.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}M+=1,L=65536+((L&1023)<<10|I.charCodeAt(M)&1023),_[_.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}C+=_.join("")}return C},d=function(y){for(var v=[{obj:{o:y},prop:"o"}],x=[],T=0;T<v.length;++T)for(var w=v[T],S=w.obj[w.prop],C=Object.keys(S),k=0;k<C.length;++k){var I=C[k],_=S[I];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(v.push({obj:S,prop:I}),x.push(_))}return o(v),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},m=function(y,v){return[].concat(y,v)},g=function(y,v){if(n(y)){for(var x=[],T=0;T<y.length;T+=1)x.push(v(y[T]));return x}return v(y)};return gp={arrayToObject:i,assign:s,combine:m,compact:d,decode:c,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},gp}var vp,Q1;function ez(){if(Q1)return vp;Q1=1;var e=tT(),t=X1(),n=mp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},c=Date.prototype.toISOString,l=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:l,formatter:n.formatters[l],indices:!1,serializeDate:function(h){return c.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,y,v,x,T,w,S,C,k,I,_,M,L,$,A,N,O,V){for(var F=h,B=V,D=0,z=!1;(B=B.get(p))!==void 0&&!z;){var J=B.get(h);if(D+=1,typeof J<"u"){if(J===D)throw new RangeError("Cyclic object value");z=!0}typeof B.get(p)>"u"&&(D=0)}if(typeof I=="function"?F=I(y,F):F instanceof Date?F=L(F):v==="comma"&&i(F)&&(F=t.maybeMap(F,function(_e){return _e instanceof Date?L(_e):_e})),F===null){if(w)return k&&!N?k(y,u.encoder,O,"key",$):y;F=""}if(d(F)||t.isBuffer(F)){if(k){var X=N?y:k(y,u.encoder,O,"key",$);return[A(X)+"="+A(k(F,u.encoder,O,"value",$))]}return[A(y)+"="+A(String(F))]}var Q=[];if(typeof F>"u")return Q;var Z;if(v==="comma"&&i(F))N&&k&&(F=t.maybeMap(F,k)),Z=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))Z=I;else{var Y=Object.keys(F);Z=_?Y.sort(_):Y}var G=C?String(y).replace(/\./g,"%2E"):String(y),j=x&&i(F)&&F.length===1?G+"[]":G;if(T&&i(F)&&F.length===0)return j+"[]";for(var R=0;R<Z.length;++R){var K=Z[R],ae=typeof K=="object"&&K&&typeof K.value<"u"?K.value:F[K];if(!(S&&ae===null)){var H=M&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(F)?typeof v=="function"?v(j,H):j:j+(M?"."+H:"["+H+"]");V.set(h,D);var Ce=e();Ce.set(p,V),s(Q,g(ae,be,v,x,T,w,S,C,v==="comma"&&N&&i(F)?null:k,I,_,M,L,$,A,N,O,Ce))}}return Q},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");v=h.format}var x=n.formatters[v],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:v,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return vp=function(g,h){var y=g,v=m(h),x,T;typeof v.filter=="function"?(T=v.filter,y=T("",y)):i(v.filter)&&(T=v.filter,x=T);var w=[];if(typeof y!="object"||y===null)return"";var S=o[v.arrayFormat],C=S==="comma"&&v.commaRoundTrip;x||(x=Object.keys(y)),v.sort&&x.sort(v.sort);for(var k=e(),I=0;I<x.length;++I){var _=x[I],M=y[_];v.skipNulls&&M===null||s(w,f(M,_,S,C,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,k))}var L=w.join(v.delimiter),$=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),L.length>0?$+L:""},vp}var yp,J1;function tz(){if(J1)return yp;J1=1;var e=X1(),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,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=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",c=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,v=h.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var x=-1,T,w=m.charset;if(m.charsetSentinel)for(T=0;T<v.length;++T)v[T].indexOf("utf8=")===0&&(v[T]===s?w="utf-8":v[T]===a&&(w="iso-8859-1"),x=T,T=v.length);for(T=0;T<v.length;++T)if(T!==x){var S=v[T],C=S.indexOf("]="),k=C===-1?S.indexOf("="):C+1,I,_;k===-1?(I=m.decoder(S,r.decoder,w,"key"),_=m.strictNullHandling?null:""):(I=m.decoder(S.slice(0,k),r.decoder,w,"key"),_=e.maybeMap(i(S.slice(k+1),m,n(g[I])?g[I].length:0),function(L){return m.decoder(L,r.decoder,w,"value")})),_&&m.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),S.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var M=t.call(g,I);M&&m.duplicates==="combine"?g[I]=e.combine(g[I],_):(!M||m.duplicates==="last")&&(g[I]=_)}return g},l=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");h=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var T,w=p[x];if(w==="[]"&&m.parseArrays)T=m.allowEmptyArrays&&(v===""||m.strictNullHandling&&v===null)?[]:e.combine([],v);else{T=m.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,k=parseInt(C,10);!m.parseArrays&&C===""?T={0:v}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(T=[],T[k]=v):C!=="__proto__"&&(T[C]=v)}v=T}return v},u=function(f,m,g,h){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,T=g.depth>0&&v.exec(y),w=T?y.slice(0,T.index):y,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=x.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+y.slice(T.index)+"]")}return l(S,m,g,h)}},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 m=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 h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,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:m,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 yp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?c(p,m):p,h=m.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v<y.length;++v){var x=y[v],T=u(x,g[x],m,typeof p=="string");h=e.merge(h,T,m)}return m.allowSparse===!0?h:e.compact(h)},yp}var bp,eS;function nz(){if(eS)return bp;eS=1;var e=ez(),t=tz(),n=mp();return bp={formats:n,parse:t,stringify:e},bp}var rz=nz(),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 tS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(tS||(tS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sr=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}},oe=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 fn 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,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),r}static assert(t){if(!(t instanceof fn))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()}}fn.create=e=>new fn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.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 oe.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 oe.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 oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let oz=Sa;function xp(){return oz}const wp=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 c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ue(e,t){const n=xp(),r=wp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{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 Pe;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 qt.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 Pe;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 Pe=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),nS=e=>e.status==="aborted",rS=e=>e.status==="dirty",hi=e=>e.status==="valid",bl=e=>typeof Promise<"u"&&e instanceof Promise;function xl(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 oS(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}typeof SuppressedError=="function"&&SuppressedError;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ye||(ye={}));var Ea,Ca;class zn{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 iS=(e,t)=>{if(hi(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 fn(e.common.issues);return this._error=n,this._error}}};function Me(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 c,l;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:o}}class je{get description(){return this._def.description}_getType(t){return Sr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Sr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:Sr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(bl(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:Sr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return iS(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:Sr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return hi(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=>hi(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:Sr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(bl(o)?o:Promise.resolve(o));return iS(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:oe.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!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 Jn.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return Tl.create([this,t],this._def)}and(t){return El.create(this,t,this._def)}transform(t){return new Qn({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _l({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new cS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Il({...Me(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 Ol.create(this,t)}readonly(){return Ml.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const iz=/^c[^\s-]{8,}$/i,az=/^[0-9a-z]+$/,sz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lz=/^[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,cz=/^[a-z0-9_-]{21}$/i,uz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dz=/^[-+]?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)?)??$/,fz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Sp;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])$/,mz=/^(?:(?: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])$/,gz=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yz=/^([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}(=)?))?$/,aS="((\\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])))",xz=new RegExp(`^${aS}$`);function sS(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function wz(e){return new RegExp(`^${sS(e)}$`)}function Sz(e){let t=`${aS}T${sS(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 Tz(e,t){return!!((t==="v4"||!t)&&hz.test(e)||(t==="v6"||!t)&&gz.test(e))}function Ez(e,t){if(!uz.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 Cz(e,t){return!!((t==="v4"||!t)&&mz.test(e)||(t==="v6"||!t)&&vz.test(e))}class Gn extends je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),Pe}const r=new qt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Sp||(Sp=new RegExp(pz,"u")),Sp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")lz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")iz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")az.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:oe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"regex",code:oe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Sz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?wz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?dz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Tz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Ez(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Cz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:oe.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:oe.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new Gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){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,...ye.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,...ye.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ye.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gn({...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}}Gn.create=e=>{var t;return new Gn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function kz(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 ao extends je{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 ue(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),Pe}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?kz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.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,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&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)}}ao.create=e=>new ao({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class mi extends je{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 qt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.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 ue(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),Pe}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mi.create=e=>{var t;return new mi({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class Tp extends je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),Pe}return Zt(t.data)}}Tp.create=e=>new Tp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class ka extends je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),Pe}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_date}),Pe}const r=new qt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.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 ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,...Me(e)});class Ep extends je{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),Pe}return Zt(t.data)}}Ep.create=e=>new Ep({typeName:Ee.ZodSymbol,...Me(e)});class wl extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),Pe}return Zt(t.data)}}wl.create=e=>new wl({typeName:Ee.ZodUndefined,...Me(e)});class Sl extends je{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),Pe}return Zt(t.data)}}Sl.create=e=>new Sl({typeName:Ee.ZodNull,...Me(e)});class Cp extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}Cp.create=e=>new Cp({typeName:Ee.ZodAny,...Me(e)});class gi extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}gi.create=e=>new gi({typeName:Ee.ZodUnknown,...Me(e)});class Tr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Tr.create=e=>new Tr({typeName:Ee.ZodNever,...Me(e)});class kp extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),Pe}return Zt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodVoid,...Me(e)});class Rn extends je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),Pe;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?oe.too_big:oe.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ue(n,{code:oe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ue(n,{code:oe.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 zn(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new zn(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Rn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Rn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Rn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Rn.create=(e,t)=>new Rn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Me(t)});function vi(e){if(e instanceof wt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jn.create(vi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Rn?new Rn({...e._def,type:vi(e.element)}):e instanceof Jn?Jn.create(vi(e.unwrap())):e instanceof lo?lo.create(vi(e.unwrap())):e instanceof Xn?Xn.create(e.items.map(t=>vi(t))):e}class wt extends je{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 l=this._getOrReturnCtx(t);return ue(l,{code:oe.invalid_type,expected:fe.object,received:l.parsedType}),Pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Tr&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new zn(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Tr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(ue(o,{code:oe.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new zn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,p=await u.value;l.push({key:d,value:p,alwaysSet:u.alwaysSet})}return l}).then(l=>qt.mergeObjectSync(r,l)):qt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new wt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const c=(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=ye.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({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 wt({...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 wt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}deepPartial(){return vi(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 wt({...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 Jn;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return lS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Tr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Tr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Tr.create(),typeName:Ee.ZodObject,...Me(t)});class Tl extends je{_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 fn(s.ctx.common.issues));return ue(n,{code:oe.invalid_union,unionErrors:a}),Pe}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 c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new fn(c));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}Tl.create=(e,t)=>new Tl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Zn=e=>e instanceof kl?Zn(e.schema):e instanceof Qn?Zn(e.innerType()):e instanceof Pl?[e.value]:e instanceof so?e.options:e instanceof Al?qe.objectValues(e.enum):e instanceof _l?Zn(e._def.innerType):e instanceof wl?[void 0]:e instanceof Sl?[null]:e instanceof Jn?[void 0,...Zn(e.unwrap())]:e instanceof lo?[null,...Zn(e.unwrap())]:e instanceof cS||e instanceof Ml?Zn(e.unwrap()):e instanceof Il?Zn(e._def.innerType):[];class Pp extends je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),Pe;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}):(ue(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pe)}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=Zn(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 Pp({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Ap(e,t){const n=Sr(e),r=Sr(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 c=Ap(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.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],c=Ap(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class El extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(nS(i)||nS(a))return Pe;const s=Ap(i.value,a.value);return s.valid?((rS(i)||rS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:oe.invalid_intersection_types}),Pe)};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}))}}El.create=(e,t,n)=>new El({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Xn extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),Pe;if(r.data.length<this._def.items.length)return ue(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new zn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.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,...Me(t)})};class Cl extends je{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 ue(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),Pe;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new zn(r,s,r.path,s)),value:a._parse(new zn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new Cl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Cl({keyType:Gn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class _p extends je{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 ue(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),Pe;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,c],l)=>({key:o._parse(new zn(r,s,r.path,[l,"key"])),value:i._parse(new zn(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Pe;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Pe;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}_p.create=(e,t,n)=>new _p({valueType:t,keyType:e,typeName:Ee.ZodMap,...Me(n)});class yi extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),Pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:oe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ue(r,{code:oe.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(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Pe;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>i._parse(new zn(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new yi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new yi({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}yi.create=(e,t)=>new yi({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Me(t)});class Pa extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),Pe;function r(s,c){return wp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xp(),Sa].filter(l=>!!l),issueData:{code:oe.invalid_arguments,argumentsError:c}})}function o(s,c){return wp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xp(),Sa].filter(l=>!!l),issueData:{code:oe.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...c){const l=new fn([]),u=await s._def.args.parseAsync(c,i).catch(f=>{throw l.addIssue(r(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw l.addIssue(o(d,f)),l})})}else{const s=this;return Zt(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new fn([r(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new fn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Xn.create(t).rest(gi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Xn.create([]).rest(gi.create()),returns:n||gi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class kl extends je{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})}}kl.create=(e,t)=>new kl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class Pl extends je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pl.create=(e,t)=>new Pl({value:e,typeName:Ee.ZodLiteral,...Me(t)});function lS(e,t){return new so({values:e,typeName:Ee.ZodEnum,...Me(t)})}class so extends je{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:qe.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ea)||oS(this,Ea,new Set(this._def.values)),!xl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Pe}return Zt(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 so.create(t,{...this._def,...n})}exclude(t,n=this._def){return so.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,so.create=lS;class Al extends je{constructor(){super(...arguments),Ca.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 ue(r,{expected:qe.joinValues(o),received:r.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ca)||oS(this,Ca,new Set(qe.getValidEnumValues(this._def.values))),!xl(this,Ca).has(t.data)){const o=qe.objectValues(n);return ue(r,{received:r.data,code:oe.invalid_enum_value,options:o}),Pe}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,Al.create=(e,t)=>new Al({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Aa extends je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),Pe;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ee.ZodPromise,...Me(t)});class Qn extends je{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=>{ue(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Pe;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Pe:c.status==="dirty"||n.value==="dirty"?Ta(c.value):c});{if(n.value==="aborted")return Pe;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Pe:s.status==="dirty"||n.value==="dirty"?Ta(s.value):s}}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c 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"?Pe:(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"?Pe:(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(!hi(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=>hi(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,...Me(n)}),Qn.createWithPreprocess=(e,t,n)=>new Qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class Jn extends je{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jn.create=(e,t)=>new Jn({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class lo extends je{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ee.ZodNullable,...Me(t)});class _l extends je{_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}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Il extends je{_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 bl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Ip extends je{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),Pe}return{status:"valid",value:t.data}}}Ip.create=e=>new Ip({typeName:Ee.ZodNaN,...Me(e)});class cS extends je{_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 Ol extends je{_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"?Pe:i.status==="dirty"?(n.dirty(),Ta(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"?Pe: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 Ol({in:t,out:n,typeName:Ee.ZodPipeline})}}class Ml extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(hi(o)&&(o.value=Object.freeze(o.value)),o);return bl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Ee.ZodReadonly,...Me(t)}),wt.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={})),Gn.create,ao.create,Ip.create,mi.create,Tp.create,ka.create,Ep.create,wl.create,Sl.create,Cp.create,gi.create,Tr.create,kp.create,Rn.create,wt.create,wt.strictCreate,Tl.create,Pp.create,El.create,Xn.create,Cl.create,_p.create,yi.create,Pa.create,kl.create,Pl.create,so.create,Al.create,Aa.create,Qn.create,Jn.create,lo.create,Qn.createWithPreprocess,Ol.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]}}},uS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),Sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):uS(t),o=structuredClone(e);return Az(o,r,n),o},_z=(e,t)=>e.localeCompare(t),_a={},dS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return fS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=dS(e._def.innerType);return t==="ZodArray"?n??[]:n}},fS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,dS(n)])),pS=(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]=pS(i,o):n[r]=o||i)}return n},Iz={sort:_z,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},hS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return rz.parse(n.toString(),Iz)},co=(e,t)=>uS(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),Er=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Op=e=>{const t=e.dataset.target;if(!t)return Er(e);const n=document.querySelector(`[data-origin="${t}"]`);return Er(n||e)},Oz={state:{},loading:!1,useOnChange:!1},mS=e=>e.dataset.target||e.name,Mz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return Pz(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},Dz=(e,t,n=Oz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>$e.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??fS(e)??{}),c=E.useCallback(v=>{var I;const x=v.target,T=v.currentTarget;if(x.dataset.optional==="true")return;const S=mS(x),C=Op(x)||(T?Er(T):""),k=co(S,e);if(x.setAttribute("data-initialized","true"),k){const _=k.safeParse(C),M=_.success?void 0:((I=_.error.issues[0])==null?void 0:I.message)??"";o(L=>Sn(L??{},S,M))}},[]),l=E.useCallback(v=>x=>{const T=x.currentTarget,w=Object.values(i.current).reduce((C,k)=>{var $;const I=k.element,_=k.schema.safeParse(Er(I));if(I.dataset.ignore==="ignore"||_.success)return C;const M=($=_.error.issues[0])==null?void 0:$.message;I.setAttribute("data-initialized","true");const L=I.dataset.name||I.name||"";return Sn(C,L,M)},{}),S=$e.empty(w)?null:w;o(S),console.error(S),v==null||v({form:T,errors:S||{}})},[]),u=(v,x=_a)=>{const T=co(v,e),w=S=>{var k;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>Sn(I,v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,S)};return{...x,loading:n.loading,name:v,id:v,onChange:w,form:t,date:$e.string(a[v])?new Date(a[v]):a[v],required:x.required??!T.isOptional(),error:r==null?void 0:r[v],ref:S=>{S!==null&&(i.current[v]={element:S,schema:T})}}},d=(v,x=_a)=>{const T=co(v,e);return{...x,name:v,id:v,onChange:S=>{var k;const C=S.target.value;s(I=>Sn(I,v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,S)},form:t,loading:n.loading,onInvalid:c,error:Ir(r,v,void 0),value:Ir(a,v,void 0)||"",required:x.required??!T.isOptional(),ref:S=>S!==null?i.current[v]={element:S,schema:T}:void 0}},p=(v,x=_a)=>{const T=co(v,e);return{...x,name:v,id:v,onChange:S=>{var k;const C=S.target.checked;s(I=>Sn(I??{},v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,S)},form:t,loading:n.loading,onInvalid:c,error:Ir(r,v,void 0),required:x.required??!T.isOptional(),ref:S=>S!==null?void(i.current[v]={element:S,schema:T}):void 0}},f=(v,x=_a)=>{const T=co(v,e),w=S=>{var k,I;(k=S.persist)==null||k.call(S);const C=S.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,S),s(_=>Sn(_,v,C))};return{...x,loading:n.loading,name:v,id:v,onChange:w,form:t,onInvalid:c,error:Ir(r,v,void 0),required:x.required??!T.isOptional(),value:Ir(a,v,void 0)||(x==null?void 0:x.value)||"",type:$e.instance(T,ao)?"number":(x==null?void 0:x.type)??"text",ref:S=>S===null?void 0:i.current[v]={element:S,schema:T}}},m=(v,x=_a)=>{const T=co(v,e),w=T._def.typeName==="ZodNumber";return{...x,name:v,id:v,onChange:C=>{var I,_;(I=C.persist)==null||I.call(C);const k=w?C.target.valueAsNumber:C.target.value;(_=x==null?void 0:x.onChange)==null||_.call(x,C),s(M=>Sn(M,v,k))},form:t,loading:n.loading,onInvalid:c,error:Ir(r,v,void 0),required:x.required??!T.isOptional(),type:w?"number":(x==null?void 0:x.type)??"text",value:Ir(a,v,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[v]={element:C,schema:T})}};E.useEffect(()=>{const v=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(Er(w)),C=M=>{var O;const L=mS(M.target);if(!L)return!1;const $=M.target,A=Op(M.target)||(M.relatedTarget?Er(M.relatedTarget):""),N=T.schema.safeParse(A);if($.setAttribute("value",A),N.success)return w.setCustomValidity(""),o(V=>{if($e.null(V))return null;const F=Sn(V,L,void 0);return $e.empty(V)||$e.nil(V)||$e.empty(F)?null:F}),!1;if(w.required){const V=((O=N.error.issues[0])==null?void 0:O.message)||"";w.setCustomValidity(V),o(F=>{if($e.null(F))return null;const B=Sn(F,L,V||void 0);return $e.empty(B)?null:B})}return!1},k=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:k.signal});const _=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:_,unsubscribe:()=>k.abort()}});return v.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>v.forEach(T=>T.unsubscribe())});const g=v=>x=>{var _;x.preventDefault();const T=x.currentTarget;let w=hS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(M=>{if(M.tagName==="SELECT"){const L=M;w=Sn(w,L.name,L.value)}if(M.tagName==="INPUT"){const L=M,$=Op(L)||(L?Er(L):"");w=Sn(w,L.dataset.target||L.name,$)}});const C=pS(w,a),k=e.safeParse(C),I=()=>{var M;Y1(T),(M=n.interceptor)==null||M.clear()};if(k.success){const M=JSON.stringify(k.data);return T.setAttribute("data-json",M),(_=n.interceptor)==null||_.clear(),v==null?void 0:v(x,{form:T,event:x,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),v==null?void 0:v(x,{form:T,json:w,event:x,reset:I,data:w,success:!1,errors:k.error.issues.map(M=>({message:M.message,path:M.path.map(L=>String(L))}))})},h=v=>cd(a,v)||"",y=v=>({...v,id:t,name:t});return E.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:l,controller:y,datepicker:u,name:t,disabled:r!==null}},Nz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Fz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},gS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},vS={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"},yS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Lz={name:"dark",zIndex:yS,rounded:gS,spacing:vS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},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%)"},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%)"}}}},Vz={rounded:gS,spacing:vS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:yS,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%)"},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%)"}}}},jz=Lz,$z=Vz,zz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return b.jsx(Vo.Provider,{value:t,children:e.children})},Rz=()=>{const e=E.useContext(Vo);return e?e.parser:gs.hsla};te.Alert=O_,te.Autocomplete=FL,te.Button=vo,te.Calendar=kb,te.Card=pd,te.Checkbox=Lf,te.ColType=pi,te.Collapse=Cy,te.CommandPalette=H2,te.ComponentsProvider=zz,te.Context=Vo,te.DatePicker=VL,te.Dict=vn,te.Dropdown=ti,te.Empty=Pb,te.Expand=W2,te.FileUpload=ZV,te.Form=XV,te.Input=ba,te.InputFeedback=Tw,te.InputField=ya,te.Menu=K2,te.MenuItem=U2,te.Modal=T0,te.MultiSelect=oj,te.Notifications=ED,te.Polymorph=on,te.Radiobox=ij,te.RenderOnView=JT,te.Select=oo,te.Slider=Rj,te.Stats=CD,te.Switch=Bj,te.Tab=_D,te.Table=Q$,te.Tabs=PD,te.Tag=Mc,te.TaskList=Hj,te.Textarea=Wj,te.Timeline=ID,te.TimelineItem=Cs,te.Toolbar=Y2,te.Tooltip=sf,te.TransferList=Kj,te.createColumns=y$,te.createCssProperties=vM,te.createDesignTokens=mb,te.createFormStorage=Mz,te.createOptionCols=up,te.createStyles=hM,te.createTheme=gM,te.createTokenStyles=yM,te.css=Oe,te.defaultDarkTheme=jz,te.defaultLightTheme=$z,te.defaultTranslations=ys,te.defaultTweaks=bs,te.dispatchInput=em,te.formReset=Y1,te.formToJson=hS,te.getCoords=GT,te.getJsonForm=Nz,te.getRemainingSize=Ti,te.getSchemaShape=co,te.hasVerticalScroll=tm,te.initializeInputDataset=Si,te.isMobile=xb,te.isReactComponent=YT,te.isReactFC=Oc,te.isSsr=Wr,te.mergeRefs=Hn,te.negate=xM,te.noop=dd,te.parsers=gs,te.path=cd,te.reduceTokens=Hr,te.safeRegex=ud,te.splitInto=bb,te.useColorParser=Rz,te.useForm=Dz,te.useLocale=ld,te.useNotification=SD,te.usePrevious=Fz,te.useReactive=tx,te.useTablePreferences=w$,te.useTranslations=Pt,te.uuid=jo,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
210
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i1(e,t){if(e){if(typeof e=="string")return Zf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zf(e,t)}}function Zf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RV(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 BV(e){if(Array.isArray(e))return e}function a1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a1(Object(n),!0).forEach(function(r){Xf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(e,t){if(e==null)return{};var n=HV(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 HV(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Qf=E.forwardRef(function(e,t){var n=e.children,r=pl(e,MV),o=l1(r),i=o.open,a=pl(o,DV);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});Qf.displayName="Dropzone";var s1={disabled:!1,getFilesFromEvent:JL,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Qf.defaultProps=s1,Qf.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var Jf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function l1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},s1),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,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,_=E.useMemo(function(){return _V(n)},[n]),M=E.useMemo(function(){return AV(n)},[n]),L=E.useMemo(function(){return typeof h=="function"?h:c1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:c1},[g]),A=E.useRef(null),N=E.useRef(null),O=E.useReducer(WV,Jf),V=Gf(O,2),F=V[0],B=V[1],D=F.isFocused,R=F.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&PV()),X=function(){!Q.current&&R&&setTimeout(function(){if(N.current){var ne=N.current.files;ne.length||(B({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[N,R,$,Q]);var J=E.useRef([]),Z=function(ne){A.current&&A.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",n1,!1),document.addEventListener("drop",Z,!1)),function(){x&&(document.removeEventListener("dragover",n1),document.removeEventListener("drop",Z))}},[A,x]),E.useEffect(function(){return!r&&v&&A.current&&A.current.focus(),function(){}},[A,v,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),G=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(LV(J.current),[q.target]),fl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(dl(q)&&!C)){var me=ne.length,De=me>0&&TV({files:ne,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ue=me>0&&!De;B({isDragAccept:De,isDragReject:Ue,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(ne){return Y(ne)})},[o,c,Y,C,_,a,i,s,l,I]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=fl(q);if(ne&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(q),!1},[d,C]),z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=J.current.filter(function(De){return A.current&&A.current.contains(De)}),me=ne.indexOf(q.target);me!==-1&&ne.splice(me,1),J.current=ne,!(ne.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fl(q)&&u&&u(q))},[A,u,C]),K=E.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Xe=e1(Ue,_),Lt=Gf(Xe,2),Tn=Lt[0],Bn=Lt[1],Cr=t1(Ue,a,i),kr=Gf(Cr,2),Pr=kr[0],W=kr[1],U=I?I(Ue):null;if(Tn&&Pr&&!U)me.push(Ue);else{var Be=[Bn,W];U&&(Be=Be.concat(U)),De.push({file:Ue,errors:Be.filter(function(rt){return rt})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[SV]})}),me.splice(0)),B({acceptedFiles:me,fileRejections:De,isDragReject:De.length>0,type:"setFiles"}),p&&p(me,De,ne),De.length>0&&m&&m(De,ne),me.length>0&&f&&f(me,ne)},[B,s,_,a,i,l,p,f,m,I]),ae=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],fl(q)&&Promise.resolve(o(q)).then(function(ne){dl(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),B({type:"reset"})},[o,K,Y,C]),H=E.useCallback(function(){if(Q.current){B({type:"openDialog"}),L();var q={multiple:s,types:M};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),B({type:"closeDialog"})}).catch(function(ne){IV(ne)?($(ne),B({type:"closeDialog"})):OV(ne)?(Q.current=!1,N.current?(N.current.value=null,N.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(ne)});return}N.current&&(B({type:"openDialog"}),L(),N.current.value=null,N.current.click())},[B,L,$,y,K,Y,M,s]),be=E.useCallback(function(q){!A.current||!A.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[A,H]),Ce=E.useCallback(function(){B({type:"focus"})},[]),_e=E.useCallback(function(){B({type:"blur"})},[]),Re=E.useCallback(function(){S||(kV()?setTimeout(H,0):H())},[S,H]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return T?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},ie=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.role,Ue=q.onKeyDown,Xe=q.onFocus,Lt=q.onBlur,Tn=q.onClick,Bn=q.onDragEnter,Cr=q.onDragOver,kr=q.onDragLeave,Pr=q.onDrop,W=pl(q,NV);return vt(vt(Xf({onKeyDown:we($n(Ue,be)),onFocus:we($n(Xe,Ce)),onBlur:we($n(Lt,_e)),onClick:le($n(Tn,Re)),onDragEnter:ce($n(Bn,G)),onDragOver:ce($n(Cr,j)),onDragLeave:ce($n(kr,z)),onDrop:ce($n(Pr,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,be,Ce,_e,Re,G,j,z,ae,w,T,r]),de=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Xe=pl(q,FV),Lt=Xf({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le($n(De,ae)),onClick:le($n(Ue,de)),tabIndex:-1},me,N);return vt(vt({},Lt),Xe)}},[N,n,s,ae,r]);return vt(vt({},F),{},{isFocused:D&&!r,getRootProps:ie,getInputProps:ee,rootRef:A,inputRef:N,open:le(H)})}function WV(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},Jf),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},Jf);default:return e}}function c1(){}const qV={isImage:e=>e.type.includes("image")},UV=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(qV.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Aw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Aw(e.file.size)})},[e.file]),t.type==="img"?b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[b.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(vo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Io,{})})]}):b.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[b.jsxs("header",{className:"flex flex-row items-center gap-4",children:[b.jsx(wy,{size:48}),b.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[b.jsx("span",{children:e.file.name}),b.jsx("span",{children:t.size})]})]}),b.jsx(vo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:b.jsx(Io,{className:"text-danger"})})]})},KV=e=>b.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>b.jsx(UV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),YV=e=>e.isDragActive?b.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?b.jsx(KV,{onDeleteFile:e.onDeleteFile,files:e.files}):b.jsx(E.Fragment,{children:e.idle}),GV=b.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[b.jsx(A_,{size:64}),b.jsxs("p",{children:["You can drag your files or"," ",b.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),ZV=({idle:e=GV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=l1({onDrop:a});return b.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[b.jsx("input",{...l(r),name:r.name,id:r.name}),b.jsx(YV,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},XV=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return b.jsx("form",{...e,onSubmit:t})},u1=40,QV=e=>b.jsx(E.Fragment,{children:e.children}),JV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},d1=[],ej=E.forwardRef(function(t,n){return b.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:b.jsx(tr,{children:t.children})})}),tj=E.forwardRef(function({item:t,context:n,...r},o){return b.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),nj={List:ej,Item:tj},rj=e=>{const t=Pt(),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]),b.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?b.jsxs(Mc,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},oj=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:m=!1,onChangeOptions:g,...h},y)=>{const v=E.useMemo(()=>new vn(r.map(ee=>[ee.value,ee])),[r]),x=E.useRef(null),S=E.useRef(null),w=h.value??h.defaultValue??d1,T=Pt(),[C,k]=E.useState(0),[I,_]=E.useState(!1),[M,L]=E.useState(""),[$,A]=E.useState(()=>{const ee=new vn;return w.forEach(q=>{const ne=v.get(q);return ne?ee.set(q,ne):void 0}),ee}),N=E.useMemo(()=>Array.from($.keys()),[$]),[O,V]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,ne)=>ee.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,B]=E.useState(null),D=E.useRef(d1),R=m&&M!==""?[{value:M,label:M,"data-dynamic":"true"},...r]:r,Q=M.length===0?R:tf(R,"value",[{key:"value",value:M},{key:"label",value:M}]),X=rf(I,"block-only"),J=Q.filter(ee=>ee.hidden!==!0),Z=J.length===0,{x:Y,y:G,strategy:j,refs:z,context:K}=mr({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Uo,middleware:[ta(4),Ix({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ti(z.reference.current,window.innerHeight),De=Math.min(ne<u1?me:ne,me,ee.availableHeight),Ue=J.length===0?u1:Math.min(De,me,ne),Xe=`${x.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Xe,maxWidth:Xe,height:Ue})}})]}),ae=d0(K,JV),{getReferenceProps:H,getFloatingProps:be,getItemProps:Ce}=gr([Jr(K,{role:"listbox"}),Qr(K),Ws(K,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>B(q=>ee??q)})]);E.useEffect(()=>{if(!I)return k(0);const ee=z.reference;if(ee.current===null)return;const q=Ti(ee.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[M,I,z.reference]),E.useEffect(()=>{h.value&&A(new vn(h.value.map(ee=>[ee,v.get(ee)])))},[h.value,v]),E.useEffect(()=>{const ee=z.reference.current;if(ee)return Si(ee)},[]);const _e=(ee,q)=>{const ne=$.clone(Ue=>Ue.has(ee.value)?Ue.remove(ee.value):Ue.set(ee.value,ee));A(ne);const me=z.reference.current;if(!me)return;const De=ne.map(Ue=>Ue.value);me==null||me.setAttribute("data-value",JSON.stringify(De)),g&&g(De),V(Ue=>Ue.concat(ee.label??"")),L(""),B(q)},Re=ee=>{const q=ee.target.value;return L(q),!I&&q===""?_(!0):(ee.target.name=h.name||"",q?_(!0):void 0)},le=()=>{var ee;_(!0),L(""),(ee=z.reference.current)==null||ee.focus()},we=()=>{_(!0),L("")},ce=()=>{var ee;(ee=z.reference.current)==null||ee.setAttribute("data-value","[]"),L(""),_(!1),A(new vn),g==null||g([])},Se=h.id||h.name,ie=$.map((ee,q)=>b.jsx(Mc,{size:"small",icon:b.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),_e(ee,q),_(!1)},children:b.jsx(os,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),de={height:Z?"0":$.size===0?C-49:C-86};return b.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:b.jsxs("span",{className:"flex items-center gap-0.5",children:[n,b.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[b.jsx(Hu,{size:20}),b.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?b.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:b.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.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:[b.jsx("li",{...H({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),value:I?M:O||$,className:Oe("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",h.className),children:b.jsx(rj,{label:c,children:ie})}),b.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:y,required:f,defaultValue:h.value||N||void 0}),b.jsx(Zr,{preserveTabOrder:!0,children:I?b.jsx(Jo,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:b.jsxs("div",{...be({ref:z.setFloating,style:{...ae.styles,top:G??0,position:j,left:Y}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-80 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:[b.jsx("input",{autoFocus:!0,value:M,onChange:Re,title:h.title,placeholder:T.multiSelectInnerPlaceholder,onKeyDown:ee=>{var q,ne;if(ee.key==="ArrowDown"){let me=F+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),B(me)}if(ee.key==="ArrowUp"){let me=F-1;return me<0&&(me=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:me}),B(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),_(!1);if(ee.key==="Enter"){if(F!==null&&J[F])return ee.preventDefault(),_e(J[F],F);if(J.length===1)return ee.preventDefault(),_e(J[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 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"}),Z?b.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:b.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,Z?null:b.jsx(ft.div,{initial:!1,"data-floating":"true",ref:X,animate:{height:Z?"auto":C},style:de,className:"max-h-80 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return wi.flushSync(()=>k(ne+2))},children:b.jsx(Of,{ref:S,hidden:Z,data:J,components:nj,style:de,className:"max-h-80 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const ne=q.Render??QV,me=$.has(q.value)||$.has(q.label??""),De=F===ee,Ue=q.label??q.value;return b.jsxs("button",{"data-value":q.value,...Ce({ref:Xe=>void(D.current[ee]=Xe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>_e(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||De?"bg-floating-hover text-floating-foreground":""}`,children:[b.jsx(Lf,{onChange:dd,checked:me,"aria-checked":me,onClick:Xe=>{Xe.stopPropagation(),_e(q,ee)}}),b.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),$.size===0?null:b.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:ie})]})}):null})]})}),ij=({children:e,className:t="",size:n,...r})=>b.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:[b.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),oo=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:m,...g},h)=>{const y=Pt(),v=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const w=new AbortController,T=v.current,C=Si(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=v.current)==null?void 0:w.focus()};return b.jsx(ya,{info:n,left:f,error:m,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:b.jsxs("label",{htmlFor:x,children:[p,b.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[b.jsx(Hu,{size:20}),b.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:b.jsxs("select",{...g,id:x,name:x,value:g.value,required:e,ref:Hn(h,v),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Oe("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:[b.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:`${x}-select-option-${w.value}`}))]})})});function f1(e,[t,n]){return Math.min(n,Math.max(t,e))}function ci(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 p1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function h1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=p1(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():p1(e[o],null)}}}}function io(...e){return P.useCallback(h1(...e),e)}function m1(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,h=P.useMemo(()=>m,Object.values(m));return b.jsx(g.Provider,{value:h,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,m=P.useContext(f);if(m)return m;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=>P.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,aj(o,...t)]}function aj(...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 P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function g1(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function sj({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=lj({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=g1(n),l=P.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 lj({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),i=g1(t);return P.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var cj=P.createContext(void 0);function uj(e){const t=P.useContext(cj);return e||t||"ltr"}function dj(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var fj=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{};function pj(e){const[t,n]=P.useState(void 0);return fj(()=>{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 ep(e){const t=hj(e),n=P.forwardRef((r,o)=>{const{children:i,...a}=r,s=P.Children.toArray(i),l=s.find(gj);if(l){const c=l.props.children,u=s.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function hj(e){const t=P.forwardRef((n,r)=>{const{children:o,...i}=n;if(P.isValidElement(o)){const a=yj(o),s=vj(i,o.props);return o.type!==P.Fragment&&(s.ref=r?h1(r,a):a),P.cloneElement(o,s)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mj=Symbol("radix.slottable");function gj(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mj}function vj(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 yj(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 bj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],hl=bj.reduce((e,t)=>{const n=ep(`Primitive.${t}`),r=P.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xj(e){const t=e+"CollectionProvider",[n,r]=m1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:y}=g,v=E.useRef(null),x=E.useRef(new Map).current;return b.jsx(o,{scope:h,itemMap:x,collectionRef:v,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=ep(s),c=E.forwardRef((g,h)=>{const{scope:y,children:v}=g,x=i(s,y),S=io(h,x.collectionRef);return b.jsx(l,{ref:S,children:v})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ep(u),f=E.forwardRef((g,h)=>{const{scope:y,children:v,...x}=g,S=E.useRef(null),w=io(h,S),T=i(u,y);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...x}),()=>void T.itemMap.delete(S))),b.jsx(p,{[d]:"",ref:w,children:v})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((T,C)=>x.indexOf(T.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var v1=["PageUp","PageDown"],y1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],b1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ui="Slider",[tp,wj,Sj]=xj(ui),[x1,AR]=m1(ui,[Sj]),[Tj,ml]=x1(ui),w1=P.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:m,...g}=e,h=P.useRef(new Set),y=P.useRef(0),x=a==="horizontal"?Ej:Cj,[S=[],w]=sj({prop:u,defaultProp:c,onChange:M=>{var $;($=[...h.current][y.current])==null||$.focus(),d(M)}}),T=P.useRef(S);function C(M){const L=Ij(S,M);_(M,L)}function k(M){_(M,y.current)}function I(){const M=T.current[y.current];S[y.current]!==M&&p(S)}function _(M,L,{commit:$}={commit:!1}){const A=Nj(i),N=Fj(Math.round((M-r)/i)*i+r,A),O=f1(N,[r,o]);w((V=[])=>{const F=Aj(V,O,L);if(Dj(F,l*i)){y.current=F.indexOf(O);const B=String(F)!==String(V);return B&&$&&p(F),B?F:V}else return V})}return b.jsx(Tj,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:h.current,values:S,orientation:a,form:m,children:b.jsx(tp.Provider,{scope:e.__scopeSlider,children:b.jsx(tp.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:ci(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&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,S.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:L})=>{if(!s){const N=v1.includes(M.key)||M.shiftKey&&y1.includes(M.key)?10:1,O=y.current,V=S[O],F=i*N*L;_(V+F,O,{commit:!0})}}})})})})});w1.displayName=ui;var[S1,T1]=x1(ui,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Ej=P.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=P.useState(null),f=io(t,x=>p(x)),m=P.useRef(void 0),g=uj(o),h=g==="ltr",y=h&&!i||!h&&i;function v(x){const S=m.current||d.getBoundingClientRect(),w=[0,S.width],C=op(w,y?[n,r]:[r,n]);return m.current=S,C(x-S.left)}return b.jsx(S1,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(E1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=v(x.clientX);a==null||a(S)},onSlideMove:x=>{const S=v(x.clientX);s==null||s(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=b1[y?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),Cj=P.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=P.useRef(null),d=io(t,u),p=P.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),y=[0,h.height],x=op(y,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return b.jsx(S1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:b.jsx(E1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const y=b1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),E1=P.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ml(ui,n);return b.jsx(hl.span,{...c,ref:t,onKeyDown:ci(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):v1.concat(y1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ci(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:ci(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ci(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),C1="SliderTrack",k1=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ml(C1,n);return b.jsx(hl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});k1.displayName=C1;var np="SliderRange",P1=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ml(np,n),i=T1(np,n),a=P.useRef(null),s=io(t,a),l=o.values.length,c=o.values.map(p=>_1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(hl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});P1.displayName=np;var rp="SliderThumb",A1=P.forwardRef((e,t)=>{const n=wj(e.__scopeSlider),[r,o]=P.useState(null),i=io(t,s=>o(s)),a=P.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(kj,{...e,ref:i,index:a})}),kj=P.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ml(rp,n),s=T1(rp,n),[l,c]=P.useState(null),u=io(t,v=>c(v)),d=l?a.form||!!l.closest("form"):!0,p=pj(l),f=a.values[r],m=f===void 0?0:_1(f,a.min,a.max),g=_j(r,a.values.length),h=p==null?void 0:p[s.size],y=h?Oj(h,m,s.direction):0;return P.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${y}px)`},children:[b.jsx(tp.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(hl.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:ci(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(Pj,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});A1.displayName=rp;var Pj=e=>{const{value:t,...n}=e,r=P.useRef(null),o=dj(t);return P.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]),b.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function Aj(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function _1(e,t,n){const i=100/(n-t)*(e-t);return f1(i,[0,100])}function _j(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Ij(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 Oj(e,t,n){const r=e/2,i=op([0,50],[0,r]);return(r-i(t)*n)*n}function Mj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Dj(e,t){if(t>0){const n=Mj(e);return Math.min(...n)>=t}return!0}function op(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 Nj(e){return(String(e).split(".")[1]||"").length}function Fj(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Lj=w1,Vj=k1,jj=P1,$j=A1;const zj=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"));$e.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n($e.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),b.jsx(sf,{title:"",ref:r,as:$j,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},Rj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(jo()),s=r||o||[];return b.jsxs(Lj,{...i,defaultValue:r,value:o,className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[b.jsx(Vj,{className:"relative h-2 grow rounded-full bg-background",children:b.jsx(jj,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>b.jsx(zj,{tooltip:t??!1},`${a.current}-${c}`))]})},Bj=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=Dr(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.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 b.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[b.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[b.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)}),b.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:b.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"})}),b.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:b.jsx("span",{className:"font-medium text-foreground",children:e})})]}),b.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Hj=e=>{const[t,n]=e_();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:i_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),b.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Wj=Ew("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
211
|
+
`);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)}),qj=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},Uj={Item:E.forwardRef(function(t,n){return b.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return b.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Kj=e=>{const t=E.useRef(null),n=qj(t);return b.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[b.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:[b.jsx("header",{className:"border-b border-card-border pb-2"}),b.jsxs("div",{className:"px-8 space-y-2",children:[b.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),b.jsx(Of,{height:n,useWindowScroll:!0,data:e.source,components:Uj,itemContent:(r,o)=>b.jsx(E.Fragment,{children:b.jsx(Lf,{children:b.jsx(e.Item,{data:o})})})})]})]}),b.jsx("div",{children:b.jsx(vo,{children:b.jsx(Wu,{})})}),b.jsx("div",{})]})};var Yj=Object.defineProperty,I1=Object.getOwnPropertySymbols,Gj=Object.prototype.hasOwnProperty,Zj=Object.prototype.propertyIsEnumerable,O1=(e,t,n)=>t in e?Yj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xj=(e,t)=>{for(var n in t||(t={}))Gj.call(t,n)&&O1(e,n,t[n]);if(I1)for(var n of I1(t))Zj.call(t,n)&&O1(e,n,t[n]);return e},ip=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Qj=(e,t,n,r)=>vl(ip,e,t,n,r),di=e=>typeof e=="object",wr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!di(e)&&!di(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=>wr(e[r],t[r]))},Jj=(e,t)=>(di(e)||Array.isArray(e))&&t?e[t]:e,e$=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,gl=e=>/[0-9.]+/.test(e),M1=e=>["string","number"].includes(typeof e),D1=e=>e==null||(e==null?void 0:e.length)===0||e==="",N1={eq:wr,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:D1,notEmpty:e=>!D1(e),in:(e,t)=>ip(t,n=>wr(e,n)),notIn:(e,t)=>F1(t,n=>!wr(e,n))},t$=e=>{if(e in N1)return N1[e];throw new Error("Linq - Symbol not found")},fi=(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},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=t$(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},n$=(e,t,n,r)=>vl(fi,e,t,n,r),F1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},r$=(e,t,n,r)=>vl(F1,e,t,n,r),L1=e=>{if(e===null)return null;const t=Xj({},e);return Object.keys(t).forEach(n=>t[n]=di(e[n])?L1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},V1=(e,t)=>{if(di(t)){for(let n=0;n<e.length;n++){const r=e[n];if(wr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(wr(t,r))return!0}return!1},o$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},i$=e=>fi(e,(t,n,r)=>di(t)?n===r.findIndex(o=>wr(o,t)):n===r.indexOf(t)),a$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},j1=(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())},s$=(e,t)=>j1(e,n=>n[t]),$1=(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},l$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},c$=(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 gl(e)&&gl(t)?r.map(a=>Number.parseInt(a)):r},ap=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&gl(e)&&gl(t)){const o=[],[i,a]=l$(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return c$(e,t,r)},u$=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?ap(r,o,1):ap(r,i,Number.parseInt(o,10))}return M1(e)&&M1(t)?ap(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},sp=(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},z1=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},d$=(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)},f$=(e,t,n,r)=>vl(d$,e,t,n,r),R1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(e$(t))},B1=(e=>(e.Asc="asc",e.Desc="desc",e))(B1||{}),p$=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(p$(t)),m$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:fi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},g$=class $p{constructor(t=[]){this.array=t}static Range(...t){return u$(...t)}static New(t){return new $p(t)}Where(t,n,r){return this.array=n$(this.array,t,n,r),this}Some(t,n,r){return Qj(this.array,t,n,r)}All(t,n,r){return r$(this.array,t,n,r)}Reverse(){return this.array=z1(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=f$(this.array,t,n,r),this}Distinct(){return this.array=i$(this.array),this}First(t){return t===void 0?this.array[0]:a$(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?sp((n,r)=>n+r,0,this.array):sp((n,r)=>n+Jj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return s$(this.array,t)}GroupWith(t){return j1(this.array,t)}Except(t){return fi(this.array,n=>!V1(t,n))}Intersect(t){return fi(this.array,n=>V1(t,n))}OrderBy(t,n){let r;return r=t?R1(this.array,t):this.array.toSorted(),this.array=n==="desc"?z1(r):r,this}Includes(t){return ip(this.array,n=>wr(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 sp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map($1(this.array,n=>[t,n]))}Zip(t,n){return $1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:fi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new $p(L1(this.array))}ToObject(t){return o$(this.array,t)}Sort(t){return Array.isArray(t)?h$(this.array,t):R1(this.array,t)}Unique(t){return m$(this.array,t)}},H1=g$,lp={},W1;function v$(){return W1||(W1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(v){window.console.log(v)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const v=y.getItem(h);try{return JSON.parse(v)}catch{return v??null}},i=h=>Object.keys(h).reduce((y,v)=>({...y,[v]:o(v,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=p.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,v={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((w,T)=>{const C=T.parse(v);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=S,u()}},f=h=>{const y=new Set,v=x=>{h().removeItem(x);const S=i(h());y.forEach(w=>w(S))};return{delete:v,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const S=h().getItem(x);return!n(S)},deleteAll:()=>{t(h(),v),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,S)=>{h().setItem(x,JSON.stringify(S)),y.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(lp)),lp}var wa=v$();const cp=e=>e.headerLabel??e.thead??e.id,up=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var pi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(pi||{});const dp=e=>e.type==="number"?e.valueAsNumber:e.value,y$=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$={},x$=(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})},w$=(e,t,n=b$)=>{const r=Wr()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ad({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:x$(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Wr()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},S$=e=>{const t=Dr(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]},fp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??pi.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:jo(),operation:l,label:cp(e),name:o,type:i,value:"",...r}},pp=()=>{const e=Pt(),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(()=>({[pi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[pi.Boolean]:[t.is,t.isNot],[pi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},T$=e=>{const t=Pt(),n=pp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,fp(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(m=>u===m.id);return fp(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=dp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return b.jsx(E.Fragment,{children:b.jsx(ti,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(S_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),b.jsx(oo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),b.jsx(ba,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),b.jsx("div",{className:"mt-5 flex items-center justify-center",children:b.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:b.jsx(Io,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[b.jsx(qu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},E$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=pp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=dp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return b.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[b.jsx(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),b.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),b.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:b.jsx(Io,{className:"text-danger",size:14})})]})},C$=({item:e,onPointerDown:t})=>{const n=rs(0);return b.jsxs(gy,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[b.jsx("button",{type:"button",className:"cursor-grab",children:b.jsx(w_,{size:14})}),b.jsx("span",{children:e.groupName})]},e.groupId)},k$=e=>{var l;const t=Pt(),n=up(e.cols),r=r_(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new H1(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(aT(m).map((y,v)=>{const x=m[y];return{...g,groupId:jo(),groupKey:d,index:v,rows:x,groupName:y}}))},s=()=>e.setGroups([]);return b.jsx(E.Fragment,{children:b.jsxs(ti,{arrow:!1,title:t.tableGroupLabel,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(P_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[b.jsxs("div",{className:"flex flex-nowrap items-center",children:[b.jsx(oo,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),b.jsx(vo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:b.jsx(Io,{size:16,className:"text-danger"})})]}),e.groups.length>0?b.jsxs("section",{className:"my-4",children:[b.jsx("header",{children:b.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),b.jsx(mE,{children:b.jsx(hy,{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=>b.jsx(C$,{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)),q1=(e,t,n)=>({label:t,id:jo(),type:n,value:e.id}),_$=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,q1(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 b.jsx(E.Fragment,{children:b.jsx(ti,{title:t.tableSortDropdownTitle,trigger:b.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[b.jsx(by,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:b.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>b.jsxs("li",{className:"flex flex-nowrap gap-3",children:[b.jsx(oo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),b.jsx(oo,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),b.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:b.jsx(Io,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[b.jsx(qu,{size:14})," ",t.tableSortAddButton]})})]})})})},I$=e=>{const t=Pt(),[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=q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=cp(e.col);return b.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[b.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?b.jsx(g_,{size:14}):null,n==="desc"?b.jsx(m_,{size:14}):null,n==="undefined"?b.jsx(by,{size:14}):null]})},O$=e=>b.jsx("header",{className:"min-w-full mb-1",children:b.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[b.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[b.jsx("span",{children:b.jsx(T$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),b.jsx("span",{children:b.jsx(_$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),b.jsx("span",{children:b.jsx(k$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),b.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=>b.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[b.jsxs("span",{children:[b.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),b.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[b.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),b.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=dp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});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=Pt(),r=E.useMemo(()=>M$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return b.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[b.jsx("p",{children:b.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?b.jsxs(E.Fragment,{children:[b.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),b.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=>b.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),b.jsx("nav",{children:b.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:b.jsx(E.Fragment,{children:typeof i=="string"?b.jsx("li",{children:"..."}):b.jsx("li",{children:b.jsx(on,{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?b.jsx("li",{children:b.jsx(on,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},N$=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()},[]),b.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:b.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},F$=(e,t,n)=>{const r=n.cols,o=n.loading;return b.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=cd(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?b.jsx(N$,{children:b.jsx(p,{col:i,row:t,rowIndex:e})}):null,b.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),b.jsx("span",{className:"relative",children:o?nf:c?b.jsx(E.Fragment,{children:b.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):b.jsx(E.Fragment,{children:$e.nil(l)?"":l})}))})})},L$={top:0,left:0,right:0,bottom:-1},V$=e=>{var g;const t=Ff(),n=Pt(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=pp(),l=o?E_:C_,c=E.useRef(null),u=h=>{const y=h.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(x=>x.id!==y))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const y=new AbortController;return h.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===B1.Asc?"ascending":"descending":"none",m=cp(e.header);return b.jsxs(gy,{...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:[b.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:b.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?b.jsx(ti,{arrow:!0,trigger:b.jsxs("span",{children:[b.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),b.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:b.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",b.jsx("span",{className:"font-medium",children:m})]}),children:b.jsxs("ul",{className:"font-medium",children:[r.length===0?null:b.jsx(E.Fragment,{children:r.map(h=>b.jsx("li",{className:"my-1",children:b.jsx(E$,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),b.jsx("li",{children:b.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(fp(e.header,s.options,s.operations))),children:[b.jsx(qu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,b.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?b.jsx(I$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:b.jsx(ft.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:L$,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:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=y.delta.x;c.current.style.width=`${Math.abs(v+x)}px`}})]})},j$=e=>{const[t,n]=S$(e.setCols);return b.jsx(hy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:b.jsx(tr,{children:e.headers.map((r,o)=>b.jsx(V$,{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}`))})})},U1=E.createContext({}),$$=()=>E.useContext(U1),z$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:b.jsx(tr,{children:n.children})})),R$=E.forwardRef(({context:e,className:t="",...n},r)=>b.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),B$=E.forwardRef(({context:e,...t},n)=>{const r=$$(),o={...t==null?void 0:t.style,top:$e.number(r.sticky)?`${r.sticky}px`:void 0};return b.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs hidden md:table-header-group group:sticky top-0 bg-transparent",ref:n})}),H$=E.forwardRef(({context:e,item:t,...n},r)=>b.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)??""}`})),W$=E.forwardRef((e,t)=>e.context.loadingMore?b.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:b.jsx("tr",{role:"row",className:"bg-card-background",children:b.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:b.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),q$={TableHead:B$,Table:R$,TableBody:z$,TableRow:H$,TableFoot:W$},U$=[0,0,0,0,0,0,0,0,0,0],K$=e=>b.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?nf:b.jsx(Pb,{})}),Y$=()=>b.jsx(E.Fragment,{}),G$=()=>b.jsx(E.Fragment,{}),Z$=[],K1=({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),m=Dr(a),g=Dr(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return U$;if(c)return u.rows;const x=new H1(u.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:x.Where(S.name,S.operation.symbol,S.value)),r.length===0?x.Select():A$(x.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,S=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=m.current)==null||k.call(m),void f(!0)):f(!1)});return S.observe(x),()=>S.disconnect()},[g,m]);const y=h.length===0,v={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return b.jsxs("div",{className:"min-w-full",children:[b.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[b.jsx(hL,{useWindowScroll:!0,context:v,components:q$,totalCount:h.length,itemContent:y?Y$:F$,data:y?Z$:h,fixedFooterContent:p?G$:null,fixedHeaderContent:()=>b.jsx(j$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),y?b.jsx(K$,{loading:u.loading}):null,b.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?b.jsx(D$,{...l}):null]})},X$=(e,t)=>typeof t=="function"?t(e):t,yl=(e,t,n)=>e===t||n==null?void 0:n(t),Q$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Ff(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>up(e.cols),[e.cols]),[i,a]=ad({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:X$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),yl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),yl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),yl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),yl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return b.jsx(U1.Provider,{value:t,children:b.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?b.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?b.jsx(K1,{...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}):b.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>b.jsx("div",{className:"min-w-full",children:b.jsx(K1,{...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}`))})]})})},J$=["INPUT","SELECT"],Y1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{J$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var hp,G1;function mp(){if(G1)return hp;G1=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return hp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},hp}var gp,Z1;function X1(){if(Z1)return gp;Z1=1;var e=mp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),o=function(y){for(;y.length>1;){var v=y.pop(),x=v.obj[v.prop];if(n(x)){for(var S=[],w=0;w<x.length;++w)typeof x[w]<"u"&&S.push(x[w]);v.obj[v.prop]=S}}},i=function(y,v){for(var x=v&&v.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(x[S]=y[S]);return x},a=function h(y,v,x){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(n(y))y.push(v);else if(y&&typeof y=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var S=y;return n(y)&&!n(v)&&(S=i(y,x)),n(y)&&n(v)?(v.forEach(function(w,T){if(t.call(y,T)){var C=y[T];C&&typeof C=="object"&&w&&typeof w=="object"?y[T]=h(C,w,x):y.push(w)}else y[T]=w}),y):Object.keys(v).reduce(function(w,T){var C=v[T];return t.call(w,T)?w[T]=h(w[T],C,x):w[T]=C,w},S)},s=function(y,v){return Object.keys(v).reduce(function(x,S){return x[S]=v[S],x},y)},l=function(h,y,v){var x=h.replace(/\+/g," ");if(v==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(y,v,x,S,w){if(y.length===0)return y;var T=y;if(typeof y=="symbol"?T=Symbol.prototype.toString.call(y):typeof y!="string"&&(T=String(y)),x==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.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,_=[],M=0;M<I.length;++M){var L=I.charCodeAt(M);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||w===e.RFC1738&&(L===40||L===41)){_[_.length]=I.charAt(M);continue}if(L<128){_[_.length]=r[L];continue}if(L<2048){_[_.length]=r[192|L>>6]+r[128|L&63];continue}if(L<55296||L>=57344){_[_.length]=r[224|L>>12]+r[128|L>>6&63]+r[128|L&63];continue}M+=1,L=65536+((L&1023)<<10|I.charCodeAt(M)&1023),_[_.length]=r[240|L>>18]+r[128|L>>12&63]+r[128|L>>6&63]+r[128|L&63]}C+=_.join("")}return C},d=function(y){for(var v=[{obj:{o:y},prop:"o"}],x=[],S=0;S<v.length;++S)for(var w=v[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var I=C[k],_=T[I];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(v.push({obj:T,prop:I}),x.push(_))}return o(v),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},m=function(y,v){return[].concat(y,v)},g=function(y,v){if(n(y)){for(var x=[],S=0;S<y.length;S+=1)x.push(v(y[S]));return x}return v(y)};return gp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},gp}var vp,Q1;function ez(){if(Q1)return vp;Q1=1;var e=tT(),t=X1(),n=mp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,y,v,x,S,w,T,C,k,I,_,M,L,$,A,N,O,V){for(var F=h,B=V,D=0,R=!1;(B=B.get(p))!==void 0&&!R;){var Q=B.get(h);if(D+=1,typeof Q<"u"){if(Q===D)throw new RangeError("Cyclic object value");R=!0}typeof B.get(p)>"u"&&(D=0)}if(typeof I=="function"?F=I(y,F):F instanceof Date?F=L(F):v==="comma"&&i(F)&&(F=t.maybeMap(F,function(_e){return _e instanceof Date?L(_e):_e})),F===null){if(w)return k&&!N?k(y,u.encoder,O,"key",$):y;F=""}if(d(F)||t.isBuffer(F)){if(k){var X=N?y:k(y,u.encoder,O,"key",$);return[A(X)+"="+A(k(F,u.encoder,O,"value",$))]}return[A(y)+"="+A(String(F))]}var J=[];if(typeof F>"u")return J;var Z;if(v==="comma"&&i(F))N&&k&&(F=t.maybeMap(F,k)),Z=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))Z=I;else{var Y=Object.keys(F);Z=_?Y.sort(_):Y}var G=C?String(y).replace(/\./g,"%2E"):String(y),j=x&&i(F)&&F.length===1?G+"[]":G;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<Z.length;++z){var K=Z[z],ae=typeof K=="object"&&K&&typeof K.value<"u"?K.value:F[K];if(!(T&&ae===null)){var H=M&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(F)?typeof v=="function"?v(j,H):j:j+(M?"."+H:"["+H+"]");V.set(h,D);var Ce=e();Ce.set(p,V),s(J,g(ae,be,v,x,S,w,T,C,v==="comma"&&N&&i(F)?null:k,I,_,M,L,$,A,N,O,Ce))}}return J},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");v=h.format}var x=n.formatters[v],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:v,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return vp=function(g,h){var y=g,v=m(h),x,S;typeof v.filter=="function"?(S=v.filter,y=S("",y)):i(v.filter)&&(S=v.filter,x=S);var w=[];if(typeof y!="object"||y===null)return"";var T=o[v.arrayFormat],C=T==="comma"&&v.commaRoundTrip;x||(x=Object.keys(y)),v.sort&&x.sort(v.sort);for(var k=e(),I=0;I<x.length;++I){var _=x[I],M=y[_];v.skipNulls&&M===null||s(w,f(M,_,T,C,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,k))}var L=w.join(v.delimiter),$=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),L.length>0?$+L:""},vp}var yp,J1;function tz(){if(J1)return yp;J1=1;var e=X1(),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,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=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,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,v=h.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var x=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<v.length;++S)v[S].indexOf("utf8=")===0&&(v[S]===s?w="utf-8":v[S]===a&&(w="iso-8859-1"),x=S,S=v.length);for(S=0;S<v.length;++S)if(S!==x){var T=v[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,I,_;k===-1?(I=m.decoder(T,r.decoder,w,"key"),_=m.strictNullHandling?null:""):(I=m.decoder(T.slice(0,k),r.decoder,w,"key"),_=e.maybeMap(i(T.slice(k+1),m,n(g[I])?g[I].length:0),function(L){return m.decoder(L,r.decoder,w,"value")})),_&&m.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),T.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var M=t.call(g,I);M&&m.duplicates==="combine"?g[I]=e.combine(g[I],_):(!M||m.duplicates==="last")&&(g[I]=_)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");h=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var S,w=p[x];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(v===""||m.strictNullHandling&&v===null)?[]:e.combine([],v);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!m.parseArrays&&C===""?S={0:v}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(S=[],S[k]=v):C!=="__proto__"&&(S[C]=v)}v=S}return v},u=function(f,m,g,h){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=g.depth>0&&v.exec(y),w=S?y.slice(0,S.index):y,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=x.exec(y))!==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("["+y.slice(S.index)+"]")}return c(T,m,g,h)}},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 m=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 h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,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:m,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 yp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v<y.length;++v){var x=y[v],S=u(x,g[x],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},yp}var bp,eS;function nz(){if(eS)return bp;eS=1;var e=ez(),t=tz(),n=mp();return bp={formats:n,parse:t,stringify:e},bp}var rz=nz(),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 tS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(tS||(tS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sr=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}},oe=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 fn 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 fn))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()}}fn.create=e=>new fn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:n="Invalid function arguments";break;case oe.invalid_return_type:n="Invalid function return type";break;case oe.invalid_date:n="Invalid date";break;case oe.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 oe.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 oe.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 oe.custom:n="Invalid input";break;case oe.invalid_intersection_types:n="Intersection results could not be merged";break;case oe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let oz=Sa;function xp(){return oz}const wp=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ue(e,t){const n=xp(),r=wp({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{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 Pe;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 qt.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 Pe;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 Pe=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),nS=e=>e.status==="aborted",rS=e=>e.status==="dirty",hi=e=>e.status==="valid",bl=e=>typeof Promise<"u"&&e instanceof Promise;function xl(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 oS(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}typeof SuppressedError=="function"&&SuppressedError;var ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ye||(ye={}));var Ea,Ca;class zn{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 iS=(e,t)=>{if(hi(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 fn(e.common.issues);return this._error=n,this._error}}};function Me(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 je{get description(){return this._def.description}_getType(t){return Sr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Sr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:Sr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(bl(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:Sr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return iS(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:Sr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return hi(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=>hi(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:Sr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(bl(o)?o:Promise.resolve(o));return iS(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:oe.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 Jn.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return Tl.create([this,t],this._def)}and(t){return El.create(this,t,this._def)}transform(t){return new Qn({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _l({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new cS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Il({...Me(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 Ol.create(this,t)}readonly(){return Ml.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const iz=/^c[^\s-]{8,}$/i,az=/^[0-9a-z]+$/,sz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lz=/^[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,cz=/^[a-z0-9_-]{21}$/i,uz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dz=/^[-+]?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)?)??$/,fz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Sp;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])$/,mz=/^(?:(?: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])$/,gz=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yz=/^([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}(=)?))?$/,aS="((\\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])))",xz=new RegExp(`^${aS}$`);function sS(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function wz(e){return new RegExp(`^${sS(e)}$`)}function Sz(e){let t=`${aS}T${sS(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 Tz(e,t){return!!((t==="v4"||!t)&&hz.test(e)||(t==="v6"||!t)&&gz.test(e))}function Ez(e,t){if(!uz.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 Cz(e,t){return!!((t==="v4"||!t)&&mz.test(e)||(t==="v6"||!t)&&vz.test(e))}class Gn extends je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.string,received:i.parsedType}),Pe}const r=new qt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")fz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Sp||(Sp=new RegExp(pz,"u")),Sp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")lz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")cz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")iz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")az.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ulid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ue(o,{validation:"url",code:oe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"regex",code:oe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Sz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?wz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?dz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Tz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Ez(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Cz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:oe.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:oe.invalid_string,...ye.errToObj(r)})}_addCheck(t){return new Gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ye.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ye.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ye.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ye.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ye.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ye.errToObj(t)})}datetime(t){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,...ye.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,...ye.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ye.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ye.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ye.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ye.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ye.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ye.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ye.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ye.errToObj(n)})}nonempty(t){return this.min(1,ye.errToObj(t))}trim(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gn({...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}}Gn.create=e=>{var t;return new Gn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function kz(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 ao extends je{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 ue(i,{code:oe.invalid_type,expected:fe.number,received:i.parsedType}),Pe}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?kz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.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,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&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)}}ao.create=e=>new ao({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class mi extends je{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 qt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:oe.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 ue(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),Pe}gte(t,n){return this.setLimit("min",t,!0,ye.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ye.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ye.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ye.toString(n))}setLimit(t,n,r,o){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ye.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mi.create=e=>{var t;return new mi({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class Tp extends je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),Pe}return Zt(t.data)}}Tp.create=e=>new Tp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class ka extends je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_type,expected:fe.date,received:i.parsedType}),Pe}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_date}),Pe}const r=new qt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.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 ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ye.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ye.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,...Me(e)});class Ep extends je{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),Pe}return Zt(t.data)}}Ep.create=e=>new Ep({typeName:Ee.ZodSymbol,...Me(e)});class wl extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),Pe}return Zt(t.data)}}wl.create=e=>new wl({typeName:Ee.ZodUndefined,...Me(e)});class Sl extends je{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),Pe}return Zt(t.data)}}Sl.create=e=>new Sl({typeName:Ee.ZodNull,...Me(e)});class Cp extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}Cp.create=e=>new Cp({typeName:Ee.ZodAny,...Me(e)});class gi extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}gi.create=e=>new gi({typeName:Ee.ZodUnknown,...Me(e)});class Tr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Tr.create=e=>new Tr({typeName:Ee.ZodNever,...Me(e)});class kp extends je{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),Pe}return Zt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodVoid,...Me(e)});class Rn extends je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),Pe;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ue(n,{code:a?oe.too_big:oe.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ue(n,{code:oe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ue(n,{code:oe.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 zn(n,a,n.path,s)))).then(a=>qt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new zn(n,a,n.path,s)));return qt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Rn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Rn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Rn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Rn.create=(e,t)=>new Rn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Me(t)});function vi(e){if(e instanceof wt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jn.create(vi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Rn?new Rn({...e._def,type:vi(e.element)}):e instanceof Jn?Jn.create(vi(e.unwrap())):e instanceof lo?lo.create(vi(e.unwrap())):e instanceof Xn?Xn.create(e.items.map(t=>vi(t))):e}class wt extends je{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 ue(c,{code:oe.invalid_type,expected:fe.object,received:c.parsedType}),Pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Tr&&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 zn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Tr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ue(o,{code:oe.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 zn(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=>qt.mergeObjectSync(r,c)):qt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ye.errToObj,new wt({...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=ye.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({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 wt({...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 wt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}deepPartial(){return vi(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 wt({...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 Jn;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return lS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Tr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Tr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Tr.create(),typeName:Ee.ZodObject,...Me(t)});class Tl extends je{_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 fn(s.ctx.common.issues));return ue(n,{code:oe.invalid_union,unionErrors:a}),Pe}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 fn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}Tl.create=(e,t)=>new Tl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Zn=e=>e instanceof kl?Zn(e.schema):e instanceof Qn?Zn(e.innerType()):e instanceof Pl?[e.value]:e instanceof so?e.options:e instanceof Al?qe.objectValues(e.enum):e instanceof _l?Zn(e._def.innerType):e instanceof wl?[void 0]:e instanceof Sl?[null]:e instanceof Jn?[void 0,...Zn(e.unwrap())]:e instanceof lo?[null,...Zn(e.unwrap())]:e instanceof cS||e instanceof Ml?Zn(e.unwrap()):e instanceof Il?Zn(e._def.innerType):[];class Pp extends je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),Pe;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}):(ue(n,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pe)}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=Zn(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 Pp({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Ap(e,t){const n=Sr(e),r=Sr(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=Ap(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=Ap(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 El extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(nS(i)||nS(a))return Pe;const s=Ap(i.value,a.value);return s.valid?((rS(i)||rS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:oe.invalid_intersection_types}),Pe)};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}))}}El.create=(e,t,n)=>new El({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Xn extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),Pe;if(r.data.length<this._def.items.length)return ue(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:oe.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 zn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>qt.mergeArray(n,a)):qt.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,...Me(t)})};class Cl extends je{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 ue(r,{code:oe.invalid_type,expected:fe.object,received:r.parsedType}),Pe;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new zn(r,s,r.path,s)),value:a._parse(new zn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?qt.mergeObjectAsync(n,o):qt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new Cl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Cl({keyType:Gn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class _p extends je{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 ue(r,{code:oe.invalid_type,expected:fe.map,received:r.parsedType}),Pe;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new zn(r,s,r.path,[c,"key"])),value:i._parse(new zn(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 Pe;(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 Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}_p.create=(e,t,n)=>new _p({valueType:t,keyType:e,typeName:Ee.ZodMap,...Me(n)});class yi extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),Pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(r,{code:oe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ue(r,{code:oe.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 Pe;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 zn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new yi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new yi({...this._def,maxSize:{value:t,message:ye.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}yi.create=(e,t)=>new yi({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Me(t)});class Pa extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),Pe;function r(s,l){return wp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return wp({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...l){const c=new fn([]),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 Zt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new fn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new fn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Xn.create(t).rest(gi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Xn.create([]).rest(gi.create()),returns:n||gi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class kl extends je{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})}}kl.create=(e,t)=>new kl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class Pl extends je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pl.create=(e,t)=>new Pl({value:e,typeName:Ee.ZodLiteral,...Me(t)});function lS(e,t){return new so({values:e,typeName:Ee.ZodEnum,...Me(t)})}class so extends je{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:qe.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ea)||oS(this,Ea,new Set(this._def.values)),!xl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Pe}return Zt(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 so.create(t,{...this._def,...n})}exclude(t,n=this._def){return so.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,so.create=lS;class Al extends je{constructor(){super(...arguments),Ca.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 ue(r,{expected:qe.joinValues(o),received:r.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ca)||oS(this,Ca,new Set(qe.getValidEnumValues(this._def.values))),!xl(this,Ca).has(t.data)){const o=qe.objectValues(n);return ue(r,{received:r.data,code:oe.invalid_enum_value,options:o}),Pe}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,Al.create=(e,t)=>new Al({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Aa extends je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ue(n,{code:oe.invalid_type,expected:fe.promise,received:n.parsedType}),Pe;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ee.ZodPromise,...Me(t)});class Qn extends je{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=>{ue(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Pe;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Pe:l.status==="dirty"||n.value==="dirty"?Ta(l.value):l});{if(n.value==="aborted")return Pe;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Pe:s.status==="dirty"||n.value==="dirty"?Ta(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"?Pe:(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"?Pe:(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(!hi(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=>hi(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,...Me(n)}),Qn.createWithPreprocess=(e,t,n)=>new Qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class Jn extends je{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jn.create=(e,t)=>new Jn({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class lo extends je{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ee.ZodNullable,...Me(t)});class _l extends je{_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}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Il extends je{_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 bl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new fn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Ip extends je{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),Pe}return{status:"valid",value:t.data}}}Ip.create=e=>new Ip({typeName:Ee.ZodNaN,...Me(e)});class cS extends je{_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 Ol extends je{_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"?Pe:i.status==="dirty"?(n.dirty(),Ta(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"?Pe: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 Ol({in:t,out:n,typeName:Ee.ZodPipeline})}}class Ml extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(hi(o)&&(o.value=Object.freeze(o.value)),o);return bl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Ee.ZodReadonly,...Me(t)}),wt.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={})),Gn.create,ao.create,Ip.create,mi.create,Tp.create,ka.create,Ep.create,wl.create,Sl.create,Cp.create,gi.create,Tr.create,kp.create,Rn.create,wt.create,wt.strictCreate,Tl.create,Pp.create,El.create,Xn.create,Cl.create,_p.create,yi.create,Pa.create,kl.create,Pl.create,so.create,Al.create,Aa.create,Qn.create,Jn.create,lo.create,Qn.createWithPreprocess,Ol.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]}}},uS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),Sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):uS(t),o=structuredClone(e);return Az(o,r,n),o},_z=(e,t)=>e.localeCompare(t),_a={},dS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return fS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=dS(e._def.innerType);return t==="ZodArray"?n??[]:n}},fS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,dS(n)])),pS=(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]=pS(i,o):n[r]=o||i)}return n},Iz={sort:_z,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},hS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return rz.parse(n.toString(),Iz)},co=(e,t)=>uS(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),Er=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Op=e=>{const t=e.dataset.target;if(!t)return Er(e);const n=document.querySelector(`[data-origin="${t}"]`);return Er(n||e)},Oz={state:{},loading:!1,useOnChange:!1},mS=e=>e.dataset.target||e.name,Mz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return Pz(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},Dz=(e,t,n=Oz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>$e.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??fS(e)??{}),l=E.useCallback(v=>{var I;const x=v.target,S=v.currentTarget;if(x.dataset.optional==="true")return;const T=mS(x),C=Op(x)||(S?Er(S):""),k=co(T,e);if(x.setAttribute("data-initialized","true"),k){const _=k.safeParse(C),M=_.success?void 0:((I=_.error.issues[0])==null?void 0:I.message)??"";o(L=>Sn(L??{},T,M))}},[]),c=E.useCallback(v=>x=>{const S=x.currentTarget,w=Object.values(i.current).reduce((C,k)=>{var $;const I=k.element,_=k.schema.safeParse(Er(I));if(I.dataset.ignore==="ignore"||_.success)return C;const M=($=_.error.issues[0])==null?void 0:$.message;I.setAttribute("data-initialized","true");const L=I.dataset.name||I.name||"";return Sn(C,L,M)},{}),T=$e.empty(w)?null:w;o(T),console.error(T),v==null||v({form:S,errors:T||{}})},[]),u=(v,x=_a)=>{const S=co(v,e),w=T=>{var k;if(!T)return;const C=T instanceof Date?T.toISOString():T.target.value;s(I=>Sn(I,v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,T)};return{...x,loading:n.loading,name:v,id:v,onChange:w,form:t,date:$e.string(a[v])?new Date(a[v]):a[v],required:x.required??!S.isOptional(),error:r==null?void 0:r[v],ref:T=>{T!==null&&(i.current[v]={element:T,schema:S})}}},d=(v,x=_a)=>{const S=co(v,e);return{...x,name:v,id:v,onChange:T=>{var k;const C=T.target.value;s(I=>Sn(I,v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,T)},form:t,loading:n.loading,onInvalid:l,error:Ir(r,v,void 0),value:Ir(a,v,void 0)||"",required:x.required??!S.isOptional(),ref:T=>T!==null?i.current[v]={element:T,schema:S}:void 0}},p=(v,x=_a)=>{const S=co(v,e);return{...x,name:v,id:v,onChange:T=>{var k;const C=T.target.checked;s(I=>Sn(I??{},v,C)),(k=x==null?void 0:x.onChange)==null||k.call(x,T)},form:t,loading:n.loading,onInvalid:l,error:Ir(r,v,void 0),required:x.required??!S.isOptional(),ref:T=>T!==null?void(i.current[v]={element:T,schema:S}):void 0}},f=(v,x=_a)=>{const S=co(v,e),w=T=>{var k,I;(k=T.persist)==null||k.call(T);const C=T.target.value;(I=x==null?void 0:x.onChange)==null||I.call(x,T),s(_=>Sn(_,v,C))};return{...x,loading:n.loading,name:v,id:v,onChange:w,form:t,onInvalid:l,error:Ir(r,v,void 0),required:x.required??!S.isOptional(),value:Ir(a,v,void 0)||(x==null?void 0:x.value)||"",type:$e.instance(S,ao)?"number":(x==null?void 0:x.type)??"text",ref:T=>T===null?void 0:i.current[v]={element:T,schema:S}}},m=(v,x=_a)=>{const S=co(v,e),w=S._def.typeName==="ZodNumber";return{...x,name:v,id:v,onChange:C=>{var I,_;(I=C.persist)==null||I.call(C);const k=w?C.target.valueAsNumber:C.target.value;(_=x==null?void 0:x.onChange)==null||_.call(x,C),s(M=>Sn(M,v,k))},form:t,loading:n.loading,onInvalid:l,error:Ir(r,v,void 0),required:x.required??!S.isOptional(),type:w?"number":(x==null?void 0:x.type)??"text",value:Ir(a,v,void 0)||(x==null?void 0:x.value)||"",ref:C=>C===null?void 0:void(i.current[v]={element:C,schema:S})}};E.useEffect(()=>{const v=Object.values(i.current).map(S=>{const w=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,T=S.schema.safeParse(Er(w)),C=M=>{var O;const L=mS(M.target);if(!L)return!1;const $=M.target,A=Op(M.target)||(M.relatedTarget?Er(M.relatedTarget):""),N=S.schema.safeParse(A);if($.setAttribute("value",A),N.success)return w.setCustomValidity(""),o(V=>{if($e.null(V))return null;const F=Sn(V,L,void 0);return $e.empty(V)||$e.nil(V)||$e.empty(F)?null:F}),!1;if(w.required){const V=((O=N.error.issues[0])==null?void 0:O.message)||"";w.setCustomValidity(V),o(F=>{if($e.null(F))return null;const B=Sn(F,L,V||void 0);return $e.empty(B)?null:B})}return!1},k=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:k.signal});const _=w.dataset.shadow?!1:w.required?!T.success:!1;return{input:S,hasInitialError:_,unsubscribe:()=>k.abort()}});return v.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>v.forEach(S=>S.unsubscribe())});const g=v=>x=>{var _;x.preventDefault();const S=x.currentTarget;let w=hS(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(M=>{if(M.tagName==="SELECT"){const L=M;w=Sn(w,L.name,L.value)}if(M.tagName==="INPUT"){const L=M,$=Op(L)||(L?Er(L):"");w=Sn(w,L.dataset.target||L.name,$)}});const C=pS(w,a),k=e.safeParse(C),I=()=>{var M;Y1(S),(M=n.interceptor)==null||M.clear()};if(k.success){const M=JSON.stringify(k.data);return S.setAttribute("data-json",M),(_=n.interceptor)==null||_.clear(),v==null?void 0:v(x,{form:S,event:x,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),S.reportValidity(),v==null?void 0:v(x,{form:S,json:w,event:x,reset:I,data:w,success:!1,errors:k.error.issues.map(M=>({message:M.message,path:M.path.map(L=>String(L))}))})},h=v=>cd(a,v)||"",y=v=>({...v,id:t,name:t});return E.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(a))},[a]),{get:h,input:m,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,disabled:r!==null}},Nz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Fz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},gS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},vS={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"},yS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Lz={name:"dark",zIndex:yS,rounded:gS,spacing:vS,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},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%)"},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%)"}}}},Vz={rounded:gS,spacing:vS,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:yS,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%)"},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%)"}}}},jz=Lz,$z=Vz,zz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return b.jsx(Vo.Provider,{value:t,children:e.children})},Rz=()=>{const e=E.useContext(Vo);return e?e.parser:gs.hsla};te.Alert=O_,te.Autocomplete=FL,te.Button=vo,te.Calendar=kb,te.Card=pd,te.Checkbox=Lf,te.ColType=pi,te.Collapse=Cy,te.CommandPalette=H2,te.ComponentsProvider=zz,te.Context=Vo,te.DatePicker=VL,te.Dict=vn,te.Dropdown=ti,te.Empty=Pb,te.Expand=W2,te.FileUpload=ZV,te.Form=XV,te.Input=ba,te.InputFeedback=Tw,te.InputField=ya,te.Menu=K2,te.MenuItem=U2,te.Modal=T0,te.MultiSelect=oj,te.Notifications=ED,te.Polymorph=on,te.Radiobox=ij,te.RenderOnView=JT,te.Select=oo,te.Slider=Rj,te.Stats=CD,te.Switch=Bj,te.Tab=_D,te.Table=Q$,te.Tabs=PD,te.Tag=Mc,te.TaskList=Hj,te.Textarea=Wj,te.Timeline=ID,te.TimelineItem=Cs,te.Toolbar=Y2,te.Tooltip=sf,te.TransferList=Kj,te.createColumns=y$,te.createCssProperties=vM,te.createDesignTokens=mb,te.createFormStorage=Mz,te.createOptionCols=up,te.createStyles=hM,te.createTheme=gM,te.createTokenStyles=yM,te.css=Oe,te.defaultDarkTheme=jz,te.defaultLightTheme=$z,te.defaultTranslations=ys,te.defaultTweaks=bs,te.dispatchInput=em,te.formReset=Y1,te.formToJson=hS,te.getCoords=GT,te.getJsonForm=Nz,te.getRemainingSize=Ti,te.getSchemaShape=co,te.hasVerticalScroll=tm,te.initializeInputDataset=Si,te.isMobile=xb,te.isReactComponent=YT,te.isReactFC=Oc,te.isSsr=Wr,te.mergeRefs=Hn,te.negate=xM,te.noop=dd,te.parsers=gs,te.path=cd,te.reduceTokens=Hr,te.safeRegex=ud,te.splitInto=bb,te.useColorParser=Rz,te.useForm=Dz,te.useLocale=ld,te.useNotification=SD,te.usePrevious=Fz,te.useReactive=tx,te.useTablePreferences=w$,te.useTranslations=Pt,te.uuid=jo,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
212
212
|
//# sourceMappingURL=index.umd.js.map
|